Skip to content

Instantly share code, notes, and snippets.

@Ashar2shahid
Created July 1, 2022 06:52
Show Gist options
  • Save Ashar2shahid/15596ccad2e6252bc88532fe6ba31106 to your computer and use it in GitHub Desktop.
Save Ashar2shahid/15596ccad2e6252bc88532fe6ba31106 to your computer and use it in GitHub Desktop.
contract Quantumon is ERC721, RrpRequesterV0, Ownable {
using Strings for uint256;
uint256[9958] public ids; //Array to store the Quantomon Id - This is different from the tokenId
uint256 private index; // Track the next TokenId to be minted
string private _baseURIextended; // The Extended baseUrl for ERC721
mapping(uint256 => string) private _tokenURIs; //Mapping a custom URI to a tokenId
address public airnode; //The address of the QRNG airnode
bytes32 public endpointIdUint256; // The endpointId of the airnode to fetch a single random number
address public sponsorWallet; // The address of the sponsorWallet that will be making the fullfillment transaction
// Mapping that maps the requestId for a random number to the fullfillment status of that request
mapping(bytes32 => bool) public expectingRequestWithIdToBeFulfilled;
//Mapping that maps the requestId to the address that made the request
mapping(bytes32 => address) requestToSender;
constructor(address _airnodeRrp)
RrpRequesterV0(_airnodeRrp)
ERC721("QUANTUMON", "QUANTUMON")
{
}
function setRequestParameters(
address _airnode,
bytes32 _endpointIdUint256,
address _sponsorWallet
) external onlyOwner {
airnode = _airnode;
endpointIdUint256 = _endpointIdUint256;
sponsorWallet = _sponsorWallet;
emit SetRequestParameters(airnode, endpointIdUint256, sponsorWallet);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment