Skip to content

Commit

Permalink
update wasm migrate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yun-yeo committed May 20, 2022
1 parent 85b07a9 commit c9cd8f9
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions WASM_MIGRATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
## Wasm Migration Guide from Terra Classic
Terra Rebirth is now using wasm module of [wasmd](https://github.com/CosmWasm/wasmd) and it introduces minor compatibility issue with Terra Classic.

### Store

#### Permission
A code uploader can specify the permission of code instantiation
```go
const (
// AccessTypeUnspecified placeholder for empty value
AccessTypeUnspecified AccessType = 0
// AccessTypeNobody forbidden
AccessTypeNobody AccessType = 1
// AccessTypeOnlyAddress restricted to an address
AccessTypeOnlyAddress AccessType = 2
// AccessTypeEverybody unrestricted
AccessTypeEverybody AccessType = 3
)
```

### Instantiate

#### Reply
The contracts are using reply to check instantiated contract address,
should update the proto file to the following.

```protobuf
// MsgInstantiateContractResponse return instantiation result data
message MsgInstantiateContractResponse {
Expand All @@ -15,6 +34,13 @@ message MsgInstantiateContractResponse {
}
```

Event key for instantiated contract also should be changed
from `instantiate`.`contract_address` to `instantiate`.`_contract_address`.
Ex) https://github.com/terraswap/terraswap/pull/47

#### Event
Event key for instantiated contract also should be changed from `instantiate`.`contract_address` to `instantiate`.`_contract_address`.

#### Label
Now label is used to represent the contract info

#### Burn Operation
`CosmosMsg::Bank(BankMsg::Burn)` is enabled

0 comments on commit c9cd8f9

Please sign in to comment.