This modules is very advanced and will not be used directly by the vast majority of users.
We want to offer it to ensure a stable storage key composition system but don’t encourage
contract devs to use it directly.
A coin type with decimal amount.
Modeled after the Cosmos SDK’s DecCoin type.
However, in contrast to the Cosmos SDK the amount string MUST always have a dot at JSON level,
see https://github.com/cosmos/cosmos-sdk/issues/10863.
Also if Cosmos SDK choses to migrate away from fixed point decimals
(as shown [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.4/x/group/internal/math/dec.go#L13-L21 and discussed here),
wasmd needs to truncate the decimal places to 18.
This is the return value for the majority of the ibc handlers.
That are able to dispatch messages / events on their own,
but have no meaningful return value to the calling code.
This defines the return value on packet response processing.
This “success” case should be returned even in application-level errors,
Where the acknowledgement bytes contain an encoded error message to be returned to
the calling chain. (Returning ContractResult::Err will abort processing of this packet
and not inform the calling chain).
In IBC each package must set at least one type of timeout:
the timestamp or the block height. Using this rather complex enum instead of
two timeout fields we ensure that at least one timeout is set.
IBCTimeoutHeight Height is a monotonically increasing data type
that can be compared against another Height for the purposes of updating and
freezing clients.
Ordering is (revision_number, timeout_height)
An implementation of i64 that is using strings for JSON encoding/decoding,
such that the full i64 range can be used for clients that convert JSON numbers to floats,
like JavaScript and jq.
An implementation of i128 that is using strings for JSON encoding/decoding,
such that the full i128 range can be used for clients that convert JSON numbers to floats,
like JavaScript and jq.
An implementation of i256 that is using strings for JSON encoding/decoding,
such that the full i256 range can be used for clients that convert JSON numbers to floats,
like JavaScript and jq.
An implementation of i512 that is using strings for JSON encoding/decoding,
such that the full i512 range can be used for clients that convert JSON numbers to floats,
like JavaScript and jq.
Additional information from MsgInstantiateContract and MsgExecuteContract, which is passed
along with the contract execution message into the instantiate and execute entry points.
Holds all external dependencies of the contract.
Designed to allow easy dependency injection at runtime.
This cannot be copied or cloned since it would behave differently
for mock storages and a bridge storage in the VM.
A submessage that will guarantee a reply call on success or error, depending on
the reply_on setting. If you do not need to process the result, use regular messages instead.
A thin wrapper around u64 that is using strings for JSON encoding/decoding,
such that the full u64 range can be used for clients that convert JSON numbers to floats,
like JavaScript and jq.
A thin wrapper around u128 that is using strings for JSON encoding/decoding,
such that the full u128 range can be used for clients that convert JSON numbers to floats,
like JavaScript and jq.
An implementation of u256 that is using strings for JSON encoding/decoding,
such that the full u256 range can be used for clients that convert JSON numbers to floats,
like JavaScript and jq.
An implementation of u512 that is using strings for JSON encoding/decoding,
such that the full u512 range can be used for clients that convert JSON numbers to floats,
like JavaScript and jq.
This is the final result type that is created and serialized in a contract for
every init/execute/migrate call. The VM then deserializes this type to distinguish
between successful and failed executions.
IbcOrder defines if a channel is ORDERED or UNORDERED
Values come from https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/core/channel/v1/channel.proto#L69-L80
Naming comes from the protobuf files and go translations.
These are queries to the various IBC modules to see the state of the contract’s
IBC connection. These will return errors if the contract is not “ibc enabled”
Never can never be instantiated. This can be used in places
where we want to ensure that no error is returned, such as
the ibc_packet_receive entry point.
Use this to define when the contract gets a response callback.
If you only need it for errors or success you can select just those in order
to save gas.
This is a standard IBC acknowledgement type. IBC application are free
to use any acknowledgement format they want. However, for compatibility
purposes it is recommended to use this.
Api are callbacks to system functions implemented outside of the wasm modules.
Currently it just supports address conversion but we could add eg. crypto functions here.
A trait that is required to avoid conflicts with other query types like BankQuery and WasmQuery
in generic implementations.
You need to implement it in your custom query type.
Creates a contract address using the predictable address format introduced with
wasmd 0.29. When using instantiate2, this is a way to precompute the address.
When using instantiate, the contract address will use a different algorithm and
cannot be pre-computed as it contains inputs from the chain’s state at the time of
message execution.
A record of a key-value storage that is created through an iterator API.
The first element (key) is always raw binary data. The second element
(value) is binary by default but can be changed to a custom type. This
allows contracts to reuse the type when deserializing database records.
The return type for init, execute and query. Since the error type cannot be serialized to JSON,
this is only available within the contract and its unit tests.