This contract was deployed to the Opal network at address 0xd3bdE3e10D04373dFc1Ded1C68BF4F31eBB4ADa7
. Self-sponsoring is enabled, which means that the contract will cover all transaction fees.
One event registered. To claim NFT, use the collection address 0x17c4e6453cC49AaaAeaCa894E6d9683e00000eDa
. Check the collection and minted NFTs on the Unique Scan.
This struct represents EVM or Substrate account. Only one field can be filled.
- For the EVM account, set
eth
with the EVM address (0x...). - For the Substrate account, set the
sub
property with the substrate public key in decimal format
struct CrossAddress {
address eth;
uint256 sub;
}
Key/value pair representing NFT's trait
struct Attribute {
string trait_type;
string value;
}
This struct represents the event's configuration.
startTimestamp
: NFT cannot be minted ifblock.timestamp
<startTimestamp
endTimestamp
: NFT cannot be minted ifblock.timestamp
>endTimestamp
collectionCoverImage
: URL of a collection cover imagetokenImage
: URL of an NFT image. All NFTs will have the same imageattributes
: NFT attributes list, see Attributesowner
: Event owner. This address is a virtual owner of the event's NFT collection. Real ownership can be claimed
struct EventConfig {
uint256 startTimestamp;
uint256 endTimestamp;
string collectionCoverImage;
string tokenImage;
Attribute[] attributes;
CrossAddress owner;
}
function createCollection(string _name,string _description,string _symbol,bool _soulbound,EventConfig _eventConfig)
event EventCreated(uint256 collectionId, address collectionAddress);
function createToken(address _collectionAddress, CrossAddress _owner)
event TokenClaimed(CrossAddress indexed owner, uint256 indexed colletionId, uint256 tokenId);
The contract can be called with a Substrate account using evm.call
extrinsic.
Examples are coming soon.
Node.js, yarn, and forge should be installed.
yarn