72 releases (28 stable)

new 3.13.0 Apr 26, 2024
3.7.0 Feb 13, 2024
3.3.0 Oct 11, 2023
3.0.0 Jul 2, 2023
0.9.1 Mar 27, 2022

#713 in Magic Beans

Download history 66/week @ 2024-01-01 42/week @ 2024-01-08 114/week @ 2024-01-15 128/week @ 2024-01-22 38/week @ 2024-01-29 74/week @ 2024-02-05 199/week @ 2024-02-12 55/week @ 2024-02-19 352/week @ 2024-02-26 72/week @ 2024-03-04 906/week @ 2024-03-11 114/week @ 2024-03-18 131/week @ 2024-03-25 1007/week @ 2024-04-01 126/week @ 2024-04-08 140/week @ 2024-04-15

1,408 downloads per month
Used in 23 crates (21 directly)

Apache-2.0

7KB
94 lines

SG-721

SG-721 is a cw721-compatible spec that adds on-chain contract metadata, including royalties.

pub struct CollectionInfo<T> {
    pub creator: String,
    pub description: String,
    pub image: String,
    pub external_link: Option<String>,
    pub trading_start_time: Option<Timestamp>,
    pub royalty_info: Option<T>,
}

pub struct RoyaltyInfo {
    pub payment_address: Addr,
    pub share: Decimal,
}

The above is set when the contract is instantiated. The contract inherits everything else from cw721-base.

Dependencies

~4–5.5MB
~123K SLoC