@latticexyz/world-modules 2.0.0-main-2b8c0bcc → 2.0.0-main-9448c3f1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/ERC20.t.sol/ERC20Test.json +1 -1
- package/out/ERC721.t.sol/ERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/ERC721Test.json +1 -1
- package/out/ERC721.t.sol/ERC721TokenReceiver.json +1 -1
- package/out/ERC721.t.sol/NonERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/RevertingERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/WrongReturnDataERC721Recipient.json +1 -1
- package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.json +1 -1
- package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.json +1 -1
- package/out/PuppetModule.t.sol/PuppetModuleTest.json +1 -1
- package/out/PuppetModule.t.sol/PuppetTestSystem.json +1 -1
- package/out/StandardDelegationsModule.t.sol/StandardDelegationsModuleTest.json +1 -1
- package/out/SystemSwitch.sol/SystemSwitch.json +1 -1
- package/out/SystemSwitch.t.sol/EchoSystem.abi.json +98 -1
- package/out/SystemSwitch.t.sol/EchoSystem.abi.json.d.ts +98 -1
- package/out/SystemSwitch.t.sol/EchoSystem.json +1 -1
- package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json +59 -15
- package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json.d.ts +59 -15
- package/out/SystemSwitch.t.sol/SystemSwitchTest.json +1 -1
- package/out/UniqueEntityModule.t.sol/UniqueEntityModuleTest.json +1 -1
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json +68 -0
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json.d.ts +68 -0
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.json +1 -1
- package/out/getUniqueEntity.sol/getUniqueEntity.json +1 -1
- package/out/query.t.sol/QueryTest.json +1 -1
- package/out/registerERC721.sol/registerERC721.json +1 -1
- package/package.json +8 -8
- package/src/utils/SystemSwitch.sol +6 -9
@@ -1 +1 @@
|
|
1
|
-
{"abi":[],"bytecode":{"object":"0x","linkReferences":{}},"deployedBytecode":{"object":"0x","linkReferences":{}},"ast":{"absolutePath":"src/modules/erc721-puppet/registerERC721.sol","id":99281,"exportedSymbols":{"ERC721MetadataData":[99323],"ERC721Module":[97549],"ERC721Registry":[102483],"ERC721_REGISTRY_TABLE_ID":[99191],"IBaseWorld":[24554],"IERC721Mintable":[99108],"MODULE_NAMESPACE_ID":[99152],"NamespaceOwner":[29959],"SystemSwitch":[128104],"WorldResourceIdLib":[24290],"registerERC721":[99280]},"nodeType":"SourceUnit","src":"32:1490:150","nodes":[{"id":99193,"nodeType":"PragmaDirective","src":"32:25:150","nodes":[],"literals":["solidity",">=","0.8",".24"]},{"id":99195,"nodeType":"ImportDirective","src":"59:85:150","nodes":[],"absolutePath":"node_modules/@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol","file":"@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":24555,"symbolAliases":[{"foreign":{"id":99194,"name":"IBaseWorld","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24554,"src":"68:10:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99197,"nodeType":"ImportDirective","src":"145:89:150","nodes":[],"absolutePath":"node_modules/@latticexyz/world/src/codegen/tables/NamespaceOwner.sol","file":"@latticexyz/world/src/codegen/tables/NamespaceOwner.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":29960,"symbolAliases":[{"foreign":{"id":99196,"name":"NamespaceOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":29959,"src":"154:14:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99199,"nodeType":"ImportDirective","src":"235:79:150","nodes":[],"absolutePath":"node_modules/@latticexyz/world/src/WorldResourceId.sol","file":"@latticexyz/world/src/WorldResourceId.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":24418,"symbolAliases":[{"foreign":{"id":99198,"name":"WorldResourceIdLib","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24290,"src":"244:18:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99201,"nodeType":"ImportDirective","src":"316:60:150","nodes":[],"absolutePath":"src/utils/SystemSwitch.sol","file":"../../utils/SystemSwitch.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":128105,"symbolAliases":[{"foreign":{"id":99200,"name":"SystemSwitch","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":128104,"src":"325:12:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99203,"nodeType":"ImportDirective","src":"378:50:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/ERC721Module.sol","file":"./ERC721Module.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":97643,"symbolAliases":[{"foreign":{"id":99202,"name":"ERC721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":97549,"src":"387:12:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99206,"nodeType":"ImportDirective","src":"429:80:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/constants.sol","file":"./constants.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":99192,"symbolAliases":[{"foreign":{"id":99204,"name":"MODULE_NAMESPACE_ID","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99152,"src":"438:19:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"},{"foreign":{"id":99205,"name":"ERC721_REGISTRY_TABLE_ID","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99191,"src":"459:24:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99208,"nodeType":"ImportDirective","src":"510:56:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/IERC721Mintable.sol","file":"./IERC721Mintable.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":99109,"symbolAliases":[{"foreign":{"id":99207,"name":"IERC721Mintable","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99108,"src":"519:15:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99210,"nodeType":"ImportDirective","src":"568:65:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/tables/ERC721Metadata.sol","file":"./tables/ERC721Metadata.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":101729,"symbolAliases":[{"foreign":{"id":99209,"name":"ERC721MetadataData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99323,"src":"577:18:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99212,"nodeType":"ImportDirective","src":"634:61:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/tables/ERC721Registry.sol","file":"./tables/ERC721Registry.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":102484,"symbolAliases":[{"foreign":{"id":99211,"name":"ERC721Registry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":102483,"src":"643:14:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99280,"nodeType":"FunctionDefinition","src":"892:629:150","nodes":[],"body":{"id":99279,"nodeType":"Block","src":"1029:492:150","nodes":[],"statements":[{"assignments":[99229],"declarations":[{"constant":false,"id":99229,"mutability":"mutable","name":"erc721Module","nameLocation":"1073:12:150","nodeType":"VariableDeclaration","scope":99279,"src":"1060:25:150","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"},"typeName":{"id":99228,"nodeType":"UserDefinedTypeName","pathNode":{"id":99227,"name":"ERC721Module","nameLocations":["1060:12:150"],"nodeType":"IdentifierPath","referencedDeclaration":97549,"src":"1060:12:150"},"referencedDeclaration":97549,"src":"1060:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"visibility":"internal"}],"id":99236,"initialValue":{"arguments":[{"arguments":[{"id":99233,"name":"MODULE_NAMESPACE_ID","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99152,"src":"1120:19:150","typeDescriptions":{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}],"expression":{"id":99231,"name":"NamespaceOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":29959,"src":"1101:14:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_NamespaceOwner_$29959_$","typeString":"type(library NamespaceOwner)"}},"id":99232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1116:3:150","memberName":"get","nodeType":"MemberAccess","referencedDeclaration":29583,"src":"1101:18:150","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_userDefinedValueType$_ResourceId_$2782_$returns$_t_address_$","typeString":"function (ResourceId) view returns (address)"}},"id":99234,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1101:39:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":99230,"name":"ERC721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":97549,"src":"1088:12:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ERC721Module_$97549_$","typeString":"type(contract ERC721Module)"}},"id":99235,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1088:53:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"nodeType":"VariableDeclarationStatement","src":"1060:81:150"},{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":99245,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"id":99239,"name":"erc721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99229,"src":"1157:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}],"id":99238,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1149:7:150","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":99237,"name":"address","nodeType":"ElementaryTypeName","src":"1149:7:150","typeDescriptions":{}}},"id":99240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1149:21:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"arguments":[{"hexValue":"30","id":99243,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1182:1:150","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":99242,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1174:7:150","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":99241,"name":"address","nodeType":"ElementaryTypeName","src":"1174:7:150","typeDescriptions":{}}},"id":99244,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1174:10:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1149:35:150","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":99254,"nodeType":"IfStatement","src":"1145:85:150","trueBody":{"id":99253,"nodeType":"Block","src":"1186:44:150","statements":[{"expression":{"id":99251,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":99246,"name":"erc721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99229,"src":"1192:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[],"expression":{"argumentTypes":[],"id":99249,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1207:16:150","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$__$returns$_t_contract$_ERC721Module_$97549_$","typeString":"function () returns (contract ERC721Module)"},"typeName":{"id":99248,"nodeType":"UserDefinedTypeName","pathNode":{"id":99247,"name":"ERC721Module","nameLocations":["1211:12:150"],"nodeType":"IdentifierPath","referencedDeclaration":97549,"src":"1211:12:150"},"referencedDeclaration":97549,"src":"1211:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}}},"id":99250,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1207:18:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"src":"1192:33:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"id":99252,"nodeType":"ExpressionStatement","src":"1192:33:150"}]}},{"expression":{"arguments":[{"id":99258,"name":"erc721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99229,"src":"1308:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},{"arguments":[{"id":99261,"name":"namespace","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99218,"src":"1333:9:150","typeDescriptions":{"typeIdentifier":"t_bytes14","typeString":"bytes14"}},{"id":99262,"name":"metadata","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99221,"src":"1344:8:150","typeDescriptions":{"typeIdentifier":"t_struct$_ERC721MetadataData_$99323_memory_ptr","typeString":"struct ERC721MetadataData memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes14","typeString":"bytes14"},{"typeIdentifier":"t_struct$_ERC721MetadataData_$99323_memory_ptr","typeString":"struct ERC721MetadataData memory"}],"expression":{"id":99259,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-1,"src":"1322:3:150","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":99260,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberLocation":"1326:6:150","memberName":"encode","nodeType":"MemberAccess","src":"1322:10:150","typeDescriptions":{"typeIdentifier":"t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":99263,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1322:31:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"},{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"expression":{"id":99255,"name":"world","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99216,"src":"1288:5:150","typeDescriptions":{"typeIdentifier":"t_contract$_IBaseWorld_$24554","typeString":"contract IBaseWorld"}},"id":99257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1294:13:150","memberName":"installModule","nodeType":"MemberAccess","referencedDeclaration":24594,"src":"1288:19:150","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_IModule_$22390_$_t_bytes_memory_ptr_$returns$__$","typeString":"function (contract IModule,bytes memory) external"}},"id":99264,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1288:66:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":99265,"nodeType":"ExpressionStatement","src":"1288:66:150"},{"expression":{"id":99277,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":99266,"name":"token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99225,"src":"1402:5:150","typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"arguments":[{"id":99270,"name":"ERC721_REGISTRY_TABLE_ID","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99191,"src":"1445:24:150","typeDescriptions":{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}},{"arguments":[{"id":99273,"name":"namespace","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99218,"src":"1506:9:150","typeDescriptions":{"typeIdentifier":"t_bytes14","typeString":"bytes14"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes14","typeString":"bytes14"}],"expression":{"id":99271,"name":"WorldResourceIdLib","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24290,"src":"1471:18:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_WorldResourceIdLib_$24290_$","typeString":"type(library WorldResourceIdLib)"}},"id":99272,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1490:15:150","memberName":"encodeNamespace","nodeType":"MemberAccess","referencedDeclaration":24245,"src":"1471:34:150","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_bytes14_$returns$_t_userDefinedValueType$_ResourceId_$2782_$","typeString":"function (bytes14) pure returns (ResourceId)"}},"id":99274,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1471:45:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"},{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}],"expression":{"id":99268,"name":"ERC721Registry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":102483,"src":"1426:14:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ERC721Registry_$102483_$","typeString":"type(library ERC721Registry)"}},"id":99269,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1441:3:150","memberName":"get","nodeType":"MemberAccess","referencedDeclaration":102086,"src":"1426:18:150","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_userDefinedValueType$_ResourceId_$2782_$_t_userDefinedValueType$_ResourceId_$2782_$returns$_t_address_$","typeString":"function (ResourceId,ResourceId) view returns (address)"}},"id":99275,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1426:91:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":99267,"name":"IERC721Mintable","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99108,"src":"1410:15:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_IERC721Mintable_$99108_$","typeString":"type(contract IERC721Mintable)"}},"id":99276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1410:108:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"}},"src":"1402:116:150","typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"}},"id":99278,"nodeType":"ExpressionStatement","src":"1402:116:150"}]},"documentation":{"id":99213,"nodeType":"StructuredDocumentation","src":"697:194:150","text":" @notice Register a new ERC721 token with the given metadata in a given namespace\n @dev This function must be called within a Store context (i.e. using StoreSwitch.setStoreAddress())"},"implemented":true,"kind":"freeFunction","modifiers":[],"name":"registerERC721","nameLocation":"901:14:150","parameters":{"id":99222,"nodeType":"ParameterList","parameters":[{"constant":false,"id":99216,"mutability":"mutable","name":"world","nameLocation":"930:5:150","nodeType":"VariableDeclaration","scope":99280,"src":"919:16:150","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_IBaseWorld_$24554","typeString":"contract IBaseWorld"},"typeName":{"id":99215,"nodeType":"UserDefinedTypeName","pathNode":{"id":99214,"name":"IBaseWorld","nameLocations":["919:10:150"],"nodeType":"IdentifierPath","referencedDeclaration":24554,"src":"919:10:150"},"referencedDeclaration":24554,"src":"919:10:150","typeDescriptions":{"typeIdentifier":"t_contract$_IBaseWorld_$24554","typeString":"contract IBaseWorld"}},"visibility":"internal"},{"constant":false,"id":99218,"mutability":"mutable","name":"namespace","nameLocation":"947:9:150","nodeType":"VariableDeclaration","scope":99280,"src":"939:17:150","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes14","typeString":"bytes14"},"typeName":{"id":99217,"name":"bytes14","nodeType":"ElementaryTypeName","src":"939:7:150","typeDescriptions":{"typeIdentifier":"t_bytes14","typeString":"bytes14"}},"visibility":"internal"},{"constant":false,"id":99221,"mutability":"mutable","name":"metadata","nameLocation":"986:8:150","nodeType":"VariableDeclaration","scope":99280,"src":"960:34:150","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_ERC721MetadataData_$99323_memory_ptr","typeString":"struct ERC721MetadataData"},"typeName":{"id":99220,"nodeType":"UserDefinedTypeName","pathNode":{"id":99219,"name":"ERC721MetadataData","nameLocations":["960:18:150"],"nodeType":"IdentifierPath","referencedDeclaration":99323,"src":"960:18:150"},"referencedDeclaration":99323,"src":"960:18:150","typeDescriptions":{"typeIdentifier":"t_struct$_ERC721MetadataData_$99323_storage_ptr","typeString":"struct ERC721MetadataData"}},"visibility":"internal"}],"src":"915:81:150"},"returnParameters":{"id":99226,"nodeType":"ParameterList","parameters":[{"constant":false,"id":99225,"mutability":"mutable","name":"token","nameLocation":"1022:5:150","nodeType":"VariableDeclaration","scope":99280,"src":"1006:21:150","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"},"typeName":{"id":99224,"nodeType":"UserDefinedTypeName","pathNode":{"id":99223,"name":"IERC721Mintable","nameLocations":["1006:15:150"],"nodeType":"IdentifierPath","referencedDeclaration":99108,"src":"1006:15:150"},"referencedDeclaration":99108,"src":"1006:15:150","typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"}},"visibility":"internal"}],"src":"1005:23:150"},"scope":99281,"stateMutability":"nonpayable","virtual":false,"visibility":"internal"}],"license":"MIT"},"id":150}
|
1
|
+
{"abi":[],"bytecode":{"object":"0x","linkReferences":{}},"deployedBytecode":{"object":"0x","linkReferences":{}},"ast":{"absolutePath":"src/modules/erc721-puppet/registerERC721.sol","id":99281,"exportedSymbols":{"ERC721MetadataData":[99323],"ERC721Module":[97549],"ERC721Registry":[102483],"ERC721_REGISTRY_TABLE_ID":[99191],"IBaseWorld":[24554],"IERC721Mintable":[99108],"MODULE_NAMESPACE_ID":[99152],"NamespaceOwner":[29959],"SystemSwitch":[128081],"WorldResourceIdLib":[24290],"registerERC721":[99280]},"nodeType":"SourceUnit","src":"32:1490:150","nodes":[{"id":99193,"nodeType":"PragmaDirective","src":"32:25:150","nodes":[],"literals":["solidity",">=","0.8",".24"]},{"id":99195,"nodeType":"ImportDirective","src":"59:85:150","nodes":[],"absolutePath":"node_modules/@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol","file":"@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":24555,"symbolAliases":[{"foreign":{"id":99194,"name":"IBaseWorld","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24554,"src":"68:10:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99197,"nodeType":"ImportDirective","src":"145:89:150","nodes":[],"absolutePath":"node_modules/@latticexyz/world/src/codegen/tables/NamespaceOwner.sol","file":"@latticexyz/world/src/codegen/tables/NamespaceOwner.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":29960,"symbolAliases":[{"foreign":{"id":99196,"name":"NamespaceOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":29959,"src":"154:14:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99199,"nodeType":"ImportDirective","src":"235:79:150","nodes":[],"absolutePath":"node_modules/@latticexyz/world/src/WorldResourceId.sol","file":"@latticexyz/world/src/WorldResourceId.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":24418,"symbolAliases":[{"foreign":{"id":99198,"name":"WorldResourceIdLib","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24290,"src":"244:18:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99201,"nodeType":"ImportDirective","src":"316:60:150","nodes":[],"absolutePath":"src/utils/SystemSwitch.sol","file":"../../utils/SystemSwitch.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":128082,"symbolAliases":[{"foreign":{"id":99200,"name":"SystemSwitch","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":128081,"src":"325:12:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99203,"nodeType":"ImportDirective","src":"378:50:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/ERC721Module.sol","file":"./ERC721Module.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":97643,"symbolAliases":[{"foreign":{"id":99202,"name":"ERC721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":97549,"src":"387:12:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99206,"nodeType":"ImportDirective","src":"429:80:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/constants.sol","file":"./constants.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":99192,"symbolAliases":[{"foreign":{"id":99204,"name":"MODULE_NAMESPACE_ID","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99152,"src":"438:19:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"},{"foreign":{"id":99205,"name":"ERC721_REGISTRY_TABLE_ID","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99191,"src":"459:24:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99208,"nodeType":"ImportDirective","src":"510:56:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/IERC721Mintable.sol","file":"./IERC721Mintable.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":99109,"symbolAliases":[{"foreign":{"id":99207,"name":"IERC721Mintable","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99108,"src":"519:15:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99210,"nodeType":"ImportDirective","src":"568:65:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/tables/ERC721Metadata.sol","file":"./tables/ERC721Metadata.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":101729,"symbolAliases":[{"foreign":{"id":99209,"name":"ERC721MetadataData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99323,"src":"577:18:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99212,"nodeType":"ImportDirective","src":"634:61:150","nodes":[],"absolutePath":"src/modules/erc721-puppet/tables/ERC721Registry.sol","file":"./tables/ERC721Registry.sol","nameLocation":"-1:-1:-1","scope":99281,"sourceUnit":102484,"symbolAliases":[{"foreign":{"id":99211,"name":"ERC721Registry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":102483,"src":"643:14:150","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":99280,"nodeType":"FunctionDefinition","src":"892:629:150","nodes":[],"body":{"id":99279,"nodeType":"Block","src":"1029:492:150","nodes":[],"statements":[{"assignments":[99229],"declarations":[{"constant":false,"id":99229,"mutability":"mutable","name":"erc721Module","nameLocation":"1073:12:150","nodeType":"VariableDeclaration","scope":99279,"src":"1060:25:150","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"},"typeName":{"id":99228,"nodeType":"UserDefinedTypeName","pathNode":{"id":99227,"name":"ERC721Module","nameLocations":["1060:12:150"],"nodeType":"IdentifierPath","referencedDeclaration":97549,"src":"1060:12:150"},"referencedDeclaration":97549,"src":"1060:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"visibility":"internal"}],"id":99236,"initialValue":{"arguments":[{"arguments":[{"id":99233,"name":"MODULE_NAMESPACE_ID","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99152,"src":"1120:19:150","typeDescriptions":{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}],"expression":{"id":99231,"name":"NamespaceOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":29959,"src":"1101:14:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_NamespaceOwner_$29959_$","typeString":"type(library NamespaceOwner)"}},"id":99232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1116:3:150","memberName":"get","nodeType":"MemberAccess","referencedDeclaration":29583,"src":"1101:18:150","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_userDefinedValueType$_ResourceId_$2782_$returns$_t_address_$","typeString":"function (ResourceId) view returns (address)"}},"id":99234,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1101:39:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":99230,"name":"ERC721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":97549,"src":"1088:12:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ERC721Module_$97549_$","typeString":"type(contract ERC721Module)"}},"id":99235,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1088:53:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"nodeType":"VariableDeclarationStatement","src":"1060:81:150"},{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":99245,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"id":99239,"name":"erc721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99229,"src":"1157:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}],"id":99238,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1149:7:150","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":99237,"name":"address","nodeType":"ElementaryTypeName","src":"1149:7:150","typeDescriptions":{}}},"id":99240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1149:21:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"arguments":[{"hexValue":"30","id":99243,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1182:1:150","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":99242,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1174:7:150","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":99241,"name":"address","nodeType":"ElementaryTypeName","src":"1174:7:150","typeDescriptions":{}}},"id":99244,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1174:10:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1149:35:150","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":99254,"nodeType":"IfStatement","src":"1145:85:150","trueBody":{"id":99253,"nodeType":"Block","src":"1186:44:150","statements":[{"expression":{"id":99251,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":99246,"name":"erc721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99229,"src":"1192:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[],"expression":{"argumentTypes":[],"id":99249,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1207:16:150","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$__$returns$_t_contract$_ERC721Module_$97549_$","typeString":"function () returns (contract ERC721Module)"},"typeName":{"id":99248,"nodeType":"UserDefinedTypeName","pathNode":{"id":99247,"name":"ERC721Module","nameLocations":["1211:12:150"],"nodeType":"IdentifierPath","referencedDeclaration":97549,"src":"1211:12:150"},"referencedDeclaration":97549,"src":"1211:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}}},"id":99250,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1207:18:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"src":"1192:33:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},"id":99252,"nodeType":"ExpressionStatement","src":"1192:33:150"}]}},{"expression":{"arguments":[{"id":99258,"name":"erc721Module","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99229,"src":"1308:12:150","typeDescriptions":{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"}},{"arguments":[{"id":99261,"name":"namespace","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99218,"src":"1333:9:150","typeDescriptions":{"typeIdentifier":"t_bytes14","typeString":"bytes14"}},{"id":99262,"name":"metadata","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99221,"src":"1344:8:150","typeDescriptions":{"typeIdentifier":"t_struct$_ERC721MetadataData_$99323_memory_ptr","typeString":"struct ERC721MetadataData memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes14","typeString":"bytes14"},{"typeIdentifier":"t_struct$_ERC721MetadataData_$99323_memory_ptr","typeString":"struct ERC721MetadataData memory"}],"expression":{"id":99259,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-1,"src":"1322:3:150","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":99260,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberLocation":"1326:6:150","memberName":"encode","nodeType":"MemberAccess","src":"1322:10:150","typeDescriptions":{"typeIdentifier":"t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":99263,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1322:31:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC721Module_$97549","typeString":"contract ERC721Module"},{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"expression":{"id":99255,"name":"world","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99216,"src":"1288:5:150","typeDescriptions":{"typeIdentifier":"t_contract$_IBaseWorld_$24554","typeString":"contract IBaseWorld"}},"id":99257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1294:13:150","memberName":"installModule","nodeType":"MemberAccess","referencedDeclaration":24594,"src":"1288:19:150","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_IModule_$22390_$_t_bytes_memory_ptr_$returns$__$","typeString":"function (contract IModule,bytes memory) external"}},"id":99264,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1288:66:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":99265,"nodeType":"ExpressionStatement","src":"1288:66:150"},{"expression":{"id":99277,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":99266,"name":"token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99225,"src":"1402:5:150","typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"arguments":[{"id":99270,"name":"ERC721_REGISTRY_TABLE_ID","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99191,"src":"1445:24:150","typeDescriptions":{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}},{"arguments":[{"id":99273,"name":"namespace","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99218,"src":"1506:9:150","typeDescriptions":{"typeIdentifier":"t_bytes14","typeString":"bytes14"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes14","typeString":"bytes14"}],"expression":{"id":99271,"name":"WorldResourceIdLib","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24290,"src":"1471:18:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_WorldResourceIdLib_$24290_$","typeString":"type(library WorldResourceIdLib)"}},"id":99272,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1490:15:150","memberName":"encodeNamespace","nodeType":"MemberAccess","referencedDeclaration":24245,"src":"1471:34:150","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_bytes14_$returns$_t_userDefinedValueType$_ResourceId_$2782_$","typeString":"function (bytes14) pure returns (ResourceId)"}},"id":99274,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1471:45:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"},{"typeIdentifier":"t_userDefinedValueType$_ResourceId_$2782","typeString":"ResourceId"}],"expression":{"id":99268,"name":"ERC721Registry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":102483,"src":"1426:14:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ERC721Registry_$102483_$","typeString":"type(library ERC721Registry)"}},"id":99269,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1441:3:150","memberName":"get","nodeType":"MemberAccess","referencedDeclaration":102086,"src":"1426:18:150","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_userDefinedValueType$_ResourceId_$2782_$_t_userDefinedValueType$_ResourceId_$2782_$returns$_t_address_$","typeString":"function (ResourceId,ResourceId) view returns (address)"}},"id":99275,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1426:91:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":99267,"name":"IERC721Mintable","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":99108,"src":"1410:15:150","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_IERC721Mintable_$99108_$","typeString":"type(contract IERC721Mintable)"}},"id":99276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1410:108:150","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"}},"src":"1402:116:150","typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"}},"id":99278,"nodeType":"ExpressionStatement","src":"1402:116:150"}]},"documentation":{"id":99213,"nodeType":"StructuredDocumentation","src":"697:194:150","text":" @notice Register a new ERC721 token with the given metadata in a given namespace\n @dev This function must be called within a Store context (i.e. using StoreSwitch.setStoreAddress())"},"implemented":true,"kind":"freeFunction","modifiers":[],"name":"registerERC721","nameLocation":"901:14:150","parameters":{"id":99222,"nodeType":"ParameterList","parameters":[{"constant":false,"id":99216,"mutability":"mutable","name":"world","nameLocation":"930:5:150","nodeType":"VariableDeclaration","scope":99280,"src":"919:16:150","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_IBaseWorld_$24554","typeString":"contract IBaseWorld"},"typeName":{"id":99215,"nodeType":"UserDefinedTypeName","pathNode":{"id":99214,"name":"IBaseWorld","nameLocations":["919:10:150"],"nodeType":"IdentifierPath","referencedDeclaration":24554,"src":"919:10:150"},"referencedDeclaration":24554,"src":"919:10:150","typeDescriptions":{"typeIdentifier":"t_contract$_IBaseWorld_$24554","typeString":"contract IBaseWorld"}},"visibility":"internal"},{"constant":false,"id":99218,"mutability":"mutable","name":"namespace","nameLocation":"947:9:150","nodeType":"VariableDeclaration","scope":99280,"src":"939:17:150","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes14","typeString":"bytes14"},"typeName":{"id":99217,"name":"bytes14","nodeType":"ElementaryTypeName","src":"939:7:150","typeDescriptions":{"typeIdentifier":"t_bytes14","typeString":"bytes14"}},"visibility":"internal"},{"constant":false,"id":99221,"mutability":"mutable","name":"metadata","nameLocation":"986:8:150","nodeType":"VariableDeclaration","scope":99280,"src":"960:34:150","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_ERC721MetadataData_$99323_memory_ptr","typeString":"struct ERC721MetadataData"},"typeName":{"id":99220,"nodeType":"UserDefinedTypeName","pathNode":{"id":99219,"name":"ERC721MetadataData","nameLocations":["960:18:150"],"nodeType":"IdentifierPath","referencedDeclaration":99323,"src":"960:18:150"},"referencedDeclaration":99323,"src":"960:18:150","typeDescriptions":{"typeIdentifier":"t_struct$_ERC721MetadataData_$99323_storage_ptr","typeString":"struct ERC721MetadataData"}},"visibility":"internal"}],"src":"915:81:150"},"returnParameters":{"id":99226,"nodeType":"ParameterList","parameters":[{"constant":false,"id":99225,"mutability":"mutable","name":"token","nameLocation":"1022:5:150","nodeType":"VariableDeclaration","scope":99280,"src":"1006:21:150","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"},"typeName":{"id":99224,"nodeType":"UserDefinedTypeName","pathNode":{"id":99223,"name":"IERC721Mintable","nameLocations":["1006:15:150"],"nodeType":"IdentifierPath","referencedDeclaration":99108,"src":"1006:15:150"},"referencedDeclaration":99108,"src":"1006:15:150","typeDescriptions":{"typeIdentifier":"t_contract$_IERC721Mintable_$99108","typeString":"contract IERC721Mintable"}},"visibility":"internal"}],"src":"1005:23:150"},"scope":99281,"stateMutability":"nonpayable","virtual":false,"visibility":"internal"}],"license":"MIT"},"id":150}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@latticexyz/world-modules",
|
3
|
-
"version": "2.0.0-main-
|
3
|
+
"version": "2.0.0-main-9448c3f1",
|
4
4
|
"description": "World modules",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -15,11 +15,11 @@
|
|
15
15
|
},
|
16
16
|
"dependencies": {
|
17
17
|
"zod": "^3.21.4",
|
18
|
-
"@latticexyz/common": "2.0.0-main-
|
19
|
-
"@latticexyz/
|
20
|
-
"@latticexyz/
|
21
|
-
"@latticexyz/
|
22
|
-
"@latticexyz/
|
18
|
+
"@latticexyz/common": "2.0.0-main-9448c3f1",
|
19
|
+
"@latticexyz/config": "2.0.0-main-9448c3f1",
|
20
|
+
"@latticexyz/schema-type": "2.0.0-main-9448c3f1",
|
21
|
+
"@latticexyz/store": "2.0.0-main-9448c3f1",
|
22
|
+
"@latticexyz/world": "2.0.0-main-9448c3f1"
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
25
|
"@types/ejs": "^3.1.1",
|
@@ -34,8 +34,8 @@
|
|
34
34
|
"tsup": "^6.7.0",
|
35
35
|
"tsx": "^3.12.6",
|
36
36
|
"vitest": "0.34.6",
|
37
|
-
"@latticexyz/abi-ts": "2.0.0-main-
|
38
|
-
"@latticexyz/gas-report": "2.0.0-main-
|
37
|
+
"@latticexyz/abi-ts": "2.0.0-main-9448c3f1",
|
38
|
+
"@latticexyz/gas-report": "2.0.0-main-9448c3f1"
|
39
39
|
},
|
40
40
|
"publishConfig": {
|
41
41
|
"access": "public"
|
@@ -11,6 +11,7 @@ import { AccessControl } from "@latticexyz/world/src/AccessControl.sol";
|
|
11
11
|
import { ROOT_NAMESPACE } from "@latticexyz/world/src/constants.sol";
|
12
12
|
import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
|
13
13
|
import { BEFORE_CALL_SYSTEM, AFTER_CALL_SYSTEM } from "@latticexyz/world/src/systemHookTypes.sol";
|
14
|
+
import { SystemCall } from "@latticexyz/world/src/SystemCall.sol";
|
14
15
|
|
15
16
|
import { IWorldErrors } from "@latticexyz/world/src/IWorldErrors.sol";
|
16
17
|
import { ISystemHook } from "@latticexyz/world/src/ISystemHook.sol";
|
@@ -39,17 +40,13 @@ library SystemSwitch {
|
|
39
40
|
function call(ResourceId systemId, bytes memory callData) internal returns (bytes memory returnData) {
|
40
41
|
address worldAddress = WorldContextConsumerLib._world();
|
41
42
|
|
42
|
-
// If we're in the World context, call the
|
43
|
+
// If we're in the World context, call via the internal library
|
43
44
|
if (address(this) == worldAddress) {
|
44
|
-
(address systemAddress, ) = Systems.get(systemId);
|
45
|
-
// Check if the system exists
|
46
|
-
if (systemAddress == address(0)) revert IWorldErrors.World_ResourceNotFound(systemId, systemId.toString());
|
47
|
-
|
48
45
|
bool success;
|
49
|
-
(success, returnData) =
|
50
|
-
|
51
|
-
|
52
|
-
|
46
|
+
(success, returnData) = SystemCall.call({
|
47
|
+
caller: WorldContextConsumerLib._msgSender(),
|
48
|
+
value: 0,
|
49
|
+
systemId: systemId,
|
53
50
|
callData: callData
|
54
51
|
});
|
55
52
|
|