Skip to content

Instantly share code, notes, and snippets.

@Ashar2shahid
Ashar2shahid / Quantumon.sol
Created July 1, 2022 08:55
The Complete Contract
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
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
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
@Ashar2shahid
Ashar2shahid / RandomCharacter.sol
Created June 30, 2022 04:24
The contract we deployed during the workshop on June-28-2022. It uses QRNG to mint a random character and set its attributes
//SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@api3/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol";
contract RandomCharacter is ERC721, Ownable, RrpRequesterV0 {
struct Character{
uint256 strenght;
uint256 intelligence;
//SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
import "@api3/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Quantumon is ERC721, RrpRequesterV0, Ownable {
}
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