A human readable address.
DelegationsResponse is data format returned from StakingRequest::AllDelegations query
The data format returned from StakingRequest::AllValidators query
A message encoded the same way as a protobuf
Any.
This is the same structure as messages in
TxBody
from
ADR-020An key value pair that is used in the context of event attributes in logs
Binary is a wrapper around Vec to add base64 de/serialization
with serde. It also adds some helper methods to help encode inline.
BondedDenomResponse is data format returned from StakingRequest::BondedDenom query
A blockchain address in its binary form.
A SHA-256 checksum of a Wasm blob, used to identify a Wasm code.
This must remain stable since this checksum is stored in the blockchain state.
A collection of coins, similar to Cosmos SDK’s sdk.Coins
struct.
The error returned by
TryFrom
conversions that overflow, for example
when converting from
Uint256
to
Uint128
.
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.
A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0
A fixed-point decimal value with 18 fractional digits, i.e. Decimal256(1_000_000_000_000_000_000) == 1.0
Delegation is basic (cheap to query) data about a delegation.
DelegationResponse is data format returned from StakingRequest::Delegation query
Replicates the cosmos-sdk bank module Metadata type
Replicates the cosmos-sdk bank module DenomUnit type
An empty struct that serves as a placeholder in different places,
such as contracts that don’t set a custom message.
FullDelegation is all the info on the delegation, some (like accumulated_reward and can_redelegate)
is expensive to query.
Queries the chain using a grpc query.
This allows to query information that is not exposed in our API.
The chain needs to allowlist the supported queries.
The drawback of this query is that you have to handle the protobuf encoding and decoding yourself.
This is a wrapper around Vec to add hex de/serialization
with serde. It also adds some helper methods to help encode inline.
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 is just a type representing the data that has to be sent with the IBC message to receive
callbacks. It should be serialized and sent with the IBC message.
The specific field and format to send it in can vary depending on the IBC message,
but is usually the memo
field by convention.
IbcChannel defines all information on a channel.
This is generally used in the hand-shake process, but can be queried directly.
The message type of the IBC destination callback.
The message that is passed into ibc_packet_ack
The message that is passed into ibc_packet_receive
The message that is passed into ibc_packet_timeout
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.
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.
Simplified version of the PageRequest type for pagination from the cosmos-sdk
The result object returned to reply
. We always get the ID from the submessage
back and then must handle success and error cases ourselves.
A response of a contract entry point, such as instantiate
, execute
or migrate
.
A signed fixed-point decimal value with 18 fractional digits, i.e. SignedDecimal(1_000_000_000_000_000_000) == 1.0
A signed fixed-point decimal value with 18 fractional digits,
i.e. SignedDecimal256(1_000_000_000_000_000_000) == 1.0
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.
The information we get back from a successful sub message execution,
with full Cosmos SDK events.
A point in time in nanosecond precision.
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.
Instances are created in the querier.
The data format returned from StakingRequest::Validator query
The message types of the bank module.
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.
The message types of the distribution module.
This message type allows the contract interact with the
x/gov module in order
to cast votes.
The message that is passed into ibc_channel_close
The message that is passed into ibc_channel_connect
The message that is passed into ibc_channel_open
These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts
(contracts that directly speak the IBC protocol via 6 entry points)
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”
The type of IBC source callback that is being called.
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.
The message types of the staking module.
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.
Structured error type for init, execute and query.
This is the result type that is returned from a sub message execution.
SystemError is used for errors inside the VM and is API friendly (i.e. serializable).
This is the outer result type returned by a querier to the contract.
The message types of the wasm module.
Creates a new Attribute. Attribute::new
is an alias for this.
A shorthand constructor for Coin
A shortcut constructor for a set of one denomination of coins
Deserialize a bag of bytes from Base64 into a vector of bytes
Decode a bag of bytes from hex into a vector of bytes
Deserializes the given JSON bytes to a data structure.
has_coins returns true if the list of coins has at least the required amount
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.
Encode a bag of bytes into the Base64 format
Encode a bag of bytes into the hex format
Serializes the given data structure as JSON bytes.
Serializes the given data structure as a JSON string.
Serializes the given data structure as a JSON byte vector.
Shortcut helper as the construction of WasmMsg::Execute can be quite verbose in contract code
Shortcut helper as the construction of WasmMsg::Instantiate can be quite verbose in contract code.