--- /dev/null +++ b/tests/src/.outdated/balance-transfer-contract/metadata.json @@ -0,0 +1,96 @@ +{ + "registry": { + "strings": [ + "Storage", + "calls", + "__ink_private", + "__ink_storage", + "new", + "balance_transfer", + "dest", + "AccountId", + "value", + "Balance" + ], + "types": [ + { + "id": { + "custom.name": 1, + "custom.namespace": [ + 2, + 2, + 3, + 4 + ], + "custom.params": [] + }, + "def": { + "struct.fields": [] + } + }, + { + "id": { + "array.len": 32, + "array.type": 3 + }, + "def": "builtin" + }, + { + "id": "u8", + "def": "builtin" + }, + { + "id": "u128", + "def": "builtin" + } + ] + }, + "storage": { + "struct.type": 1, + "struct.fields": [] + }, + "contract": { + "name": 2, + "constructors": [ + { + "name": 5, + "selector": "[\"0x5E\",\"0xBD\",\"0x88\",\"0xD6\"]", + "args": [], + "docs": [] + } + ], + "messages": [ + { + "name": 6, + "selector": "[\"0xEC\",\"0x9F\",\"0xA4\",\"0xF0\"]", + "mutates": false, + "args": [ + { + "name": 7, + "type": { + "ty": 2, + "display_name": [ + 8 + ] + } + }, + { + "name": 9, + "type": { + "ty": 4, + "display_name": [ + 10 + ] + } + } + ], + "return_type": null, + "docs": [ + "Dispatches a `transfer` call to the Balances srml module" + ] + } + ], + "events": [], + "docs": [] + } +} \ No newline at end of file --- /dev/null +++ b/tests/src/.outdated/flipper/metadata.json @@ -0,0 +1,110 @@ +{ + "metadataVersion": "0.1.0", + "source": { + "hash": "0x5b02ceadaacee8408d3c6496394847092c099bcb897221dbe8d22c16d372fa17", + "language": "ink! 3.0.0-rc2", + "compiler": "rustc 1.51.0-nightly" + }, + "contract": { + "name": "flipper", + "version": "0.1.0", + "authors": [ + "[your_name] <[your_email]>" + ] + }, + "spec": { + "constructors": [ + { + "args": [ + { + "name": "init_value", + "type": { + "displayName": [ + "bool" + ], + "type": 1 + } + } + ], + "docs": [ + " Constructor that initializes the `bool` value to the given `init_value`." + ], + "name": [ + "new" + ], + "selector": "0xd183512b" + }, + { + "args": [], + "docs": [ + " Constructor that initializes the `bool` value to `false`.", + "", + " Constructors can delegate to other constructors." + ], + "name": [ + "default" + ], + "selector": "0x6a3712e2" + } + ], + "docs": [], + "events": [], + "messages": [ + { + "args": [], + "docs": [ + " A message that can be called on instantiated contracts.", + " This one flips the value of the stored `bool` from `true`", + " to `false` and vice versa." + ], + "mutates": true, + "name": [ + "flip" + ], + "payable": false, + "returnType": null, + "selector": "0xc096a5f3" + }, + { + "args": [], + "docs": [ + " Simply returns the current value of our `bool`." + ], + "mutates": false, + "name": [ + "get" + ], + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "type": 1 + }, + "selector": "0x1e5ca456" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "value" + } + ] + } + }, + "types": [ + { + "def": { + "primitive": "bool" + } + } + ] +} \ No newline at end of file --- /dev/null +++ b/tests/src/.outdated/load_test_sc/metadata.json @@ -0,0 +1,125 @@ +{ + "metadataVersion": "0.1.0", + "source": { + "hash": "0x168cc3cba9657ad3950fb506e568751f99b90fb097685107f6101675662a8303", + "language": "ink! 3.0.0-rc2", + "compiler": "rustc 1.49.0-nightly" + }, + "contract": { + "name": "loadtester", + "version": "0.1.0", + "authors": [ + "[your_name] <[your_email]>" + ] + }, + "spec": { + "constructors": [ + { + "args": [], + "docs": [], + "name": [ + "new" + ], + "selector": "0xd183512b" + } + ], + "docs": [], + "events": [], + "messages": [ + { + "args": [ + { + "name": "count", + "type": { + "displayName": [ + "u64" + ], + "type": 2 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "bloat" + ], + "payable": false, + "returnType": null, + "selector": "0x49891c2a" + }, + { + "args": [], + "docs": [], + "mutates": false, + "name": [ + "get" + ], + "payable": false, + "returnType": { + "displayName": [ + "u128" + ], + "type": 3 + }, + "selector": "0x1e5ca456" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cellsPerElem": 1, + "layout": { + "cell": { + "key": "0x0000000001000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "len": 4294967295, + "offset": "0x0100000000000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "vector" + } + ] + } + }, + "types": [ + { + "def": { + "primitive": "u32" + } + }, + { + "def": { + "primitive": "u64" + } + }, + { + "def": { + "primitive": "u128" + } + } + ] +} \ No newline at end of file --- /dev/null +++ b/tests/src/.outdated/transfer_contract/metadata.json @@ -0,0 +1,469 @@ +{ + "metadataVersion": "0.1.0", + "source": { + "hash": "0xc6c3f47adeafe86d1674ed72c7179605787842f2f05a2d7da0dbabf3c4fa1aa8", + "language": "ink! 3.0.0-rc3", + "compiler": "rustc 1.52.0-nightly" + }, + "contract": { + "name": "nft_transfer", + "version": "0.1.0", + "authors": [ + "[Greg Zaitsev] <[your_email]>" + ] + }, + "spec": { + "constructors": [ + { + "args": [], + "docs": [ + "Default Constructor", + "", + "Constructors can delegate to other constructors." + ], + "name": [ + "default" + ], + "selector": "0xed4b9d1b" + } + ], + "docs": [], + "events": [], + "messages": [ + { + "args": [ + { + "name": "recipient", + "type": { + "displayName": [ + "AccountId" + ], + "type": 1 + } + }, + { + "name": "collection_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "token_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "amount", + "type": { + "displayName": [ + "u128" + ], + "type": 5 + } + } + ], + "docs": [ + " Transfer one NFT token" + ], + "mutates": true, + "name": [ + "transfer" + ], + "payable": false, + "returnType": null, + "selector": "0x84a15da1" + }, + { + "args": [ + { + "name": "recipient", + "type": { + "displayName": [ + "AccountId" + ], + "type": 1 + } + }, + { + "name": "collection_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "data", + "type": { + "displayName": [ + "CreateItemData" + ], + "type": 6 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "create_item" + ], + "payable": false, + "returnType": null, + "selector": "0xd7c3f083" + }, + { + "args": [ + { + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "type": 1 + } + }, + { + "name": "collection_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "data", + "type": { + "displayName": [ + "Vec" + ], + "type": 8 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "create_multiple_items" + ], + "payable": false, + "returnType": null, + "selector": "0x15f9a1eb" + }, + { + "args": [ + { + "name": "spender", + "type": { + "displayName": [ + "AccountId" + ], + "type": 1 + } + }, + { + "name": "collection_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "item_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "amount", + "type": { + "displayName": [ + "u128" + ], + "type": 5 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "approve" + ], + "payable": false, + "returnType": null, + "selector": "0x681266a0" + }, + { + "args": [ + { + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "type": 1 + } + }, + { + "name": "recipient", + "type": { + "displayName": [ + "AccountId" + ], + "type": 1 + } + }, + { + "name": "collection_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "item_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "amount", + "type": { + "displayName": [ + "u128" + ], + "type": 5 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "transfer_from" + ], + "payable": false, + "returnType": null, + "selector": "0x0b396f18" + }, + { + "args": [ + { + "name": "collection_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "item_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "data", + "type": { + "displayName": [ + "Vec" + ], + "type": 7 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "set_variable_meta_data" + ], + "payable": false, + "returnType": null, + "selector": "0xb0b26da2" + }, + { + "args": [ + { + "name": "collection_id", + "type": { + "displayName": [ + "u32" + ], + "type": 4 + } + }, + { + "name": "address", + "type": { + "displayName": [ + "AccountId" + ], + "type": 1 + } + }, + { + "name": "allowlisted", + "type": { + "displayName": [ + "bool" + ], + "type": 9 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "toggle_allow_list" + ], + "payable": false, + "returnType": null, + "selector": "0x98574dac" + } + ] + }, + "storage": { + "struct": { + "fields": [] + } + }, + "types": [ + { + "def": { + "composite": { + "fields": [ + { + "type": 2, + "typeName": "[u8; 32]" + } + ] + } + }, + "path": [ + "ink_env", + "types", + "AccountId" + ] + }, + { + "def": { + "array": { + "len": 32, + "type": 3 + } + } + }, + { + "def": { + "primitive": "u8" + } + }, + { + "def": { + "primitive": "u32" + } + }, + { + "def": { + "primitive": "u128" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "name": "const_data", + "type": 7, + "typeName": "Vec" + }, + { + "name": "variable_data", + "type": 7, + "typeName": "Vec" + } + ], + "name": "Nft" + }, + { + "fields": [ + { + "name": "value", + "type": 5, + "typeName": "u128" + } + ], + "name": "Fungible" + }, + { + "fields": [ + { + "name": "const_data", + "type": 7, + "typeName": "Vec" + }, + { + "name": "variable_data", + "type": 7, + "typeName": "Vec" + }, + { + "name": "pieces", + "type": 5, + "typeName": "u128" + } + ], + "name": "ReFungible" + } + ] + } + }, + "path": [ + "nft_transfer", + "CreateItemData" + ] + }, + { + "def": { + "sequence": { + "type": 3 + } + } + }, + { + "def": { + "sequence": { + "type": 6 + } + } + }, + { + "def": { + "primitive": "bool" + } + } + ] +} \ No newline at end of file --- a/tests/src/balance-transfer-contract/metadata.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "registry": { - "strings": [ - "Storage", - "calls", - "__ink_private", - "__ink_storage", - "new", - "balance_transfer", - "dest", - "AccountId", - "value", - "Balance" - ], - "types": [ - { - "id": { - "custom.name": 1, - "custom.namespace": [ - 2, - 2, - 3, - 4 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [] - } - }, - { - "id": { - "array.len": 32, - "array.type": 3 - }, - "def": "builtin" - }, - { - "id": "u8", - "def": "builtin" - }, - { - "id": "u128", - "def": "builtin" - } - ] - }, - "storage": { - "struct.type": 1, - "struct.fields": [] - }, - "contract": { - "name": 2, - "constructors": [ - { - "name": 5, - "selector": "[\"0x5E\",\"0xBD\",\"0x88\",\"0xD6\"]", - "args": [], - "docs": [] - } - ], - "messages": [ - { - "name": 6, - "selector": "[\"0xEC\",\"0x9F\",\"0xA4\",\"0xF0\"]", - "mutates": false, - "args": [ - { - "name": 7, - "type": { - "ty": 2, - "display_name": [ - 8 - ] - } - }, - { - "name": 9, - "type": { - "ty": 4, - "display_name": [ - 10 - ] - } - } - ], - "return_type": null, - "docs": [ - "Dispatches a `transfer` call to the Balances srml module" - ] - } - ], - "events": [], - "docs": [] - } -} \ No newline at end of file --- a/tests/src/flipper/metadata.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "metadataVersion": "0.1.0", - "source": { - "hash": "0x5b02ceadaacee8408d3c6496394847092c099bcb897221dbe8d22c16d372fa17", - "language": "ink! 3.0.0-rc2", - "compiler": "rustc 1.51.0-nightly" - }, - "contract": { - "name": "flipper", - "version": "0.1.0", - "authors": [ - "[your_name] <[your_email]>" - ] - }, - "spec": { - "constructors": [ - { - "args": [ - { - "name": "init_value", - "type": { - "displayName": [ - "bool" - ], - "type": 1 - } - } - ], - "docs": [ - " Constructor that initializes the `bool` value to the given `init_value`." - ], - "name": [ - "new" - ], - "selector": "0xd183512b" - }, - { - "args": [], - "docs": [ - " Constructor that initializes the `bool` value to `false`.", - "", - " Constructors can delegate to other constructors." - ], - "name": [ - "default" - ], - "selector": "0x6a3712e2" - } - ], - "docs": [], - "events": [], - "messages": [ - { - "args": [], - "docs": [ - " A message that can be called on instantiated contracts.", - " This one flips the value of the stored `bool` from `true`", - " to `false` and vice versa." - ], - "mutates": true, - "name": [ - "flip" - ], - "payable": false, - "returnType": null, - "selector": "0xc096a5f3" - }, - { - "args": [], - "docs": [ - " Simply returns the current value of our `bool`." - ], - "mutates": false, - "name": [ - "get" - ], - "payable": false, - "returnType": { - "displayName": [ - "bool" - ], - "type": 1 - }, - "selector": "0x1e5ca456" - } - ] - }, - "storage": { - "struct": { - "fields": [ - { - "layout": { - "cell": { - "key": "0x0000000000000000000000000000000000000000000000000000000000000000", - "ty": 1 - } - }, - "name": "value" - } - ] - } - }, - "types": [ - { - "def": { - "primitive": "bool" - } - } - ] -} \ No newline at end of file --- a/tests/src/load_test_sc/metadata.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "metadataVersion": "0.1.0", - "source": { - "hash": "0x168cc3cba9657ad3950fb506e568751f99b90fb097685107f6101675662a8303", - "language": "ink! 3.0.0-rc2", - "compiler": "rustc 1.49.0-nightly" - }, - "contract": { - "name": "loadtester", - "version": "0.1.0", - "authors": [ - "[your_name] <[your_email]>" - ] - }, - "spec": { - "constructors": [ - { - "args": [], - "docs": [], - "name": [ - "new" - ], - "selector": "0xd183512b" - } - ], - "docs": [], - "events": [], - "messages": [ - { - "args": [ - { - "name": "count", - "type": { - "displayName": [ - "u64" - ], - "type": 2 - } - } - ], - "docs": [], - "mutates": true, - "name": [ - "bloat" - ], - "payable": false, - "returnType": null, - "selector": "0x49891c2a" - }, - { - "args": [], - "docs": [], - "mutates": false, - "name": [ - "get" - ], - "payable": false, - "returnType": { - "displayName": [ - "u128" - ], - "type": 3 - }, - "selector": "0x1e5ca456" - } - ] - }, - "storage": { - "struct": { - "fields": [ - { - "layout": { - "struct": { - "fields": [ - { - "layout": { - "cell": { - "key": "0x0000000000000000000000000000000000000000000000000000000000000000", - "ty": 1 - } - }, - "name": "len" - }, - { - "layout": { - "array": { - "cellsPerElem": 1, - "layout": { - "cell": { - "key": "0x0000000001000000000000000000000000000000000000000000000000000000", - "ty": 2 - } - }, - "len": 4294967295, - "offset": "0x0100000000000000000000000000000000000000000000000000000000000000" - } - }, - "name": "elems" - } - ] - } - }, - "name": "vector" - } - ] - } - }, - "types": [ - { - "def": { - "primitive": "u32" - } - }, - { - "def": { - "primitive": "u64" - } - }, - { - "def": { - "primitive": "u128" - } - } - ] -} \ No newline at end of file --- a/tests/src/rpc.load.ts +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2019-2022 Unique Network (Gibraltar) Ltd. -// This file is part of Unique Network. - -// Unique Network is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Unique Network is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Unique Network. If not, see . - -import usingApi, {submitTransactionAsync} from './substrate/substrate-api'; -import {IKeyringPair} from '@polkadot/types/types'; -import {Abi, BlueprintPromise as Blueprint, CodePromise, ContractPromise as Contract} from '@polkadot/api-contract'; -import {ApiPromise, Keyring} from '@polkadot/api'; -import {findUnusedAddress} from './util/helpers'; -import fs from 'fs'; - -const value = 0; -const gasLimit = 500000n * 1000000n; -const endowment = '1000000000000000'; - -/*eslint no-async-promise-executor: "off"*/ -function deployBlueprint(alice: IKeyringPair, code: CodePromise): Promise { - return new Promise(async (resolve) => { - const unsub = await code - .createBlueprint() - .signAndSend(alice, (result) => { - if (result.status.isInBlock || result.status.isFinalized) { - // here we have an additional field in the result, containing the blueprint - resolve(result.blueprint); - unsub(); - } - }); - }); -} - -/*eslint no-async-promise-executor: "off"*/ -function deployContract(alice: IKeyringPair, blueprint: Blueprint) : Promise { - return new Promise(async (resolve) => { - const unsub = await blueprint.tx - .new(endowment, gasLimit) - .signAndSend(alice, (result) => { - if (result.status.isInBlock || result.status.isFinalized) { - unsub(); - resolve(result); - } - }); - }); -} - -async function prepareDeployer(api: ApiPromise, privateKeyWrapper: ((account: string) => IKeyringPair)) { - // Find unused address - const deployer = await findUnusedAddress(api, privateKeyWrapper); - - // Transfer balance to it - const alice = privateKeyWrapper('//Alice'); - const amount = BigInt(endowment) + 10n**15n; - const tx = api.tx.balances.transfer(deployer.address, amount); - await submitTransactionAsync(alice, tx); - - return deployer; -} - -async function deployLoadTester(api: ApiPromise, privateKeyWrapper: ((account: string) => IKeyringPair)): Promise<[Contract, IKeyringPair]> { - const metadata = JSON.parse(fs.readFileSync('./src/load_test_sc/metadata.json').toString('utf-8')); - const abi = new Abi(metadata); - - const deployer = await prepareDeployer(api, privateKeyWrapper); - - const wasm = fs.readFileSync('./src/load_test_sc/loadtester.wasm'); - - const code = new CodePromise(api, abi, wasm); - - const blueprint = await deployBlueprint(deployer, code); - const contract = (await deployContract(deployer, blueprint))['contract'] as Contract; - - return [contract, deployer]; -} - -async function getScData(contract: Contract, deployer: IKeyringPair) { - const result = await contract.query.get(deployer.address, value, gasLimit); - - if(!result.result.isSuccess) { - throw 'Failed to get value'; - } - return result.result.asSuccess.data; -} - - -describe('RPC Tests', () => { - it('Simple RPC Load Test', async () => { - await usingApi(async api => { - let count = 0; - let hrTime = process.hrtime(); - let microsec1 = hrTime[0] * 1000000 + hrTime[1] / 1000; - let rate = 0; - const checkPoint = 1000; - - /* eslint no-constant-condition: "off" */ - while (true) { - await api.rpc.system.chain(); - count++; - process.stdout.write(`RPC reads: ${count} times at rate ${rate} r/s \r`); - - if (count % checkPoint == 0) { - hrTime = process.hrtime(); - const microsec2 = hrTime[0] * 1000000 + hrTime[1] / 1000; - rate = 1000000*checkPoint/(microsec2 - microsec1); - microsec1 = microsec2; - } - } - }); - }); - - it('Smart Contract RPC Load Test', async () => { - await usingApi(async (api, privateKeyWrapper) => { - - // Deploy smart contract - const [contract, deployer] = await deployLoadTester(api, privateKeyWrapper); - - // Fill smart contract up with data - const bob = privateKeyWrapper('//Bob'); - const tx = contract.tx.bloat(value, gasLimit, 200); - await submitTransactionAsync(bob, tx); - - // Run load test - let count = 0; - let hrTime = process.hrtime(); - let microsec1 = hrTime[0] * 1000000 + hrTime[1] / 1000; - let rate = 0; - const checkPoint = 10; - - /* eslint no-constant-condition: "off" */ - while (true) { - await getScData(contract, deployer); - count++; - process.stdout.write(`SC reads: ${count} times at rate ${rate} r/s \r`); - - if (count % checkPoint == 0) { - hrTime = process.hrtime(); - const microsec2 = hrTime[0] * 1000000 + hrTime[1] / 1000; - rate = 1000000*checkPoint/(microsec2 - microsec1); - microsec1 = microsec2; - } - } - }); - }); - -}); --- a/tests/src/transfer_contract/metadata.json +++ /dev/null @@ -1,469 +0,0 @@ -{ - "metadataVersion": "0.1.0", - "source": { - "hash": "0xc6c3f47adeafe86d1674ed72c7179605787842f2f05a2d7da0dbabf3c4fa1aa8", - "language": "ink! 3.0.0-rc3", - "compiler": "rustc 1.52.0-nightly" - }, - "contract": { - "name": "nft_transfer", - "version": "0.1.0", - "authors": [ - "[Greg Zaitsev] <[your_email]>" - ] - }, - "spec": { - "constructors": [ - { - "args": [], - "docs": [ - "Default Constructor", - "", - "Constructors can delegate to other constructors." - ], - "name": [ - "default" - ], - "selector": "0xed4b9d1b" - } - ], - "docs": [], - "events": [], - "messages": [ - { - "args": [ - { - "name": "recipient", - "type": { - "displayName": [ - "AccountId" - ], - "type": 1 - } - }, - { - "name": "collection_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "token_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "amount", - "type": { - "displayName": [ - "u128" - ], - "type": 5 - } - } - ], - "docs": [ - " Transfer one NFT token" - ], - "mutates": true, - "name": [ - "transfer" - ], - "payable": false, - "returnType": null, - "selector": "0x84a15da1" - }, - { - "args": [ - { - "name": "recipient", - "type": { - "displayName": [ - "AccountId" - ], - "type": 1 - } - }, - { - "name": "collection_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "data", - "type": { - "displayName": [ - "CreateItemData" - ], - "type": 6 - } - } - ], - "docs": [], - "mutates": true, - "name": [ - "create_item" - ], - "payable": false, - "returnType": null, - "selector": "0xd7c3f083" - }, - { - "args": [ - { - "name": "owner", - "type": { - "displayName": [ - "AccountId" - ], - "type": 1 - } - }, - { - "name": "collection_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "data", - "type": { - "displayName": [ - "Vec" - ], - "type": 8 - } - } - ], - "docs": [], - "mutates": true, - "name": [ - "create_multiple_items" - ], - "payable": false, - "returnType": null, - "selector": "0x15f9a1eb" - }, - { - "args": [ - { - "name": "spender", - "type": { - "displayName": [ - "AccountId" - ], - "type": 1 - } - }, - { - "name": "collection_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "item_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "amount", - "type": { - "displayName": [ - "u128" - ], - "type": 5 - } - } - ], - "docs": [], - "mutates": true, - "name": [ - "approve" - ], - "payable": false, - "returnType": null, - "selector": "0x681266a0" - }, - { - "args": [ - { - "name": "owner", - "type": { - "displayName": [ - "AccountId" - ], - "type": 1 - } - }, - { - "name": "recipient", - "type": { - "displayName": [ - "AccountId" - ], - "type": 1 - } - }, - { - "name": "collection_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "item_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "amount", - "type": { - "displayName": [ - "u128" - ], - "type": 5 - } - } - ], - "docs": [], - "mutates": true, - "name": [ - "transfer_from" - ], - "payable": false, - "returnType": null, - "selector": "0x0b396f18" - }, - { - "args": [ - { - "name": "collection_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "item_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "data", - "type": { - "displayName": [ - "Vec" - ], - "type": 7 - } - } - ], - "docs": [], - "mutates": true, - "name": [ - "set_variable_meta_data" - ], - "payable": false, - "returnType": null, - "selector": "0xb0b26da2" - }, - { - "args": [ - { - "name": "collection_id", - "type": { - "displayName": [ - "u32" - ], - "type": 4 - } - }, - { - "name": "address", - "type": { - "displayName": [ - "AccountId" - ], - "type": 1 - } - }, - { - "name": "allowlisted", - "type": { - "displayName": [ - "bool" - ], - "type": 9 - } - } - ], - "docs": [], - "mutates": true, - "name": [ - "toggle_allow_list" - ], - "payable": false, - "returnType": null, - "selector": "0x98574dac" - } - ] - }, - "storage": { - "struct": { - "fields": [] - } - }, - "types": [ - { - "def": { - "composite": { - "fields": [ - { - "type": 2, - "typeName": "[u8; 32]" - } - ] - } - }, - "path": [ - "ink_env", - "types", - "AccountId" - ] - }, - { - "def": { - "array": { - "len": 32, - "type": 3 - } - } - }, - { - "def": { - "primitive": "u8" - } - }, - { - "def": { - "primitive": "u32" - } - }, - { - "def": { - "primitive": "u128" - } - }, - { - "def": { - "variant": { - "variants": [ - { - "fields": [ - { - "name": "const_data", - "type": 7, - "typeName": "Vec" - }, - { - "name": "variable_data", - "type": 7, - "typeName": "Vec" - } - ], - "name": "Nft" - }, - { - "fields": [ - { - "name": "value", - "type": 5, - "typeName": "u128" - } - ], - "name": "Fungible" - }, - { - "fields": [ - { - "name": "const_data", - "type": 7, - "typeName": "Vec" - }, - { - "name": "variable_data", - "type": 7, - "typeName": "Vec" - }, - { - "name": "pieces", - "type": 5, - "typeName": "u128" - } - ], - "name": "ReFungible" - } - ] - } - }, - "path": [ - "nft_transfer", - "CreateItemData" - ] - }, - { - "def": { - "sequence": { - "type": 3 - } - } - }, - { - "def": { - "sequence": { - "type": 6 - } - } - }, - { - "def": { - "primitive": "bool" - } - } - ] -} \ No newline at end of file