Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Bump cosmwasm to v0.14.0 #472

Merged
merged 10 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ WORKDIR /code
COPY . /code/

# See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.14.0-beta3/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
RUN sha256sum /lib/libwasmvm_muslc.a | grep adea8f977601daa8daa9885e02b31ca6dd0ab6d4dbbd8ba2ccfa447ffebda37c
ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.14.0/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
RUN sha256sum /lib/libwasmvm_muslc.a | grep 220b85158d1ae72008f099a7ddafe27f6374518816dd5873fd8be272c5418026

# force it to use static lib (from above) not standard libgo_cosmwasm.so file
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc make update-swagger-docs build
Expand Down
10 changes: 6 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ import (
wasmtypes "github.com/terra-project/core/x/wasm/types"

bankwasm "github.com/terra-project/core/custom/bank/wasm"
distrwasm "github.com/terra-project/core/custom/distribution/wasm"
stakingwasm "github.com/terra-project/core/custom/staking/wasm"
marketwasm "github.com/terra-project/core/x/market/wasm"
oraclewasm "github.com/terra-project/core/x/oracle/wasm"
Expand Down Expand Up @@ -387,10 +388,11 @@ func NewTerraApp(

// register wasm msg parser & querier
app.WasmKeeper.RegisterMsgParsers(map[string]wasmtypes.WasmMsgParserInterface{
wasmtypes.WasmMsgParserRouteBank: bankwasm.NewWasmMsgParser(),
wasmtypes.WasmMsgParserRouteStaking: stakingwasm.NewWasmMsgParser(),
wasmtypes.WasmMsgParserRouteMarket: marketwasm.NewWasmMsgParser(),
wasmtypes.WasmMsgParserRouteWasm: wasmkeeper.NewWasmMsgParser(),
wasmtypes.WasmMsgParserRouteBank: bankwasm.NewWasmMsgParser(),
wasmtypes.WasmMsgParserRouteStaking: stakingwasm.NewWasmMsgParser(),
wasmtypes.WasmMsgParserRouteMarket: marketwasm.NewWasmMsgParser(),
wasmtypes.WasmMsgParserRouteWasm: wasmkeeper.NewWasmMsgParser(),
wasmtypes.WasmMsgParserRouteDistribution: distrwasm.NewWasmMsgParser(),
}, wasmkeeper.NewStargateWasmMsgParser(appCodec))
app.WasmKeeper.RegisterQueriers(map[string]wasmtypes.WasmQuerierInterface{
wasmtypes.WasmQueryRouteBank: bankwasm.NewWasmQuerier(app.BankKeeper),
Expand Down
216 changes: 189 additions & 27 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7300,6 +7300,10 @@ paths:
type: string
description: json formatted string
example: '{}'
admin:
type: string
description: bech32 encoded address
example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv
responses:
'200':
description: OK
Expand Down Expand Up @@ -7768,21 +7772,21 @@ paths:
description: Bad request
'500':
description: Internal Server Error
'/wasm/contracts/{contractAddress}/owner':
'/wasm/contracts/{contractAddress}/admin/update':
post:
summary: Update wasm contract owner to new address
summary: Update wasm contract admin to new address
tags:
- Wasm
produces:
- application/json
parameters:
- in: path
name: contractAddress
description: contract address you want to update owner
description: contract address you want to update admin
required: true
type: string
- in: body
name: update contract owner request body
name: update contract admin request body
schema:
type: object
properties:
Expand Down Expand Up @@ -7828,7 +7832,7 @@ paths:
description: >-
Estimate gas for a transaction (cannot be used in
conjunction with generate_only)
new_owner:
new_admin:
type: string
description: bech32 encoded address
example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv
Expand Down Expand Up @@ -7886,6 +7890,120 @@ paths:
description: Bad request
'500':
description: Internal Server Error
'/wasm/contracts/{contractAddress}/admin/clear':
post:
summary: Clear wasm contract admin to make the contract un-migratable
tags:
- Wasm
produces:
- application/json
parameters:
- in: path
name: contractAddress
description: contract address you want to clear admin
required: true
type: string
- in: body
name: clear contract admin request body
schema:
type: object
properties:
base_req:
type: object
properties:
from:
type: string
example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv
description: Sender address or Keybase name to generate a transaction
memo:
type: string
example: "Sent via Terra Station \U0001F680"
chain_id:
type: string
example: columbus-3
account_number:
type: string
example: '0'
sequence:
type: string
example: '1'
gas:
type: string
example: '200000'
gas_adjustment:
type: string
example: '1.2'
fees:
type: array
items:
type: object
properties:
denom:
type: string
example: uluna
amount:
type: string
example: '50'
simulate:
type: boolean
example: false
description: >-
Estimate gas for a transaction (cannot be used in
conjunction with generate_only)
responses:
'200':
description: OK
schema:
type: object
properties:
msg:
type: array
items:
type: string
fee:
type: object
properties:
gas:
type: string
amount:
type: array
items:
type: object
properties:
denom:
type: string
example: uluna
amount:
type: string
example: '50'
memo:
type: string
signature:
type: object
properties:
signature:
type: string
example: >-
MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=
pub_key:
type: object
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
account_number:
type: string
example: '0'
sequence:
type: string
example: '0'
'400':
description: Bad request
'500':
description: Internal Server Error
'/wasm/contracts/{contractAddress}/store':
get:
summary: Get stored information with query msg
Expand Down Expand Up @@ -27589,9 +27707,12 @@ paths:
properties:
address:
type: string
owner:
creator:
type: string
title: Creator address that can execute migrations
admin:
type: string
title: Owner address that can execute migrations
title: Admin address that can execute migrations
code_id:
type: string
format: uint64
Expand All @@ -27602,12 +27723,6 @@ paths:
title: >-
InitMsg is the raw message used when instantiating a
contract
migratable:
type: boolean
format: boolean
title: >-
Migratable is the flag to specify the contract
migratability
title: ContractInfo stores a WASM contract instance
description: |-
QueryContractInfoResponse is response type for the
Expand Down Expand Up @@ -38580,6 +38695,10 @@ definitions:
type: string
description: json formatted string
example: '{}'
admin:
type: string
description: bech32 encoded address
example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv
ExecuteContractReq:
type: object
properties:
Expand Down Expand Up @@ -38691,7 +38810,7 @@ definitions:
migrate_msg:
type: string
example: '{}'
UpdateContractOwnerReq:
UpdateContractAdminReq:
type: object
properties:
base_req:
Expand Down Expand Up @@ -38736,10 +38855,55 @@ definitions:
description: >-
Estimate gas for a transaction (cannot be used in conjunction with
generate_only)
new_owner:
new_admin:
type: string
description: bech32 encoded address
example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv
ClearContractAdminReq:
type: object
properties:
base_req:
type: object
properties:
from:
type: string
example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv
description: Sender address or Keybase name to generate a transaction
memo:
type: string
example: "Sent via Terra Station \U0001F680"
chain_id:
type: string
example: columbus-3
account_number:
type: string
example: '0'
sequence:
type: string
example: '1'
gas:
type: string
example: '200000'
gas_adjustment:
type: string
example: '1.2'
fees:
type: array
items:
type: object
properties:
denom:
type: string
example: uluna
amount:
type: string
example: '50'
simulate:
type: boolean
example: false
description: >-
Estimate gas for a transaction (cannot be used in conjunction with
generate_only)
GenericAuthorization:
type: object
properties:
Expand Down Expand Up @@ -54374,9 +54538,12 @@ definitions:
properties:
address:
type: string
owner:
creator:
type: string
title: Owner address that can execute migrations
title: Creator address that can execute migrations
admin:
type: string
title: Admin address that can execute migrations
code_id:
type: string
format: uint64
Expand All @@ -54385,10 +54552,6 @@ definitions:
type: string
format: byte
title: InitMsg is the raw message used when instantiating a contract
migratable:
type: boolean
format: boolean
title: Migratable is the flag to specify the contract migratability
title: ContractInfo stores a WASM contract instance
terra.wasm.v1beta1.EventParams:
type: object
Expand Down Expand Up @@ -54470,9 +54633,12 @@ definitions:
properties:
address:
type: string
owner:
creator:
type: string
title: Creator address that can execute migrations
admin:
type: string
title: Owner address that can execute migrations
title: Admin address that can execute migrations
code_id:
type: string
format: uint64
Expand All @@ -54481,10 +54647,6 @@ definitions:
type: string
format: byte
title: InitMsg is the raw message used when instantiating a contract
migratable:
type: boolean
format: boolean
title: Migratable is the flag to specify the contract migratability
title: ContractInfo stores a WASM contract instance
description: |-
QueryContractInfoResponse is response type for the
Expand Down
Loading