Crate cw20

source · []
Expand description

CW20 is a specification for fungible tokens based on CosmWasm. The name and design is loosely based on Ethereum’s ERC20 standard, but many changes have been made. The types in here can be imported by contracts that wish to implement this spec, or by contracts that call to any standard cw20 contract.

For more information on this specification, please check out the README.

Structs

Cw20Contract is a wrapper around Addr that provides a lot of helpers for working with this.
Cw20ReceiveMsg should be de/serialized under Receive() variant in a ExecuteMsg
When we download an embedded logo, we get this response type. We expect a SPA to be able to accept this info and display it.

Enums

This is used to store the logo on the blockchain in an accepted format. Enforce maximum size of 5KB on all variants.
Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)
This is used for uploading logo data, or setting it in InstantiateData
This is used to display logo info, provide a link or inform there is one that can be downloaded from the blockchain itself