Last active
July 15, 2022 16:41
-
-
Save sdelvalle57/6a9e37a795ffeac12d5d44bf3c37cae1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getNetwork(id) { | |
| if(id === 4) return "Mainnet" | |
| else return "Rinkeby" | |
| } | |
| function getMateriaAbi() { | |
| return [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "_name", | |
| "type": "string" | |
| }, | |
| { | |
| "internalType": "string", | |
| "name": "_symbol", | |
| "type": "string" | |
| }, | |
| { | |
| "internalType": "string", | |
| "name": "_metadataURI", | |
| "type": "string" | |
| }, | |
| { | |
| "internalType": "uint64", | |
| "name": "start", | |
| "type": "uint64" | |
| }, | |
| { | |
| "internalType": "uint64", | |
| "name": "end", | |
| "type": "uint64" | |
| }, | |
| { | |
| "internalType": "bytes32", | |
| "name": "merkleRoot", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "signer", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "antonym", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "constructor" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "_owner", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "_operator", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "bool", | |
| "name": "_approved", | |
| "type": "bool" | |
| } | |
| ], | |
| "name": "ApprovalForAll", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "previousOwner", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "newOwner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "OwnershipTransferred", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "_operator", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "_from", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "_to", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "uint256[]", | |
| "name": "_ids", | |
| "type": "uint256[]" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "uint256[]", | |
| "name": "_amounts", | |
| "type": "uint256[]" | |
| } | |
| ], | |
| "name": "TransferBatch", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "_operator", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "_from", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "_to", | |
| "type": "address" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "uint256", | |
| "name": "_id", | |
| "type": "uint256" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "uint256", | |
| "name": "_amount", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "TransferSingle", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": false, | |
| "internalType": "string", | |
| "name": "_uri", | |
| "type": "string" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "uint256", | |
| "name": "_id", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "URI", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "allow", | |
| "type": "bool" | |
| } | |
| ], | |
| "name": "allowMinting", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "_owner", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_id", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "balanceOf", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address[]", | |
| "name": "_owners", | |
| "type": "address[]" | |
| }, | |
| { | |
| "internalType": "uint256[]", | |
| "name": "_ids", | |
| "type": "uint256[]" | |
| } | |
| ], | |
| "name": "balanceOfBatch", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256[]", | |
| "name": "", | |
| "type": "uint256[]" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "getNextTokenID", | |
| "outputs": [ | |
| { | |
| "internalType": "uint8", | |
| "name": "", | |
| "type": "uint8" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "_owner", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_operator", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "isApprovedForAll", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "isOperator", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "account", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "tokenId", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "messageHash", | |
| "outputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "stateMutability": "pure", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "amountMateria", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "amountPrimaMateria", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "mintBatchMateria", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "antonymTokenId", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes", | |
| "name": "signature", | |
| "type": "bytes" | |
| } | |
| ], | |
| "name": "mintMateria", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "antonymTokenId", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes", | |
| "name": "signature", | |
| "type": "bytes" | |
| }, | |
| { | |
| "internalType": "bytes32[]", | |
| "name": "proof", | |
| "type": "bytes32[]" | |
| } | |
| ], | |
| "name": "mintPrimaMateria", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "name", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "", | |
| "type": "string" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "owner", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "renounceOwnership", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "_from", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256[]", | |
| "name": "_ids", | |
| "type": "uint256[]" | |
| }, | |
| { | |
| "internalType": "uint256[]", | |
| "name": "_amounts", | |
| "type": "uint256[]" | |
| }, | |
| { | |
| "internalType": "bytes", | |
| "name": "_data", | |
| "type": "bytes" | |
| } | |
| ], | |
| "name": "safeBatchTransferFrom", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "_from", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_id", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_amount", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes", | |
| "name": "_data", | |
| "type": "bytes" | |
| } | |
| ], | |
| "name": "safeTransferFrom", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "_operator", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "bool", | |
| "name": "_approved", | |
| "type": "bool" | |
| } | |
| ], | |
| "name": "setApprovalForAll", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "_newBaseMetadataURI", | |
| "type": "string" | |
| } | |
| ], | |
| "name": "setBaseMetadataURI", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "uint64", | |
| "name": "end", | |
| "type": "uint64" | |
| } | |
| ], | |
| "name": "setDeadline", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "signer", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "setSigner", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes4", | |
| "name": "_interfaceID", | |
| "type": "bytes4" | |
| } | |
| ], | |
| "name": "supportsInterface", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "symbol", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "", | |
| "type": "string" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "uint8", | |
| "name": "", | |
| "type": "uint8" | |
| } | |
| ], | |
| "name": "tokenSupply", | |
| "outputs": [ | |
| { | |
| "internalType": "uint16", | |
| "name": "", | |
| "type": "uint16" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "uint8", | |
| "name": "_id", | |
| "type": "uint8" | |
| } | |
| ], | |
| "name": "totalSupply", | |
| "outputs": [ | |
| { | |
| "internalType": "uint16", | |
| "name": "", | |
| "type": "uint16" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "newOwner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "transferOwnership", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "_id", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "uri", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "", | |
| "type": "string" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "uint8", | |
| "name": "_id", | |
| "type": "uint8" | |
| } | |
| ], | |
| "name": "uri", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "", | |
| "type": "string" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment