[][src]Crate cosmwasm_std

Modules

testing

Structs

AllBalanceResponse
BalanceResponse
Binary

Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.

CanonicalAddr
Coin
Delegation
DelegationsResponse

DelegationsResponse is data format returned from StakingRequest::Delegations query

Env
Extern

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.

HandleResponse
HumanAddr
InitResponse
LogAttribute
MemoryStorage
Uint128
Validator
ValidatorsResponse

ValidatorsResponse is data format returned from StakingRequest::Validators query

Enums

BankMsg
BankQuery
CosmosMsg
Never

Never can never be instantiated and is a no-op placeholder for unsupported enums, such as contracts that don't set a custom message.

QueryRequest
StakingMsg
StakingQuery
StdError

Structured error type for init, handle and query.

SystemError

SystemError is used for errors inside the VM and is API frindly (i.e. serializable).

WasmMsg
WasmQuery

Traits

Api

Api are callbacks to system functions defined outside of the wasm modules. This is a trait to allow Mocks in the test code.

Querier
ReadonlyStorage

ReadonlyStorage is access to the contracts persistent data store

Storage

Functions

coin
coins
from_binary
from_slice
generic_err
has_coins

has_coins returns true if the list of coins has at least the required amount

invalid_base64
invalid_utf8
log

A shorthand to produce log messages

not_found
null_pointer
parse_err
serialize_err
to_binary
to_vec
unauthorized
underflow

Type Definitions

HandleResult
InitResult
QuerierResult

A short-hand alias for the two-level query result (1. accessing the contract, 2. executing query in the contract)

QueryResponse
QueryResult
StdResult

The return type for init, handle and query. Since the error type cannot be serialized to JSON, this is only available within the contract and its unit tests.

SystemResult