@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,572 lines (1,571 loc) • 644 kB
JSON
{
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"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": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"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": [],
"name": "NAME",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "SYMBOL",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"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": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "bundleIdForTokenId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"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": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getBundleId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getBundleModuleAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"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": "bundleId",
"type": "uint256"
},
{
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "mint",
"outputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"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": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "ownerOf",
"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": "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": "address",
"name": "bundleModule",
"type": "address"
}
],
"name": "setBundleModule",
"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": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "tokenURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"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"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"12": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"14": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"24": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/tokens/BundleToken.sol",
"46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"6": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol",
"7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"8": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721Receiver.sol",
"9": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/tokens/BundleToken.sol",
"exportedSymbols": {
"Address": [
24852
],
"BundleToken": [
23505
],
"Context": [
15648
],
"ERC165": [
24921
],
"ERC721": [
24557
],
"IBundleToken": [
13428
],
"IERC165": [
22864
],
"IERC721": [
13932
],
"IERC721Metadata": [
24897
],
"IERC721Receiver": [
24870
],
"Ownable": [
9476
],
"Strings": [
16154
]
},
"id": 23506,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 23294,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:24"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"file": "@openzeppelin/contracts/access/Ownable.sol",
"id": 23295,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 23506,
"sourceUnit": 9477,
"src": "63:52:24",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol",
"file": "@openzeppelin/contracts/token/ERC721/ERC721.sol",
"id": 23296,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 23506,
"sourceUnit": 24558,
"src": "116:57:24",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"file": "@etherisc/gif-interface/contracts/tokens/IBundleToken.sol",
"id": 23297,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 23506,
"sourceUnit": 13429,
"src": "175:67:24",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 23298,
"name": "IBundleToken",
"nodeType": "IdentifierPath",
"referencedDeclaration": 13428,
"src": "273:12:24"
},
"id": 23299,
"nodeType": "InheritanceSpecifier",
"src": "273:12:24"
},
{
"baseName": {
"id": 23300,
"name": "ERC721",
"nodeType": "IdentifierPath",
"referencedDeclaration": 24557,
"src": "291:6:24"
},
"id": 23301,
"nodeType": "InheritanceSpecifier",
"src": "291:6:24"
},
{
"baseName": {
"id": 23302,
"name": "Ownable",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9476,
"src": "303:7:24"
},
"id": 23303,
"nodeType": "InheritanceSpecifier",
"src": "303:7:24"
}
],
"contractDependencies": [
9476,
13428,
13932,
15648,
22864,
24557,
24897,
24921
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 23505,
"linearizedBaseContracts": [
23505,
9476,
24557,
24897,
13428,
13932,
24921,
22864,
15648
],
"name": "BundleToken",
"nameLocation": "253:11:24",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "a3f4df7e",
"id": 23306,
"mutability": "constant",
"name": "NAME",
"nameLocation": "340:4:24",
"nodeType": "VariableDeclaration",
"scope": 23505,
"src": "317:48:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 23304,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "317:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"hexValue": "4749462042756e646c6520546f6b656e",
"id": 23305,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "347:18:24",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_bbfc3e9b464864803acc054897a72761e0805ad16a65cd3c6e7237d5e77e32a8",
"typeString": "literal_string \"GIF Bundle Token\""
},
"value": "GIF Bundle Token"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "f76f8d78",
"id": 23309,
"mutability": "constant",
"name": "SYMBOL",
"nameLocation": "394:6:24",
"nodeType": "VariableDeclaration",
"scope": 23505,
"src": "371:37:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 23307,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "371:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"hexValue": "42544b",
"id": 23308,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "403:5:24",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cbd09d845af28ee5b0642a9230e90a4426144cbbda10cea126e4301fa7e1a7f0",
"typeString": "literal_string \"BTK\""
},
"value": "BTK"
},
"visibility": "public"
},
{
"constant": false,
"functionSelector": "6ae9d6e8",
"id": 23313,
"mutability": "mutable",
"name": "bundleIdForTokenId",
"nameLocation": "481:18:24",
"nodeType": "VariableDeclaration",
"scope": 23505,
"src": "415:84:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 23312,
"keyType": {
"id": 23310,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "423:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "415:58:24",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 23311,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "449:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"visibility": "public"
},
{
"constant": false,
"id": 23315,
"mutability": "mutable",
"name": "_bundleModule",
"nameLocation": "521:13:24",
"nodeType": "VariableDeclaration",
"scope": 23505,
"src": "505:29:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 23314,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "505:7:24",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 23317,
"mutability": "mutable",
"name": "_totalSupply",
"nameLocation": "556:12:24",
"nodeType": "VariableDeclaration",
"scope": 23505,
"src": "540:28:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 23316,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "540:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"body": {
"id": 23338,
"nodeType": "Block",
"src": "603:180:24",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 23325,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 23320,
"name": "_bundleModule",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23315,
"src": "621:13:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 23323,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "646:1:24",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 23322,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "638:7:24",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 23321,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "638:7:24",
"typeDescriptions": {}
}
},
"id": 23324,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "638:10:24",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "621:27:24",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a42544b2d3030313a4e4f545f494e495449414c495a4544",
"id": 23326,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "650:31:24",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_71c345712a418cc2c46cd273ab8511c6cbb55feb2ba9f1d283511627144b0e51",
"typeString": "literal_string \"ERROR:BTK-001:NOT_INITIALIZED\""
},
"value": "ERROR:BTK-001:NOT_INITIALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_71c345712a418cc2c46cd273ab8511c6cbb55feb2ba9f1d283511627144b0e51",
"typeString": "literal_string \"ERROR:BTK-001:NOT_INITIALIZED\""
}
],
"id": 23319,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "613:7:24",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 23327,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "613:69:24",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 23328,
"nodeType": "ExpressionStatement",
"src": "613:69:24"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 23333,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 23330,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15638,
"src": "700:10:24",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 23331,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "700:12:24",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 23332,
"name": "_bundleModule",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23315,
"src": "716:13:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "700:29:24",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a42544b2d3030323a4e4f545f42554e444c455f4d4f44554c45",
"id": 23334,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "731:33:24",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e4463d809287d808796cb4a3a161ee1bce186c0b33e3e1818bc6844ffcc5748f",
"typeString": "literal_string \"ERROR:BTK-002:NOT_BUNDLE_MODULE\""
},
"value": "ERROR:BTK-002:NOT_BUNDLE_MODULE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_e4463d809287d808796cb4a3a161ee1bce186c0b33e3e1818bc6844ffcc5748f",
"typeString": "literal_string \"ERROR:BTK-002:NOT_BUNDLE_MODULE\""
}
],
"id": 23329,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "692:7:24",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 23335,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "692:73:24",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 23336,
"nodeType": "ExpressionStatement",
"src": "692:73:24"
},
{
"id": 23337,
"nodeType": "PlaceholderStatement",
"src": "775:1:24"
}
]
},
"id": 23339,
"name": "onlyBundleModule",
"nameLocation": "584:16:24",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 23318,
"nodeType": "ParameterList",
"parameters": [],
"src": "600:2:24"
},
"src": "575:208:24",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 23348,
"nodeType": "Block",
"src": "834:3:24",
"statements": []
},
"id": 23349,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"id": 23342,
"name": "NAME",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23306,
"src": "810:4:24",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
{
"id": 23343,
"name": "SYMBOL",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23309,
"src": "816:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"id": 23344,
"modifierName": {
"id": 23341,
"name": "ERC721",
"nodeType": "IdentifierPath",
"referencedDeclaration": 24557,
"src": "803:6:24"
},
"nodeType": "ModifierInvocation",
"src": "803:20:24"
},
{
"arguments": [],
"id": 23346,
"modifierName": {
"id": 23345,
"name": "Ownable",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9476,
"src": "824:7:24"
},
"nodeType": "ModifierInvocation",
"src": "824:9:24"
}
],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 23340,
"nodeType": "ParameterList",
"parameters": [],
"src": "800:2:24"
},
"returnParameters": {
"id": 23347,
"nodeType": "ParameterList",
"parameters": [],
"src": "834:0:24"
},
"scope": 23505,
"src": "789:48:24",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 23378,
"nodeType": "Block",
"src": "911:230:24",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 23360,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 23355,
"name": "_bundleModule",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23315,
"src": "929:13:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 23358,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "954:1:24",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 23357,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "946:7:24",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 23356,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "946:7:24",
"typeDescriptions": {}
}
},
"id": 23359,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "946:10:24",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "929:27:24",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a42544b2d3030333a42554e444c455f4d4f44554c455f414c52454144595f444546494e4544",
"id": 23361,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "958:45:24",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_abc636ae2799ac58b80df921189c05433792fe090199f11c917db3daf328f355",
"typeString": "literal_string \"ERROR:BTK-003:BUNDLE_MODULE_ALREADY_DEFINED\""
},
"value": "ERROR:BTK-003:BUNDLE_MODULE_ALREADY_DEFINED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_abc636ae2799ac58b80df921189c05433792fe090199f11c917db3daf328f355",
"typeString": "literal_string \"ERROR:BTK-003:BUNDLE_MODULE_ALREADY_DEFINED\""
}
],
"id": 23354,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "921:7:24",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 23362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "921:83:24",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 23363,
"nodeType": "ExpressionStatement",
"src": "921:83:24"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 23370,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 23365,
"name": "bundleModule",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23351,
"src": "1022:12:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 23368,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1046:1:24",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [