Terra Rebirth is now using wasm module of wasmd and it introduces minor compatibility issue with Terra Classic.
Contract Address length will be different from normal account.
// VerifyAddressLen ensures that the address matches the expected length
// ContractAddrLen = 32
// SDKAddrLen = 20
func VerifyAddressLen() func(addr []byte) error {
return func(addr []byte) error {
if len(addr) != ContractAddrLen && len(addr) != SDKAddrLen {
return sdkerrors.ErrInvalidAddress
}
return nil
}
}
A code uploader can specify the permission of code for instantiation
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
)
The contracts, which are using reply to check instantiated contract address, should update the proto file to the following.
// MsgInstantiateContractResponse return instantiation result data
message MsgInstantiateContractResponse {
// Address is the bech32 address of the new contract instance.
string address = 1;
// Data contains base64-encoded bytes to returned from the contract
bytes data = 2;
}
Event key for instantiated contract also should be changed from instantiate
.contract_address
to instantiate
._contract_address
.
Now label is used to represent the contract info
CosmosMsg::Bank(BankMsg::Burn)
is enabled
Event key for instantiated contract also should be changed from execute
.contract_address
to execute
._contract_address
.
Event key for instantiated contract also should be changed from migrate
.contract_address
to migrate
._contract_address
.
Event key for instantiated contract also should be changed from reply
.contract_address
to reply
._contract_address
.