Crate psp34_full

source ·

Modules§

Macros§

  • Inserts a suite of ink! unit tests intended for a contract implementing PSP34 trait. $contract argument should be the name of the contract struct. $constructor argument should be the name of a function, which initializes $contract. This macro should be invoked inside #[ink::contract] module.

Structs§

  • A class implementing the internal logic of a PSP34 token. Holds the state of all account balances and approvals. Each method of this class corresponds to one type of transaction as defined in the PSP34 standard. Since this code is outside of ink::contract macro, the caller’s address cannot be obtained automatically. Because of that, all the methods that need to know the caller require an additional argument (compared to transactions defined by the PSP34 standard or the PSP34 trait). lib.rs contains an example implementation of a smart contract using this class.

Enums§

  • Type for a PSP34 token id. Contains all the possible permutations of id according to the standard.
  • Temporary type for events emitted during operations that change the state of PSP34Data struct. This is meant to be replaced with proper ink! events as soon as the language allows for event definitions outside contracts.

Traits§