Retrieve Calls
This page demonstrates how the NFTDelegation.com smart contract can be integrated to make external calls.
Steps:
Import Interfaces within your smart contract
Declare the Read Interface variable as below:
Modify your constructor as below. When deploying the smart contract input the NFTDelegation smart contract address 0x2202CB9c00487e7e8EF21e6d8E914B32e709f43d within your constructor.
Add function calls
The retrieveDelegators() function returns an array of Delegators for the function caller address (msg.sender) based on 'Any Collection' and 'All Use Cases'.
The checkMintingStatus(_vault) function checks the minting eligibility status for the function caller (msg.sender) by providing a Delegator's address as an input. This function is based on 'Any Collection' and 'Minting Use Case #2' and returns a bool status (true/false).
The retrieveTokenStatus(_vault, _tokenid) function checks if a delegation was registered from the a Delegator to the function caller (msg.sender) for an individual token id on a specific usecase on a specific collection and returns a bool status (true/false).
Please note that you can customize the demo functions for the collection or usecase that you are interested in.
Full Source Code
Last updated