This contract was deployed to the Opal network at address 0x4aecf1b3a3f9ed8f2bf86a0e66955245ab38a2eb
. Self-sponsoring is enabled, which means that the contract will cover all transaction fees.
One event registered. To claim NFT, use the collection address 0x17C4E6453Cc49aAAaeaCA894e6d9683e000011cD
. 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
accountLimit
: How many NFTs a single account may havecollectionCoverImage
: URL of a collection cover imagetokenImage
: URL of an NFT image. All NFTs will have the same imagesoulbound
: iftrue
NFT cannot be transferredattributes
: 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;
uint256 accountLimit;
string collectionCoverImage;
string tokenImage;
bool soulbound;
Attribute[] attributes;
CrossAddress owner;
}
function createCollection(string _name,string _description,string _symbol,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