35 releases (10 breaking)

0.16.0 Oct 17, 2022
0.14.0 Jul 28, 2022
0.13.1 Mar 25, 2022
0.11.1 Dec 28, 2021
0.8.0-rc1 Jul 29, 2021

#13 in #minter

Apache-2.0

58KB
1.5K SLoC

CW1155 Basic

This is a basic implementation of a cw1155 contract. It implements the CW1155 spec and manages multiple tokens (fungible or non-fungible) under one contract.

Instantiation

To create it, you must pass in a minter address.

#[cw_serde]
pub struct InstantiateMsg {
    /// The minter is the only one who can create new tokens.
    /// This is designed for a base token platform that is controlled by an external program or
    /// contract.
    pub minter: String,
}

Messages

All other messages and queries are defined by the CW1155 spec. Please refer to it for more info.


lib.rs:

This is a basic implementation of a cw1155 contract. It implements the CW1155 spec and manages multiple tokens (fungible or non-fungible) under one contract.

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

Dependencies

~4–5.5MB
~121K SLoC