difftreelog
delete `EvmToSustrate` folder
in: master
10 files changed
tests/src/eth/evmToSubstrate/ABI/EvmToSubstrate.jsondiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/ABI/EvmToSubstrate.json
+++ /dev/null
@@ -1,5909 +0,0 @@
-{
- "contractName": "EvmToSubstrate",
- "abi": [
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "_toEth",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "_toSub",
- "type": "uint256"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "_collection",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "_tokenId",
- "type": "uint256"
- }
- ],
- "name": "MintToSub",
- "type": "event"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "_collection",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "_substrateReceiver",
- "type": "uint256"
- }
- ],
- "name": "mintToSubstrate",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "_collection",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "_substrateReceiver",
- "type": "uint256"
- },
- {
- "components": [
- {
- "internalType": "string",
- "name": "key",
- "type": "string"
- },
- {
- "internalType": "bytes",
- "name": "value",
- "type": "bytes"
- }
- ],
- "internalType": "struct Property[]",
- "name": "properties",
- "type": "tuple[]"
- }
- ],
- "name": "mintToSubstrateWithProperty",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
- ],
- "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_toEth\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toSub\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"MintToSub\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_substrateReceiver\",\"type\":\"uint256\"}],\"name\":\"mintToSubstrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_substrateReceiver\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"value\",\"type\":\"bytes\"}],\"internalType\":\"struct Property[]\",\"name\":\"properties\",\"type\":\"tuple[]\"}],\"name\":\"mintToSubstrateWithProperty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"MintToSub(address,uint256,address,uint256)\":{\"details\":\"This emits when a mint to a substrate address has been made.\"}},\"kind\":\"dev\",\"methods\":{\"mintToSubstrate(address,uint256)\":{\"details\":\"Throws if RFT collection is already configured for this contract. Throws if collection of wrong type (NFT, Fungible) is provided instead of RFT collection. Throws if `msg.sender` is not owner or admin of provided RFT collection. Can only be called by contract owner.\",\"params\":{\"_collection\":\"address of RFT collection.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"mintToSubstrate(address,uint256)\":{\"notice\":\"Set RFT collection that contract will work with. RFT tokens for fractionalized NFT tokens would be created in this collection.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/evmToSubstrate/EvmToSubstrateHelper.sol\":\"EvmToSubstrate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/CollectionHelpers.sol\":{\"keccak256\":\"0xe91307f91e63b71da7395290b787ab8a4aeb8fe7d3a84cdae31cbce9fc9feda0\",\"license\":\"OTHER\",\"urls\":[\"bzz-raw://695a2b10727b1dc1630bc3b5beeda3b9c49a2b930ca55225f06dca1b171ecc58\",\"dweb:/ipfs/QmXvsf3FijN8NhkQza9iDkiF9CQJswhnHtWwLMxywVcEV6\"]},\"/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/ContractHelpers.sol\":{\"keccak256\":\"0xbf6cbc8921b46aceef74fcb0218f8af41a5c1c8c09278cd29b055d39af4ba06c\",\"license\":\"OTHER\",\"urls\":[\"bzz-raw://cb309a7e806ab15bf7db1469c70ce547e358783a8be709d48632062600bbdf58\",\"dweb:/ipfs/QmcUViezUamzuLB9Pp5AjwNbSNLdVqnrSbvrRMkHoEb5DY\"]},\"/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/UniqueNFT.sol\":{\"keccak256\":\"0x1f42224d400226c94cc333ee95b2158f91e157e49a056054dbef3295d603e7e9\",\"license\":\"OTHER\",\"urls\":[\"bzz-raw://fa5f97112c5d7b6749e3a3f554b6593706e132042ac669dc8b4c39f78e1160c1\",\"dweb:/ipfs/QmbrtRn7AbrH8Zu64m5aXJcNthooeZKgDC4NUm1WcJ6ZaU\"]},\"/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/UniqueRefungible.sol\":{\"keccak256\":\"0x265d5f1642a84fcdc5ebc874fa9857ada43f85b8f2621a43f64873f8897b7fa6\",\"license\":\"OTHER\",\"urls\":[\"bzz-raw://324fc61ea39a5f834665612e023d90facbe6d0af444d4c7769bd32999d7ab441\",\"dweb:/ipfs/QmQX446wQKaFfPaQ6Wv4QaUojGYJvB7TxWPAcFt5UtbUqC\"]},\"/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/UniqueRefungibleToken.sol\":{\"keccak256\":\"0xb59b9048e1b781ac57c466c9d323422cac264676232514a713ccacdb531d9c40\",\"license\":\"OTHER\",\"urls\":[\"bzz-raw://51ce50ac81d569f7e385b41fa1a4bb77d3358fb83ae420fae65b73dec54feb05\",\"dweb:/ipfs/QmQSpdWmxammhuDwFWn9jTAnALKCgyNUYYGDVQF8QRzB3w\"]},\"/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/evmToSubstrate/EvmToSubstrateHelper.sol\":{\"keccak256\":\"0x3f58b981bf3923d570d2cd0c4aa5bb2650a76da628b6b3dd0d4ba32237f514bb\",\"license\":\"Apache License\",\"urls\":[\"bzz-raw://de485cdf79fde3f3de802182a9a9a43799d21ec4c2277e07988b430c49578c71\",\"dweb:/ipfs/QmVNdwyLMp7zQD5sZPDeE1SXwKQCX3yXhTLEki4pZcHu9u\"]}},\"version\":1}",
- "bytecode": "608060405234801561001057600080fd5b50610e46806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063440dff9d1461003b5780637a8d978614610050575b600080fd5b61004e610049366004610aa4565b610063565b005b61004e61005e366004610b2e565b6106f9565b604051639811b0c760e01b8152336004820152849081906001600160a01b03821690639811b0c790602401602060405180830381865afa1580156100ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100cf9190610b58565b6100f45760405162461bcd60e51b81526004016100eb90610b81565b60405180910390fd5b82806101375760405162461bcd60e51b815260206004820152601260248201527150726f70657269657320697320656d70747960701b60448201526064016100eb565b60008790506000816001600160a01b031663d34b55b86040518163ffffffff1660e01b8152600401600060405180830381865afa15801561017c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101a49190810190610be7565b805160209182012060408051808201909152600a815269526546756e6769626c6560b01b920191909152905060007f3248d02b1e2f292b1142854ebdeec13d4b4f9224dbcdb24a3d7810fe54b7b295820161043f5760008a9050806001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561023c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102609190610cb1565b6040516340c10f1960e01b8152306004820152602481018290529092506001600160a01b038216906340c10f19906044016020604051808303816000875af11580156102b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d49190610b58565b5060005b858110156103b357816001600160a01b0316631752d67b848c8c8581811061030257610302610cca565b90506020028101906103149190610ce0565b61031e9080610d00565b8e8e8781811061033057610330610cca565b90506020028101906103429190610ce0565b610350906020810190610d00565b6040518663ffffffff1660e01b8152600401610370959493929190610d77565b600060405180830381600087803b15801561038a57600080fd5b505af115801561039e573d6000803e3d6000fd5b50505050806103ac90610db0565b90506102d8565b50604080518082018252308152600060208083018290528351808501855291825281018d9052915163d5cf430b60e01b81526001600160a01b0384169263d5cf430b92610407929091908790600401610dd7565b600060405180830381600087803b15801561042157600080fd5b505af1158015610435573d6000803e3d6000fd5b505050505061069d565b60408051808201909152600381526213919560ea1b6020909101527f63bec732f5ecee1b8b708f2f01c23aa0f0a08a1f0df248cedda343c476ebfe96820161063b5760008a9050806001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190610cb1565b6040516340c10f1960e01b8152306004820152602481018290529092506001600160a01b038216906340c10f19906044016020604051808303816000875af1158015610538573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055c9190610b58565b5060005b858110156103b357816001600160a01b0316631752d67b848c8c8581811061058a5761058a610cca565b905060200281019061059c9190610ce0565b6105a69080610d00565b8e8e878181106105b8576105b8610cca565b90506020028101906105ca9190610ce0565b6105d8906020810190610d00565b6040518663ffffffff1660e01b81526004016105f8959493929190610d77565b600060405180830381600087803b15801561061257600080fd5b505af1158015610626573d6000803e3d6000fd5b505050508061063490610db0565b9050610560565b60405162461bcd60e51b815260206004820152603160248201527f57726f6e6720636f6c6c656374696f6e20747970652e20576f726b73206f6e6c6044820152701e481dda5d1a08139195081bdc88149195607a1b60648201526084016100eb565b6040805160008152602081018b90526001600160a01b038c16818301526060810183905290517ffb3433367f20c42151d30b3d2c634726a94c4f9fa7d45120606029741aeb75359181900360800190a150505050505050505050565b604051639811b0c760e01b8152336004820152829081906001600160a01b03821690639811b0c790602401602060405180830381865afa158015610741573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107659190610b58565b6107815760405162461bcd60e51b81526004016100eb90610b81565b60008490506000816001600160a01b031663d34b55b86040518163ffffffff1660e01b8152600401600060405180830381865afa1580156107c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ee9190810190610be7565b805160209182012060408051808201909152600a815269526546756e6769626c6560b01b920191909152905060007f3248d02b1e2f292b1142854ebdeec13d4b4f9224dbcdb24a3d7810fe54b7b29582016109aa576000879050806001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610886573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108aa9190610cb1565b6040516340c10f1960e01b8152306004820152602481018290529092506001600160a01b038216906340c10f19906044016020604051808303816000875af11580156108fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091e9190610b58565b50604080518082018252308152600060208083018290528351808501855291825281018a9052915163d5cf430b60e01b81526001600160a01b0384169263d5cf430b92610972929091908790600401610dd7565b600060405180830381600087803b15801561098c57600080fd5b505af11580156109a0573d6000803e3d6000fd5b5050505050610a2f565b60408051808201909152600381526213919560ea1b6020909101527f63bec732f5ecee1b8b708f2f01c23aa0f0a08a1f0df248cedda343c476ebfe96820161063b576000879050806001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610886573d6000803e3d6000fd5b6040805160008152602081018890526001600160a01b038916818301526060810183905290517ffb3433367f20c42151d30b3d2c634726a94c4f9fa7d45120606029741aeb75359181900360800190a150505050505050565b80356001600160a01b0381168114610a9f57600080fd5b919050565b60008060008060608587031215610aba57600080fd5b610ac385610a88565b935060208501359250604085013567ffffffffffffffff80821115610ae757600080fd5b818701915087601f830112610afb57600080fd5b813581811115610b0a57600080fd5b8860208260051b8501011115610b1f57600080fd5b95989497505060200194505050565b60008060408385031215610b4157600080fd5b610b4a83610a88565b946020939093013593505050565b600060208284031215610b6a57600080fd5b81518015158114610b7a57600080fd5b9392505050565b60208082526030908201527f4f6e6c7920636f6c6c656374696f6e2061646d696e2f6f776e65722063616e2060408201526f18d85b1b081d1a1a5cc81b595d1a1bd960821b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610bfa57600080fd5b825167ffffffffffffffff80821115610c1257600080fd5b818501915085601f830112610c2657600080fd5b815181811115610c3857610c38610bd1565b604051601f8201601f19908116603f01168101908382118183101715610c6057610c60610bd1565b816040528281528886848701011115610c7857600080fd5b600093505b82841015610c9a5784840186015181850187015292850192610c7d565b600086848301015280965050505050505092915050565b600060208284031215610cc357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60008235603e19833603018112610cf657600080fd5b9190910192915050565b6000808335601e19843603018112610d1757600080fd5b83018035915067ffffffffffffffff821115610d3257600080fd5b602001915036819003821315610d4757600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b858152606060208201526000610d91606083018688610d4e565b8281036040840152610da4818587610d4e565b98975050505050505050565b600060018201610dd057634e487b7160e01b600052601160045260246000fd5b5060010190565b83516001600160a01b03908116825260209485015185830152835116604082015291909201516060820152608081019190915260a0019056fea2646970667358221220da8ff84a103be9db6b42d85b4650dc8a633327ec7c4a8dc98e58ce322129c48664736f6c63430008110033",
- "deployedBytecode": "608060405234801561001057600080fd5b50600436106100365760003560e01c8063440dff9d1461003b5780637a8d978614610050575b600080fd5b61004e610049366004610aa4565b610063565b005b61004e61005e366004610b2e565b6106f9565b604051639811b0c760e01b8152336004820152849081906001600160a01b03821690639811b0c790602401602060405180830381865afa1580156100ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100cf9190610b58565b6100f45760405162461bcd60e51b81526004016100eb90610b81565b60405180910390fd5b82806101375760405162461bcd60e51b815260206004820152601260248201527150726f70657269657320697320656d70747960701b60448201526064016100eb565b60008790506000816001600160a01b031663d34b55b86040518163ffffffff1660e01b8152600401600060405180830381865afa15801561017c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101a49190810190610be7565b805160209182012060408051808201909152600a815269526546756e6769626c6560b01b920191909152905060007f3248d02b1e2f292b1142854ebdeec13d4b4f9224dbcdb24a3d7810fe54b7b295820161043f5760008a9050806001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561023c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102609190610cb1565b6040516340c10f1960e01b8152306004820152602481018290529092506001600160a01b038216906340c10f19906044016020604051808303816000875af11580156102b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d49190610b58565b5060005b858110156103b357816001600160a01b0316631752d67b848c8c8581811061030257610302610cca565b90506020028101906103149190610ce0565b61031e9080610d00565b8e8e8781811061033057610330610cca565b90506020028101906103429190610ce0565b610350906020810190610d00565b6040518663ffffffff1660e01b8152600401610370959493929190610d77565b600060405180830381600087803b15801561038a57600080fd5b505af115801561039e573d6000803e3d6000fd5b50505050806103ac90610db0565b90506102d8565b50604080518082018252308152600060208083018290528351808501855291825281018d9052915163d5cf430b60e01b81526001600160a01b0384169263d5cf430b92610407929091908790600401610dd7565b600060405180830381600087803b15801561042157600080fd5b505af1158015610435573d6000803e3d6000fd5b505050505061069d565b60408051808201909152600381526213919560ea1b6020909101527f63bec732f5ecee1b8b708f2f01c23aa0f0a08a1f0df248cedda343c476ebfe96820161063b5760008a9050806001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190610cb1565b6040516340c10f1960e01b8152306004820152602481018290529092506001600160a01b038216906340c10f19906044016020604051808303816000875af1158015610538573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055c9190610b58565b5060005b858110156103b357816001600160a01b0316631752d67b848c8c8581811061058a5761058a610cca565b905060200281019061059c9190610ce0565b6105a69080610d00565b8e8e878181106105b8576105b8610cca565b90506020028101906105ca9190610ce0565b6105d8906020810190610d00565b6040518663ffffffff1660e01b81526004016105f8959493929190610d77565b600060405180830381600087803b15801561061257600080fd5b505af1158015610626573d6000803e3d6000fd5b505050508061063490610db0565b9050610560565b60405162461bcd60e51b815260206004820152603160248201527f57726f6e6720636f6c6c656374696f6e20747970652e20576f726b73206f6e6c6044820152701e481dda5d1a08139195081bdc88149195607a1b60648201526084016100eb565b6040805160008152602081018b90526001600160a01b038c16818301526060810183905290517ffb3433367f20c42151d30b3d2c634726a94c4f9fa7d45120606029741aeb75359181900360800190a150505050505050505050565b604051639811b0c760e01b8152336004820152829081906001600160a01b03821690639811b0c790602401602060405180830381865afa158015610741573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107659190610b58565b6107815760405162461bcd60e51b81526004016100eb90610b81565b60008490506000816001600160a01b031663d34b55b86040518163ffffffff1660e01b8152600401600060405180830381865afa1580156107c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ee9190810190610be7565b805160209182012060408051808201909152600a815269526546756e6769626c6560b01b920191909152905060007f3248d02b1e2f292b1142854ebdeec13d4b4f9224dbcdb24a3d7810fe54b7b29582016109aa576000879050806001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610886573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108aa9190610cb1565b6040516340c10f1960e01b8152306004820152602481018290529092506001600160a01b038216906340c10f19906044016020604051808303816000875af11580156108fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091e9190610b58565b50604080518082018252308152600060208083018290528351808501855291825281018a9052915163d5cf430b60e01b81526001600160a01b0384169263d5cf430b92610972929091908790600401610dd7565b600060405180830381600087803b15801561098c57600080fd5b505af11580156109a0573d6000803e3d6000fd5b5050505050610a2f565b60408051808201909152600381526213919560ea1b6020909101527f63bec732f5ecee1b8b708f2f01c23aa0f0a08a1f0df248cedda343c476ebfe96820161063b576000879050806001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610886573d6000803e3d6000fd5b6040805160008152602081018890526001600160a01b038916818301526060810183905290517ffb3433367f20c42151d30b3d2c634726a94c4f9fa7d45120606029741aeb75359181900360800190a150505050505050565b80356001600160a01b0381168114610a9f57600080fd5b919050565b60008060008060608587031215610aba57600080fd5b610ac385610a88565b935060208501359250604085013567ffffffffffffffff80821115610ae757600080fd5b818701915087601f830112610afb57600080fd5b813581811115610b0a57600080fd5b8860208260051b8501011115610b1f57600080fd5b95989497505060200194505050565b60008060408385031215610b4157600080fd5b610b4a83610a88565b946020939093013593505050565b600060208284031215610b6a57600080fd5b81518015158114610b7a57600080fd5b9392505050565b60208082526030908201527f4f6e6c7920636f6c6c656374696f6e2061646d696e2f6f776e65722063616e2060408201526f18d85b1b081d1a1a5cc81b595d1a1bd960821b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610bfa57600080fd5b825167ffffffffffffffff80821115610c1257600080fd5b818501915085601f830112610c2657600080fd5b815181811115610c3857610c38610bd1565b604051601f8201601f19908116603f01168101908382118183101715610c6057610c60610bd1565b816040528281528886848701011115610c7857600080fd5b600093505b82841015610c9a5784840186015181850187015292850192610c7d565b600086848301015280965050505050505092915050565b600060208284031215610cc357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60008235603e19833603018112610cf657600080fd5b9190910192915050565b6000808335601e19843603018112610d1757600080fd5b83018035915067ffffffffffffffff821115610d3257600080fd5b602001915036819003821315610d4757600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b858152606060208201526000610d91606083018688610d4e565b8281036040840152610da4818587610d4e565b98975050505050505050565b600060018201610dd057634e487b7160e01b600052601160045260246000fd5b5060010190565b83516001600160a01b03908116825260209485015185830152835116604082015291909201516060820152608081019190915260a0019056fea2646970667358221220da8ff84a103be9db6b42d85b4650dc8a633327ec7c4a8dc98e58ce322129c48664736f6c63430008110033",
- "sourceMap": "494:5314:5:-:0;;;;;;;;;;;;;;;;;;;",
- "deployedSourceMap": "494:5314:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4031:1775;;;;;;:::i;:::-;;:::i;:::-;;2522:1506;;;;;;:::i;:::-;;:::i;4031:1775::-;1047:41;;-1:-1:-1;;;1047:41:5;;1077:10;1047:41;;;1387:51:6;4185:11:5;;;;-1:-1:-1;;;;;1047:29:5;;;;;1360:18:6;;1047:41:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1039:102;;;;-1:-1:-1;;;1039:102:5;;;;;;;:::i;:::-;;;;;;;;;4378:10;4407:20;4399:51:::1;;;::::0;-1:-1:-1;;;4399:51:5;;2350:2:6;4399:51:5::1;::::0;::::1;2332:21:6::0;2389:2;2369:18;;;2362:30;-1:-1:-1;;;2408:18:6;;;2401:48;2466:18;;4399:51:5::1;2148:342:6::0;4399:51:5::1;4455:25;4494:11;4455:51;;4510:22;4551:14;-1:-1:-1::0;;;;;4551:35:5::1;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;::::0;;::::1;-1:-1:-1::0;;4551:37:5::1;::::0;::::1;;::::0;::::1;::::0;;;::::1;::::0;::::1;:::i;:::-;4535:55:::0;;::::1;::::0;;::::1;::::0;577:19:::1;::::0;;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;577:19:5;::::1;::::0;;;;4535:55;-1:-1:-1;4594:15:5::1;4618:44:::0;;;4614:1064:::1;;4669:30;4719:11;4669:62;;4746:13;-1:-1:-1::0;;;;;4746:25:5::1;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4778:42;::::0;-1:-1:-1;;;4778:42:5;;4805:4:::1;4778:42;::::0;::::1;4037:51:6::0;4104:18;;;4097:34;;;4736:37:5;;-1:-1:-1;;;;;;4778:18:5;::::1;::::0;::::1;::::0;4010::6;;4778:42:5::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4830:9;4825:133;4849:16;4845:1;:20;4825:133;;;4878:13;-1:-1:-1::0;;;;;4878:25:5::1;;4904:7;4913:10;;4924:1;4913:13;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:17;::::0;;::::1;:::i;:::-;4932:10;;4943:1;4932:13;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:19;::::0;::::1;::::0;::::1;::::0;::::1;:::i;:::-;4878:74;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;4867:3;;;;:::i;:::-;;;4825:133;;;-1:-1:-1::0;4999:35:5::1;::::0;;;;::::1;::::0;;5025:4:::1;4999:35:::0;;-1:-1:-1;4999:35:5::1;::::0;;::::1;::::0;;;5040:49;;;;::::1;::::0;;;;;;::::1;::::0;;;4962:145;;-1:-1:-1;;;4962:145:5;;-1:-1:-1;;;;;4962:31:5;::::1;::::0;::::1;::::0;:145:::1;::::0;4999:35;;5040:49;5095:7;;4962:145:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;4664:448;4614:1064;;;657:12;::::0;;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;657:12:5::1;::::0;;::::1;::::0;5122:45;;;5118:560:::1;;5174:23;5210:11;5174:48;;5237:13;-1:-1:-1::0;;;;;5237:25:5::1;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5269:42;::::0;-1:-1:-1;;;5269:42:5;;5296:4:::1;5269:42;::::0;::::1;4037:51:6::0;4104:18;;;4097:34;;;5227:37:5;;-1:-1:-1;;;;;;5269:18:5;::::1;::::0;::::1;::::0;4010::6;;5269:42:5::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5321:9;5316:133;5340:16;5336:1;:20;5316:133;;;5369:13;-1:-1:-1::0;;;;;5369:25:5::1;;5395:7;5404:10;;5415:1;5404:13;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:17;::::0;;::::1;:::i;:::-;5423:10;;5434:1;5423:13;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:19;::::0;::::1;::::0;::::1;::::0;::::1;:::i;:::-;5369:74;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;5358:3;;;;:::i;:::-;;;5316:133;;5118:560;5614:59;::::0;-1:-1:-1;;;5614:59:5;;7969:2:6;5614:59:5::1;::::0;::::1;7951:21:6::0;8008:2;7988:18;;;7981:30;8047:34;8027:18;;;8020:62;-1:-1:-1;;;8098:18:6;;;8091:47;8155:19;;5614:59:5::1;7767:413:6::0;5118:560:5::1;5739:63;::::0;;5757:1:::1;8454:34:6::0;;8519:2;8504:18;;8497:34;;;-1:-1:-1;;;;;8567:15:6;;8547:18;;;8540:43;8614:2;8599:18;;8592:34;;;5739:63:5;;::::1;::::0;;;;8403:3:6;5739:63:5;;::::1;4198:1608;;;;980:889:::0;4031:1775;;;;;:::o;2522:1506::-;1047:41;;-1:-1:-1;;;1047:41:5;;1077:10;1047:41;;;1387:51:6;2623:11:5;;;;-1:-1:-1;;;;;1047:29:5;;;;;1360:18:6;;1047:41:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1039:102;;;;-1:-1:-1;;;1039:102:5;;;;;;;:::i;:::-;2786:25:::1;2825:11;2786:51;;2841:22;2882:14;-1:-1:-1::0;;;;;2882:35:5::1;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;::::0;;::::1;-1:-1:-1::0;;2882:37:5::1;::::0;::::1;;::::0;::::1;::::0;;;::::1;::::0;::::1;:::i;:::-;2866:55:::0;;::::1;::::0;;::::1;::::0;577:19:::1;::::0;;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;577:19:5;::::1;::::0;;;;2866:55;-1:-1:-1;2925:15:5::1;2949:44:::0;;;2945:792:::1;;3000:30;3050:11;3000:62;;3077:13;-1:-1:-1::0;;;;;3077:25:5::1;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3109:42;::::0;-1:-1:-1;;;3109:42:5;;3136:4:::1;3109:42;::::0;::::1;4037:51:6::0;4104:18;;;4097:34;;;3067:37:5;;-1:-1:-1;;;;;;3109:18:5;::::1;::::0;::::1;::::0;4010::6;;3109:42:5::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;3194:35:5::1;::::0;;;;::::1;::::0;;3220:4:::1;3194:35:::0;;-1:-1:-1;3194:35:5::1;::::0;;::::1;::::0;;;3235:49;;;;::::1;::::0;;;;;;::::1;::::0;;;3157:145;;-1:-1:-1;;;3157:145:5;;-1:-1:-1;;;;;3157:31:5;::::1;::::0;::::1;::::0;:145:::1;::::0;3194:35;;3235:49;3290:7;;3157:145:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;2995:312;2945:792;;;657:12;::::0;;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;657:12:5::1;::::0;;::::1;::::0;3317:45;;;3313:424:::1;;3369:23;3405:11;3369:48;;3432:13;-1:-1:-1::0;;;;;3432:25:5::1;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;3313:424;3961:63;::::0;;3979:1:::1;8454:34:6::0;;8519:2;8504:18;;8497:34;;;-1:-1:-1;;;;;8567:15:6;;8547:18;;;8540:43;8614:2;8599:18;;8592:34;;;3961:63:5;;::::1;::::0;;;;8403:3:6;3961:63:5;;::::1;2636:1392;;;980:889:::0;2522:1506;;;:::o;14:173:6:-;82:20;;-1:-1:-1;;;;;131:31:6;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:785::-;324:6;332;340;348;401:2;389:9;380:7;376:23;372:32;369:52;;;417:1;414;407:12;369:52;440:29;459:9;440:29;:::i;:::-;430:39;;516:2;505:9;501:18;488:32;478:42;;571:2;560:9;556:18;543:32;594:18;635:2;627:6;624:14;621:34;;;651:1;648;641:12;621:34;689:6;678:9;674:22;664:32;;734:7;727:4;723:2;719:13;715:27;705:55;;756:1;753;746:12;705:55;796:2;783:16;822:2;814:6;811:14;808:34;;;838:1;835;828:12;808:34;891:7;886:2;876:6;873:1;869:14;865:2;861:23;857:32;854:45;851:65;;;912:1;909;902:12;851:65;192:785;;;;-1:-1:-1;;943:2:6;935:11;;-1:-1:-1;;;192:785:6:o;982:254::-;1050:6;1058;1111:2;1099:9;1090:7;1086:23;1082:32;1079:52;;;1127:1;1124;1117:12;1079:52;1150:29;1169:9;1150:29;:::i;:::-;1140:39;1226:2;1211:18;;;;1198:32;;-1:-1:-1;;;982:254:6:o;1449:277::-;1516:6;1569:2;1557:9;1548:7;1544:23;1540:32;1537:52;;;1585:1;1582;1575:12;1537:52;1617:9;1611:16;1670:5;1663:13;1656:21;1649:5;1646:32;1636:60;;1692:1;1689;1682:12;1636:60;1715:5;1449:277;-1:-1:-1;;;1449:277:6:o;1731:412::-;1933:2;1915:21;;;1972:2;1952:18;;;1945:30;2011:34;2006:2;1991:18;;1984:62;-1:-1:-1;;;2077:2:6;2062:18;;2055:46;2133:3;2118:19;;1731:412::o;2495:127::-;2556:10;2551:3;2547:20;2544:1;2537:31;2587:4;2584:1;2577:15;2611:4;2608:1;2601:15;2627:1042;2707:6;2738:2;2781;2769:9;2760:7;2756:23;2752:32;2749:52;;;2797:1;2794;2787:12;2749:52;2830:9;2824:16;2859:18;2900:2;2892:6;2889:14;2886:34;;;2916:1;2913;2906:12;2886:34;2954:6;2943:9;2939:22;2929:32;;2999:7;2992:4;2988:2;2984:13;2980:27;2970:55;;3021:1;3018;3011:12;2970:55;3050:2;3044:9;3072:2;3068;3065:10;3062:36;;;3078:18;;:::i;:::-;3153:2;3147:9;3121:2;3207:13;;-1:-1:-1;;3203:22:6;;;3227:2;3199:31;3195:40;3183:53;;;3251:18;;;3271:22;;;3248:46;3245:72;;;3297:18;;:::i;:::-;3337:10;3333:2;3326:22;3372:2;3364:6;3357:18;3412:7;3407:2;3402;3398;3394:11;3390:20;3387:33;3384:53;;;3433:1;3430;3423:12;3384:53;3455:1;3446:10;;3465:129;3479:2;3476:1;3473:9;3465:129;;;3567:10;;;3563:19;;3557:26;3536:14;;;3532:23;;3525:59;3490:10;;;;3465:129;;;3636:1;3631:2;3626;3618:6;3614:15;3610:24;3603:35;3657:6;3647:16;;;;;;;;2627:1042;;;;:::o;3674:184::-;3744:6;3797:2;3785:9;3776:7;3772:23;3768:32;3765:52;;;3813:1;3810;3803:12;3765:52;-1:-1:-1;3836:16:6;;3674:184;-1:-1:-1;3674:184:6:o;4142:127::-;4203:10;4198:3;4194:20;4191:1;4184:31;4234:4;4231:1;4224:15;4258:4;4255:1;4248:15;4274:325;4368:4;4426:11;4413:25;4520:2;4516:7;4505:8;4489:14;4485:29;4481:43;4461:18;4457:68;4447:96;;4539:1;4536;4529:12;4447:96;4560:33;;;;;4274:325;-1:-1:-1;;4274:325:6:o;4604:522::-;4682:4;4688:6;4748:11;4735:25;4842:2;4838:7;4827:8;4811:14;4807:29;4803:43;4783:18;4779:68;4769:96;;4861:1;4858;4851:12;4769:96;4888:33;;4940:20;;;-1:-1:-1;4983:18:6;4972:30;;4969:50;;;5015:1;5012;5005:12;4969:50;5048:4;5036:17;;-1:-1:-1;5079:14:6;5075:27;;;5065:38;;5062:58;;;5116:1;5113;5106:12;5062:58;4604:522;;;;;:::o;5657:267::-;5746:6;5741:3;5734:19;5798:6;5791:5;5784:4;5779:3;5775:14;5762:43;-1:-1:-1;5850:1:6;5825:16;;;5843:4;5821:27;;;5814:38;;;;5906:2;5885:15;;;-1:-1:-1;;5881:29:6;5872:39;;;5868:50;;5657:267::o;5929:506::-;6172:6;6161:9;6154:25;6215:2;6210;6199:9;6195:18;6188:30;6135:4;6241:62;6299:2;6288:9;6284:18;6276:6;6268;6241:62;:::i;:::-;6351:9;6343:6;6339:22;6334:2;6323:9;6319:18;6312:50;6379;6422:6;6414;6406;6379:50;:::i;:::-;6371:58;5929:506;-1:-1:-1;;;;;;;;5929:506:6:o;6440:232::-;6479:3;6500:17;;;6497:140;;6559:10;6554:3;6550:20;6547:1;6540:31;6594:4;6591:1;6584:15;6622:4;6619:1;6612:15;6497:140;-1:-1:-1;6664:1:6;6653:13;;6440:232::o;6855:453::-;6753:12;;-1:-1:-1;;;;;6749:38:6;;;6737:51;;6837:4;6826:16;;;6820:23;6804:14;;;6797:47;6753:12;;6749:38;7254:2;7239:18;;6737:51;6826:16;;;;6820:23;6804:14;;;6797:47;7289:3;7274:19;;7267:35;;;;7141:3;7126:19;;6855:453::o",
- "sourcePath": "/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/evmToSubstrate/EvmToSubstrateHelper.sol",
- "compiler": {
- "name": "solc",
- "version": "0.8.17+commit.8df45f5f"
- },
- "ast": {
- "absolutePath": "/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/evmToSubstrate/EvmToSubstrateHelper.sol",
- "exportedSymbols": {
- "Collection": [
- 1167
- ],
- "CollectionHelpers": [
- 89
- ],
- "ContractHelpers": [
- 272
- ],
- "EvmToSubstrate": [
- 2100
- ],
- "NftCrossAccountId": [
- 700
- ],
- "Property": [
- 1695
- ],
- "RftCrossAccountId": [
- 1315
- ],
- "UniqueNFT": [
- 893
- ],
- "UniqueRefungible": [
- 1508
- ],
- "UniqueRefungibleToken": [
- 1675
- ]
- },
- "id": 2101,
- "license": "Apache License",
- "nodeType": "SourceUnit",
- "nodes": [
- {
- "id": 1677,
- "literals": [
- "solidity",
- ">=",
- "0.8",
- ".0"
- ],
- "nodeType": "PragmaDirective",
- "src": "44:24:5"
- },
- {
- "absolutePath": "/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/CollectionHelpers.sol",
- "file": "../api/CollectionHelpers.sol",
- "id": 1679,
- "nameLocation": "-1:-1:-1",
- "nodeType": "ImportDirective",
- "scope": 2101,
- "sourceUnit": 90,
- "src": "69:63:5",
- "symbolAliases": [
- {
- "foreign": {
- "id": 1678,
- "name": "CollectionHelpers",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 89,
- "src": "77:17:5",
- "typeDescriptions": {}
- },
- "nameLocation": "-1:-1:-1"
- }
- ],
- "unitAlias": ""
- },
- {
- "absolutePath": "/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/ContractHelpers.sol",
- "file": "../api/ContractHelpers.sol",
- "id": 1681,
- "nameLocation": "-1:-1:-1",
- "nodeType": "ImportDirective",
- "scope": 2101,
- "sourceUnit": 278,
- "src": "133:59:5",
- "symbolAliases": [
- {
- "foreign": {
- "id": 1680,
- "name": "ContractHelpers",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 272,
- "src": "141:15:5",
- "typeDescriptions": {}
- },
- "nameLocation": "-1:-1:-1"
- }
- ],
- "unitAlias": ""
- },
- {
- "absolutePath": "/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/UniqueRefungibleToken.sol",
- "file": "../api/UniqueRefungibleToken.sol",
- "id": 1683,
- "nameLocation": "-1:-1:-1",
- "nodeType": "ImportDirective",
- "scope": 2101,
- "sourceUnit": 1676,
- "src": "193:71:5",
- "symbolAliases": [
- {
- "foreign": {
- "id": 1682,
- "name": "UniqueRefungibleToken",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1675,
- "src": "201:21:5",
- "typeDescriptions": {}
- },
- "nameLocation": "-1:-1:-1"
- }
- ],
- "unitAlias": ""
- },
- {
- "absolutePath": "/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/UniqueRefungible.sol",
- "file": "../api/UniqueRefungible.sol",
- "id": 1687,
- "nameLocation": "-1:-1:-1",
- "nodeType": "ImportDirective",
- "scope": 2101,
- "sourceUnit": 1509,
- "src": "265:102:5",
- "symbolAliases": [
- {
- "foreign": {
- "id": 1684,
- "name": "UniqueRefungible",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1508,
- "src": "273:16:5",
- "typeDescriptions": {}
- },
- "nameLocation": "-1:-1:-1"
- },
- {
- "foreign": {
- "id": 1685,
- "name": "Collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1167,
- "src": "291:10:5",
- "typeDescriptions": {}
- },
- "nameLocation": "-1:-1:-1"
- },
- {
- "foreign": {
- "id": 1686,
- "name": "Tuple8",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1315,
- "src": "303:6:5",
- "typeDescriptions": {}
- },
- "local": "RftCrossAccountId",
- "nameLocation": "-1:-1:-1"
- }
- ],
- "unitAlias": ""
- },
- {
- "absolutePath": "/home/praetorp/Repos/Polkadot/unique-chain/tests/src/eth/api/UniqueNFT.sol",
- "file": "../api/UniqueNFT.sol",
- "id": 1690,
- "nameLocation": "-1:-1:-1",
- "nodeType": "ImportDirective",
- "scope": 2101,
- "sourceUnit": 894,
- "src": "368:76:5",
- "symbolAliases": [
- {
- "foreign": {
- "id": 1688,
- "name": "UniqueNFT",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 893,
- "src": "376:9:5",
- "typeDescriptions": {}
- },
- "nameLocation": "-1:-1:-1"
- },
- {
- "foreign": {
- "id": 1689,
- "name": "Tuple8",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 700,
- "src": "387:6:5",
- "typeDescriptions": {}
- },
- "local": "NftCrossAccountId",
- "nameLocation": "-1:-1:-1"
- }
- ],
- "unitAlias": ""
- },
- {
- "canonicalName": "Property",
- "id": 1695,
- "members": [
- {
- "constant": false,
- "id": 1692,
- "mutability": "mutable",
- "name": "key",
- "nameLocation": "472:3:5",
- "nodeType": "VariableDeclaration",
- "scope": 1695,
- "src": "465:10:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_string_storage_ptr",
- "typeString": "string"
- },
- "typeName": {
- "id": 1691,
- "name": "string",
- "nodeType": "ElementaryTypeName",
- "src": "465:6:5",
- "typeDescriptions": {
- "typeIdentifier": "t_string_storage_ptr",
- "typeString": "string"
- }
- },
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1694,
- "mutability": "mutable",
- "name": "value",
- "nameLocation": "484:5:5",
- "nodeType": "VariableDeclaration",
- "scope": 1695,
- "src": "478:11:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes_storage_ptr",
- "typeString": "bytes"
- },
- "typeName": {
- "id": 1693,
- "name": "bytes",
- "nodeType": "ElementaryTypeName",
- "src": "478:5:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes_storage_ptr",
- "typeString": "bytes"
- }
- },
- "visibility": "internal"
- }
- ],
- "name": "Property",
- "nameLocation": "453:8:5",
- "nodeType": "StructDefinition",
- "scope": 2101,
- "src": "446:46:5",
- "visibility": "public"
- },
- {
- "abstract": false,
- "baseContracts": [],
- "canonicalName": "EvmToSubstrate",
- "contractDependencies": [],
- "contractKind": "contract",
- "fullyImplemented": true,
- "id": 2100,
- "linearizedBaseContracts": [
- 2100
- ],
- "name": "EvmToSubstrate",
- "nameLocation": "503:14:5",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "constant": true,
- "id": 1703,
- "mutability": "constant",
- "name": "REFUNGIBLE_COLLECTION_TYPE",
- "nameLocation": "538:26:5",
- "nodeType": "VariableDeclaration",
- "scope": 2100,
- "src": "521:76:5",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- },
- "typeName": {
- "id": 1696,
- "name": "bytes32",
- "nodeType": "ElementaryTypeName",
- "src": "521:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "value": {
- "arguments": [
- {
- "arguments": [
- {
- "hexValue": "526546756e6769626c65",
- "id": 1700,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "string",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "583:12:5",
- "typeDescriptions": {
- "typeIdentifier": "t_stringliteral_cdb72fd4e1d0d6d4eebd7ab142113ec2b4b06ddb24324db5c287ef01ab484d6b",
- "typeString": "literal_string \"ReFungible\""
- },
- "value": "ReFungible"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_stringliteral_cdb72fd4e1d0d6d4eebd7ab142113ec2b4b06ddb24324db5c287ef01ab484d6b",
- "typeString": "literal_string \"ReFungible\""
- }
- ],
- "id": 1699,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "577:5:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
- "typeString": "type(bytes storage pointer)"
- },
- "typeName": {
- "id": 1698,
- "name": "bytes",
- "nodeType": "ElementaryTypeName",
- "src": "577:5:5",
- "typeDescriptions": {}
- }
- },
- "id": 1701,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "577:19:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bytes_memory_ptr",
- "typeString": "bytes memory"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bytes_memory_ptr",
- "typeString": "bytes memory"
- }
- ],
- "id": 1697,
- "name": "keccak256",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967288,
- "src": "567:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
- "typeString": "function (bytes memory) pure returns (bytes32)"
- }
- },
- "id": 1702,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "567:30:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "visibility": "internal"
- },
- {
- "constant": true,
- "id": 1711,
- "mutability": "constant",
- "name": "NONFUNGIBLE_COLLECTION_TYPE",
- "nameLocation": "617:27:5",
- "nodeType": "VariableDeclaration",
- "scope": 2100,
- "src": "600:70:5",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- },
- "typeName": {
- "id": 1704,
- "name": "bytes32",
- "nodeType": "ElementaryTypeName",
- "src": "600:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "value": {
- "arguments": [
- {
- "arguments": [
- {
- "hexValue": "4e4654",
- "id": 1708,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "string",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "663:5:5",
- "typeDescriptions": {
- "typeIdentifier": "t_stringliteral_9c4138cd0a1311e4748f70d0fe3dc55f0f5f75e0f20db731225cbc3b8914016a",
- "typeString": "literal_string \"NFT\""
- },
- "value": "NFT"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_stringliteral_9c4138cd0a1311e4748f70d0fe3dc55f0f5f75e0f20db731225cbc3b8914016a",
- "typeString": "literal_string \"NFT\""
- }
- ],
- "id": 1707,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "657:5:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
- "typeString": "type(bytes storage pointer)"
- },
- "typeName": {
- "id": 1706,
- "name": "bytes",
- "nodeType": "ElementaryTypeName",
- "src": "657:5:5",
- "typeDescriptions": {}
- }
- },
- "id": 1709,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "657:12:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bytes_memory_ptr",
- "typeString": "bytes memory"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bytes_memory_ptr",
- "typeString": "bytes memory"
- }
- ],
- "id": 1705,
- "name": "keccak256",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967288,
- "src": "647:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
- "typeString": "function (bytes memory) pure returns (bytes32)"
- }
- },
- "id": 1710,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "647:23:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "visibility": "internal"
- },
- {
- "body": {
- "id": 1732,
- "nodeType": "Block",
- "src": "980:889:5",
- "statements": [
- {
- "assignments": [
- 1717
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1717,
- "mutability": "mutable",
- "name": "commonContract",
- "nameLocation": "995:14:5",
- "nodeType": "VariableDeclaration",
- "scope": 1732,
- "src": "984:25:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- },
- "typeName": {
- "id": 1716,
- "nodeType": "UserDefinedTypeName",
- "pathNode": {
- "id": 1715,
- "name": "Collection",
- "nameLocations": [
- "984:10:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 1167,
- "src": "984:10:5"
- },
- "referencedDeclaration": 1167,
- "src": "984:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1721,
- "initialValue": {
- "arguments": [
- {
- "id": 1719,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1713,
- "src": "1023:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1718,
- "name": "Collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1167,
- "src": "1012:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_Collection_$1167_$",
- "typeString": "type(contract Collection)"
- }
- },
- "id": 1720,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1012:23:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "984:51:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "expression": {
- "id": 1725,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967281,
- "src": "1077:3:5",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 1726,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "1081:6:5",
- "memberName": "sender",
- "nodeType": "MemberAccess",
- "src": "1077:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "expression": {
- "id": 1723,
- "name": "commonContract",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1717,
- "src": "1047:14:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "id": 1724,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "1062:14:5",
- "memberName": "isOwnerOrAdmin",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1131,
- "src": "1047:29:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
- "typeString": "function (address) view external returns (bool)"
- }
- },
- "id": 1727,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1047:41:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- {
- "hexValue": "4f6e6c7920636f6c6c656374696f6e2061646d696e2f6f776e65722063616e2063616c6c2074686973206d6574686f64",
- "id": 1728,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "string",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "1090:50:5",
- "typeDescriptions": {
- "typeIdentifier": "t_stringliteral_9e1b1a457a3a51e38b70747f3c56c9a0ede0f22582e6963b10271c34b83f1ca3",
- "typeString": "literal_string \"Only collection admin/owner can call this method\""
- },
- "value": "Only collection admin/owner can call this method"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- },
- {
- "typeIdentifier": "t_stringliteral_9e1b1a457a3a51e38b70747f3c56c9a0ede0f22582e6963b10271c34b83f1ca3",
- "typeString": "literal_string \"Only collection admin/owner can call this method\""
- }
- ],
- "id": 1722,
- "name": "require",
- "nodeType": "Identifier",
- "overloadedDeclarations": [
- 4294967278,
- 4294967278
- ],
- "referencedDeclaration": 4294967278,
- "src": "1039:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
- "typeString": "function (bool,string memory) pure"
- }
- },
- "id": 1729,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1039:102:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1730,
- "nodeType": "ExpressionStatement",
- "src": "1039:102:5"
- },
- {
- "id": 1731,
- "nodeType": "PlaceholderStatement",
- "src": "1864:1:5"
- }
- ]
- },
- "id": 1733,
- "name": "checkRestrictions",
- "nameLocation": "941:17:5",
- "nodeType": "ModifierDefinition",
- "parameters": {
- "id": 1714,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 1713,
- "mutability": "mutable",
- "name": "_collection",
- "nameLocation": "967:11:5",
- "nodeType": "VariableDeclaration",
- "scope": 1733,
- "src": "959:19:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1712,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "959:7:5",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "visibility": "internal"
- }
- ],
- "src": "958:21:5"
- },
- "src": "932:937:5",
- "virtual": false,
- "visibility": "internal"
- },
- {
- "anonymous": false,
- "documentation": {
- "id": 1734,
- "nodeType": "StructuredDocumentation",
- "src": "1872:69:5",
- "text": "@dev This emits when a mint to a substrate address has been made."
- },
- "eventSelector": "fb3433367f20c42151d30b3d2c634726a94c4f9fa7d45120606029741aeb7535",
- "id": 1744,
- "name": "MintToSub",
- "nameLocation": "1949:9:5",
- "nodeType": "EventDefinition",
- "parameters": {
- "id": 1743,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 1736,
- "indexed": false,
- "mutability": "mutable",
- "name": "_toEth",
- "nameLocation": "1967:6:5",
- "nodeType": "VariableDeclaration",
- "scope": 1744,
- "src": "1959:14:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1735,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "1959:7:5",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1738,
- "indexed": false,
- "mutability": "mutable",
- "name": "_toSub",
- "nameLocation": "1983:6:5",
- "nodeType": "VariableDeclaration",
- "scope": 1744,
- "src": "1975:14:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1737,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "1975:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1740,
- "indexed": false,
- "mutability": "mutable",
- "name": "_collection",
- "nameLocation": "1999:11:5",
- "nodeType": "VariableDeclaration",
- "scope": 1744,
- "src": "1991:19:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1739,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "1991:7:5",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1742,
- "indexed": false,
- "mutability": "mutable",
- "name": "_tokenId",
- "nameLocation": "2020:8:5",
- "nodeType": "VariableDeclaration",
- "scope": 1744,
- "src": "2012:16:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1741,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "2012:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- }
- ],
- "src": "1958:71:5"
- },
- "src": "1943:87:5"
- },
- {
- "body": {
- "id": 1887,
- "nodeType": "Block",
- "src": "2636:1392:5",
- "statements": [
- {
- "assignments": [
- 1757
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1757,
- "mutability": "mutable",
- "name": "commonContract",
- "nameLocation": "2797:14:5",
- "nodeType": "VariableDeclaration",
- "scope": 1887,
- "src": "2786:25:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- },
- "typeName": {
- "id": 1756,
- "nodeType": "UserDefinedTypeName",
- "pathNode": {
- "id": 1755,
- "name": "Collection",
- "nameLocations": [
- "2786:10:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 1167,
- "src": "2786:10:5"
- },
- "referencedDeclaration": 1167,
- "src": "2786:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1761,
- "initialValue": {
- "arguments": [
- {
- "id": 1759,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1747,
- "src": "2825:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1758,
- "name": "Collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1167,
- "src": "2814:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_Collection_$1167_$",
- "typeString": "type(contract Collection)"
- }
- },
- "id": 1760,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2814:23:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "2786:51:5"
- },
- {
- "assignments": [
- 1763
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1763,
- "mutability": "mutable",
- "name": "collectionType",
- "nameLocation": "2849:14:5",
- "nodeType": "VariableDeclaration",
- "scope": 1887,
- "src": "2841:22:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- },
- "typeName": {
- "id": 1762,
- "name": "bytes32",
- "nodeType": "ElementaryTypeName",
- "src": "2841:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1772,
- "initialValue": {
- "arguments": [
- {
- "arguments": [
- {
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "id": 1767,
- "name": "commonContract",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1757,
- "src": "2882:14:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "id": 1768,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "2897:20:5",
- "memberName": "uniqueCollectionType",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1146,
- "src": "2882:35:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$",
- "typeString": "function () view external returns (string memory)"
- }
- },
- "id": 1769,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2882:37:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_string_memory_ptr",
- "typeString": "string memory"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_string_memory_ptr",
- "typeString": "string memory"
- }
- ],
- "id": 1766,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "2876:5:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
- "typeString": "type(bytes storage pointer)"
- },
- "typeName": {
- "id": 1765,
- "name": "bytes",
- "nodeType": "ElementaryTypeName",
- "src": "2876:5:5",
- "typeDescriptions": {}
- }
- },
- "id": 1770,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2876:44:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bytes_memory_ptr",
- "typeString": "bytes memory"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bytes_memory_ptr",
- "typeString": "bytes memory"
- }
- ],
- "id": 1764,
- "name": "keccak256",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967288,
- "src": "2866:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
- "typeString": "function (bytes memory) pure returns (bytes32)"
- }
- },
- "id": 1771,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2866:55:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "2841:80:5"
- },
- {
- "assignments": [
- 1774
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1774,
- "mutability": "mutable",
- "name": "tokenId",
- "nameLocation": "2933:7:5",
- "nodeType": "VariableDeclaration",
- "scope": 1887,
- "src": "2925:15:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1773,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "2925:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1775,
- "nodeType": "VariableDeclarationStatement",
- "src": "2925:15:5"
- },
- {
- "condition": {
- "commonType": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- },
- "id": 1778,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "id": 1776,
- "name": "collectionType",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1763,
- "src": "2949:14:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "==",
- "rightExpression": {
- "id": 1777,
- "name": "REFUNGIBLE_COLLECTION_TYPE",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1703,
- "src": "2967:26:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "src": "2949:44:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "falseBody": {
- "condition": {
- "commonType": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- },
- "id": 1825,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "id": 1823,
- "name": "collectionType",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1763,
- "src": "3317:14:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "==",
- "rightExpression": {
- "id": 1824,
- "name": "NONFUNGIBLE_COLLECTION_TYPE",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1711,
- "src": "3335:27:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "src": "3317:45:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "falseBody": {
- "id": 1874,
- "nodeType": "Block",
- "src": "3668:69:5",
- "statements": [
- {
- "expression": {
- "arguments": [
- {
- "hexValue": "57726f6e6720636f6c6c656374696f6e20747970652e20576f726b73206f6e6c792077697468204e4654206f7220524654",
- "id": 1871,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "string",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "3680:51:5",
- "typeDescriptions": {
- "typeIdentifier": "t_stringliteral_a720d6ef8719206bfa9a6cc035f350312523cbf9cf6cd62b2324270bef55372a",
- "typeString": "literal_string \"Wrong collection type. Works only with NFT or RFT\""
- },
- "value": "Wrong collection type. Works only with NFT or RFT"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_stringliteral_a720d6ef8719206bfa9a6cc035f350312523cbf9cf6cd62b2324270bef55372a",
- "typeString": "literal_string \"Wrong collection type. Works only with NFT or RFT\""
- }
- ],
- "id": 1870,
- "name": "revert",
- "nodeType": "Identifier",
- "overloadedDeclarations": [
- 4294967277,
- 4294967277
- ],
- "referencedDeclaration": 4294967277,
- "src": "3673:6:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
- "typeString": "function (string memory) pure"
- }
- },
- "id": 1872,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3673:59:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1873,
- "nodeType": "ExpressionStatement",
- "src": "3673:59:5"
- }
- ]
- },
- "id": 1875,
- "nodeType": "IfStatement",
- "src": "3313:424:5",
- "trueBody": {
- "id": 1869,
- "nodeType": "Block",
- "src": "3364:298:5",
- "statements": [
- {
- "assignments": [
- 1828
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1828,
- "mutability": "mutable",
- "name": "nftCollection",
- "nameLocation": "3379:13:5",
- "nodeType": "VariableDeclaration",
- "scope": 1869,
- "src": "3369:23:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- },
- "typeName": {
- "id": 1827,
- "nodeType": "UserDefinedTypeName",
- "pathNode": {
- "id": 1826,
- "name": "UniqueNFT",
- "nameLocations": [
- "3369:9:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 893,
- "src": "3369:9:5"
- },
- "referencedDeclaration": 893,
- "src": "3369:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1832,
- "initialValue": {
- "arguments": [
- {
- "id": 1830,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1747,
- "src": "3405:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1829,
- "name": "UniqueNFT",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 893,
- "src": "3395:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_UniqueNFT_$893_$",
- "typeString": "type(contract UniqueNFT)"
- }
- },
- "id": 1831,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3395:22:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "3369:48:5"
- },
- {
- "expression": {
- "id": 1837,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "id": 1833,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1774,
- "src": "3422:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "id": 1834,
- "name": "nftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1828,
- "src": "3432:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "id": 1835,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "3446:11:5",
- "memberName": "nextTokenId",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 666,
- "src": "3432:25:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
- "typeString": "function () view external returns (uint256)"
- }
- },
- "id": 1836,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3432:27:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "3422:37:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 1838,
- "nodeType": "ExpressionStatement",
- "src": "3422:37:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "id": 1844,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967268,
- "src": "3491:4:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- ],
- "id": 1843,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "3483:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1842,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3483:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1845,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3483:13:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 1846,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1774,
- "src": "3498:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "id": 1839,
- "name": "nftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1828,
- "src": "3464:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "id": 1841,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "3478:4:5",
- "memberName": "mint",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 590,
- "src": "3464:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,uint256) external returns (bool)"
- }
- },
- "id": 1847,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3464:42:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 1848,
- "nodeType": "ExpressionStatement",
- "src": "3464:42:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "arguments": [
- {
- "id": 1855,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967268,
- "src": "3575:4:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- ],
- "id": 1854,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "3567:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1853,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3567:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1856,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3567:13:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "hexValue": "30",
- "id": 1857,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "3582:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- }
- ],
- "id": 1852,
- "name": "NftCrossAccountId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 700,
- "src": "3549:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_struct$_Tuple8_$700_storage_ptr_$",
- "typeString": "type(struct Tuple8 storage pointer)"
- }
- },
- "id": 1858,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "structConstructorCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3549:35:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Tuple8_$700_memory_ptr",
- "typeString": "struct Tuple8 memory"
- }
- },
- {
- "arguments": [
- {
- "arguments": [
- {
- "hexValue": "30",
- "id": 1862,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "3616:1:5",
- "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": 1861,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "3608:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1860,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3608:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1863,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3608:10:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 1864,
- "name": "_substrateReceiver",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1749,
- "src": "3620:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "id": 1859,
- "name": "NftCrossAccountId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 700,
- "src": "3590:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_struct$_Tuple8_$700_storage_ptr_$",
- "typeString": "type(struct Tuple8 storage pointer)"
- }
- },
- "id": 1865,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "structConstructorCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3590:49:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Tuple8_$700_memory_ptr",
- "typeString": "struct Tuple8 memory"
- }
- },
- {
- "id": 1866,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1774,
- "src": "3645:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_struct$_Tuple8_$700_memory_ptr",
- "typeString": "struct Tuple8 memory"
- },
- {
- "typeIdentifier": "t_struct$_Tuple8_$700_memory_ptr",
- "typeString": "struct Tuple8 memory"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "id": 1849,
- "name": "nftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1828,
- "src": "3512:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "id": 1851,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "3526:17:5",
- "memberName": "transferFromCross",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 643,
- "src": "3512:31:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_struct$_Tuple8_$700_memory_ptr_$_t_struct$_Tuple8_$700_memory_ptr_$_t_uint256_$returns$__$",
- "typeString": "function (struct Tuple8 memory,struct Tuple8 memory,uint256) external"
- }
- },
- "id": 1867,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3512:145:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1868,
- "nodeType": "ExpressionStatement",
- "src": "3512:145:5"
- }
- ]
- }
- },
- "id": 1876,
- "nodeType": "IfStatement",
- "src": "2945:792:5",
- "trueBody": {
- "id": 1822,
- "nodeType": "Block",
- "src": "2995:312:5",
- "statements": [
- {
- "assignments": [
- 1781
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1781,
- "mutability": "mutable",
- "name": "rftCollection",
- "nameLocation": "3017:13:5",
- "nodeType": "VariableDeclaration",
- "scope": 1822,
- "src": "3000:30:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- },
- "typeName": {
- "id": 1780,
- "nodeType": "UserDefinedTypeName",
- "pathNode": {
- "id": 1779,
- "name": "UniqueRefungible",
- "nameLocations": [
- "3000:16:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 1508,
- "src": "3000:16:5"
- },
- "referencedDeclaration": 1508,
- "src": "3000:16:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1785,
- "initialValue": {
- "arguments": [
- {
- "id": 1783,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1747,
- "src": "3050:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1782,
- "name": "UniqueRefungible",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1508,
- "src": "3033:16:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_UniqueRefungible_$1508_$",
- "typeString": "type(contract UniqueRefungible)"
- }
- },
- "id": 1784,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3033:29:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "3000:62:5"
- },
- {
- "expression": {
- "id": 1790,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "id": 1786,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1774,
- "src": "3067:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "id": 1787,
- "name": "rftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1781,
- "src": "3077:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "id": 1788,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "3091:11:5",
- "memberName": "nextTokenId",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1273,
- "src": "3077:25:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
- "typeString": "function () view external returns (uint256)"
- }
- },
- "id": 1789,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3077:27:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "3067:37:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 1791,
- "nodeType": "ExpressionStatement",
- "src": "3067:37:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "id": 1797,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967268,
- "src": "3136:4:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- ],
- "id": 1796,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "3128:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1795,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3128:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1798,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3128:13:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 1799,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1774,
- "src": "3143:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "id": 1792,
- "name": "rftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1781,
- "src": "3109:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "id": 1794,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "3123:4:5",
- "memberName": "mint",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1206,
- "src": "3109:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,uint256) external returns (bool)"
- }
- },
- "id": 1800,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3109:42:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 1801,
- "nodeType": "ExpressionStatement",
- "src": "3109:42:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "arguments": [
- {
- "id": 1808,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967268,
- "src": "3220:4:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- ],
- "id": 1807,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "3212:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1806,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3212:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1809,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3212:13:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "hexValue": "30",
- "id": 1810,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "3227:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- }
- ],
- "id": 1805,
- "name": "RftCrossAccountId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1315,
- "src": "3194:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_struct$_Tuple8_$1315_storage_ptr_$",
- "typeString": "type(struct Tuple8 storage pointer)"
- }
- },
- "id": 1811,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "structConstructorCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3194:35:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Tuple8_$1315_memory_ptr",
- "typeString": "struct Tuple8 memory"
- }
- },
- {
- "arguments": [
- {
- "arguments": [
- {
- "hexValue": "30",
- "id": 1815,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "3261:1:5",
- "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": 1814,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "3253:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1813,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3253:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1816,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3253:10:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 1817,
- "name": "_substrateReceiver",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1749,
- "src": "3265:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "id": 1812,
- "name": "RftCrossAccountId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1315,
- "src": "3235:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_struct$_Tuple8_$1315_storage_ptr_$",
- "typeString": "type(struct Tuple8 storage pointer)"
- }
- },
- "id": 1818,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "structConstructorCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3235:49:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Tuple8_$1315_memory_ptr",
- "typeString": "struct Tuple8 memory"
- }
- },
- {
- "id": 1819,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1774,
- "src": "3290:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_struct$_Tuple8_$1315_memory_ptr",
- "typeString": "struct Tuple8 memory"
- },
- {
- "typeIdentifier": "t_struct$_Tuple8_$1315_memory_ptr",
- "typeString": "struct Tuple8 memory"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "id": 1802,
- "name": "rftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1781,
- "src": "3157:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "id": 1804,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "3171:17:5",
- "memberName": "transferFromCross",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1250,
- "src": "3157:31:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_struct$_Tuple8_$1315_memory_ptr_$_t_struct$_Tuple8_$1315_memory_ptr_$_t_uint256_$returns$__$",
- "typeString": "function (struct Tuple8 memory,struct Tuple8 memory,uint256) external"
- }
- },
- "id": 1820,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3157:145:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1821,
- "nodeType": "ExpressionStatement",
- "src": "3157:145:5"
- }
- ]
- }
- },
- {
- "eventCall": {
- "arguments": [
- {
- "arguments": [
- {
- "hexValue": "30",
- "id": 1880,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "3979:1:5",
- "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": 1879,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "3971:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1878,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3971:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1881,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3971:10:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 1882,
- "name": "_substrateReceiver",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1749,
- "src": "3983:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "id": 1883,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1747,
- "src": "4003:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 1884,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1774,
- "src": "4016:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "id": 1877,
- "name": "MintToSub",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1744,
- "src": "3961:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$",
- "typeString": "function (address,uint256,address,uint256)"
- }
- },
- "id": 1885,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3961:63:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1886,
- "nodeType": "EmitStatement",
- "src": "3956:68:5"
- }
- ]
- },
- "documentation": {
- "id": 1745,
- "nodeType": "StructuredDocumentation",
- "src": "2033:487:5",
- "text": "Set RFT collection that contract will work with. RFT tokens for fractionalized NFT tokens\n would be created in this collection.\n @dev Throws if RFT collection is already configured for this contract.\n Throws if collection of wrong type (NFT, Fungible) is provided instead\n of RFT collection.\n Throws if `msg.sender` is not owner or admin of provided RFT collection.\n Can only be called by contract owner.\n @param _collection address of RFT collection."
- },
- "functionSelector": "7a8d9786",
- "id": 1888,
- "implemented": true,
- "kind": "function",
- "modifiers": [
- {
- "arguments": [
- {
- "id": 1752,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1747,
- "src": "2623:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "id": 1753,
- "kind": "modifierInvocation",
- "modifierName": {
- "id": 1751,
- "name": "checkRestrictions",
- "nameLocations": [
- "2605:17:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 1733,
- "src": "2605:17:5"
- },
- "nodeType": "ModifierInvocation",
- "src": "2605:30:5"
- }
- ],
- "name": "mintToSubstrate",
- "nameLocation": "2531:15:5",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 1750,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 1747,
- "mutability": "mutable",
- "name": "_collection",
- "nameLocation": "2555:11:5",
- "nodeType": "VariableDeclaration",
- "scope": 1888,
- "src": "2547:19:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1746,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "2547:7:5",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1749,
- "mutability": "mutable",
- "name": "_substrateReceiver",
- "nameLocation": "2576:18:5",
- "nodeType": "VariableDeclaration",
- "scope": 1888,
- "src": "2568:26:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1748,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "2568:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- }
- ],
- "src": "2546:49:5"
- },
- "returnParameters": {
- "id": 1754,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "2636:0:5"
- },
- "scope": 2100,
- "src": "2522:1506:5",
- "stateMutability": "nonpayable",
- "virtual": false,
- "visibility": "external"
- },
- {
- "body": {
- "id": 2098,
- "nodeType": "Block",
- "src": "4198:1608:5",
- "statements": [
- {
- "assignments": [
- 1903
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1903,
- "mutability": "mutable",
- "name": "propertiesLength",
- "nameLocation": "4359:16:5",
- "nodeType": "VariableDeclaration",
- "scope": 2098,
- "src": "4351:24:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1902,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "4351:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1906,
- "initialValue": {
- "expression": {
- "id": 1904,
- "name": "properties",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1896,
- "src": "4378:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_array$_t_struct$_Property_$1695_calldata_ptr_$dyn_calldata_ptr",
- "typeString": "struct Property calldata[] calldata"
- }
- },
- "id": 1905,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "4389:6:5",
- "memberName": "length",
- "nodeType": "MemberAccess",
- "src": "4378:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "4351:44:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "id": 1910,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "id": 1908,
- "name": "propertiesLength",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1903,
- "src": "4407:16:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": ">",
- "rightExpression": {
- "hexValue": "30",
- "id": 1909,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "4426:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- },
- "src": "4407:20:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- {
- "hexValue": "50726f70657269657320697320656d707479",
- "id": 1911,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "string",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "4429:20:5",
- "typeDescriptions": {
- "typeIdentifier": "t_stringliteral_3c3e0098388726dfb54bb3f478f469c7fc9acc2aa2937bb94957726165b135a1",
- "typeString": "literal_string \"Properies is empty\""
- },
- "value": "Properies is empty"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- },
- {
- "typeIdentifier": "t_stringliteral_3c3e0098388726dfb54bb3f478f469c7fc9acc2aa2937bb94957726165b135a1",
- "typeString": "literal_string \"Properies is empty\""
- }
- ],
- "id": 1907,
- "name": "require",
- "nodeType": "Identifier",
- "overloadedDeclarations": [
- 4294967278,
- 4294967278
- ],
- "referencedDeclaration": 4294967278,
- "src": "4399:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
- "typeString": "function (bool,string memory) pure"
- }
- },
- "id": 1912,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4399:51:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1913,
- "nodeType": "ExpressionStatement",
- "src": "4399:51:5"
- },
- {
- "assignments": [
- 1916
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1916,
- "mutability": "mutable",
- "name": "commonContract",
- "nameLocation": "4466:14:5",
- "nodeType": "VariableDeclaration",
- "scope": 2098,
- "src": "4455:25:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- },
- "typeName": {
- "id": 1915,
- "nodeType": "UserDefinedTypeName",
- "pathNode": {
- "id": 1914,
- "name": "Collection",
- "nameLocations": [
- "4455:10:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 1167,
- "src": "4455:10:5"
- },
- "referencedDeclaration": 1167,
- "src": "4455:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1920,
- "initialValue": {
- "arguments": [
- {
- "id": 1918,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1890,
- "src": "4494:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1917,
- "name": "Collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1167,
- "src": "4483:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_Collection_$1167_$",
- "typeString": "type(contract Collection)"
- }
- },
- "id": 1919,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4483:23:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "4455:51:5"
- },
- {
- "assignments": [
- 1922
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1922,
- "mutability": "mutable",
- "name": "collectionType",
- "nameLocation": "4518:14:5",
- "nodeType": "VariableDeclaration",
- "scope": 2098,
- "src": "4510:22:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- },
- "typeName": {
- "id": 1921,
- "name": "bytes32",
- "nodeType": "ElementaryTypeName",
- "src": "4510:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1931,
- "initialValue": {
- "arguments": [
- {
- "arguments": [
- {
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "id": 1926,
- "name": "commonContract",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1916,
- "src": "4551:14:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Collection_$1167",
- "typeString": "contract Collection"
- }
- },
- "id": 1927,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "4566:20:5",
- "memberName": "uniqueCollectionType",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1146,
- "src": "4551:35:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$",
- "typeString": "function () view external returns (string memory)"
- }
- },
- "id": 1928,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4551:37:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_string_memory_ptr",
- "typeString": "string memory"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_string_memory_ptr",
- "typeString": "string memory"
- }
- ],
- "id": 1925,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "4545:5:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
- "typeString": "type(bytes storage pointer)"
- },
- "typeName": {
- "id": 1924,
- "name": "bytes",
- "nodeType": "ElementaryTypeName",
- "src": "4545:5:5",
- "typeDescriptions": {}
- }
- },
- "id": 1929,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4545:44:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bytes_memory_ptr",
- "typeString": "bytes memory"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bytes_memory_ptr",
- "typeString": "bytes memory"
- }
- ],
- "id": 1923,
- "name": "keccak256",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967288,
- "src": "4535:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
- "typeString": "function (bytes memory) pure returns (bytes32)"
- }
- },
- "id": 1930,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4535:55:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "4510:80:5"
- },
- {
- "assignments": [
- 1933
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1933,
- "mutability": "mutable",
- "name": "tokenId",
- "nameLocation": "4602:7:5",
- "nodeType": "VariableDeclaration",
- "scope": 2098,
- "src": "4594:15:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1932,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "4594:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1934,
- "nodeType": "VariableDeclarationStatement",
- "src": "4594:15:5"
- },
- {
- "condition": {
- "commonType": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- },
- "id": 1937,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "id": 1935,
- "name": "collectionType",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1922,
- "src": "4618:14:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "==",
- "rightExpression": {
- "id": 1936,
- "name": "REFUNGIBLE_COLLECTION_TYPE",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1703,
- "src": "4636:26:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "src": "4618:44:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "falseBody": {
- "condition": {
- "commonType": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- },
- "id": 2010,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "id": 2008,
- "name": "collectionType",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1922,
- "src": "5122:14:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "==",
- "rightExpression": {
- "id": 2009,
- "name": "NONFUNGIBLE_COLLECTION_TYPE",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1711,
- "src": "5140:27:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes32",
- "typeString": "bytes32"
- }
- },
- "src": "5122:45:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "falseBody": {
- "id": 2085,
- "nodeType": "Block",
- "src": "5609:69:5",
- "statements": [
- {
- "expression": {
- "arguments": [
- {
- "hexValue": "57726f6e6720636f6c6c656374696f6e20747970652e20576f726b73206f6e6c792077697468204e4654206f7220524654",
- "id": 2082,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "string",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5621:51:5",
- "typeDescriptions": {
- "typeIdentifier": "t_stringliteral_a720d6ef8719206bfa9a6cc035f350312523cbf9cf6cd62b2324270bef55372a",
- "typeString": "literal_string \"Wrong collection type. Works only with NFT or RFT\""
- },
- "value": "Wrong collection type. Works only with NFT or RFT"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_stringliteral_a720d6ef8719206bfa9a6cc035f350312523cbf9cf6cd62b2324270bef55372a",
- "typeString": "literal_string \"Wrong collection type. Works only with NFT or RFT\""
- }
- ],
- "id": 2081,
- "name": "revert",
- "nodeType": "Identifier",
- "overloadedDeclarations": [
- 4294967277,
- 4294967277
- ],
- "referencedDeclaration": 4294967277,
- "src": "5614:6:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
- "typeString": "function (string memory) pure"
- }
- },
- "id": 2083,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5614:59:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 2084,
- "nodeType": "ExpressionStatement",
- "src": "5614:59:5"
- }
- ]
- },
- "id": 2086,
- "nodeType": "IfStatement",
- "src": "5118:560:5",
- "trueBody": {
- "id": 2080,
- "nodeType": "Block",
- "src": "5169:434:5",
- "statements": [
- {
- "assignments": [
- 2013
- ],
- "declarations": [
- {
- "constant": false,
- "id": 2013,
- "mutability": "mutable",
- "name": "nftCollection",
- "nameLocation": "5184:13:5",
- "nodeType": "VariableDeclaration",
- "scope": 2080,
- "src": "5174:23:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- },
- "typeName": {
- "id": 2012,
- "nodeType": "UserDefinedTypeName",
- "pathNode": {
- "id": 2011,
- "name": "UniqueNFT",
- "nameLocations": [
- "5174:9:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 893,
- "src": "5174:9:5"
- },
- "referencedDeclaration": 893,
- "src": "5174:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 2017,
- "initialValue": {
- "arguments": [
- {
- "id": 2015,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1890,
- "src": "5210:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 2014,
- "name": "UniqueNFT",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 893,
- "src": "5200:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_UniqueNFT_$893_$",
- "typeString": "type(contract UniqueNFT)"
- }
- },
- "id": 2016,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5200:22:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "5174:48:5"
- },
- {
- "expression": {
- "id": 2022,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "id": 2018,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "5227:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "id": 2019,
- "name": "nftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2013,
- "src": "5237:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "id": 2020,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "5251:11:5",
- "memberName": "nextTokenId",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 666,
- "src": "5237:25:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
- "typeString": "function () view external returns (uint256)"
- }
- },
- "id": 2021,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5237:27:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "5227:37:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 2023,
- "nodeType": "ExpressionStatement",
- "src": "5227:37:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "id": 2029,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967268,
- "src": "5296:4:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- ],
- "id": 2028,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "5288:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 2027,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "5288:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 2030,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5288:13:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 2031,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "5303:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "id": 2024,
- "name": "nftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2013,
- "src": "5269:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "id": 2026,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "5283:4:5",
- "memberName": "mint",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 590,
- "src": "5269:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,uint256) external returns (bool)"
- }
- },
- "id": 2032,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5269:42:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 2033,
- "nodeType": "ExpressionStatement",
- "src": "5269:42:5"
- },
- {
- "body": {
- "id": 2058,
- "nodeType": "Block",
- "src": "5363:86:5",
- "statements": [
- {
- "expression": {
- "arguments": [
- {
- "id": 2047,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "5395:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "expression": {
- "baseExpression": {
- "id": 2048,
- "name": "properties",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1896,
- "src": "5404:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_array$_t_struct$_Property_$1695_calldata_ptr_$dyn_calldata_ptr",
- "typeString": "struct Property calldata[] calldata"
- }
- },
- "id": 2050,
- "indexExpression": {
- "id": 2049,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2035,
- "src": "5415:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "nodeType": "IndexAccess",
- "src": "5404:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Property_$1695_calldata_ptr",
- "typeString": "struct Property calldata"
- }
- },
- "id": 2051,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "5418:3:5",
- "memberName": "key",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1692,
- "src": "5404:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_string_calldata_ptr",
- "typeString": "string calldata"
- }
- },
- {
- "expression": {
- "baseExpression": {
- "id": 2052,
- "name": "properties",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1896,
- "src": "5423:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_array$_t_struct$_Property_$1695_calldata_ptr_$dyn_calldata_ptr",
- "typeString": "struct Property calldata[] calldata"
- }
- },
- "id": 2054,
- "indexExpression": {
- "id": 2053,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2035,
- "src": "5434:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "nodeType": "IndexAccess",
- "src": "5423:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Property_$1695_calldata_ptr",
- "typeString": "struct Property calldata"
- }
- },
- "id": 2055,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "5437:5:5",
- "memberName": "value",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1694,
- "src": "5423:19:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes_calldata_ptr",
- "typeString": "bytes calldata"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_string_calldata_ptr",
- "typeString": "string calldata"
- },
- {
- "typeIdentifier": "t_bytes_calldata_ptr",
- "typeString": "bytes calldata"
- }
- ],
- "expression": {
- "id": 2044,
- "name": "nftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2013,
- "src": "5369:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "id": 2046,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "5383:11:5",
- "memberName": "setProperty",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 318,
- "src": "5369:25:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$__$",
- "typeString": "function (uint256,string memory,bytes memory) external"
- }
- },
- "id": 2056,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5369:74:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 2057,
- "nodeType": "ExpressionStatement",
- "src": "5369:74:5"
- }
- ]
- },
- "condition": {
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "id": 2040,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "id": 2038,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2035,
- "src": "5336:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "<",
- "rightExpression": {
- "id": 2039,
- "name": "propertiesLength",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1903,
- "src": "5340:16:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "5336:20:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 2059,
- "initializationExpression": {
- "assignments": [
- 2035
- ],
- "declarations": [
- {
- "constant": false,
- "id": 2035,
- "mutability": "mutable",
- "name": "i",
- "nameLocation": "5329:1:5",
- "nodeType": "VariableDeclaration",
- "scope": 2059,
- "src": "5321:9:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 2034,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "5321:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 2037,
- "initialValue": {
- "hexValue": "30",
- "id": 2036,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5333:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "5321:13:5"
- },
- "loopExpression": {
- "expression": {
- "id": 2042,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "nodeType": "UnaryOperation",
- "operator": "++",
- "prefix": true,
- "src": "5358:3:5",
- "subExpression": {
- "id": 2041,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2035,
- "src": "5360:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 2043,
- "nodeType": "ExpressionStatement",
- "src": "5358:3:5"
- },
- "nodeType": "ForStatement",
- "src": "5316:133:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "arguments": [
- {
- "id": 2066,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967268,
- "src": "5516:4:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- ],
- "id": 2065,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "5508:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 2064,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "5508:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 2067,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5508:13:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "hexValue": "30",
- "id": 2068,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5523:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- }
- ],
- "id": 2063,
- "name": "NftCrossAccountId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 700,
- "src": "5490:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_struct$_Tuple8_$700_storage_ptr_$",
- "typeString": "type(struct Tuple8 storage pointer)"
- }
- },
- "id": 2069,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "structConstructorCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5490:35:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Tuple8_$700_memory_ptr",
- "typeString": "struct Tuple8 memory"
- }
- },
- {
- "arguments": [
- {
- "arguments": [
- {
- "hexValue": "30",
- "id": 2073,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5557:1:5",
- "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": 2072,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "5549:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 2071,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "5549:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 2074,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5549:10:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 2075,
- "name": "_substrateReceiver",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1892,
- "src": "5561:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "id": 2070,
- "name": "NftCrossAccountId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 700,
- "src": "5531:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_struct$_Tuple8_$700_storage_ptr_$",
- "typeString": "type(struct Tuple8 storage pointer)"
- }
- },
- "id": 2076,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "structConstructorCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5531:49:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Tuple8_$700_memory_ptr",
- "typeString": "struct Tuple8 memory"
- }
- },
- {
- "id": 2077,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "5586:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_struct$_Tuple8_$700_memory_ptr",
- "typeString": "struct Tuple8 memory"
- },
- {
- "typeIdentifier": "t_struct$_Tuple8_$700_memory_ptr",
- "typeString": "struct Tuple8 memory"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "id": 2060,
- "name": "nftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2013,
- "src": "5453:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueNFT_$893",
- "typeString": "contract UniqueNFT"
- }
- },
- "id": 2062,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "5467:17:5",
- "memberName": "transferFromCross",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 643,
- "src": "5453:31:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_struct$_Tuple8_$700_memory_ptr_$_t_struct$_Tuple8_$700_memory_ptr_$_t_uint256_$returns$__$",
- "typeString": "function (struct Tuple8 memory,struct Tuple8 memory,uint256) external"
- }
- },
- "id": 2078,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5453:145:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 2079,
- "nodeType": "ExpressionStatement",
- "src": "5453:145:5"
- }
- ]
- }
- },
- "id": 2087,
- "nodeType": "IfStatement",
- "src": "4614:1064:5",
- "trueBody": {
- "id": 2007,
- "nodeType": "Block",
- "src": "4664:448:5",
- "statements": [
- {
- "assignments": [
- 1940
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1940,
- "mutability": "mutable",
- "name": "rftCollection",
- "nameLocation": "4686:13:5",
- "nodeType": "VariableDeclaration",
- "scope": 2007,
- "src": "4669:30:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- },
- "typeName": {
- "id": 1939,
- "nodeType": "UserDefinedTypeName",
- "pathNode": {
- "id": 1938,
- "name": "UniqueRefungible",
- "nameLocations": [
- "4669:16:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 1508,
- "src": "4669:16:5"
- },
- "referencedDeclaration": 1508,
- "src": "4669:16:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1944,
- "initialValue": {
- "arguments": [
- {
- "id": 1942,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1890,
- "src": "4719:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1941,
- "name": "UniqueRefungible",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1508,
- "src": "4702:16:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_UniqueRefungible_$1508_$",
- "typeString": "type(contract UniqueRefungible)"
- }
- },
- "id": 1943,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4702:29:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "4669:62:5"
- },
- {
- "expression": {
- "id": 1949,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "id": 1945,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "4736:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "id": 1946,
- "name": "rftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1940,
- "src": "4746:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "id": 1947,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "4760:11:5",
- "memberName": "nextTokenId",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1273,
- "src": "4746:25:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
- "typeString": "function () view external returns (uint256)"
- }
- },
- "id": 1948,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4746:27:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "4736:37:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 1950,
- "nodeType": "ExpressionStatement",
- "src": "4736:37:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "id": 1956,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967268,
- "src": "4805:4:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- ],
- "id": 1955,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "4797:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1954,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "4797:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1957,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4797:13:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 1958,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "4812:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "id": 1951,
- "name": "rftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1940,
- "src": "4778:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "id": 1953,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "4792:4:5",
- "memberName": "mint",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1206,
- "src": "4778:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,uint256) external returns (bool)"
- }
- },
- "id": 1959,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4778:42:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 1960,
- "nodeType": "ExpressionStatement",
- "src": "4778:42:5"
- },
- {
- "body": {
- "id": 1985,
- "nodeType": "Block",
- "src": "4872:86:5",
- "statements": [
- {
- "expression": {
- "arguments": [
- {
- "id": 1974,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "4904:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "expression": {
- "baseExpression": {
- "id": 1975,
- "name": "properties",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1896,
- "src": "4913:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_array$_t_struct$_Property_$1695_calldata_ptr_$dyn_calldata_ptr",
- "typeString": "struct Property calldata[] calldata"
- }
- },
- "id": 1977,
- "indexExpression": {
- "id": 1976,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1962,
- "src": "4924:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "nodeType": "IndexAccess",
- "src": "4913:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Property_$1695_calldata_ptr",
- "typeString": "struct Property calldata"
- }
- },
- "id": 1978,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "4927:3:5",
- "memberName": "key",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1692,
- "src": "4913:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_string_calldata_ptr",
- "typeString": "string calldata"
- }
- },
- {
- "expression": {
- "baseExpression": {
- "id": 1979,
- "name": "properties",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1896,
- "src": "4932:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_array$_t_struct$_Property_$1695_calldata_ptr_$dyn_calldata_ptr",
- "typeString": "struct Property calldata[] calldata"
- }
- },
- "id": 1981,
- "indexExpression": {
- "id": 1980,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1962,
- "src": "4943:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "nodeType": "IndexAccess",
- "src": "4932:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Property_$1695_calldata_ptr",
- "typeString": "struct Property calldata"
- }
- },
- "id": 1982,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "4946:5:5",
- "memberName": "value",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1694,
- "src": "4932:19:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bytes_calldata_ptr",
- "typeString": "bytes calldata"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_string_calldata_ptr",
- "typeString": "string calldata"
- },
- {
- "typeIdentifier": "t_bytes_calldata_ptr",
- "typeString": "bytes calldata"
- }
- ],
- "expression": {
- "id": 1971,
- "name": "rftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1940,
- "src": "4878:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "id": 1973,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "4892:11:5",
- "memberName": "setProperty",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 934,
- "src": "4878:25:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$__$",
- "typeString": "function (uint256,string memory,bytes memory) external"
- }
- },
- "id": 1983,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4878:74:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1984,
- "nodeType": "ExpressionStatement",
- "src": "4878:74:5"
- }
- ]
- },
- "condition": {
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "id": 1967,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "id": 1965,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1962,
- "src": "4845:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "<",
- "rightExpression": {
- "id": 1966,
- "name": "propertiesLength",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1903,
- "src": "4849:16:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "4845:20:5",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 1986,
- "initializationExpression": {
- "assignments": [
- 1962
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1962,
- "mutability": "mutable",
- "name": "i",
- "nameLocation": "4838:1:5",
- "nodeType": "VariableDeclaration",
- "scope": 1986,
- "src": "4830:9:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1961,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "4830:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- }
- ],
- "id": 1964,
- "initialValue": {
- "hexValue": "30",
- "id": 1963,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "4842:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "4830:13:5"
- },
- "loopExpression": {
- "expression": {
- "id": 1969,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "nodeType": "UnaryOperation",
- "operator": "++",
- "prefix": true,
- "src": "4867:3:5",
- "subExpression": {
- "id": 1968,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1962,
- "src": "4869:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 1970,
- "nodeType": "ExpressionStatement",
- "src": "4867:3:5"
- },
- "nodeType": "ForStatement",
- "src": "4825:133:5"
- },
- {
- "expression": {
- "arguments": [
- {
- "arguments": [
- {
- "arguments": [
- {
- "id": 1993,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 4294967268,
- "src": "5025:4:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EvmToSubstrate_$2100",
- "typeString": "contract EvmToSubstrate"
- }
- ],
- "id": 1992,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "5017:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1991,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "5017:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 1994,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5017:13:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "hexValue": "30",
- "id": 1995,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5032:1:5",
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- }
- ],
- "id": 1990,
- "name": "RftCrossAccountId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1315,
- "src": "4999:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_struct$_Tuple8_$1315_storage_ptr_$",
- "typeString": "type(struct Tuple8 storage pointer)"
- }
- },
- "id": 1996,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "structConstructorCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4999:35:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Tuple8_$1315_memory_ptr",
- "typeString": "struct Tuple8 memory"
- }
- },
- {
- "arguments": [
- {
- "arguments": [
- {
- "hexValue": "30",
- "id": 2000,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5066:1:5",
- "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": 1999,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "5058:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 1998,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "5058:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 2001,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5058:10:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 2002,
- "name": "_substrateReceiver",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1892,
- "src": "5070:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "id": 1997,
- "name": "RftCrossAccountId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1315,
- "src": "5040:17:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_struct$_Tuple8_$1315_storage_ptr_$",
- "typeString": "type(struct Tuple8 storage pointer)"
- }
- },
- "id": 2003,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "structConstructorCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5040:49:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Tuple8_$1315_memory_ptr",
- "typeString": "struct Tuple8 memory"
- }
- },
- {
- "id": 2004,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "5095:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_struct$_Tuple8_$1315_memory_ptr",
- "typeString": "struct Tuple8 memory"
- },
- {
- "typeIdentifier": "t_struct$_Tuple8_$1315_memory_ptr",
- "typeString": "struct Tuple8 memory"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "id": 1987,
- "name": "rftCollection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1940,
- "src": "4962:13:5",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_UniqueRefungible_$1508",
- "typeString": "contract UniqueRefungible"
- }
- },
- "id": 1989,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberLocation": "4976:17:5",
- "memberName": "transferFromCross",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 1250,
- "src": "4962:31:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_struct$_Tuple8_$1315_memory_ptr_$_t_struct$_Tuple8_$1315_memory_ptr_$_t_uint256_$returns$__$",
- "typeString": "function (struct Tuple8 memory,struct Tuple8 memory,uint256) external"
- }
- },
- "id": 2005,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4962:145:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 2006,
- "nodeType": "ExpressionStatement",
- "src": "4962:145:5"
- }
- ]
- }
- },
- {
- "eventCall": {
- "arguments": [
- {
- "arguments": [
- {
- "hexValue": "30",
- "id": 2091,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5757:1:5",
- "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": 2090,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "5749:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": {
- "id": 2089,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "5749:7:5",
- "typeDescriptions": {}
- }
- },
- "id": 2092,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5749:10:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 2093,
- "name": "_substrateReceiver",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1892,
- "src": "5761:18:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "id": 2094,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1890,
- "src": "5781:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "id": 2095,
- "name": "tokenId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1933,
- "src": "5794:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "id": 2088,
- "name": "MintToSub",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1744,
- "src": "5739:9:5",
- "typeDescriptions": {
- "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$",
- "typeString": "function (address,uint256,address,uint256)"
- }
- },
- "id": 2096,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "nameLocations": [],
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5739:63:5",
- "tryCall": false,
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 2097,
- "nodeType": "EmitStatement",
- "src": "5734:68:5"
- }
- ]
- },
- "functionSelector": "440dff9d",
- "id": 2099,
- "implemented": true,
- "kind": "function",
- "modifiers": [
- {
- "arguments": [
- {
- "id": 1899,
- "name": "_collection",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1890,
- "src": "4185:11:5",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "id": 1900,
- "kind": "modifierInvocation",
- "modifierName": {
- "id": 1898,
- "name": "checkRestrictions",
- "nameLocations": [
- "4167:17:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 1733,
- "src": "4167:17:5"
- },
- "nodeType": "ModifierInvocation",
- "src": "4167:30:5"
- }
- ],
- "name": "mintToSubstrateWithProperty",
- "nameLocation": "4040:27:5",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 1897,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 1890,
- "mutability": "mutable",
- "name": "_collection",
- "nameLocation": "4079:11:5",
- "nodeType": "VariableDeclaration",
- "scope": 2099,
- "src": "4071:19:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1889,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "4071:7:5",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1892,
- "mutability": "mutable",
- "name": "_substrateReceiver",
- "nameLocation": "4102:18:5",
- "nodeType": "VariableDeclaration",
- "scope": 2099,
- "src": "4094:26:5",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1891,
- "name": "uint256",
- "nodeType": "ElementaryTypeName",
- "src": "4094:7:5",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1896,
- "mutability": "mutable",
- "name": "properties",
- "nameLocation": "4144:10:5",
- "nodeType": "VariableDeclaration",
- "scope": 2099,
- "src": "4124:30:5",
- "stateVariable": false,
- "storageLocation": "calldata",
- "typeDescriptions": {
- "typeIdentifier": "t_array$_t_struct$_Property_$1695_calldata_ptr_$dyn_calldata_ptr",
- "typeString": "struct Property[]"
- },
- "typeName": {
- "baseType": {
- "id": 1894,
- "nodeType": "UserDefinedTypeName",
- "pathNode": {
- "id": 1893,
- "name": "Property",
- "nameLocations": [
- "4124:8:5"
- ],
- "nodeType": "IdentifierPath",
- "referencedDeclaration": 1695,
- "src": "4124:8:5"
- },
- "referencedDeclaration": 1695,
- "src": "4124:8:5",
- "typeDescriptions": {
- "typeIdentifier": "t_struct$_Property_$1695_storage_ptr",
- "typeString": "struct Property"
- }
- },
- "id": 1895,
- "nodeType": "ArrayTypeName",
- "src": "4124:10:5",
- "typeDescriptions": {
- "typeIdentifier": "t_array$_t_struct$_Property_$1695_storage_$dyn_storage_ptr",
- "typeString": "struct Property[]"
- }
- },
- "visibility": "internal"
- }
- ],
- "src": "4067:90:5"
- },
- "returnParameters": {
- "id": 1901,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "4198:0:5"
- },
- "scope": 2100,
- "src": "4031:1775:5",
- "stateMutability": "nonpayable",
- "virtual": false,
- "visibility": "external"
- }
- ],
- "scope": 2101,
- "src": "494:5314:5",
- "usedErrors": []
- }
- ],
- "src": "44:5765:5"
- },
- "functionHashes": {
- "mintToSubstrate(address,uint256)": "7a8d9786",
- "mintToSubstrateWithProperty(address,uint256,(string,bytes)[])": "440dff9d"
- },
- "gasEstimates": {
- "creation": {
- "codeDepositCost": "730800",
- "executionCost": "766",
- "totalCost": "731566"
- },
- "external": {
- "mintToSubstrate(address,uint256)": "infinite",
- "mintToSubstrateWithProperty(address,uint256,(string,bytes)[])": "infinite"
- }
- }
-}
\ No newline at end of file
tests/src/eth/evmToSubstrate/ABIGEN/EvmToSubstrate.tsdiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/ABIGEN/EvmToSubstrate.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Autogenerated file. Do not edit manually. */
-/* tslint:disable */
-/* eslint-disable */
-
-import type BN from "bn.js";
-import type { ContractOptions } from "web3-eth-contract";
-import type { EventLog } from "web3-core";
-import type { EventEmitter } from "events";
-import type {
- Callback,
- PayableTransactionObject,
- NonPayableTransactionObject,
- BlockType,
- ContractEventLog,
- BaseContract,
-} from "./types";
-
-export interface EventOptions {
- filter?: object;
- fromBlock?: BlockType;
- topics?: string[];
-}
-
-export type MintToSub = ContractEventLog<{
- _toEth: string;
- _toSub: string;
- _collection: string;
- _tokenId: string;
- 0: string;
- 1: string;
- 2: string;
- 3: string;
-}>;
-
-export interface EvmToSubstrate extends BaseContract {
- constructor(
- jsonInterface: any[],
- address?: string,
- options?: ContractOptions
- ): EvmToSubstrate;
- clone(): EvmToSubstrate;
- methods: {
- mintToSubstrate(
- _collection: string,
- _substrateReceiver: number | string | BN
- ): NonPayableTransactionObject<void>;
-
- mintToSubstrateWithProperty(
- _collection: string,
- _substrateReceiver: number | string | BN,
- properties: [string, string | number[]][]
- ): NonPayableTransactionObject<void>;
- };
- events: {
- MintToSub(cb?: Callback<MintToSub>): EventEmitter;
- MintToSub(options?: EventOptions, cb?: Callback<MintToSub>): EventEmitter;
-
- allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
- };
-
- once(event: "MintToSub", cb: Callback<MintToSub>): void;
- once(
- event: "MintToSub",
- options: EventOptions,
- cb: Callback<MintToSub>
- ): void;
-}
tests/src/eth/evmToSubstrate/ABIGEN/index.tsdiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/ABIGEN/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Autogenerated file. Do not edit manually. */
-/* tslint:disable */
-/* eslint-disable */
-export type { EvmToSubstrate } from "./EvmToSubstrate";
tests/src/eth/evmToSubstrate/ABIGEN/types.tsdiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/ABIGEN/types.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Autogenerated file. Do not edit manually. */
-/* tslint:disable */
-/* eslint-disable */
-import type BN from "bn.js";
-import type { EventEmitter } from "events";
-import type { EventLog, PromiEvent, TransactionReceipt } from "web3-core/types";
-import type { Contract } from "web3-eth-contract";
-
-export interface EstimateGasOptions {
- from?: string;
- gas?: number;
- value?: number | string | BN;
-}
-
-export interface EventOptions {
- filter?: object;
- fromBlock?: BlockType;
- topics?: string[];
-}
-
-export type Callback<T> = (error: Error, result: T) => void;
-export interface ContractEventLog<T> extends EventLog {
- returnValues: T;
-}
-export interface ContractEventEmitter<T> extends EventEmitter {
- on(event: "connected", listener: (subscriptionId: string) => void): this;
- on(
- event: "data" | "changed",
- listener: (event: ContractEventLog<T>) => void
- ): this;
- on(event: "error", listener: (error: Error) => void): this;
-}
-
-export interface NonPayableTx {
- nonce?: string | number | BN;
- chainId?: string | number | BN;
- from?: string;
- to?: string;
- data?: string;
- gas?: string | number | BN;
- maxPriorityFeePerGas?: string | number | BN;
- maxFeePerGas?: string | number | BN;
- gasPrice?: string | number | BN;
-}
-
-export interface PayableTx extends NonPayableTx {
- value?: string | number | BN;
-}
-
-export interface NonPayableTransactionObject<T> {
- arguments: any[];
- call(tx?: NonPayableTx, block?: BlockType): Promise<T>;
- send(tx?: NonPayableTx): PromiEvent<TransactionReceipt>;
- estimateGas(tx?: NonPayableTx): Promise<number>;
- encodeABI(): string;
-}
-
-export interface PayableTransactionObject<T> {
- arguments: any[];
- call(tx?: PayableTx, block?: BlockType): Promise<T>;
- send(tx?: PayableTx): PromiEvent<TransactionReceipt>;
- estimateGas(tx?: PayableTx): Promise<number>;
- encodeABI(): string;
-}
-
-export type BlockType =
- | "latest"
- | "pending"
- | "genesis"
- | "earliest"
- | number
- | BN;
-export type BaseContract = Omit<Contract, "clone" | "once">;
tests/src/eth/evmToSubstrate/EvmToSubstrateHelper.soldiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/EvmToSubstrateHelper.sol
+++ /dev/null
@@ -1,201 +0,0 @@
-// SPDX-License-Identifier: Apache License
-pragma solidity >=0.8.0;
-import {CollectionHelpers} from "../api/CollectionHelpers.sol";
-import {ContractHelpers} from "../api/ContractHelpers.sol";
-import {UniqueRefungibleToken} from "../api/UniqueRefungibleToken.sol";
-import {UniqueRefungible, Collection, EthCrossAccount as RftCrossAccountId, Tuple20 as RftProperties} from "../api/UniqueRefungible.sol";
-import {UniqueNFT, EthCrossAccount as NftCrossAccountId, Tuple21 as NftProperty, TokenProperties} from "../api/UniqueNFT.sol";
-
-struct Property {
- string key;
- bytes value;
-}
-
-// interface Foo {
-// struct Tuple19 {
-// string field_0;
-// bytes field_1;
-// }
-
-// }
-
-contract EvmToSubstrate {
- bytes32 constant REFUNGIBLE_COLLECTION_TYPE = keccak256(bytes("ReFungible"));
- bytes32 constant NONFUNGIBLE_COLLECTION_TYPE = keccak256(bytes("NFT"));
- // bytes32 collectionType;
-
- // Collection commonContract;
- // UniqueNFT nftCollection;
- // UniqueRefungible rftCollection;
-
- // function(address, uint256) external returns (bool) mintInvoke;
- // function(address, address, uint256) external transferInvoke;
-
- modifier checkRestrictions(address _collection) {
- Collection commonContract = Collection(_collection);
- require(commonContract.isOwnerOrAdmin(msg.sender), "Only collection admin/owner can call this method");
-
- // bytes32 collectionType = keccak256(bytes(commonContract.uniqueCollectionType()));
- // uint256 tokenId;
-
- // if (collectionType == REFUNGIBLE_COLLECTION_TYPE) {
- // UniqueRefungible rftCollection = UniqueRefungible(_collection);
- // mintInvoke = rftCollection.mint;
- // transferInvoke = rftCollection.transferFrom;
- // tokenId = rftCollection.nextTokenId();
- // } else if (collectionType == NONFUNGIBLE_COLLECTION_TYPE) {
- // UniqueNFT nftCollection = UniqueNFT(_collection);
- // mintInvoke = nftCollection.mint;
- // transferInvoke = nftCollection.transferFrom;
-
- // tokenId = nftCollection.nextTokenId();
- // } else {
- // revert("Wrong collection type. Works only with NFT or RFT");
- // }
-
- _;
- }
-
- /// @dev This emits when a mint to a substrate address has been made.
- event MintToSub(address _toEth, uint256 _toSub, address _collection, uint256 _tokenId);
-
- function mintToSubstrate(address _collection, uint256 _substrateReceiver) external checkRestrictions(_collection) {
- // function(address, uint256) external returns (bool) mintInvoke;
- // function(Tuple8 memory, Tuple8 memory, uint256) external transferInvoke;
- Collection commonContract = Collection(_collection);
- bytes32 collectionType = keccak256(bytes(commonContract.uniqueCollectionType()));
- uint256 tokenId;
-
- if (collectionType == REFUNGIBLE_COLLECTION_TYPE) {
- UniqueRefungible rftCollection = UniqueRefungible(_collection);
-
- tokenId = rftCollection.mint(address(this));
-
- rftCollection.transferFromCross(
- RftCrossAccountId(address(this), 0),
- RftCrossAccountId(address(0), _substrateReceiver),
- tokenId
- );
- } else if (collectionType == NONFUNGIBLE_COLLECTION_TYPE) {
- UniqueNFT nftCollection = UniqueNFT(_collection);
- // tokenId = nftCollection.nextTokenId();
- tokenId = nftCollection.mint(address(this));
-
- nftCollection.transferFromCross(
- NftCrossAccountId(address(this), 0),
- NftCrossAccountId(address(0), _substrateReceiver),
- tokenId
- );
- } else {
- revert("Wrong collection type. Works only with NFT or RFT");
- }
-
- // mintInvoke(address(this), tokenId);
- // Tuple8 memory sender = Tuple8(address(this), 0);
- // Tuple8 memory receiver = Tuple8(address(0), _substrateReceiver);
-
- // transferInvoke(sender, receiver, tokenId);
-
- emit MintToSub(address(0), _substrateReceiver, _collection, tokenId);
- }
-
- function mintToSubstrateWithProperty(
- address _collection,
- uint256 _substrateReceiver,
- Property[] calldata properties
- ) external checkRestrictions(_collection) {
- // function(address, uint256, string memory) external returns (bool) mintInvoke;
- // function(address, address, uint256) external transferInvoke;
- uint256 propertiesLength = properties.length;
- require(propertiesLength > 0, "Properies is empty");
-
- Collection commonContract = Collection(_collection);
- bytes32 collectionType = keccak256(bytes(commonContract.uniqueCollectionType()));
- uint256 tokenId;
-
- if (collectionType == REFUNGIBLE_COLLECTION_TYPE) {
- UniqueRefungible rftCollection = UniqueRefungible(_collection);
- tokenId = rftCollection.nextTokenId();
- rftCollection.mint(address(this));
- for (uint256 i = 0; i < propertiesLength; ++i) {
- rftCollection.setProperty(tokenId, properties[i].key, properties[i].value);
- }
- rftCollection.transferFromCross(
- RftCrossAccountId(address(this), 0),
- RftCrossAccountId(address(0), _substrateReceiver),
- tokenId
- );
- } else if (collectionType == NONFUNGIBLE_COLLECTION_TYPE) {
- UniqueNFT nftCollection = UniqueNFT(_collection);
- // tokenId = nftCollection.nextTokenId();
- tokenId = nftCollection.mint(address(this));
- for (uint256 i = 0; i < propertiesLength; ++i) {
- nftCollection.setProperty(tokenId, properties[i].key, properties[i].value);
- }
- nftCollection.transferFromCross(
- NftCrossAccountId(address(this), 0),
- NftCrossAccountId(address(0), _substrateReceiver),
- tokenId
- );
- } else {
- revert("Wrong collection type. Works only with NFT or RFT");
- }
-
- // transferInvoke(address(this), _gap, tokenId);
-
- emit MintToSub(address(0), _substrateReceiver, _collection, tokenId);
- }
-
- function mintToSubstrateBulkProperty(
- address _collection,
- uint256 _substrateReceiver,
- NftProperty[] calldata _properties
- ) external checkRestrictions(_collection) {
- uint256 propertiesLength = _properties.length;
- require(propertiesLength > 0, "Properies is empty");
-
- Collection commonContract = Collection(_collection);
- bytes32 collectionType = keccak256(bytes(commonContract.uniqueCollectionType()));
- uint256 tokenId;
-
- if (collectionType == REFUNGIBLE_COLLECTION_TYPE) {} else if (collectionType == NONFUNGIBLE_COLLECTION_TYPE) {
- UniqueNFT nftCollection = UniqueNFT(_collection);
- // tokenId = nftCollection.nextTokenId();
- tokenId = nftCollection.mint(address(this));
-
- nftCollection.setProperties(tokenId, _properties);
-
- nftCollection.transferFromCross(
- NftCrossAccountId(address(this), 0),
- NftCrossAccountId(address(0), _substrateReceiver),
- tokenId
- );
- } else {
- revert("Wrong collection type. Works only with NFT or RFT");
- }
-
- emit MintToSub(address(0), _substrateReceiver, _collection, tokenId);
- }
-
- function proxyProperties(
- address _collection,
- uint256 _tokenId,
- NftProperty[] calldata _properties
- ) external checkRestrictions(_collection) {
- uint256 propertiesLength = _properties.length;
- require(propertiesLength > 0, "Properies is empty");
-
- Collection commonContract = Collection(_collection);
- bytes32 collectionType = keccak256(bytes(commonContract.uniqueCollectionType()));
-
- if (collectionType == REFUNGIBLE_COLLECTION_TYPE) {
- revert("Wrong collection type. Works only with NFT or RFT");
- } else if (collectionType == NONFUNGIBLE_COLLECTION_TYPE) {
- UniqueNFT nftCollection = UniqueNFT(_collection);
-
- nftCollection.setProperties(_tokenId, _properties);
- } else {
- revert("Wrong collection type. Works only with NFT or RFT");
- }
- }
-}
tests/src/eth/evmToSubstrate/abigen.tsdiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/abigen.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import {runTypeChain, glob} from 'typechain';
-
-
-async function main() {
- const cwd = process.cwd();
-
- // find all files matching the glob
- const allFiles = glob(cwd, ['./ABI/*.json']);
-
- const result = await runTypeChain({
- cwd,
- filesToProcess: allFiles,
- allFiles,
- outDir: 'ABIGEN',
- target: 'web3-v1',
- });
-}
-
-main().catch(console.error);
\ No newline at end of file
tests/src/eth/evmToSubstrate/addressResearch.tsdiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/addressResearch.ts
+++ /dev/null
@@ -1,191 +0,0 @@
-// import {createEthAccountWithBalance} from '../util/helpers';
-import {EthUniqueHelper, usingEthPlaygrounds} from '../util/playgrounds';
-import {readFile} from 'fs/promises';
-import {ContractImports} from '../util/playgrounds/types';
-import {Contract} from '@polkadot/api-contract/base';
-import Web3 from 'web3';
-import {IProperty, ITokenPropertyPermission} from '../../util/playgrounds/types';
-import {addressToEvm, decodeAddress} from '@polkadot/util-crypto';
-import nonFungibleAbi from '../nonFungibleAbi.json';
-import {CrossAccountId} from '../../util/helpers';
-import {IKeyringPair} from '@polkadot/types/types';
-
-enum SponsoringMode {
- Disabled = 0,
- Allowlisted = 1,
- Generous = 2,
-}
-
-const WS_ENDPOINT = 'wss://ws-rc.unique.network';
-const CONTRACT_IMPORT: ContractImports[] = [
- {
- fsPath: `${__dirname}/../api/CollectionHelpers.sol`,
- solPath: 'api/CollectionHelpers.sol',
- },
- {
- fsPath: `${__dirname}/../api/ContractHelpers.sol`,
- solPath: 'api/ContractHelpers.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueRefungibleToken.sol`,
- solPath: 'api/UniqueRefungibleToken.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueRefungible.sol`,
- solPath: 'api/UniqueRefungible.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueNFT.sol`,
- solPath: 'api/UniqueNFT.sol',
- },
-];
-const main = async () => {
- await usingEthPlaygrounds(async (helper, privateKey) => {
- const contract_source = (
- await readFile(`${__dirname}/EvmToSubstrateHelper.sol`)
- ).toString();
-
-
- const donor = privateKey('//Alice'); // Seed from account with balance on this network
- const myAccount = privateKey('//Bob'); // replace with account from polkadot extension
- console.log('donor raw sub: ', donor.addressRaw);
- console.log('donor sub->eth->sub: ', decodeAddress(await helper.address.ethToSubstrate(helper.address.substrateToEth(donor.address))));
- console.log('donor sub: ', donor.address);
-
- console.log('donor raw eth: ', Uint8Array.from(Buffer.from(helper.address.substrateToEth(donor.address).slice(2), 'hex')));
- console.log('donor eth: ', helper.address.substrateToEth(donor.address));
-
- const signer = await helper.eth.createAccountWithBalance(donor, 100n);
-
- console.log('\nsigner eth: ', signer);
- console.log('signer raw eth: ', Uint8Array.from(Buffer.from(signer.slice(2), 'hex')));
- console.log('signer raw sub: ', decodeAddress(await helper.address.ethToSubstrate(signer)));
-
- const collection = await helper.nft.mintCollection(donor, {
- name: 'test mintToSubstrate',
- description: 'EVMHelpers',
- tokenPrefix: 'ap',
- tokenPropertyPermissions: [
- {
- key: 'url',
- permission: {
- tokenOwner: true,
- collectionAdmin: true,
- mutable: true,
- },
- },
- ],
- limits: {sponsorTransferTimeout: 0, sponsorApproveTimeout: 0}, permissions: {mintMode: true},
- });
-
- // await collection.addToAllowList(donor, {Ethereum: helper.address.substrateToEth(donor.address)});
- // await collection.addToAllowList(donor, {Substrate: donor.address});
- await collection.addToAllowList(donor, {Substrate: myAccount.address});
- // await collection.addAdmin(donor, {Ethereum: signer});
- // await collection.addAdmin(donor, {Ethereum: helper.address.substrateToEth(donor.address)});
-
- console.log('collection admin(s)): ', await collection.getAdmins());
- console.log('collection owner(s)): ', await collection.getAllowList());
-
-
- const collectionEthAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
- const collectionContract = helper.ethNativeContract.collection(
- collectionEthAddress,
- 'nft',
- );
- const receiverEthAddress = helper.address.substrateToEth(myAccount.address);
-
- console.log('myAccount eth mirror: ', receiverEthAddress);
- console.log('contract eth mirror: ', collectionEthAddress);
-
- let subTokenId = await collectionContract.methods.nextTokenId().call();
-
- const encodedCall = collectionContract.methods
- .mint(receiverEthAddress, subTokenId)
- .encodeABI();
-
- const ethFee = await helper.arrange.calculcateFee(
- {Substrate: donor.address},
- async () => {
- await helper.eth.sendEVM(
- myAccount,
- collectionContract.options.address,
- encodedCall,
- '0',
- );
- },
- );
-
- console.log(`\ncollection mint from eth : ${ethFee}\n`);
-
- // subTokenId = await collectionContract.methods.nextTokenId().call();
-
- // const contract = await helper.ethContract.deployByCode(signer, 'EvmToSubstrate', contract_source, CONTRACT_IMPORT);
- // console.log('contract Address', contract.options.address);
- // await helper.eth.transferBalanceFromSubstrate(donor, contract.options.address, 100n);
-
- // await collection.addToAllowList(donor, {Ethereum: contract.options.address});
- // await collection.addAdmin(donor, {Ethereum: contract.options.address});
-
-
- // const feeForProxyContractMinting = await helper.arrange.calculcateFee(
- // {Ethereum: signer},
- // async () => {
- // await contract.methods.mintToSubstrate(helper.ethAddress.fromCollectionId(collection.collectionId), myAccount.addressRaw).send({from: signer});
- // },
- // );
-
- // console.log(`\ncollection mint from contract to the Substrate Id: ${feeForProxyContractMinting}\n`);
- subTokenId = await collectionContract.methods.nextTokenId().call();
- console.log(subTokenId);
-
- console.log('All done');
- });
-};
-
-main()
- .then(() => process.exit(0))
- .catch((e) => {
- console.log(e);
- process.exit(1);
- });
-
-
-async function createCollectionForPropertiesBenchmarks(
- helper: EthUniqueHelper,
- privateKey: (seed: string) => IKeyringPair,
- ethSigner: string,
- proxyContract: string,
- permissions: ITokenPropertyPermission[],
-) {
-
- const donor = privateKey('//Alice'); // Seed from account with balance on this network
-
-
- const collection = await helper.nft.mintCollection(donor, {
- name: 'test mintToSubstrate',
- description: 'EVMHelpers',
- tokenPrefix: 'ap',
- tokenPropertyPermissions: [
- {
- key: 'url',
- permission: {
- tokenOwner: true,
- collectionAdmin: true,
- mutable: true,
- },
- },
- ],
- limits: {sponsorTransferTimeout: 0, sponsorApproveTimeout: 0}, permissions: {mintMode: true},
- });
-
- await collection.addToAllowList(donor, {Ethereum: helper.address.substrateToEth(donor.address)});
- await collection.addToAllowList(donor, {Substrate: donor.address});
- await collection.addAdmin(donor, {Ethereum: ethSigner});
- await collection.addAdmin(donor, {Ethereum: helper.address.substrateToEth(donor.address)});
- await collection.addToAllowList(donor, {Ethereum: proxyContract});
- await collection.addAdmin(donor, {Ethereum: proxyContract});
- await collection.setTokenPropertyPermissions(donor, permissions);
-
- return collection;
-}
\ No newline at end of file
tests/src/eth/evmToSubstrate/coderTest.tsdiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/coderTest.ts
+++ /dev/null
@@ -1,210 +0,0 @@
-import {EthUniqueHelper, usingEthPlaygrounds} from '../util';
-import {readFile} from 'fs/promises';
-import {ContractImports} from '../util/playgrounds/types';
-import Web3 from 'web3';
-import {
- IProperty,
- ITokenPropertyPermission,
-} from '../../util/playgrounds/types';
-import {addressToEvm, decodeAddress} from '@polkadot/util-crypto';
-import nonFungibleAbi from '../nonFungibleAbi.json';
-import {IKeyringPair} from '@polkadot/types/types';
-
-enum SponsoringMode {
- Disabled = 0,
- Allowlisted = 1,
- Generous = 2,
-}
-
-const WS_ENDPOINT = 'wss://ws-rc.unique.network';
-const CONTRACT_IMPORT: ContractImports[] = [
- {
- fsPath: `${__dirname}/../api/CollectionHelpers.sol`,
- solPath: 'api/CollectionHelpers.sol',
- },
- {
- fsPath: `${__dirname}/../api/ContractHelpers.sol`,
- solPath: 'api/ContractHelpers.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueRefungibleToken.sol`,
- solPath: 'api/UniqueRefungibleToken.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueRefungible.sol`,
- solPath: 'api/UniqueRefungible.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueNFT.sol`,
- solPath: 'api/UniqueNFT.sol',
- },
-];
-
-const main = async () => {
- await usingEthPlaygrounds(async (helper, privateKey) => {
- const contract_source = (
- await readFile(`${__dirname}/EvmToSubstrateHelper.sol`)
- ).toString();
-
- const donor = await privateKey('//Alice'); // Seed from account with balance on this network
- const myAccount = await privateKey('//Bob'); // replace with account from polkadot extension
- const signer = await helper.eth.createAccountWithBalance(donor, 100n);
- console.log(`signer data: ${Uint8Array.from(Buffer.from(signer.slice(2), 'hex'))}`);
- const collection = await helper.nft.mintCollection(donor, {
- name: 'test mintToSubstrate',
- description: 'EVMHelpers',
- tokenPrefix: 'ap',
- tokenPropertyPermissions: [
- {
- key: 'url',
- permission: {
- tokenOwner: true,
- collectionAdmin: true,
- mutable: true,
- },
- },
- ],
- limits: {sponsorTransferTimeout: 0, sponsorApproveTimeout: 0},
- permissions: {mintMode: true},
- });
-
- await collection.addToAllowList(donor, {
- Ethereum: helper.address.substrateToEth(donor.address),
- });
- await collection.addToAllowList(donor, {Substrate: donor.address});
- await collection.addAdmin(donor, {Ethereum: signer});
- await collection.addAdmin(donor, {
- Ethereum: helper.address.substrateToEth(donor.address),
- });
-
- console.log('collection admin(s)): ', await collection.getAdmins());
- console.log('collection owner(s)): ', await collection.getAllowList());
-
- const collectionEthAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
-
- const collectionEthContract = helper.ethNativeContract.collection(
- collectionEthAddress,
- 'nft',
- );
-
- const receiverEthAddress = helper.address.substrateToEth(myAccount.address);
-
- const contract = await helper.ethContract.deployByCode(
- signer,
- 'EvmToSubstrate',
- contract_source,
- CONTRACT_IMPORT,
- );
- console.log(`contract has been deployed\naddres: ${contract.options.address} || ${Uint8Array.from(Buffer.from(contract.options.address.slice(2), 'hex'))}`);
-
- await helper.eth.transferBalanceFromSubstrate(
- donor,
- contract.options.address,
- 100n,
- );
-
- console.log('transfer has been completed');
-
- await collection.addToAllowList(donor, {
- Ethereum: contract.options.address,
- });
- await collection.addAdmin(donor, {Ethereum: contract.options.address});
-
- console.log('setup has been completed');
-
- console.log('\t\t\t *** Properties Fees ***\n');
-
- const propertiesNumber = 20;
-
- const properties = Array(40)
- .fill(0)
- .map((_, i) => {
- return {
- key: `key_${i}`,
- value: Uint8Array.from(Buffer.from(`value_${i}`)),
- };
- });
-
- const permissions: ITokenPropertyPermission[] = properties.map((p) => {
- return {
- key: p.key,
- permission: {
- tokenOwner: true,
- collectionAdmin: true,
- mutable: true,
- },
- };
- });
-
- // *** ProxyContract Bulk ***
-
- const token = await collection.mintToken(donor, {Ethereum: signer});
-
- const mintWithBulkPropProxyContractFee = await helper.arrange.calculcateFee(
- {Ethereum: signer},
- async () => {
- await contract.methods
- .proxyProperties(
- collectionEthContract.options.address,
- token.tokenId,
- properties.slice(0, propertiesNumber).map((p) => {
- return {field_0: p.key, field_1: p.value};
- }),
- )
- .send({from: signer, gas: 20_000_000});
- },
- );
- console.log(`token mint from contract(with bulk prop.) to the Substrate Id: ${mintWithBulkPropProxyContractFee}`);
-
- console.log('All done');
- });
-};
-
-main()
- .then(() => process.exit(0))
- .catch((e) => {
- console.log(e);
- process.exit(1);
- });
-
-async function createCollectionForPropertiesBenchmarks(
- helper: EthUniqueHelper,
- privateKey: (seed: string) => Promise<IKeyringPair>,
- ethSigner: string,
- proxyContract: string,
- permissions: ITokenPropertyPermission[],
-) {
- const donor = await privateKey('//Alice'); // Seed from account with balance on this network
-
- const collection = await helper.nft.mintCollection(donor, {
- name: 'test mintToSubstrate',
- description: 'EVMHelpers',
- tokenPrefix: 'ap',
- tokenPropertyPermissions: [
- {
- key: 'url',
- permission: {
- tokenOwner: true,
- collectionAdmin: true,
- mutable: true,
- },
- },
- ],
- limits: {sponsorTransferTimeout: 0, sponsorApproveTimeout: 0},
- permissions: {mintMode: true},
- });
-
- await collection.addToAllowList(donor, {
- Ethereum: helper.address.substrateToEth(donor.address),
- });
- await collection.addToAllowList(donor, {Substrate: donor.address});
- await collection.addAdmin(donor, {Ethereum: ethSigner});
- await collection.addAdmin(donor, {
- Ethereum: helper.address.substrateToEth(donor.address),
- });
- await collection.addToAllowList(donor, {Ethereum: proxyContract});
- await collection.addAdmin(donor, {Ethereum: proxyContract});
- await collection.setTokenPropertyPermissions(donor, permissions);
-
- return collection;
-}
tests/src/eth/evmToSubstrate/feeBench.tsdiffbeforeafterbothno changes
tests/src/eth/evmToSubstrate/prototype.tsdiffbeforeafterboth--- a/tests/src/eth/evmToSubstrate/prototype.ts
+++ /dev/null
@@ -1,256 +0,0 @@
-// import {createEthAccountWithBalance} from '../util/helpers';
-import {EthUniqueHelper, usingEthPlaygrounds} from '../util/playgrounds';
-import {readFile} from 'fs/promises';
-import {ContractImports} from '../util/playgrounds/types';
-import {Contract} from '@polkadot/api-contract/base';
-import Web3 from 'web3';
-import {IProperty, ITokenPropertyPermission} from '../../util/playgrounds/types';
-import {addressToEvm, decodeAddress} from '@polkadot/util-crypto';
-import nonFungibleAbi from '../nonFungibleAbi.json';
-
-import {IKeyringPair} from '@polkadot/types/types';
-
-enum SponsoringMode {
- Disabled = 0,
- Allowlisted = 1,
- Generous = 2,
-}
-
-const WS_ENDPOINT = 'wss://ws-rc.unique.network';
-const CONTRACT_IMPORT: ContractImports[] = [
- {
- fsPath: `${__dirname}/../api/CollectionHelpers.sol`,
- solPath: 'api/CollectionHelpers.sol',
- },
- {
- fsPath: `${__dirname}/../api/ContractHelpers.sol`,
- solPath: 'api/ContractHelpers.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueRefungibleToken.sol`,
- solPath: 'api/UniqueRefungibleToken.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueRefungible.sol`,
- solPath: 'api/UniqueRefungible.sol',
- },
- {
- fsPath: `${__dirname}/../api/UniqueNFT.sol`,
- solPath: 'api/UniqueNFT.sol',
- },
-];
-const main = async () => {
- await usingEthPlaygrounds(async (helper, privateKey) => {
- const contractSource = (
- await readFile(`${__dirname}/EvmToSubstrateHelper.sol`)
- ).toString();
-
-
- const donor = privateKey('//Alice'); // Seed from account with balance on this network
- const myAccount = privateKey('//Bob'); // replace with account from polkadot extension
- console.log('donor raw sub: ', donor.addressRaw);
- console.log('donor sub->eth->sub: ', decodeAddress(await helper.address.ethToSubstrate(helper.address.substrateToEth(donor.address))));
- console.log('donor sub: ', donor.address);
-
- console.log('donor raw eth: ', Uint8Array.from(Buffer.from(helper.address.substrateToEth(donor.address).slice(2), 'hex')));
- console.log('donor eth: ', helper.address.substrateToEth(donor.address));
-
- const signer = await helper.eth.createAccountWithBalance(donor, 100n);
-
- console.log('\nsigner eth: ', signer);
- console.log('signer raw eth: ', Uint8Array.from(Buffer.from(signer.slice(2), 'hex')));
- console.log('signer raw sub: ', decodeAddress(await helper.address.ethToSubstrate(signer)));
-
- const collection = await helper.nft.mintCollection(donor, {
- name: 'test mintToSubstrate',
- description: 'EVMHelpers',
- tokenPrefix: 'ap',
- tokenPropertyPermissions: [
- {
- key: 'url',
- permission: {
- tokenOwner: true,
- collectionAdmin: true,
- mutable: true,
- },
- },
- ],
- limits: {sponsorTransferTimeout: 0, sponsorApproveTimeout: 0}, permissions: {mintMode: true},
- });
-
- await collection.addToAllowList(donor, {Ethereum: helper.address.substrateToEth(donor.address)});
- await collection.addToAllowList(donor, {Substrate: donor.address});
- await collection.addAdmin(donor, {Ethereum: signer});
- await collection.addAdmin(donor, {Ethereum: helper.address.substrateToEth(donor.address)});
-
- console.log('collection admin(s)): ', await collection.getAdmins());
- console.log('collection owner(s)): ', await collection.getAllowList());
- const fee = await helper.arrange.calculcateFee({Substrate: donor.address}, () => collection.mintToken(donor, {Substrate: myAccount.address}));
- console.log(`\ncollection mint from susbtrate : ${fee}\n`);
-
- const collectionEthAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
- const collectionContract = helper.ethNativeContract.collection(
- collectionEthAddress,
- 'nft',
- );
- const receiverEthAddress = helper.address.substrateToEth(myAccount.address);
- console.log('myAccount eth mirror: ', receiverEthAddress);
- console.log('contract eth mirror: ', collectionEthAddress);
-
- let subTokenId = await collectionContract.methods.nextTokenId().call();
-
- let encodedCall = collectionContract.methods
- .mint(receiverEthAddress, subTokenId)
- .encodeABI();
-
- const ethFee = await helper.arrange.calculcateFee(
- {Substrate: donor.address},
- async () => {
- await helper.eth.sendEVM(
- donor,
- collectionContract.options.address,
- encodedCall,
- '0',
- );
- },
- );
-
- console.log(`\ncollection mint from eth : ${ethFee}\n`);
-
- subTokenId = await collectionContract.methods.nextTokenId().call();
-
- const contract = await helper.ethContract.deployByCode(signer, 'EvmToSubstrate', contractSource, CONTRACT_IMPORT);
- console.log('contract Address', contract.options.address);
- await helper.eth.transferBalanceFromSubstrate(donor, contract.options.address, 100n);
-
- await collection.addToAllowList(donor, {Ethereum: contract.options.address});
- await collection.addAdmin(donor, {Ethereum: contract.options.address});
-
-
- const feeForProxyContractMinting = await helper.arrange.calculcateFee(
- {Ethereum: signer},
- async () => {
- await contract.methods.mintToSubstrate(helper.ethAddress.fromCollectionId(collection.collectionId), myAccount.addressRaw).send({from: signer});
- },
- );
-
- console.log(`\ncollection mint from contract to the Substrate Id: ${feeForProxyContractMinting}\n`);
- subTokenId = await collectionContract.methods.nextTokenId().call();
-
- /// *** properties part ***
-
- console.log('\t\t\t *** Properties Fees ***\n');
-
- const propertiesNumber = 20;
-
- const properties = Array(40).fill(0).map((_, i) => { return {key: `key_${i}`, value: Uint8Array.from(Buffer.from(`value_${i}`))}; });
- const permissions: ITokenPropertyPermission[] = properties.map(p => { return {key: p.key, permission: {tokenOwner: true,
- collectionAdmin: true,
- mutable: true}}; });
-
- await collection.setTokenPropertyPermissions(donor, permissions);
-
-
- const mintWithPropProxyContractFee = await helper.arrange.calculcateFee({Ethereum: signer}, async () => {
- await contract.methods.mintToSubstrateWithProperty(helper.ethAddress
- .fromCollectionId(collection.collectionId), myAccount.addressRaw, properties.slice(0, propertiesNumber)).send({from: signer});
- });
- console.log(`collection mint from contract to the Substrate Id: ${mintWithPropProxyContractFee}`);
-
- const collectionForSubstrateBench = await createCollectionForPropertiesBenchmarks(helper, privateKey, signer, contract.options.address, permissions);
-
- const mintWithPropSubstrate = await helper.arrange.calculcateFee({Substrate: donor.address}, async () => {
- await collectionForSubstrateBench
- .mintToken(donor, {Substrate: myAccount.address}, properties.slice(0, propertiesNumber).map(p => { return {key: p.key, value: Buffer.from(p.value).toString()}; }));
- });
-
- console.log(`collection mint from susbtrate: ${mintWithPropSubstrate}`);
-
- const collectionForEvmBench = await createCollectionForPropertiesBenchmarks(helper, privateKey, signer, contract.options.address, permissions);
- const evmContract = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collectionForEvmBench.collectionId), 'nft');
-
- subTokenId = await evmContract.methods.nextTokenId().call();
-
- encodedCall = evmContract.methods
- .mint(receiverEthAddress, subTokenId)
- .encodeABI();
-
- const evmCallWithPropFee = await helper.arrange.calculcateFee(
- {Substrate: donor.address},
- async () => {
-
- await helper.eth.sendEVM(
- donor,
- evmContract.options.address,
- encodedCall,
- '0',
- );
-
- for (const val of properties.slice(0, propertiesNumber)) {
-
- encodedCall = await evmContract.methods
- .setProperty(subTokenId, val.key, Buffer.from(val.value))
- .encodeABI();
-
- await helper.eth.sendEVM(
- donor,
- evmContract.options.address,
- encodedCall,
- '0',
- );
- }
- },
- );
-
- console.log(`collection mint from eth : ${evmCallWithPropFee}`);
-
- console.log('All done');
- });
-};
-
-main()
- .then(() => process.exit(0))
- .catch((e) => {
- console.log(e);
- process.exit(1);
- });
-
-
-async function createCollectionForPropertiesBenchmarks(
- helper: EthUniqueHelper,
- privateKey: (seed: string) => IKeyringPair,
- ethSigner: string,
- proxyContract: string,
- permissions: ITokenPropertyPermission[],
-) {
-
- const donor = privateKey('//Alice'); // Seed from account with balance on this network
-
-
- const collection = await helper.nft.mintCollection(donor, {
- name: 'test mintToSubstrate',
- description: 'EVMHelpers',
- tokenPrefix: 'ap',
- tokenPropertyPermissions: [
- {
- key: 'url',
- permission: {
- tokenOwner: true,
- collectionAdmin: true,
- mutable: true,
- },
- },
- ],
- limits: {sponsorTransferTimeout: 0, sponsorApproveTimeout: 0}, permissions: {mintMode: true},
- });
-
- await collection.addToAllowList(donor, {Ethereum: helper.address.substrateToEth(donor.address)});
- await collection.addToAllowList(donor, {Substrate: donor.address});
- await collection.addAdmin(donor, {Ethereum: ethSigner});
- await collection.addAdmin(donor, {Ethereum: helper.address.substrateToEth(donor.address)});
- await collection.addToAllowList(donor, {Ethereum: proxyContract});
- await collection.addAdmin(donor, {Ethereum: proxyContract});
- await collection.setTokenPropertyPermissions(donor, permissions);
-
- return collection;
-}
\ No newline at end of file