@etherisc/gif-interface
Version:
This repository holds the necessary interfaces and base contracts to interact with an existing GIF instance. The repository is not intended to be used on its own.
1,030 lines • 32.2 kB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"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": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "LogBundleTokenBurned",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "tokenOwner",
"type": "address"
}
],
"name": "LogBundleTokenMinted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "burned",
"outputs": [
{
"internalType": "bool",
"name": "isBurned",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "exists",
"outputs": [
{
"internalType": "bool",
"name": "doesExist",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getBundleId",
"outputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "ownerOf",
"outputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"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": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "tokenCount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"2": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"30": "contracts/tokens/IBundleToken.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol"
},
"ast": {
"absolutePath": "contracts/tokens/IBundleToken.sol",
"exportedSymbols": {
"IBundleToken": [
4649
],
"IERC165": [
4990
],
"IERC721": [
4878
]
},
"id": 4650,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4605,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:30"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"file": "@openzeppelin/contracts/token/ERC721/IERC721.sol",
"id": 4606,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4650,
"sourceUnit": 4879,
"src": "63:58:30",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 4607,
"name": "IERC721",
"nodeType": "IdentifierPath",
"referencedDeclaration": 4878,
"src": "153:7:30"
},
"id": 4608,
"nodeType": "InheritanceSpecifier",
"src": "153:7:30"
}
],
"contractDependencies": [
4878,
4990
],
"contractKind": "interface",
"fullyImplemented": false,
"id": 4649,
"linearizedBaseContracts": [
4649,
4878,
4990
],
"name": "IBundleToken",
"nameLocation": "133:12:30",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"id": 4616,
"name": "LogBundleTokenMinted",
"nameLocation": "173:20:30",
"nodeType": "EventDefinition",
"parameters": {
"id": 4615,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4610,
"indexed": false,
"mutability": "mutable",
"name": "bundleId",
"nameLocation": "202:8:30",
"nodeType": "VariableDeclaration",
"scope": 4616,
"src": "194:16:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4609,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "194:7:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4612,
"indexed": false,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "220:7:30",
"nodeType": "VariableDeclaration",
"scope": 4616,
"src": "212:15:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4611,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "212:7:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4614,
"indexed": false,
"mutability": "mutable",
"name": "tokenOwner",
"nameLocation": "237:10:30",
"nodeType": "VariableDeclaration",
"scope": 4616,
"src": "229:18:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4613,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "229:7:30",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "193:55:30"
},
"src": "167:82:30"
},
{
"anonymous": false,
"id": 4622,
"name": "LogBundleTokenBurned",
"nameLocation": "260:20:30",
"nodeType": "EventDefinition",
"parameters": {
"id": 4621,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4618,
"indexed": false,
"mutability": "mutable",
"name": "bundleId",
"nameLocation": "289:8:30",
"nodeType": "VariableDeclaration",
"scope": 4622,
"src": "281:16:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4617,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "281:7:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4620,
"indexed": false,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "307:7:30",
"nodeType": "VariableDeclaration",
"scope": 4622,
"src": "299:15:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4619,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "299:7:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "280:35:30"
},
"src": "254:62:30"
},
{
"functionSelector": "23250cae",
"id": 4629,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "burned",
"nameLocation": "334:6:30",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4625,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4624,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "346:7:30",
"nodeType": "VariableDeclaration",
"scope": 4629,
"src": "341:12:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4623,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "341:4:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "340:14:30"
},
"returnParameters": {
"id": 4628,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4627,
"mutability": "mutable",
"name": "isBurned",
"nameLocation": "382:8:30",
"nodeType": "VariableDeclaration",
"scope": 4629,
"src": "377:13:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 4626,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "377:4:30",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "376:15:30"
},
"scope": 4649,
"src": "325:67:30",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "4f558e79",
"id": 4636,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exists",
"nameLocation": "406:6:30",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4632,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4631,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "421:7:30",
"nodeType": "VariableDeclaration",
"scope": 4636,
"src": "413:15:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4630,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "413:7:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "412:17:30"
},
"returnParameters": {
"id": 4635,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4634,
"mutability": "mutable",
"name": "doesExist",
"nameLocation": "457:9:30",
"nodeType": "VariableDeclaration",
"scope": 4636,
"src": "452:14:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 4633,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "452:4:30",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "451:16:30"
},
"scope": 4649,
"src": "397:71:30",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "29a63083",
"id": 4643,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getBundleId",
"nameLocation": "482:11:30",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4639,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4638,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "502:7:30",
"nodeType": "VariableDeclaration",
"scope": 4643,
"src": "494:15:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4637,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "494:7:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "493:17:30"
},
"returnParameters": {
"id": 4642,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4641,
"mutability": "mutable",
"name": "bundleId",
"nameLocation": "541:8:30",
"nodeType": "VariableDeclaration",
"scope": 4643,
"src": "533:16:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4640,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "533:7:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "532:18:30"
},
"scope": 4649,
"src": "473:78:30",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "18160ddd",
"id": 4648,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "totalSupply",
"nameLocation": "565:11:30",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4644,
"nodeType": "ParameterList",
"parameters": [],
"src": "576:2:30"
},
"returnParameters": {
"id": 4647,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4646,
"mutability": "mutable",
"name": "tokenCount",
"nameLocation": "609:10:30",
"nodeType": "VariableDeclaration",
"scope": 4648,
"src": "601:18:30",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4645,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "601:7:30",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "600:20:30"
},
"scope": 4649,
"src": "556:65:30",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 4650,
"src": "123:500:30"
}
],
"src": "39:585:30"
},
"bytecode": "",
"bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"compiler": {
"evm_version": "istanbul",
"optimizer": {
"enabled": true,
"runs": 200
},
"version": "0.8.2+commit.661d1103"
},
"contractName": "IBundleToken",
"coverageMap": {
"branches": {},
"statements": {}
},
"dependencies": [
"OpenZeppelin/openzeppelin-contracts@4.7.3/IERC165",
"OpenZeppelin/openzeppelin-contracts@4.7.3/IERC721"
],
"deployedBytecode": "",
"deployedSourceMap": "",
"language": "Solidity",
"natspec": {
"kind": "dev",
"methods": {
"approve(address,uint256)": {
"details": "Gives permission to `to` to transfer `tokenId` token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - `tokenId` must exist. Emits an {Approval} event."
},
"balanceOf(address)": {
"details": "Returns the number of tokens in ``owner``'s account."
},
"getApproved(uint256)": {
"details": "Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist."
},
"isApprovedForAll(address,address)": {
"details": "Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll}"
},
"ownerOf(uint256)": {
"details": "Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist."
},
"safeTransferFrom(address,address,uint256)": {
"details": "Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
},
"safeTransferFrom(address,address,uint256,bytes)": {
"details": "Safely transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
},
"setApprovalForAll(address,bool)": {
"details": "Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event."
},
"supportsInterface(bytes4)": {
"details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
},
"transferFrom(address,address,uint256)": {
"details": "Transfers `tokenId` token from `from` to `to`. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."
}
},
"version": 1
},
"offset": [
123,
623
],
"opcodes": "",
"pcMap": {},
"sha1": "1af4a490e8fc4010a620039ae8fc1e86a9fc1d09",
"source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.2;\n\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\ninterface IBundleToken is\n IERC721\n{\n event LogBundleTokenMinted(uint256 bundleId, uint256 tokenId, address tokenOwner);\n event LogBundleTokenBurned(uint256 bundleId, uint256 tokenId); \n\n function burned(uint tokenId) external view returns(bool isBurned);\n function exists(uint256 tokenId) external view returns(bool doesExist);\n function getBundleId(uint256 tokenId) external view returns(uint256 bundleId);\n function totalSupply() external view returns(uint256 tokenCount);\n}\n",
"sourceMap": "",
"sourcePath": "contracts/tokens/IBundleToken.sol",
"type": "interface"
}