difftreelog
Merge branch 'develop' into feature/CORE-162
in: master
96 files changed
.github/workflows/node_build_test.ymldiffbeforeafterboth31 username: ${{ secrets.SERVER_USERNAME }}31 username: ${{ secrets.SERVER_USERNAME }}32 key: ${{ secrets.KEY }}32 key: ${{ secrets.KEY }}33 port: ${{ secrets.SERVER_PORT }}33 port: ${{ secrets.SERVER_PORT }}34 command_timeout: 240m34 command_timeout: 300m35 script: |35 script: |36 eval $(ssh-agent -s)36 eval $(ssh-agent -s)37 ssh-add /home/polkadot/.ssh/git_hub37 ssh-add /home/devops/.ssh/git_hub38 git clone git@github.com:usetech-llc/nft_private.git38 git clone git@github.com:UniqueNetwork/nft_private.git39 cd nft_private39 cd nft_private40 git checkout develop40 git checkout develop41 # git pull --all41 # git pull --all42 chmod +x ci_node.sh42 chmod +x ci_node.sh43 ./ci_node.sh43 ./ci_node.sh44 rm -rf /home/polkadot/nft_private44 rm -rf /home/polkadot/nft_private4545.maintain/frame-weight-template.hbsdiffbeforeafterbothno changes
.maintain/scripts/compile_stub.shdiffbeforeafterbothno changes
.maintain/scripts/generate_api.shdiffbeforeafterbothno changes
Cargo.lockdiffbeforeafterboth703 "once_cell",703 "once_cell",704]704]705706[[package]]707name = "bp-header-chain"708version = "0.1.0"709source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"710dependencies = [711 "finality-grandpa",712 "frame-support",713 "parity-scale-codec",714 "serde",715 "sp-core",716 "sp-finality-grandpa",717 "sp-runtime",718 "sp-std",719]720721[[package]]722name = "bp-messages"723version = "0.1.0"724source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"725dependencies = [726 "bitvec 0.20.4",727 "bp-runtime",728 "frame-support",729 "frame-system",730 "impl-trait-for-tuples",731 "parity-scale-codec",732 "serde",733 "sp-std",734]735736[[package]]737name = "bp-polkadot-core"738version = "0.1.0"739source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"740dependencies = [741 "bp-messages",742 "bp-runtime",743 "frame-support",744 "frame-system",745 "parity-scale-codec",746 "sp-api",747 "sp-core",748 "sp-runtime",749 "sp-std",750 "sp-version",751]752753[[package]]754name = "bp-rococo"755version = "0.1.0"756source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"757dependencies = [758 "bp-messages",759 "bp-polkadot-core",760 "bp-runtime",761 "frame-support",762 "parity-scale-codec",763 "smallvec 1.6.1",764 "sp-api",765 "sp-runtime",766 "sp-std",767 "sp-version",768]769770[[package]]771name = "bp-runtime"772version = "0.1.0"773source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"774dependencies = [775 "frame-support",776 "hash-db",777 "num-traits",778 "parity-scale-codec",779 "sp-core",780 "sp-io",781 "sp-runtime",782 "sp-state-machine",783 "sp-std",784 "sp-trie",785]786787[[package]]788name = "bp-test-utils"789version = "0.1.0"790source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"791dependencies = [792 "bp-header-chain",793 "ed25519-dalek",794 "finality-grandpa",795 "parity-scale-codec",796 "sp-application-crypto",797 "sp-finality-grandpa",798 "sp-runtime",799 "sp-std",800]801802[[package]]803name = "bp-wococo"804version = "0.1.0"805source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"806dependencies = [807 "bp-messages",808 "bp-polkadot-core",809 "bp-rococo",810 "bp-runtime",811 "parity-scale-codec",812 "sp-api",813 "sp-runtime",814 "sp-std",815]705816706[[package]]817[[package]]707name = "bs58"818name = "bs58"3778 "winapi-build",3889 "winapi-build",3779]3890]38913892[[package]]3893name = "kusama-runtime"3894version = "0.9.8"3895source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"3896dependencies = [3897 "beefy-primitives",3898 "bitvec 0.20.4",3899 "frame-benchmarking",3900 "frame-election-provider-support",3901 "frame-executive",3902 "frame-support",3903 "frame-system",3904 "frame-system-benchmarking",3905 "frame-system-rpc-runtime-api",3906 "frame-try-runtime",3907 "hex-literal",3908 "log",3909 "max-encoded-len",3910 "pallet-authority-discovery",3911 "pallet-authorship",3912 "pallet-babe",3913 "pallet-balances",3914 "pallet-bounties",3915 "pallet-collective",3916 "pallet-democracy",3917 "pallet-election-provider-multi-phase",3918 "pallet-elections-phragmen",3919 "pallet-gilt",3920 "pallet-grandpa",3921 "pallet-identity",3922 "pallet-im-online",3923 "pallet-indices",3924 "pallet-membership",3925 "pallet-mmr-primitives",3926 "pallet-multisig",3927 "pallet-nicks",3928 "pallet-offences",3929 "pallet-offences-benchmarking",3930 "pallet-proxy",3931 "pallet-recovery",3932 "pallet-scheduler 3.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8)",3933 "pallet-session",3934 "pallet-session-benchmarking",3935 "pallet-society",3936 "pallet-staking",3937 "pallet-staking-reward-fn",3938 "pallet-timestamp",3939 "pallet-tips",3940 "pallet-transaction-payment",3941 "pallet-transaction-payment-rpc-runtime-api",3942 "pallet-treasury",3943 "pallet-utility",3944 "pallet-vesting",3945 "pallet-xcm",3946 "parity-scale-codec",3947 "polkadot-primitives",3948 "polkadot-runtime-common",3949 "polkadot-runtime-parachains",3950 "rustc-hex",3951 "serde",3952 "serde_derive",3953 "smallvec 1.6.1",3954 "sp-api",3955 "sp-arithmetic",3956 "sp-authority-discovery",3957 "sp-block-builder",3958 "sp-consensus-babe",3959 "sp-core",3960 "sp-inherents",3961 "sp-io",3962 "sp-npos-elections",3963 "sp-offchain",3964 "sp-runtime",3965 "sp-session",3966 "sp-staking",3967 "sp-std",3968 "sp-transaction-pool",3969 "sp-version",3970 "static_assertions",3971 "substrate-wasm-builder 4.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8)",3972 "xcm",3973 "xcm-builder",3974 "xcm-executor",3975]378039763781[[package]]3977[[package]]3782name = "kv-log-macro"3978name = "kv-log-macro"4935name = "nft-data-structs"5131name = "nft-data-structs"4936version = "0.9.0"5132version = "0.9.0"4937dependencies = [5133dependencies = [5134 "derivative",4938 "frame-support",5135 "frame-support",4939 "frame-system",5136 "frame-system",5137 "max-encoded-len",4940 "parity-scale-codec",5138 "parity-scale-codec",4941 "serde",5139 "serde",4942 "sp-core",5140 "sp-core",4943 "sp-runtime",5141 "sp-runtime",5142 "sp-std",4944]5143]494551444946[[package]]5145[[package]]4999 "cumulus-primitives-core",5198 "cumulus-primitives-core",5000 "cumulus-primitives-timestamp",5199 "cumulus-primitives-timestamp",5001 "cumulus-primitives-utility",5200 "cumulus-primitives-utility",5201 "derivative",5002 "fp-rpc",5202 "fp-rpc",5003 "frame-benchmarking",5203 "frame-benchmarking",5004 "frame-executive",5204 "frame-executive",5007 "frame-system-benchmarking",5207 "frame-system-benchmarking",5008 "frame-system-rpc-runtime-api",5208 "frame-system-rpc-runtime-api",5009 "hex-literal",5209 "hex-literal",5210 "max-encoded-len",5010 "nft-data-structs",5211 "nft-data-structs",5011 "pallet-aura",5212 "pallet-aura",5012 "pallet-balances",5213 "pallet-balances",5013 "pallet-ethereum",5214 "pallet-ethereum",5014 "pallet-evm",5215 "pallet-evm",5015 "pallet-evm-coder-substrate",5216 "pallet-evm-coder-substrate",5016 "pallet-evm-contract-helpers",5217 "pallet-evm-contract-helpers",5218 "pallet-evm-migration",5017 "pallet-evm-transaction-payment",5219 "pallet-evm-transaction-payment",5018 "pallet-inflation",5220 "pallet-inflation",5019 "pallet-nft",5221 "pallet-nft",5316version = "3.0.0"5518version = "3.0.0"5317source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5519source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5318dependencies = [5520dependencies = [5521 "frame-benchmarking",5319 "frame-support",5522 "frame-support",5320 "frame-system",5523 "frame-system",5321 "pallet-treasury",5524 "pallet-treasury",5324 "sp-std",5527 "sp-std",5325]5528]55295530[[package]]5531name = "pallet-bridge-grandpa"5532version = "0.1.0"5533source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"5534dependencies = [5535 "bp-header-chain",5536 "bp-runtime",5537 "bp-test-utils",5538 "finality-grandpa",5539 "frame-support",5540 "frame-system",5541 "log",5542 "num-traits",5543 "parity-scale-codec",5544 "serde",5545 "sp-finality-grandpa",5546 "sp-runtime",5547 "sp-std",5548 "sp-trie",5549]532655505327[[package]]5551[[package]]5328name = "pallet-collective"5552name = "pallet-collective"5329version = "3.0.0"5553version = "3.0.0"5330source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5554source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5331dependencies = [5555dependencies = [5556 "frame-benchmarking",5332 "frame-support",5557 "frame-support",5333 "frame-system",5558 "frame-system",5334 "log",5559 "log",5418version = "3.0.0"5643version = "3.0.0"5419source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5644source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5420dependencies = [5645dependencies = [5646 "frame-benchmarking",5421 "frame-election-provider-support",5647 "frame-election-provider-support",5422 "frame-support",5648 "frame-support",5423 "frame-system",5649 "frame-system",5424 "log",5650 "log",5425 "parity-scale-codec",5651 "parity-scale-codec",5652 "rand 0.7.3",5426 "sp-arithmetic",5653 "sp-arithmetic",5427 "sp-core",5654 "sp-core",5428 "sp-io",5655 "sp-io",5437version = "4.0.0"5664version = "4.0.0"5438source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5665source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5439dependencies = [5666dependencies = [5667 "frame-benchmarking",5440 "frame-support",5668 "frame-support",5441 "frame-system",5669 "frame-system",5442 "log",5670 "log",5536 "up-sponsorship",5764 "up-sponsorship",5537]5765]57665767[[package]]5768name = "pallet-evm-migration"5769version = "0.1.0"5770dependencies = [5771 "fp-evm",5772 "frame-benchmarking",5773 "frame-support",5774 "frame-system",5775 "pallet-evm",5776 "parity-scale-codec",5777 "sp-core",5778 "sp-io",5779 "sp-runtime",5780 "sp-std",5781]553857825539[[package]]5783[[package]]5540name = "pallet-evm-transaction-payment"5784name = "pallet-evm-transaction-payment"5553 "up-sponsorship",5797 "up-sponsorship",5554]5798]57995800[[package]]5801name = "pallet-gilt"5802version = "3.0.0"5803source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5804dependencies = [5805 "frame-benchmarking",5806 "frame-support",5807 "frame-system",5808 "parity-scale-codec",5809 "sp-arithmetic",5810 "sp-runtime",5811 "sp-std",5812]555558135556[[package]]5814[[package]]5557name = "pallet-grandpa"5815name = "pallet-grandpa"5595version = "3.0.0"5853version = "3.0.0"5596source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5854source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5597dependencies = [5855dependencies = [5856 "frame-benchmarking",5598 "frame-support",5857 "frame-support",5599 "frame-system",5858 "frame-system",5600 "log",5859 "log",5613version = "3.0.0"5872version = "3.0.0"5614source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5873source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5615dependencies = [5874dependencies = [5875 "frame-benchmarking",5616 "frame-support",5876 "frame-support",5617 "frame-system",5877 "frame-system",5618 "parity-scale-codec",5878 "parity-scale-codec",5712version = "3.0.0"5972version = "3.0.0"5713source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5973source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5714dependencies = [5974dependencies = [5975 "frame-benchmarking",5715 "frame-support",5976 "frame-support",5716 "frame-system",5977 "frame-system",5717 "parity-scale-codec",5978 "parity-scale-codec",5816 "sp-std",6077 "sp-std",5817]6078]60796080[[package]]6081name = "pallet-offences-benchmarking"6082version = "3.0.0"6083source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6084dependencies = [6085 "frame-benchmarking",6086 "frame-election-provider-support",6087 "frame-support",6088 "frame-system",6089 "pallet-babe",6090 "pallet-balances",6091 "pallet-grandpa",6092 "pallet-im-online",6093 "pallet-offences",6094 "pallet-session",6095 "pallet-staking",6096 "parity-scale-codec",6097 "sp-runtime",6098 "sp-staking",6099 "sp-std",6100]581861015819[[package]]6102[[package]]5820name = "pallet-proxy"6103name = "pallet-proxy"5821version = "3.0.0"6104version = "3.0.0"5822source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6105source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5823dependencies = [6106dependencies = [6107 "frame-benchmarking",5824 "frame-support",6108 "frame-support",5825 "frame-system",6109 "frame-system",5826 "max-encoded-len",6110 "max-encoded-len",5844 "sp-std",6128 "sp-std",5845]6129]61306131[[package]]6132name = "pallet-recovery"6133version = "3.0.0"6134source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6135dependencies = [6136 "enumflags2",6137 "frame-support",6138 "frame-system",6139 "parity-scale-codec",6140 "sp-io",6141 "sp-runtime",6142 "sp-std",6143]61446145[[package]]6146name = "pallet-scheduler"6147version = "3.0.0"6148source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6149dependencies = [6150 "frame-benchmarking",6151 "frame-support",6152 "frame-system",6153 "log",6154 "parity-scale-codec",6155 "sp-io",6156 "sp-runtime",6157 "sp-std",6158]584661595847[[package]]6160[[package]]5848name = "pallet-scheduler"6161name = "pallet-scheduler"5862 "up-sponsorship",6175 "up-sponsorship",5863]6176]58645865[[package]]5866name = "pallet-scheduler"5867version = "3.0.0"5868source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5869dependencies = [5870 "frame-benchmarking",5871 "frame-support",5872 "frame-system",5873 "log",5874 "parity-scale-codec",5875 "sp-io",5876 "sp-runtime",5877 "sp-std",5878]587961775880[[package]]6178[[package]]5881name = "pallet-session"6179name = "pallet-session"5897 "sp-trie",6195 "sp-trie",5898]6196]61976198[[package]]6199name = "pallet-session-benchmarking"6200version = "3.0.0"6201source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6202dependencies = [6203 "frame-benchmarking",6204 "frame-support",6205 "frame-system",6206 "pallet-session",6207 "pallet-staking",6208 "rand 0.7.3",6209 "sp-runtime",6210 "sp-session",6211 "sp-std",6212]62136214[[package]]6215name = "pallet-society"6216version = "3.0.0"6217source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6218dependencies = [6219 "frame-support",6220 "frame-system",6221 "parity-scale-codec",6222 "rand_chacha 0.2.2",6223 "sp-runtime",6224 "sp-std",6225]589962265900[[package]]6227[[package]]5901name = "pallet-staking"6228name = "pallet-staking"5902version = "3.0.0"6229version = "3.0.0"5903source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6230source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5904dependencies = [6231dependencies = [6232 "frame-benchmarking",5905 "frame-election-provider-support",6233 "frame-election-provider-support",5906 "frame-support",6234 "frame-support",5907 "frame-system",6235 "frame-system",5910 "pallet-session",6238 "pallet-session",5911 "parity-scale-codec",6239 "parity-scale-codec",5912 "paste",6240 "paste",6241 "rand_chacha 0.2.2",5913 "serde",6242 "serde",5914 "sp-application-crypto",6243 "sp-application-crypto",5915 "sp-io",6244 "sp-io",5930 "syn",6259 "syn",5931]6260]62616262[[package]]6263name = "pallet-staking-reward-fn"6264version = "3.0.0"6265source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6266dependencies = [6267 "log",6268 "sp-arithmetic",6269]593262705933[[package]]6271[[package]]5934name = "pallet-sudo"6272name = "pallet-sudo"5966version = "3.0.0"6304version = "3.0.0"5967source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6305source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"5968dependencies = [6306dependencies = [6307 "frame-benchmarking",5969 "frame-support",6308 "frame-support",5970 "frame-system",6309 "frame-system",5971 "pallet-treasury",6310 "pallet-treasury",6024version = "3.0.0"6363version = "3.0.0"6025source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6364source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6026dependencies = [6365dependencies = [6366 "frame-benchmarking",6027 "frame-support",6367 "frame-support",6028 "frame-system",6368 "frame-system",6029 "impl-trait-for-tuples",6369 "impl-trait-for-tuples",6039version = "3.0.0"6379version = "3.0.0"6040source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6380source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6041dependencies = [6381dependencies = [6382 "frame-benchmarking",6042 "frame-support",6383 "frame-support",6043 "frame-system",6384 "frame-system",6044 "parity-scale-codec",6385 "parity-scale-codec",6054source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6395source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"6055dependencies = [6396dependencies = [6056 "enumflags2",6397 "enumflags2",6398 "frame-benchmarking",6057 "frame-support",6399 "frame-support",6058 "frame-system",6400 "frame-system",6059 "parity-scale-codec",6401 "parity-scale-codec",6069 "frame-support",6411 "frame-support",6070 "frame-system",6412 "frame-system",6071 "parity-scale-codec",6413 "parity-scale-codec",6414 "serde",6072 "sp-runtime",6415 "sp-runtime",6073 "sp-std",6416 "sp-std",6074 "xcm",6417 "xcm",7144dependencies = [7487dependencies = [7145 "beefy-primitives",7488 "beefy-primitives",7146 "bitvec 0.20.4",7489 "bitvec 0.20.4",7490 "frame-benchmarking",7147 "frame-election-provider-support",7491 "frame-election-provider-support",7148 "frame-executive",7492 "frame-executive",7149 "frame-support",7493 "frame-support",7150 "frame-system",7494 "frame-system",7495 "frame-system-benchmarking",7151 "frame-system-rpc-runtime-api",7496 "frame-system-rpc-runtime-api",7152 "frame-try-runtime",7497 "frame-try-runtime",7498 "hex-literal",7153 "log",7499 "log",7154 "max-encoded-len",7500 "max-encoded-len",7155 "pallet-authority-discovery",7501 "pallet-authority-discovery",7170 "pallet-multisig",7516 "pallet-multisig",7171 "pallet-nicks",7517 "pallet-nicks",7172 "pallet-offences",7518 "pallet-offences",7519 "pallet-offences-benchmarking",7173 "pallet-proxy",7520 "pallet-proxy",7174 "pallet-scheduler 3.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8)",7521 "pallet-scheduler 3.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8)",7175 "pallet-session",7522 "pallet-session",7523 "pallet-session-benchmarking",7176 "pallet-staking",7524 "pallet-staking",7177 "pallet-staking-reward-curve",7525 "pallet-staking-reward-curve",7178 "pallet-timestamp",7526 "pallet-timestamp",7215dependencies = [7563dependencies = [7216 "beefy-primitives",7564 "beefy-primitives",7217 "bitvec 0.20.4",7565 "bitvec 0.20.4",7566 "frame-benchmarking",7218 "frame-support",7567 "frame-support",7219 "frame-system",7568 "frame-system",7220 "impl-trait-for-tuples",7569 "impl-trait-for-tuples",7221 "libsecp256k1 0.3.5",7570 "libsecp256k1 0.3.5",7222 "log",7571 "log",7223 "pallet-authorship",7572 "pallet-authorship",7573 "pallet-babe",7224 "pallet-balances",7574 "pallet-balances",7225 "pallet-beefy",7575 "pallet-beefy",7226 "pallet-election-provider-multi-phase",7576 "pallet-election-provider-multi-phase",7258dependencies = [7608dependencies = [7259 "bitvec 0.20.4",7609 "bitvec 0.20.4",7260 "derive_more",7610 "derive_more",7611 "frame-benchmarking",7261 "frame-support",7612 "frame-support",7262 "frame-system",7613 "frame-system",7614 "libsecp256k1 0.3.5",7263 "log",7615 "log",7264 "pallet-authority-discovery",7616 "pallet-authority-discovery",7265 "pallet-authorship",7617 "pallet-authorship",7299 "frame-system-rpc-runtime-api",7651 "frame-system-rpc-runtime-api",7300 "futures 0.3.16",7652 "futures 0.3.16",7301 "hex-literal",7653 "hex-literal",7654 "kusama-runtime",7302 "kvdb",7655 "kvdb",7303 "kvdb-rocksdb",7656 "kvdb-rocksdb",7304 "pallet-babe",7657 "pallet-babe",7334 "polkadot-runtime",7687 "polkadot-runtime",7335 "polkadot-runtime-parachains",7688 "polkadot-runtime-parachains",7336 "polkadot-statement-distribution",7689 "polkadot-statement-distribution",7690 "rococo-runtime",7337 "sc-authority-discovery",7691 "sc-authority-discovery",7338 "sc-basic-authorship",7692 "sc-basic-authorship",7339 "sc-block-builder",7693 "sc-block-builder",7375 "substrate-prometheus-endpoint",7729 "substrate-prometheus-endpoint",7376 "thiserror",7730 "thiserror",7377 "tracing",7731 "tracing",7732 "westend-runtime",7378]7733]737977347380[[package]]7735[[package]]8138 "librocksdb-sys",8493 "librocksdb-sys",8139]8494]84958496[[package]]8497name = "rococo-runtime"8498version = "0.9.8"8499source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"8500dependencies = [8501 "beefy-primitives",8502 "bp-rococo",8503 "bp-wococo",8504 "frame-executive",8505 "frame-support",8506 "frame-system",8507 "frame-system-rpc-runtime-api",8508 "hex-literal",8509 "log",8510 "max-encoded-len",8511 "pallet-authority-discovery",8512 "pallet-authorship",8513 "pallet-babe",8514 "pallet-balances",8515 "pallet-beefy",8516 "pallet-bridge-grandpa",8517 "pallet-collective",8518 "pallet-grandpa",8519 "pallet-im-online",8520 "pallet-indices",8521 "pallet-membership",8522 "pallet-mmr",8523 "pallet-mmr-primitives",8524 "pallet-offences",8525 "pallet-proxy",8526 "pallet-session",8527 "pallet-staking",8528 "pallet-staking-reward-curve",8529 "pallet-sudo",8530 "pallet-timestamp",8531 "pallet-transaction-payment",8532 "pallet-transaction-payment-rpc-runtime-api",8533 "pallet-utility",8534 "pallet-xcm",8535 "parity-scale-codec",8536 "polkadot-parachain",8537 "polkadot-primitives",8538 "polkadot-runtime-common",8539 "polkadot-runtime-parachains",8540 "serde",8541 "serde_derive",8542 "smallvec 1.6.1",8543 "sp-api",8544 "sp-authority-discovery",8545 "sp-block-builder",8546 "sp-consensus-babe",8547 "sp-core",8548 "sp-inherents",8549 "sp-io",8550 "sp-offchain",8551 "sp-runtime",8552 "sp-session",8553 "sp-staking",8554 "sp-std",8555 "sp-transaction-pool",8556 "sp-version",8557 "substrate-wasm-builder 4.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8)",8558 "xcm",8559 "xcm-builder",8560 "xcm-executor",8561]814085628141[[package]]8563[[package]]8142name = "rpassword"8564name = "rpassword"10687 "syn",11109 "syn",10688]11110]1111111112[[package]]11113name = "substrate-wasm-builder"11114version = "4.0.0"11115source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"11116dependencies = [11117 "ansi_term 0.12.1",11118 "atty",11119 "build-helper",11120 "cargo_metadata 0.13.1",11121 "sp-maybe-compressed-blob",11122 "tempfile",11123 "toml",11124 "walkdir",11125 "wasm-gc-api",11126]106891112710690[[package]]11128[[package]]10691name = "substrate-wasm-builder"11129name = "substrate-wasm-builder"10703 "wasm-gc-api",11141 "wasm-gc-api",10704]11142]1070510706[[package]]10707name = "substrate-wasm-builder"10708version = "4.0.0"10709source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16"10710dependencies = [10711 "ansi_term 0.12.1",10712 "atty",10713 "build-helper",10714 "cargo_metadata 0.13.1",10715 "sp-maybe-compressed-blob",10716 "tempfile",10717 "toml",10718 "walkdir",10719 "wasm-gc-api",10720]107211114310722[[package]]11144[[package]]10723name = "subtle"11145name = "subtle"12038 "cc",12460 "cc",12039]12461]1246212463[[package]]12464name = "westend-runtime"12465version = "0.9.8"12466source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.8#3a10ee63c0b5703a1c802db3438ab7e01344a8ce"12467dependencies = [12468 "beefy-primitives",12469 "bitvec 0.20.4",12470 "frame-benchmarking",12471 "frame-election-provider-support",12472 "frame-executive",12473 "frame-support",12474 "frame-system",12475 "frame-system-benchmarking",12476 "frame-system-rpc-runtime-api",12477 "frame-try-runtime",12478 "hex-literal",12479 "log",12480 "max-encoded-len",12481 "pallet-authority-discovery",12482 "pallet-authorship",12483 "pallet-babe",12484 "pallet-balances",12485 "pallet-collective",12486 "pallet-democracy",12487 "pallet-election-provider-multi-phase",12488 "pallet-elections-phragmen",12489 "pallet-grandpa",12490 "pallet-identity",12491 "pallet-im-online",12492 "pallet-indices",12493 "pallet-membership",12494 "pallet-mmr-primitives",12495 "pallet-multisig",12496 "pallet-nicks",12497 "pallet-offences",12498 "pallet-offences-benchmarking",12499 "pallet-proxy",12500 "pallet-recovery",12501 "pallet-scheduler 3.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8)",12502 "pallet-session",12503 "pallet-session-benchmarking",12504 "pallet-society",12505 "pallet-staking",12506 "pallet-staking-reward-curve",12507 "pallet-sudo",12508 "pallet-timestamp",12509 "pallet-transaction-payment",12510 "pallet-transaction-payment-rpc-runtime-api",12511 "pallet-treasury",12512 "pallet-utility",12513 "pallet-vesting",12514 "pallet-xcm",12515 "parity-scale-codec",12516 "polkadot-parachain",12517 "polkadot-primitives",12518 "polkadot-runtime-common",12519 "polkadot-runtime-parachains",12520 "rustc-hex",12521 "serde",12522 "serde_derive",12523 "smallvec 1.6.1",12524 "sp-api",12525 "sp-authority-discovery",12526 "sp-block-builder",12527 "sp-consensus-babe",12528 "sp-core",12529 "sp-inherents",12530 "sp-io",12531 "sp-npos-elections",12532 "sp-offchain",12533 "sp-runtime",12534 "sp-session",12535 "sp-staking",12536 "sp-std",12537 "sp-transaction-pool",12538 "sp-version",12539 "static_assertions",12540 "substrate-wasm-builder 4.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8)",12541 "xcm",12542 "xcm-builder",12543 "xcm-executor",12544]120401254512041[[package]]12546[[package]]12042name = "which"12547name = "which"Makefilediffbeforeafterbothno changes
crates/evm-coder-macros/src/solidity_interface.rsdiffbeforeafterboth1#![allow(dead_code)]1#![allow(dead_code)]223use quote::quote;3use quote::quote;4use darling::FromMeta;4use darling::{FromMeta, ToTokens};5use inflector::cases;5use inflector::cases;6use std::fmt::Write;6use std::fmt::Write;7use syn::{7use syn::{8 FnArg, Generics, Ident, ImplItem, ImplItemMethod, ItemImpl, Meta, NestedMeta, PatType, Path,8 Expr, FnArg, GenericArgument, Generics, Ident, ImplItem, ImplItemMethod, ItemImpl, Lit, Meta,9 ReturnType, Type, spanned::Spanned,9 NestedMeta, PatType, Path, PathArguments, ReturnType, Type, spanned::Spanned,10};10};111112use crate::{12use crate::{13 fn_selector_str, parse_ident_from_pat, parse_ident_from_path, parse_ident_from_type,13 fn_selector_str, parse_ident_from_pat, parse_ident_from_path, parse_path, parse_path_segment,14 parse_result_ok, pascal_ident_to_call, pascal_ident_to_snake_call, snake_ident_to_pascal,14 parse_result_ok, pascal_ident_to_call, pascal_ident_to_snake_call, snake_ident_to_pascal,15 snake_ident_to_screaming,15 snake_ident_to_screaming,16};16};74 }74 }75 }75 }7677 fn expand_generator(&self) -> proc_macro2::TokenStream {78 let pascal_call_name = &self.pascal_call_name;79 quote! {80 #pascal_call_name::generate_solidity_interface(tc, is_impl);81 }82 }8384 fn expand_event_generator(&self) -> proc_macro2::TokenStream {85 let name = &self.name;86 quote! {87 #name::generate_solidity_interface(tc, is_impl);88 }89 }76}90}779178#[derive(Default)]92#[derive(Default)]107 rename_selector: Option<String>,121 rename_selector: Option<String>,108}122}123124enum AbiType {125 // type126 Plain(Ident),127 // (type1,type2)128 Tuple(Vec<AbiType>),129 // type[]130 Vec(Box<AbiType>),131 // type[20]132 Array(Box<AbiType>, usize),133}134impl AbiType {135 fn try_from(value: &Type) -> syn::Result<Self> {136 let value = Self::try_maybe_special_from(value)?;137 if value.is_special() {138 return Err(syn::Error::new(value.span(), "unexpected special type"));139 }140 Ok(value)141 }142 fn try_maybe_special_from(value: &Type) -> syn::Result<Self> {143 match value {144 Type::Array(arr) => {145 let wrapped = AbiType::try_from(&arr.elem)?;146 match &arr.len {147 Expr::Lit(l) => match &l.lit {148 Lit::Int(i) => {149 let num = i.base10_parse::<usize>()?;150 Ok(AbiType::Array(Box::new(wrapped), num as usize))151 }152 _ => Err(syn::Error::new(arr.len.span(), "should be int literal")),153 },154 _ => Err(syn::Error::new(arr.len.span(), "should be literal")),155 }156 }157 Type::Path(_) => {158 let path = parse_path(value)?;159 let segment = parse_path_segment(path)?;160 if segment.ident == "Vec" {161 let args = match &segment.arguments {162 PathArguments::AngleBracketed(e) => e,163 _ => {164 return Err(syn::Error::new(165 segment.arguments.span(),166 "missing Vec generic",167 ))168 }169 };170 let args = &args.args;171 if args.len() != 1 {172 return Err(syn::Error::new(173 args.span(),174 "expected only one generic for vec",175 ));176 }177 let arg = args.first().unwrap();178179 let ty = match arg {180 GenericArgument::Type(ty) => ty,181 _ => {182 return Err(syn::Error::new(183 arg.span(),184 "expected first generic to be type",185 ))186 }187 };188189 let wrapped = AbiType::try_from(ty)?;190 Ok(Self::Vec(Box::new(wrapped)))191 } else {192 if !segment.arguments.is_empty() {193 return Err(syn::Error::new(194 segment.arguments.span(),195 "unexpected generic arguments for non-vec type",196 ));197 }198 Ok(Self::Plain(segment.ident.clone()))199 }200 }201 Type::Tuple(t) => {202 let mut out = Vec::with_capacity(t.elems.len());203 for el in t.elems.iter() {204 out.push(AbiType::try_from(el)?)205 }206 Ok(Self::Tuple(out))207 }208 _ => Err(syn::Error::new(209 value.span(),210 "unexpected type, only arrays, plain types and tuples are supported",211 )),212 }213 }214 fn is_value(&self) -> bool {215 match self {216 Self::Plain(v) if v == "value" => true,217 _ => false,218 }219 }220 fn is_caller(&self) -> bool {221 match self {222 Self::Plain(v) if v == "caller" => true,223 _ => false,224 }225 }226 fn is_special(&self) -> bool {227 self.is_caller() || self.is_value()228 }229 fn selector_ty_buf(&self, buf: &mut String) -> std::fmt::Result {230 match self {231 AbiType::Plain(t) => {232 write!(buf, "{}", t)233 }234 AbiType::Tuple(t) => {235 write!(buf, "(")?;236 for (i, t) in t.iter().enumerate() {237 if i != 0 {238 write!(buf, ",")?;239 }240 t.selector_ty_buf(buf)?;241 }242 write!(buf, ")")243 }244 AbiType::Vec(v) => {245 v.selector_ty_buf(buf)?;246 write!(buf, "[]")247 }248 AbiType::Array(v, len) => {249 v.selector_ty_buf(buf)?;250 write!(buf, "[{}]", len)251 }252 }253 }254 fn selector_ty(&self) -> String {255 let mut out = String::new();256 self.selector_ty_buf(&mut out).expect("no fmt error");257 out258 }259}260impl ToTokens for AbiType {261 fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {262 match self {263 AbiType::Plain(t) => tokens.extend(quote! {#t}),264 AbiType::Tuple(t) => {265 tokens.extend(quote! {(266 #(#t),*267 )});268 }269 AbiType::Vec(v) => tokens.extend(quote! {Vec<#v>}),270 AbiType::Array(v, l) => tokens.extend(quote! {[#v; #l]}),271 }272 }273}109274110struct MethodArg {275struct MethodArg {111 name: Ident,276 name: Ident,277 camel_name: String,112 ty: Ident,278 ty: AbiType,113}279}114impl MethodArg {280impl MethodArg {115 fn try_from(value: &PatType) -> syn::Result<Self> {281 fn try_from(value: &PatType) -> syn::Result<Self> {116 Ok(Self {117 name: parse_ident_from_pat(&value.pat)?.clone(),282 let name = parse_ident_from_pat(&value.pat)?.clone();283 Ok(Self {284 camel_name: cases::camelcase::to_camel_case(&name.to_string()),285 name,118 ty: parse_ident_from_type(&value.ty, false)?.clone(),286 ty: AbiType::try_maybe_special_from(&value.ty)?,119 })287 })120 }288 }121 fn is_value(&self) -> bool {289 fn is_value(&self) -> bool {122 self.ty == "value"290 self.ty.is_value()123 }291 }124 fn is_caller(&self) -> bool {292 fn is_caller(&self) -> bool {125 self.ty == "caller"293 self.ty.is_caller()126 }294 }127 fn is_special(&self) -> bool {295 fn is_special(&self) -> bool {128 self.is_value() || self.is_caller()296 self.ty.is_special()129 }297 }130 fn selector_ty(&self) -> &Ident {298 fn selector_ty(&self) -> String {131 assert!(!self.is_special());299 assert!(!self.is_special());132 &self.ty300 self.ty.selector_ty()133 }301 }134302135 fn expand_call_def(&self) -> proc_macro2::TokenStream {303 fn expand_call_def(&self) -> proc_macro2::TokenStream {168 }336 }169337170 fn expand_solidity_argument(&self) -> proc_macro2::TokenStream {338 fn expand_solidity_argument(&self) -> proc_macro2::TokenStream {171 let name = &self.name.to_string();339 let camel_name = &self.camel_name.to_string();172 let ty = &self.ty;340 let ty = &self.ty;173 quote! {341 quote! {174 <NamedArgument<#ty>>::new(#name)342 <NamedArgument<#ty>>::new(#camel_name)175 }343 }176 }344 }177}345}400 let args = self.args.iter().map(MethodArg::expand_solidity_argument);568 let args = self569 .args570 .iter()571 .filter(|a| !a.is_special())572 .map(MethodArg::expand_solidity_argument);573 let selector = format!("{} {:0>8x}", self.selector_str, self.selector);401574402 quote! {575 quote! {403 SolidityFunction {576 SolidityFunction {577 selector: #selector,404 name: #camel_name,578 name: #camel_name,405 mutability: #mutability,579 mutability: #mutability,406 args: (580 args: (475 let call_variants_this = self.methods.iter().map(Method::expand_variant_call);649 let call_variants_this = self.methods.iter().map(Method::expand_variant_call);476 let solidity_functions = self.methods.iter().map(Method::expand_solidity_function);650 let solidity_functions = self.methods.iter().map(Method::expand_solidity_function);651652 // TODO: Inline inline_is653 let solidity_is = self654 .info655 .is656 .0657 .iter()658 .chain(self.info.inline_is.0.iter())659 .map(|is| is.name.to_string());660 let solidity_events_is = self.info.events.0.iter().map(|is| is.name.to_string());661 let solidity_generators = self662 .info663 .is664 .0665 .iter()666 .chain(self.info.inline_is.0.iter())667 .map(Is::expand_generator);668 let solidity_event_generators = self.info.events.0.iter().map(Is::expand_event_generator);477669478 // let methods = self.methods.iter().map(Method::solidity_def);670 // let methods = self.methods.iter().map(Method::solidity_def);479671505 )*697 )*506 )698 )507 }699 }508 pub fn generate_solidity_interface() -> string {700 pub fn generate_solidity_interface(tc: &evm_coder::solidity::TypeCollector, is_impl: bool) {509 use evm_coder::solidity::*;701 use evm_coder::solidity::*;510 use core::fmt::Write;702 use core::fmt::Write;511 let interface = SolidityInterface {703 let interface = SolidityInterface {512 name: #solidity_name,704 name: #solidity_name,705 is: &["Dummy", #(706 #solidity_is,707 )* #(708 #solidity_events_is,709 )* ],513 functions: (#(710 functions: (#(514 #solidity_functions,711 #solidity_functions,515 )*),712 )*),516 };713 };714 if is_impl {715 tc.collect("// Common stubs holder\ncontract Dummy {\n\tuint8 dummy;\n\tstring stub_error = \"this contract is implemented in native\";\n}\n".into());716 } else {717 tc.collect("// Common stubs holder\ninterface Dummy {\n}\n".into());718 }719 #(720 #solidity_generators721 )*722 #(723 #solidity_event_generators724 )*725517 let mut out = string::new();726 let mut out = string::new();727 // In solidity interface usage (is) should be preceeded by interface definition728 // This comment helps to sort it in a set729 if #solidity_name.starts_with("Inline") {730 out.push_str("// Inline\n");731 }518 let _ = interface.format(&mut out);732 let _ = interface.format(is_impl, &mut out, tc);519 out733 tc.collect(out);520 }734 }521 }735 }522 impl ::evm_coder::Call for #call_name {736 impl ::evm_coder::Call for #call_name {crates/evm-coder-macros/src/to_log.rsdiffbeforeafterboth1use inflector::cases;1use syn::{Data, DeriveInput, Field, Fields, Ident, Variant, spanned::Spanned};2use syn::{Data, DeriveInput, Field, Fields, Ident, Variant, spanned::Spanned};2use std::fmt::Write;3use std::fmt::Write;3use quote::quote;4use quote::quote;677struct EventField {8struct EventField {8 name: Ident,9 name: Ident,10 camel_name: String,9 ty: Ident,11 ty: Ident,10 indexed: bool,12 indexed: bool,11}13}24 }26 }25 Ok(Self {27 Ok(Self {26 name: name.to_owned(),28 name: name.to_owned(),29 camel_name: cases::camelcase::to_camel_case(&name.to_string()),27 ty: ty.to_owned(),30 ty: ty.to_owned(),28 indexed,31 indexed,29 })32 })30 }33 }34 fn expand_solidity_argument(&self) -> proc_macro2::TokenStream {35 let camel_name = &self.camel_name;36 let ty = &self.ty;37 let indexed = self.indexed;38 quote! {39 <SolidityEventArgument<#ty>>::new(#indexed, #camel_name)40 }41 }31}42}324333struct Event {44struct Event {117 }128 }118 }129 }130131 fn expand_solidity_function(&self) -> proc_macro2::TokenStream {132 let name = self.name.to_string();133 let args = self.fields.iter().map(EventField::expand_solidity_argument);134 quote! {135 SolidityEvent {136 name: #name,137 args: (138 #(139 #args,140 )*141 ),142 }143 }144 }119}145}120146121pub struct Events {147pub struct Events {144170145 let consts = self.events.iter().map(Event::expand_consts);171 let consts = self.events.iter().map(Event::expand_consts);146 let serializers = self.events.iter().map(Event::expand_serializers);172 let serializers = self.events.iter().map(Event::expand_serializers);173 let solidity_name = self.name.to_string();174 let solidity_functions = self.events.iter().map(Event::expand_solidity_function);147175148 quote! {176 quote! {149 impl #name {177 impl #name {150 #(178 #(151 #consts179 #consts152 )*180 )*181182 pub fn generate_solidity_interface(tc: &evm_coder::solidity::TypeCollector, is_impl: bool) {183 use evm_coder::solidity::*;184 use core::fmt::Write;185 let interface = SolidityInterface {186 name: #solidity_name,187 is: &[],188 functions: (#(189 #solidity_functions,190 )*),191 };192 let mut out = string::new();193 out.push_str("// Inline\n");194 let _ = interface.format(is_impl, &mut out, tc);195 tc.collect(out);196 }153 }197 }154198155 #[automatically_derived]199 #[automatically_derived]crates/evm-coder/src/abi.rsdiffbeforeafterboth19#[derive(Clone)]19#[derive(Clone)]20pub struct AbiReader<'i> {20pub struct AbiReader<'i> {21 buf: &'i [u8],21 buf: &'i [u8],22 subresult_offset: usize,22 offset: usize,23 offset: usize,23}24}24impl<'i> AbiReader<'i> {25impl<'i> AbiReader<'i> {25 pub fn new(buf: &'i [u8]) -> Self {26 pub fn new(buf: &'i [u8]) -> Self {26 Self { buf, offset: 0 }27 Self {28 buf,29 subresult_offset: 0,30 offset: 0,31 }27 }32 }28 pub fn new_call(buf: &'i [u8]) -> Result<(u32, Self)> {33 pub fn new_call(buf: &'i [u8]) -> Result<(u32, Self)> {41 u32::from_be_bytes(method_id),42 Self {43 buf,44 subresult_offset: 4,45 offset: 4,46 },47 ))36 }48 }374938 fn read_padleft<const S: usize>(&mut self) -> Result<[u8; S]> {50 fn read_padleft<const S: usize>(&mut self) -> Result<[u8; S]> {39 if self.buf.len() - self.offset < 32 {51 if self.buf.len() - self.offset < ABI_ALIGNMENT {40 return Err(Error::Error(ExitError::OutOfOffset));52 return Err(Error::Error(ExitError::OutOfOffset));41 }53 }42 let mut block = [0; S];54 let mut block = [0; S];79 }91 }80 Ok(subresult.buf[subresult.offset..subresult.offset + length].into())92 Ok(subresult.buf[subresult.offset..subresult.offset + length].into())81 }93 }94 pub fn string(&mut self) -> Result<string> {95 string::from_utf8(self.bytes()?).map_err(|_| Error::Error(ExitError::InvalidRange))96 }829783 pub fn uint32(&mut self) -> Result<u32> {98 pub fn uint32(&mut self) -> Result<u32> {84 Ok(u32::from_be_bytes(self.read_padleft()?))99 Ok(u32::from_be_bytes(self.read_padleft()?))103118104 fn subresult(&mut self) -> Result<AbiReader<'i>> {119 fn subresult(&mut self) -> Result<AbiReader<'i>> {105 let offset = self.read_usize()?;120 let offset = self.read_usize()?;121 if offset + self.subresult_offset > self.buf.len() {122 return Err(Error::Error(ExitError::InvalidRange));123 }106 Ok(AbiReader {124 Ok(AbiReader {107 buf: self.buf,125 buf: self.buf,126 subresult_offset: offset + self.subresult_offset,108 offset: offset + self.offset,127 offset: offset + self.subresult_offset,109 })128 })110 }129 }111130192 self.memory(value.as_bytes())211 self.memory(value.as_bytes())193 }212 }213214 pub fn bytes(&mut self, value: &[u8]) {215 self.memory(value)216 }194217195 pub fn finish(mut self) -> Vec<u8> {218 pub fn finish(mut self) -> Vec<u8> {196 for (static_offset, part) in self.dynamic_part {219 for (static_offset, part) in self.dynamic_part {197 let part_offset = self.static_part.len();220 let part_offset = self.static_part.len();198221199 let encoded_dynamic_offset = usize::to_be_bytes(part_offset - static_offset);222 let encoded_dynamic_offset = usize::to_be_bytes(part_offset);200 self.static_part[static_offset + ABI_ALIGNMENT - encoded_dynamic_offset.len()223 self.static_part[static_offset + ABI_ALIGNMENT - encoded_dynamic_offset.len()201 ..static_offset + ABI_ALIGNMENT]224 ..static_offset + ABI_ALIGNMENT]202 .copy_from_slice(&encoded_dynamic_offset);225 .copy_from_slice(&encoded_dynamic_offset);226impl_abi_readable!(H160, address);249impl_abi_readable!(H160, address);227impl_abi_readable!(Vec<u8>, bytes);250impl_abi_readable!(Vec<u8>, bytes);228impl_abi_readable!(bool, bool);251impl_abi_readable!(bool, bool);252impl_abi_readable!(string, string);253254mod sealed {255 /// Not all types can be placed in vec, i.e `Vec<u8>` is restricted, `bytes` should be used instead256 pub trait CanBePlacedInVec {}257}258259impl sealed::CanBePlacedInVec for U256 {}260impl sealed::CanBePlacedInVec for string {}261impl sealed::CanBePlacedInVec for H160 {}262263impl<R: sealed::CanBePlacedInVec> AbiRead<Vec<R>> for AbiReader<'_>264where265 Self: AbiRead<R>,266{267 fn abi_read(&mut self) -> Result<Vec<R>> {268 let mut sub = self.subresult()?;269 let size = sub.read_usize()?;270 sub.subresult_offset = sub.offset;271 let mut out = Vec::with_capacity(size);272 for _ in 0..size {273 out.push(<Self as AbiRead<R>>::abi_read(&mut sub)?);274 }275 Ok(out)276 }277}278279macro_rules! impl_tuples {280 ($($ident:ident)+) => {281 impl<$($ident),+> sealed::CanBePlacedInVec for ($($ident,)+) {}282 impl<$($ident),+> AbiRead<($($ident,)+)> for AbiReader<'_>283 where284 $(Self: AbiRead<$ident>),+285 {286 fn abi_read(&mut self) -> Result<($($ident,)+)> {287 let mut subresult = self.subresult()?;288 Ok((289 $(<Self as AbiRead<$ident>>::abi_read(&mut subresult)?,)+290 ))291 }292 }293 };294}295296impl_tuples! {A}297impl_tuples! {A B}298impl_tuples! {A B C}299impl_tuples! {A B C D}300impl_tuples! {A B C D E}301impl_tuples! {A B C D E F}302impl_tuples! {A B C D E F G}303impl_tuples! {A B C D E F G H}304impl_tuples! {A B C D E F G H I}305impl_tuples! {A B C D E F G H I J}229306230pub trait AbiWrite {307pub trait AbiWrite {231 fn abi_write(&self, writer: &mut AbiWriter);308 fn abi_write(&self, writer: &mut AbiWriter);253 writer.string(self)330 writer.string(self)254 }331 }255}332}333impl AbiWrite for &Vec<u8> {334 fn abi_write(&self, writer: &mut AbiWriter) {335 writer.bytes(self)336 }337}256338257impl AbiWrite for () {339impl AbiWrite for () {258 fn abi_write(&self, _writer: &mut AbiWriter) {}340 fn abi_write(&self, _writer: &mut AbiWriter) {}286 }}368 }}287}369}370371#[cfg(test)]372pub mod test {373 use crate::{374 abi::AbiRead,375 types::{string, uint256},376 };377378 use super::{AbiReader, AbiWriter};379 use hex_literal::hex;380381 #[test]382 fn dynamic_after_static() {383 let mut encoder = AbiWriter::new();384 encoder.bool(&true);385 encoder.string("test");386 let encoded = encoder.finish();387388 let mut encoder = AbiWriter::new();389 encoder.bool(&true);390 // Offset to subresult391 encoder.uint32(&(32 * 2));392 // Len of "test"393 encoder.uint32(&4);394 encoder.write_padright(&[b't', b'e', b's', b't']);395 let alternative_encoded = encoder.finish();396397 assert_eq!(encoded, alternative_encoded);398399 let mut decoder = AbiReader::new(&encoded);400 assert_eq!(decoder.bool().unwrap(), true);401 assert_eq!(decoder.string().unwrap(), "test");402 }403404 #[test]405 fn mint_sample() {406 let (call, mut decoder) = AbiReader::new_call(&hex!(407 "408 50bb4e7f409 000000000000000000000000ad2c0954693c2b5404b7e50967d3481bea432374410 0000000000000000000000000000000000000000000000000000000000000001411 0000000000000000000000000000000000000000000000000000000000000060412 0000000000000000000000000000000000000000000000000000000000000008413 5465737420555249000000000000000000000000000000000000000000000000414 "415 ))416 .unwrap();417 assert_eq!(call, 0x50bb4e7f);418 assert_eq!(419 format!("{:?}", decoder.address().unwrap()),420 "0xad2c0954693c2b5404b7e50967d3481bea432374"421 );422 assert_eq!(decoder.uint32().unwrap(), 1);423 assert_eq!(decoder.string().unwrap(), "Test URI");424 }425426 #[test]427 fn mint_bulk() {428 let (call, mut decoder) = AbiReader::new_call(&hex!(429 "430 36543006431 00000000000000000000000053744e6da587ba10b32a2554d2efdcd985bc27a3 // address432 0000000000000000000000000000000000000000000000000000000000000040 // offset of (uint256, string)[]433 0000000000000000000000000000000000000000000000000000000000000003 // length of (uint256, string)[]434435 0000000000000000000000000000000000000000000000000000000000000060 // offset of first elem436 00000000000000000000000000000000000000000000000000000000000000e0 // offset of second elem437 0000000000000000000000000000000000000000000000000000000000000160 // offset of third elem438439 0000000000000000000000000000000000000000000000000000000000000001 // first token id? #60440 0000000000000000000000000000000000000000000000000000000000000040 // offset of string441 000000000000000000000000000000000000000000000000000000000000000a // size of string442 5465737420555249203000000000000000000000000000000000000000000000 // string443444 000000000000000000000000000000000000000000000000000000000000000b // second token id? Why ==11? #e0445 0000000000000000000000000000000000000000000000000000000000000040 // offset of string446 000000000000000000000000000000000000000000000000000000000000000a // size of string447 5465737420555249203100000000000000000000000000000000000000000000 // string448449 000000000000000000000000000000000000000000000000000000000000000c // third token id? Why ==12? #160450 0000000000000000000000000000000000000000000000000000000000000040 // offset of string451 000000000000000000000000000000000000000000000000000000000000000a // size of string452 5465737420555249203200000000000000000000000000000000000000000000 // string453 "454 ))455 .unwrap();456 assert_eq!(call, 0x36543006);457 let _ = decoder.address().unwrap();458 let data =459 <AbiReader<'_> as AbiRead<Vec<(uint256, string)>>>::abi_read(&mut decoder).unwrap();460 assert_eq!(461 data,462 vec![463 (1.into(), "Test URI 0".to_string()),464 (11.into(), "Test URI 1".to_string()),465 (12.into(), "Test URI 2".to_string())466 ]467 );468 }469}288470crates/evm-coder/src/lib.rsdiffbeforeafterboth61 fn call(&mut self, call: types::Msg<C>) -> execution::Result<AbiWriter>;61 fn call(&mut self, call: types::Msg<C>) -> execution::Result<AbiWriter>;62}62}6364#[macro_export]65macro_rules! generate_stubgen {66 ($name:ident, $decl:ident, $is_impl:literal) => {67 #[test]68 #[ignore]69 fn $name() {70 use evm_coder::solidity::TypeCollector;71 let mut out = TypeCollector::new();72 $decl::generate_solidity_interface(&mut out, $is_impl);73 println!("=== SNIP START ===");74 println!("// SPDX-License-Identifier: OTHER");75 println!("// This code is automatically generated");76 println!();77 println!("pragma solidity >=0.8.0 <0.9.0;");78 println!();79 for b in out.finish() {80 println!("{}", b);81 }82 println!("=== SNIP END ===");83 }84 };85}638664#[cfg(test)]87#[cfg(test)]65mod tests {88mod tests {crates/evm-coder/src/solidity.rsdiffbeforeafterboth1#[cfg(not(feature = "std"))]1#[cfg(not(feature = "std"))]2use alloc::{string::String};2use alloc::{3 string::String,4 vec::Vec,5 collections::{BTreeSet, BTreeMap},6 format,7};8#[cfg(feature = "std")]9use std::collections::{BTreeSet, BTreeMap};3use core::{fmt, marker::PhantomData};10use core::{11 fmt::{self, Write},12 marker::PhantomData,13 cell::{Cell, RefCell},14};4use impl_trait_for_tuples::impl_for_tuples;15use impl_trait_for_tuples::impl_for_tuples;5use crate::types::*;16use crate::types::*;1718#[derive(Default)]19pub struct TypeCollector {20 structs: RefCell<BTreeSet<string>>,21 anonymous: RefCell<BTreeMap<Vec<string>, usize>>,22 id: Cell<usize>,23}24impl TypeCollector {25 pub fn new() -> Self {26 Self::default()27 }28 pub fn collect(&self, item: string) {29 self.structs.borrow_mut().insert(item);30 }31 pub fn next_id(&self) -> usize {32 let v = self.id.get();33 self.id.set(v + 1);34 v35 }36 pub fn collect_tuple<T: SolidityTupleType>(&self) -> String {37 let names = T::names(self);38 if let Some(id) = self.anonymous.borrow().get(&names).cloned() {39 return format!("Tuple{}", id);40 }41 let id = self.next_id();42 let mut str = String::new();43 writeln!(str, "// Anonymous struct").unwrap();44 writeln!(str, "struct Tuple{} {{", id).unwrap();45 for (i, name) in names.iter().enumerate() {46 writeln!(str, "\t{} field_{};", name, i).unwrap();47 }48 writeln!(str, "}}").unwrap();49 self.collect(str);50 self.anonymous.borrow_mut().insert(names, id);51 format!("Tuple{}", id)52 }53 pub fn finish(self) -> BTreeSet<string> {54 self.structs.into_inner()55 }56}6577pub trait SolidityTypeName: 'static {58pub trait SolidityTypeName: 'static {8 fn solidity_name(writer: &mut impl fmt::Write) -> fmt::Result;59 fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;60 fn is_simple() -> bool;61 fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;9 fn is_void() -> bool {62 fn is_void() -> bool {10 false63 false11 }64 }12}65}1314macro_rules! solidity_type_name {66macro_rules! solidity_type_name {15 ($($ty:ident => $name:expr),* $(,)?) => {67 ($($ty:ty => $name:literal $simple:literal = $default:literal),* $(,)?) => {16 $(68 $(17 impl SolidityTypeName for $ty {69 impl SolidityTypeName for $ty {18 fn solidity_name(writer: &mut impl core::fmt::Write) -> core::fmt::Result {70 fn solidity_name(writer: &mut impl core::fmt::Write, _tc: &TypeCollector) -> core::fmt::Result {19 write!(writer, $name)71 write!(writer, $name)20 }72 }73 fn is_simple() -> bool {74 $simple75 }76 fn solidity_default(writer: &mut impl core::fmt::Write, _tc: &TypeCollector) -> core::fmt::Result {77 write!(writer, $default)78 }21 }79 }22 )*80 )*23 };81 };24}82}258326solidity_type_name! {84solidity_type_name! {27 uint8 => "uint8",85 uint8 => "uint8" true = "0",28 uint32 => "uint32",86 uint32 => "uint32" true = "0",29 uint128 => "uint128",87 uint128 => "uint128" true = "0",30 uint256 => "uint256",88 uint256 => "uint256" true = "0",31 address => "address",89 address => "address" true = "0x0000000000000000000000000000000000000000",32 string => "memory string",90 string => "string" false = "\"\"",33 bytes => "memory bytes",91 bytes => "bytes" false = "hex\"\"",34 bool => "bool",92 bool => "bool" true = "false",35}93}36impl SolidityTypeName for void {94impl SolidityTypeName for void {37 fn solidity_name(_writer: &mut impl fmt::Write) -> fmt::Result {95 fn solidity_name(_writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {38 Ok(())96 Ok(())39 }97 }98 fn is_simple() -> bool {99 true100 }101 fn solidity_default(_writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {102 Ok(())103 }40 fn is_void() -> bool {104 fn is_void() -> bool {41 true105 true42 }106 }43}107}108109mod sealed {110 pub trait CanBePlacedInVec {}111}112113impl sealed::CanBePlacedInVec for uint256 {}114impl sealed::CanBePlacedInVec for string {}115impl sealed::CanBePlacedInVec for address {}116117impl<T: SolidityTypeName + sealed::CanBePlacedInVec> SolidityTypeName for Vec<T> {118 fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {119 T::solidity_name(writer, tc)?;120 write!(writer, "[]")121 }122 fn is_simple() -> bool {123 false124 }125 fn solidity_default(writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {126 write!(writer, "[]")127 }128}129130pub trait SolidityTupleType {131 fn names(tc: &TypeCollector) -> Vec<String>;132 fn len() -> usize;133}134135macro_rules! count {136 () => (0usize);137 ( $x:tt $($xs:tt)* ) => (1usize + count!($($xs)*));138}139140macro_rules! impl_tuples {141 ($($ident:ident)+) => {142 impl<$($ident),+> sealed::CanBePlacedInVec for ($($ident,)+) {}143 impl<$($ident: SolidityTypeName + 'static),+> SolidityTupleType for ($($ident,)+) {144 fn names(tc: &TypeCollector) -> Vec<string> {145 let mut collected = Vec::with_capacity(Self::len());146 $({147 let mut out = string::new();148 $ident::solidity_name(&mut out, tc).expect("no fmt error");149 collected.push(out);150 })*;151 collected152 }153154 fn len() -> usize {155 count!($($ident)*)156 }157 }158 impl<$($ident: SolidityTypeName + 'static),+> SolidityTypeName for ($($ident,)+) {159 fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {160 write!(writer, "{}", tc.collect_tuple::<Self>())161 }162 fn is_simple() -> bool {163 false164 }165 fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {166 write!(writer, "{}(", tc.collect_tuple::<Self>())?;167 $(168 <$ident>::solidity_default(writer, tc)?;169 )*170 write!(writer, ")")171 }172 }173 };174}175176impl_tuples! {A}177impl_tuples! {A B}178impl_tuples! {A B C}179impl_tuples! {A B C D}180impl_tuples! {A B C D E}181impl_tuples! {A B C D E F}182impl_tuples! {A B C D E F G}183impl_tuples! {A B C D E F G H}184impl_tuples! {A B C D E F G H I}185impl_tuples! {A B C D E F G H I J}4418645pub trait SolidityArguments {187pub trait SolidityArguments {46 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result;188 fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;189 fn solidity_get(&self, writer: &mut impl fmt::Write) -> fmt::Result;190 fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;47 fn is_empty(&self) -> bool {191 fn is_empty(&self) -> bool {48 self.len() == 0192 self.len() == 049 }193 }54pub struct UnnamedArgument<T>(PhantomData<*const T>);198pub struct UnnamedArgument<T>(PhantomData<*const T>);5519956impl<T: SolidityTypeName> SolidityArguments for UnnamedArgument<T> {200impl<T: SolidityTypeName> SolidityArguments for UnnamedArgument<T> {57 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result {201 fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {58 if !T::is_void() {202 if !T::is_void() {59 T::solidity_name(writer)203 T::solidity_name(writer, tc)?;204 if !T::is_simple() {205 write!(writer, " memory")?;206 }207 Ok(())60 } else {208 } else {61 Ok(())209 Ok(())62 }210 }63 }211 }212 fn solidity_get(&self, _writer: &mut impl fmt::Write) -> fmt::Result {213 Ok(())214 }215 fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {216 T::solidity_default(writer, tc)217 }64 fn len(&self) -> usize {218 fn len(&self) -> usize {65 if T::is_void() {219 if T::is_void() {66 0220 079}233}8023481impl<T: SolidityTypeName> SolidityArguments for NamedArgument<T> {235impl<T: SolidityTypeName> SolidityArguments for NamedArgument<T> {82 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result {236 fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {83 if !T::is_void() {237 if !T::is_void() {84 T::solidity_name(writer)?;238 T::solidity_name(writer, tc)?;239 if !T::is_simple() {240 write!(writer, " memory")?;241 }85 write!(writer, " {}", self.0)242 write!(writer, " {}", self.0)86 } else {243 } else {87 Ok(())244 Ok(())88 }245 }89 }246 }247 fn solidity_get(&self, writer: &mut impl fmt::Write) -> fmt::Result {248 writeln!(writer, "\t\t{};", self.0)249 }250 fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {251 T::solidity_default(writer, tc)252 }90 fn len(&self) -> usize {253 fn len(&self) -> usize {91 if T::is_void() {254 if T::is_void() {92 0255 096 }259 }97}260}261262pub struct SolidityEventArgument<T>(pub bool, &'static str, PhantomData<*const T>);263264impl<T> SolidityEventArgument<T> {265 pub fn new(indexed: bool, name: &'static str) -> Self {266 Self(indexed, name, Default::default())267 }268}269270impl<T: SolidityTypeName> SolidityArguments for SolidityEventArgument<T> {271 fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {272 if !T::is_void() {273 T::solidity_name(writer, tc)?;274 if self.0 {275 write!(writer, " indexed")?;276 }277 write!(writer, " {}", self.1)278 } else {279 Ok(())280 }281 }282 fn solidity_get(&self, writer: &mut impl fmt::Write) -> fmt::Result {283 writeln!(writer, "\t\t{};", self.1)284 }285 fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {286 T::solidity_default(writer, tc)287 }288 fn len(&self) -> usize {289 if T::is_void() {290 0291 } else {292 1293 }294 }295}9829699impl SolidityArguments for () {297impl SolidityArguments for () {100 fn solidity_name(&self, _writer: &mut impl fmt::Write) -> fmt::Result {298 fn solidity_name(&self, _writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {101 Ok(())299 Ok(())102 }300 }301 fn solidity_get(&self, _writer: &mut impl fmt::Write) -> fmt::Result {302 Ok(())303 }304 fn solidity_default(&self, _writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {305 Ok(())306 }103 fn len(&self) -> usize {307 fn len(&self) -> usize {104 0308 0105 }309 }109impl SolidityArguments for Tuple {313impl SolidityArguments for Tuple {110 for_tuples!( where #( Tuple: SolidityArguments ),* );314 for_tuples!( where #( Tuple: SolidityArguments ),* );111315112 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result {316 fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {113 let mut first = true;317 let mut first = true;114 for_tuples!( #(318 for_tuples!( #(115 if !Tuple.is_empty() {319 if !Tuple.is_empty() {116 if !first {320 if !first {117 write!(writer, ", ")?;321 write!(writer, ", ")?;118 }322 }119 first = false;323 first = false;120 Tuple.solidity_name(writer)?;324 Tuple.solidity_name(writer, tc)?;121 }325 }122 )* );326 )* );123 Ok(())327 Ok(())124 }328 }329 fn solidity_get(&self, writer: &mut impl fmt::Write) -> fmt::Result {330 for_tuples!( #(331 Tuple.solidity_get(writer)?;332 )* );333 Ok(())334 }335 fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {336 if self.is_empty() {337 Ok(())338 } else if self.len() == 1 {339 for_tuples!( #(340 Tuple.solidity_default(writer, tc)?;341 )* );342 Ok(())343 } else {344 write!(writer, "(")?;345 let mut first = true;346 for_tuples!( #(347 if !Tuple.is_empty() {348 if !first {349 write!(writer, ", ")?;350 }351 first = false;352 Tuple.solidity_default(writer, tc)?;353 }354 )* );355 write!(writer, ")")?;356 Ok(())357 }358 }125 fn len(&self) -> usize {359 fn len(&self) -> usize {126 for_tuples!( #( Tuple.len() )+* )360 for_tuples!( #( Tuple.len() )+* )127 }361 }128}362}129363130pub trait SolidityFunctions {364pub trait SolidityFunctions {131 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result;365 fn solidity_name(366 &self,367 is_impl: bool,368 writer: &mut impl fmt::Write,369 tc: &TypeCollector,370 ) -> fmt::Result;132}371}133372137 Mutable,376 Mutable,138}377}139pub struct SolidityFunction<A, R> {378pub struct SolidityFunction<A, R> {379 pub selector: &'static str,140 pub name: &'static str,380 pub name: &'static str,141 pub args: A,381 pub args: A,142 pub result: R,382 pub result: R,143 pub mutability: SolidityMutability,383 pub mutability: SolidityMutability,144}384}145impl<A: SolidityArguments, R: SolidityArguments> SolidityFunctions for SolidityFunction<A, R> {385impl<A: SolidityArguments, R: SolidityArguments> SolidityFunctions for SolidityFunction<A, R> {146 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result {386 fn solidity_name(387 &self,388 is_impl: bool,389 writer: &mut impl fmt::Write,390 tc: &TypeCollector,391 ) -> fmt::Result {392 writeln!(writer, "\t// Selector: {}", self.selector)?;147 write!(writer, "function {}(", self.name)?;393 write!(writer, "\tfunction {}(", self.name)?;148 self.args.solidity_name(writer)?;394 self.args.solidity_name(writer, tc)?;149 write!(writer, ") external")?;395 write!(writer, ")")?;396 if is_impl {397 write!(writer, " public")?;398 } else {399 write!(writer, " external")?;400 }150 match &self.mutability {401 match &self.mutability {151 SolidityMutability::Pure => write!(writer, " pure")?,402 SolidityMutability::Pure => write!(writer, " pure")?,152 SolidityMutability::View => write!(writer, " view")?,403 SolidityMutability::View => write!(writer, " view")?,153 SolidityMutability::Mutable => {}404 SolidityMutability::Mutable => {}154 }405 }155 if !self.result.is_empty() {406 if !self.result.is_empty() {156 write!(writer, " returns (")?;407 write!(writer, " returns (")?;157 self.result.solidity_name(writer)?;408 self.result.solidity_name(writer, tc)?;158 write!(writer, ")")?;409 write!(writer, ")")?;159 }410 }411 if is_impl {412 writeln!(writer, " {{")?;413 writeln!(writer, "\t\trequire(false, stub_error);")?;414 self.args.solidity_get(writer)?;415 match &self.mutability {416 SolidityMutability::Pure => {}417 SolidityMutability::View => writeln!(writer, "\t\tdummy;")?,418 SolidityMutability::Mutable => writeln!(writer, "\t\tdummy = 0;")?,419 }420 if !self.result.is_empty() {421 write!(writer, "\t\treturn ")?;422 self.result.solidity_default(writer, tc)?;423 writeln!(writer, ";")?;424 }425 writeln!(writer, "\t}}")?;426 } else {160 writeln!(writer, ";")427 writeln!(writer, ";")?;428 }429 Ok(())161 }430 }162}431}163432167436168 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result {437 fn solidity_name(438 &self,439 is_impl: bool,440 writer: &mut impl fmt::Write,441 tc: &TypeCollector,442 ) -> fmt::Result {169 let mut first = false;443 let mut first = false;170 for_tuples!( #(444 for_tuples!( #(171 Tuple.solidity_name(writer)?;445 Tuple.solidity_name(is_impl, writer, tc)?;172 )* );446 )* );173 Ok(())447 Ok(())174 }448 }175}449}176450177pub struct SolidityInterface<F: SolidityFunctions> {451pub struct SolidityInterface<F: SolidityFunctions> {178 pub name: &'static str,452 pub name: &'static str,453 pub is: &'static [&'static str],179 pub functions: F,454 pub functions: F,180}455}181456182impl<F: SolidityFunctions> SolidityInterface<F> {457impl<F: SolidityFunctions> SolidityInterface<F> {183 pub fn format(&self, out: &mut impl fmt::Write) -> fmt::Result {458 pub fn format(459 &self,460 is_impl: bool,461 out: &mut impl fmt::Write,462 tc: &TypeCollector,463 ) -> fmt::Result {464 if is_impl {465 write!(out, "contract ")?;466 } else {467 write!(out, "interface ")?;468 }184 writeln!(out, "interface {} {{", self.name)?;469 write!(out, "{}", self.name)?;470 if !self.is.is_empty() {471 write!(out, " is")?;472 for (i, n) in self.is.iter().enumerate() {473 if i != 0 {474 write!(out, ",")?;475 }476 write!(out, " {}", n)?;477 }478 }479 writeln!(out, " {{")?;185 self.functions.solidity_name(out)?;480 self.functions.solidity_name(is_impl, out, tc)?;186 writeln!(out, "}}")?;481 writeln!(out, "}}")?;187 Ok(())482 Ok(())188 }483 }189}484}485486pub struct SolidityEvent<A> {487 pub name: &'static str,488 pub args: A,489}490491impl<A: SolidityArguments> SolidityFunctions for SolidityEvent<A> {492 fn solidity_name(493 &self,494 _is_impl: bool,495 writer: &mut impl fmt::Write,496 tc: &TypeCollector,497 ) -> fmt::Result {498 write!(writer, "\tevent {}(", self.name)?;499 self.args.solidity_name(writer, tc)?;500 writeln!(writer, ");")501 }502}190503crates/evm-coder/tests/a.rsdiffbeforeafterboth223use evm_coder::{solidity_interface, types::*, ToLog, execution::Result};3use evm_coder::{solidity_interface, types::*, ToLog, execution::Result};4use evm_coder_macros::solidity;4use evm_coder_macros::solidity;5use std as sp_std;566struct Impls;7struct Impls;78node/cli/Cargo.tomldiffbeforeafterboth318[features]318[features]319default = []319default = []320runtime-benchmarks = ['nft-runtime/runtime-benchmarks']320runtime-benchmarks = [321 'nft-runtime/runtime-benchmarks',322 'polkadot-service/runtime-benchmarks',323]321324node/cli/src/chain_spec.rsdiffbeforeafterboth202 nft_item_id: vec![],202 nft_item_id: vec![],203 fungible_item_id: vec![],203 fungible_item_id: vec![],204 refungible_item_id: vec![],204 refungible_item_id: vec![],205 chain_limit: ChainLimits {206 collection_numbers_limit: 100000,207 account_token_ownership_limit: 1000000,208 collections_admins_limit: 5,209 custom_data_limit: 2048,210 nft_sponsor_transfer_timeout: 15,211 fungible_sponsor_transfer_timeout: 15,212 refungible_sponsor_transfer_timeout: 15,213 offchain_schema_limit: 1024,214 variable_on_chain_schema_limit: 1024,215 const_on_chain_schema_limit: 1024,216 },217 },205 },218 parachain_info: nft_runtime::ParachainInfoConfig { parachain_id: id },206 parachain_info: nft_runtime::ParachainInfoConfig { parachain_id: id },219 aura: nft_runtime::AuraConfig {207 aura: nft_runtime::AuraConfig {pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth1use core::marker::PhantomData;1use core::marker::PhantomData;2use evm_coder::{abi::AbiWriter, execution::Result, solidity_interface, types::*};2use evm_coder::{abi::AbiWriter, execution::Result, generate_stubgen, solidity_interface, types::*};3use pallet_evm_coder_substrate::SubstrateRecorder;3use pallet_evm_coder_substrate::SubstrateRecorder;4use pallet_evm::{ExitReason, ExitRevert, OnCreate, OnMethodCall, PrecompileOutput};4use pallet_evm::{ExitReason, ExitRevert, OnCreate, OnMethodCall, PrecompileOutput};5use sp_core::H160;5use sp_core::H160;141415#[solidity_interface(name = "ContractHelpers")]15#[solidity_interface(name = "ContractHelpers")]16impl<T: Config> ContractHelpers<T> {16impl<T: Config> ContractHelpers<T> {17 fn contract_owner(&self, contract: address) -> Result<address> {17 fn contract_owner(&self, contract_address: address) -> Result<address> {18 self.0.consume_sload()?;18 self.0.consume_sload()?;19 Ok(<Owner<T>>::get(contract))19 Ok(<Owner<T>>::get(contract_address))20 }20 }212122 fn sponsoring_enabled(&self, contract: address) -> Result<bool> {22 fn sponsoring_enabled(&self, contract_address: address) -> Result<bool> {23 self.0.consume_sload()?;23 self.0.consume_sload()?;24 Ok(<SelfSponsoring<T>>::get(contract))24 Ok(<SelfSponsoring<T>>::get(contract_address))25 }25 }262627 fn toggle_sponsoring(27 fn toggle_sponsoring(28 &mut self,28 &mut self,29 caller: caller,29 caller: caller,30 contract: address,30 contract_address: address,31 enabled: bool,31 enabled: bool,32 ) -> Result<void> {32 ) -> Result<void> {33 self.0.consume_sload()?;33 self.0.consume_sload()?;34 <Pallet<T>>::ensure_owner(contract, caller)?;34 <Pallet<T>>::ensure_owner(contract_address, caller)?;35 self.0.consume_sstore()?;35 self.0.consume_sstore()?;36 <Pallet<T>>::toggle_sponsoring(contract, enabled);36 <Pallet<T>>::toggle_sponsoring(contract_address, enabled);37 Ok(())37 Ok(())38 }38 }393940 fn set_sponsoring_rate_limit(40 fn set_sponsoring_rate_limit(41 &mut self,41 &mut self,42 caller: caller,42 caller: caller,43 contract: address,43 contract_address: address,44 rate_limit: uint32,44 rate_limit: uint32,45 ) -> Result<void> {45 ) -> Result<void> {46 self.0.consume_sload()?;46 self.0.consume_sload()?;47 <Pallet<T>>::ensure_owner(contract, caller)?;47 <Pallet<T>>::ensure_owner(contract_address, caller)?;48 self.0.consume_sstore()?;48 self.0.consume_sstore()?;49 <Pallet<T>>::set_sponsoring_rate_limit(contract, rate_limit.into());49 <Pallet<T>>::set_sponsoring_rate_limit(contract_address, rate_limit.into());50 Ok(())50 Ok(())51 }51 }525253 fn allowed(&self, contract: address, user: address) -> Result<bool> {53 fn allowed(&self, contract_address: address, user: address) -> Result<bool> {54 self.0.consume_sload()?;54 self.0.consume_sload()?;55 Ok(<Pallet<T>>::allowed(contract, user, true))55 Ok(<Pallet<T>>::allowed(contract_address, user, true))56 }56 }575758 fn allowlist_enabled(&self, contract: address) -> Result<bool> {58 fn allowlist_enabled(&self, contract_address: address) -> Result<bool> {59 self.0.consume_sload()?;59 self.0.consume_sload()?;60 Ok(<AllowlistEnabled<T>>::get(contract))60 Ok(<AllowlistEnabled<T>>::get(contract_address))61 }61 }626263 fn toggle_allowlist(63 fn toggle_allowlist(64 &mut self,64 &mut self,65 caller: caller,65 caller: caller,66 contract: address,66 contract_address: address,67 enabled: bool,67 enabled: bool,68 ) -> Result<void> {68 ) -> Result<void> {69 self.0.consume_sload()?;69 self.0.consume_sload()?;70 <Pallet<T>>::ensure_owner(contract, caller)?;70 <Pallet<T>>::ensure_owner(contract_address, caller)?;71 self.0.consume_sstore()?;71 self.0.consume_sstore()?;72 <Pallet<T>>::toggle_allowlist(contract, enabled);72 <Pallet<T>>::toggle_allowlist(contract_address, enabled);73 Ok(())73 Ok(())74 }74 }757576 fn toggle_allowed(76 fn toggle_allowed(77 &mut self,77 &mut self,78 caller: caller,78 caller: caller,79 contract: address,79 contract_address: address,80 user: address,80 user: address,81 allowed: bool,81 allowed: bool,82 ) -> Result<void> {82 ) -> Result<void> {83 self.0.consume_sload()?;83 self.0.consume_sload()?;84 <Pallet<T>>::ensure_owner(contract, caller)?;84 <Pallet<T>>::ensure_owner(contract_address, caller)?;85 self.0.consume_sstore()?;85 self.0.consume_sstore()?;86 <Pallet<T>>::toggle_allowed(contract, user, allowed);86 <Pallet<T>>::toggle_allowed(contract_address, user, allowed);87 Ok(())87 Ok(())88 }88 }89}89}130130131 fn get_code(contract: &sp_core::H160) -> Option<Vec<u8>> {131 fn get_code(contract: &sp_core::H160) -> Option<Vec<u8>> {132 (contract == &T::ContractAddress::get())132 (contract == &T::ContractAddress::get())133 .then(|| include_bytes!("./stubs/ContractHelpers.bin").to_vec())133 .then(|| include_bytes!("./stubs/ContractHelpers.raw").to_vec())134 }134 }135}135}136136163 }163 }164}164}165166generate_stubgen!(contract_helpers_impl, ContractHelpersCall, true);167generate_stubgen!(contract_helpers_iface, ContractHelpersCall, false);165168pallets/evm-contract-helpers/src/stubs/ContractHelpers.bindiffbeforeafterbothbinary blob — no preview
pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7contract Dummy {8 uint8 dummy;9 string stub_error = "this contract is implemented in native";10}111contract ContractHelpers {12contract ContractHelpers is Dummy {2 uint8 _dummmy = 0;13 // Selector: contractOwner(address) 5152b14c3 address _dummy_addr = 0x0000000000000000000000000000000000000000;4 string stub_error = "this contract does not exists, contract helpers are implemented on substrate chain side";56 function contractOwner(address contract_address) public view returns (address) {14 function contractOwner(address contractAddress)15 public16 view17 returns (address)18 {7 require(false, stub_error);19 require(false, stub_error);8 contract_address;20 contractAddress;21 dummy;9 return _dummy_addr;22 return 0x0000000000000000000000000000000000000000;10 }23 }11 2425 // Selector: sponsoringEnabled(address) 6027dc6112 function sponsoringEnabled(address contract_address) public view returns (bool) {26 function sponsoringEnabled(address contractAddress)27 public28 view29 returns (bool)30 {13 require(false, stub_error);31 require(false, stub_error);14 contract_address;32 contractAddress;15 _dummmy;33 dummy;16 return false;34 return false;17 }35 }18 3637 // Selector: toggleSponsoring(address,bool) fcac6d8619 function toggleSponsoring(address contract_address, bool enabled) public {38 function toggleSponsoring(address contractAddress, bool enabled) public {20 require(false, stub_error);39 require(false, stub_error);21 contract_address;40 contractAddress;22 enabled;41 enabled;23 _dummmy = 0;42 dummy = 0;24 }43 }25 4445 // Selector: setSponsoringRateLimit(address,uint32) 77b6c90846 function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)47 public48 {49 require(false, stub_error);50 contractAddress;51 rateLimit;52 dummy = 0;53 }5455 // Selector: allowed(address,address) 5c65816556 function allowed(address contractAddress, address user)57 public58 view59 returns (bool)60 {61 require(false, stub_error);62 contractAddress;63 user;64 dummy;65 return false;66 }6768 // Selector: allowlistEnabled(address) c772ef6c69 function allowlistEnabled(address contractAddress)70 public71 view72 returns (bool)73 {74 require(false, stub_error);75 contractAddress;76 dummy;77 return false;78 }7980 // Selector: toggleAllowlist(address,bool) 36de20f526 function toggleAllowlist(address contract_address, bool enabled) public {81 function toggleAllowlist(address contractAddress, bool enabled) public {27 require(false, stub_error);82 require(false, stub_error);28 contract_address;83 contractAddress;29 enabled;84 enabled;30 _dummmy = 0;85 dummy = 0;31 }86 }32 8788 // Selector: toggleAllowed(address,address,bool) 4706cc1c33 function toggleAllowed(address contract_address, address user, bool allowed) public {89 function toggleAllowed(90 address contractAddress,91 address user,92 bool allowed93 ) public {34 require(false, stub_error);94 require(false, stub_error);35 contract_address;95 contractAddress;36 user;96 user;37 allowed;97 allowed;38 _dummmy = 0;98 dummy = 0;39 }99 }40}100}101pallets/evm-migration/Cargo.tomldiffbeforeafterbothno changes
pallets/evm-migration/src/benchmarking.rsdiffbeforeafterbothno changes
pallets/evm-migration/src/lib.rsdiffbeforeafterbothno changes
pallets/evm-migration/src/weights.rsdiffbeforeafterbothno changes
pallets/nft-transaction-payment/src/benchmarking.rsdiffbeforeafterbothno changes
pallets/nft-transaction-payment/src/lib.rsdiffbeforeafterboth11#[cfg(feature = "std")]11#[cfg(feature = "std")]12pub use serde::*;12pub use serde::*;1314#[cfg(feature = "runtime-benchmarks")]15mod benchmarking;161317use frame_support::{decl_module, decl_storage};14use frame_support::{decl_module, decl_storage};18use sp_std::prelude::*;15use sp_std::prelude::*;pallets/nft/Cargo.tomldiffbeforeafterboth41 'evm-coder/std',41 'evm-coder/std',42 'pallet-evm-coder-substrate/std',42 'pallet-evm-coder-substrate/std',43]43]44limit-testing = ["nft-data-structs/limit-testing"]444545################################################################################46################################################################################46# Substrate Dependencies47# Substrate Dependenciespallets/nft/src/benchmarking.rsdiffbeforeafterboth1#![cfg(feature = "runtime-benchmarks")]1#![cfg(feature = "runtime-benchmarks")]223use super::*;3use super::*;4use crate::Module as Nft;4use crate::Pallet;56use sp_std::prelude::*;7use frame_system::RawOrigin;5use frame_system::RawOrigin;8use frame_benchmarking::{benchmarks, account, whitelisted_caller}; // , TrackedStorageKey,6use frame_benchmarking::{benchmarks, account};7use nft_data_structs::*;8use core::convert::TryInto;9use sp_runtime::DispatchError;91010const SEED: u32 = 1;11const SEED: u32 = 1;11/*1212fn default_nft_data() -> CreateItemData {13fn create_data(size: usize) -> Vec<u8> {13 CreateItemData::NFT(CreateNftData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] })14 (0..size).map(|v| (v & 0xff) as u8).collect()14}15}1516fn create_u16_data(size: usize) -> Vec<u16> {16fn default_fungible_data () -> CreateItemData {17 (0..size).map(|v| (v & 0xffff) as u16).collect()17 CreateItemData::Fungible(CreateFungibleData { })18}18}191920fn default_nft_data() -> CreateItemData {20fn default_re_fungible_data () -> CreateItemData {21 CreateItemData::NFT(CreateNftData {21 CreateItemData::ReFungible(CreateReFungibleData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] })22 const_data: create_data(CUSTOM_DATA_LIMIT as usize).try_into().unwrap(),22}23 variable_data: create_data(CUSTOM_DATA_LIMIT as usize).try_into().unwrap(),23*/24 })25}2627fn default_fungible_data() -> CreateItemData {28 CreateItemData::Fungible(CreateFungibleData { value: 1000 })29}3031fn default_re_fungible_data() -> CreateItemData {32 CreateItemData::ReFungible(CreateReFungibleData {33 const_data: create_data(CUSTOM_DATA_LIMIT as usize).try_into().unwrap(),34 variable_data: create_data(CUSTOM_DATA_LIMIT as usize).try_into().unwrap(),35 pieces: 1000,36 })37}3839fn create_collection_helper<T: Config>(40 owner: T::AccountId,41 mode: CollectionMode,42) -> Result<CollectionId, DispatchError> {43 T::Currency::deposit_creating(&owner, T::CollectionCreationPrice::get());44 let col_name = create_u16_data(MAX_COLLECTION_NAME_LENGTH)45 .try_into()46 .unwrap();47 let col_desc = create_u16_data(MAX_COLLECTION_DESCRIPTION_LENGTH)48 .try_into()49 .unwrap();50 let token_prefix = create_data(MAX_TOKEN_PREFIX_LENGTH).try_into().unwrap();51 <Pallet<T>>::create_collection(52 RawOrigin::Signed(owner).into(),53 col_name,54 col_desc,55 token_prefix,56 mode,57 )?;58 Ok(CreatedCollectionCount::get())59}60fn create_nft_collection<T: Config>(owner: T::AccountId) -> Result<CollectionId, DispatchError> {61 create_collection_helper::<T>(owner, CollectionMode::NFT)62}63fn create_fungible_collection<T: Config>(64 owner: T::AccountId,65) -> Result<CollectionId, DispatchError> {66 create_collection_helper::<T>(owner, CollectionMode::Fungible(0))67}68fn create_refungible_collection<T: Config>(69 owner: T::AccountId,70) -> Result<CollectionId, DispatchError> {71 create_collection_helper::<T>(owner, CollectionMode::ReFungible)72}247325benchmarks! {74benchmarks! {267527 create_collection {76 create_collection {28 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();77 let col_name: Vec<u16> = create_u16_data(MAX_COLLECTION_NAME_LENGTH);78 let col_desc: Vec<u16> = create_u16_data(MAX_COLLECTION_DESCRIPTION_LENGTH);79 let token_prefix: Vec<u8> = create_data(MAX_TOKEN_PREFIX_LENGTH);80 let mode: CollectionMode = CollectionMode::NFT;81 let caller: T::AccountId = account("caller", 0, SEED);82 T::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());83 }: _(RawOrigin::Signed(caller.clone()), col_name.clone(), col_desc.clone(), token_prefix.clone(), mode)84 verify {85 assert_eq!(<Pallet<T>>::collection_id(2).unwrap().owner, caller);86 }8788 destroy_collection {89 let caller: T::AccountId = account("caller", 0, SEED);90 let collection = create_nft_collection::<T>(caller.clone())?;91 }: _(RawOrigin::Signed(caller.clone()), collection)9293 add_to_white_list {94 let caller: T::AccountId = account("caller", 0, SEED);95 let whitelist_account: T::AccountId = account("admin", 0, SEED);96 let collection = create_nft_collection::<T>(caller.clone())?;97 }: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(whitelist_account))9899 remove_from_white_list {100 let caller: T::AccountId = account("caller", 0, SEED);101 let whitelist_account: T::AccountId = account("admin", 0, SEED);102 let collection = create_nft_collection::<T>(caller.clone())?;103 <Pallet<T>>::add_to_white_list(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(whitelist_account.clone()))?;104 }: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(whitelist_account))105106 set_public_access_mode {107 let caller: T::AccountId = account("caller", 0, SEED);108 let collection = create_nft_collection::<T>(caller.clone())?;109 }: _(RawOrigin::Signed(caller.clone()), collection, AccessMode::WhiteList)110111 set_mint_permission {112 let caller: T::AccountId = account("caller", 0, SEED);113 let collection = create_nft_collection::<T>(caller.clone())?;114 }: _(RawOrigin::Signed(caller.clone()), collection, true)115116 change_collection_owner {117 let caller: T::AccountId = account("caller", 0, SEED);118 let collection = create_nft_collection::<T>(caller.clone())?;119 let new_owner: T::AccountId = account("admin", 0, SEED);120 }: _(RawOrigin::Signed(caller.clone()), collection, new_owner)121122 add_collection_admin {123 let caller: T::AccountId = account("caller", 0, SEED);124 let collection = create_nft_collection::<T>(caller.clone())?;125 let new_admin: T::AccountId = account("admin", 0, SEED);126 }: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(new_admin))127128 remove_collection_admin {129 let caller: T::AccountId = account("caller", 0, SEED);130 let collection = create_nft_collection::<T>(caller.clone())?;131 let new_admin: T::AccountId = account("admin", 0, SEED);132 <Pallet<T>>::add_collection_admin(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(new_admin.clone()))?;133 }: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(new_admin))134135 set_collection_sponsor {136 let caller: T::AccountId = account("caller", 0, SEED);137 let collection = create_nft_collection::<T>(caller.clone())?;138 }: _(RawOrigin::Signed(caller.clone()), collection, caller.clone())139140 confirm_sponsorship {141 let caller: T::AccountId = account("caller", 0, SEED);29 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();142 let collection = create_nft_collection::<T>(caller.clone())?;143 <Pallet<T>>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;144 }: _(RawOrigin::Signed(caller.clone()), collection)145146 remove_collection_sponsor {147 let caller: T::AccountId = account("caller", 0, SEED);148 let collection = create_nft_collection::<T>(caller.clone())?;149 <Pallet<T>>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;150 <Pallet<T>>::confirm_sponsorship(RawOrigin::Signed(caller.clone()).into(), 2)?;151 }: _(RawOrigin::Signed(caller.clone()), collection)152153 // nft item154 create_item_nft {155 let b in 0..(CUSTOM_DATA_LIMIT * 2);156157 let caller: T::AccountId = account("caller", 0, SEED);158 let collection = create_nft_collection::<T>(caller.clone())?;159 let data = CreateItemData::NFT(CreateNftData {160 const_data: create_data(b.min(CUSTOM_DATA_LIMIT) as usize).try_into().unwrap(),161 variable_data: create_data(b.saturating_sub(CUSTOM_DATA_LIMIT) as usize).try_into().unwrap(),162 });163 }: create_item(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)164165 create_multiple_items_nft {166 // TODO: Take item data size into account. As create_item_nft bench shows, this parameter has no effect on execution time,167 // but it may if we increase CUSTOM_DATA_LIMIT168 let b in 1..1000;169170 let caller: T::AccountId = account("caller", 0, SEED);171 let collection = create_nft_collection::<T>(caller.clone())?;172 let data = (0..b).map(|_| default_nft_data()).collect();173 }: create_multiple_items(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)174175 // fungible item176 create_item_fungible {177 let caller: T::AccountId = account("caller", 0, SEED);178 let collection = create_fungible_collection::<T>(caller.clone())?;179 let data = CreateItemData::Fungible(CreateFungibleData {180 value: 1000,181 });182 }: create_item(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)183184 create_multiple_items_fungible {185 let b in 1..1000;186187 let caller: T::AccountId = account("caller", 0, SEED);188 let collection = create_fungible_collection::<T>(caller.clone())?;189 let data = (0..b).map(|_| default_fungible_data()).collect();190 }: create_multiple_items(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)191192 // refungible item193 create_item_refungible {194 let b in 0..(CUSTOM_DATA_LIMIT * 2);195196 let caller: T::AccountId = account("caller", 0, SEED);197 let collection = create_refungible_collection::<T>(caller.clone())?;198 let data = CreateItemData::ReFungible(CreateReFungibleData {199 const_data: create_data(b.min(CUSTOM_DATA_LIMIT) as usize).try_into().unwrap(),200 variable_data: create_data(b.saturating_sub(CUSTOM_DATA_LIMIT) as usize).try_into().unwrap(),201 pieces: 1000,202 });203 }: create_item(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)204205 create_multiple_items_refungible {206 // TODO: Take item data size into account. As create_item_nft bench shows, this parameter has no effect on execution time,207 // but it may if we increase CUSTOM_DATA_LIMIT208 let b in 1..1000;209210 let caller: T::AccountId = account("caller", 0, SEED);211 let collection = create_refungible_collection::<T>(caller.clone())?;212 let data = (0..b).map(|_| default_re_fungible_data()).collect();213 }: create_multiple_items(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)214215 burn_item_nft {216 let caller: T::AccountId = account("caller", 0, SEED);217 let collection = create_nft_collection::<T>(caller.clone())?;218 let data = default_nft_data();219 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(caller.clone()), data)?;220 }: burn_item(RawOrigin::Signed(caller.clone()), collection, 1, 1)221222 transfer_nft {30 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();223 let caller: T::AccountId = account("caller", 0, SEED);224 let collection = create_nft_collection::<T>(caller.clone())?;225 let recipient: T::AccountId = account("recipient", 0, SEED);226 let data = default_nft_data();227 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(caller.clone()), data)?;228 }: transfer(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), collection, 1, 1)229230 transfer_fungible {231 let caller: T::AccountId = account("caller", 0, SEED);232 let collection = create_fungible_collection::<T>(caller.clone())?;233 let recipient: T::AccountId = account("recipient", 0, SEED);234 let data = default_fungible_data();235 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(caller.clone()), data)?;236 }: transfer(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), collection, 1, 1)237238 transfer_refungible {31 let mode: CollectionMode = CollectionMode::NFT;239 let caller: T::AccountId = account("caller", 0, SEED);240 let collection = create_refungible_collection::<T>(caller.clone())?;32 let caller: T::AccountId = account("caller", 0, SEED);241 let recipient: T::AccountId = account("recipient", 0, SEED);242 let data = default_re_fungible_data();243 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(caller.clone()), data)?;244 }: transfer(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), collection, 1, 1)245246 set_transfers_enabled_flag {247 let caller: T::AccountId = account("caller", 0, SEED);248 let collection = create_nft_collection::<T>(caller.clone())?;33 }: _(RawOrigin::Signed(caller.clone()), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode)249 }: _(RawOrigin::Signed(caller.clone()), collection, false)34/*25035 verify {251 approve_nft {36 assert_eq!(Nft::<T>::collection_id(2).owner, caller);252 let caller: T::AccountId = account("caller", 0, SEED);37 }253 let collection = create_nft_collection::<T>(caller.clone())?;38 destroy_collection {254 let recipient: T::AccountId = account("recipient", 0, SEED);39 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();255 let data = default_nft_data();40 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();256 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;41 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();257 }: approve(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), collection, 1, 1)42 let mode: CollectionMode = CollectionMode::NFT;25843 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());259 // Nft44 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;260 transfer_from_nft {45 }: _(RawOrigin::Signed(caller.clone()), 2)261 let caller: T::AccountId = account("caller", 0, SEED);46262 let collection = create_nft_collection::<T>(caller.clone())?;47 add_to_white_list {263 let recipient: T::AccountId = account("recipient", 0, SEED);48 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();264 let data = default_nft_data();49 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();265 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;50 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();266 <Pallet<T>>::approve(RawOrigin::Signed(caller.clone()).into(), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)?;51 let mode: CollectionMode = CollectionMode::NFT;267 }: transfer_from(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)52 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());26853 let whitelist_account: T::AccountId = account("admin", 0, SEED);269 // Fungible54 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;270 transfer_from_fungible {55 }: add_to_white_list(RawOrigin::Signed(caller.clone()), 2, whitelist_account)271 let caller: T::AccountId = account("caller", 0, SEED);56272 let collection = create_fungible_collection::<T>(caller.clone())?;57 remove_from_white_list {273 let recipient: T::AccountId = account("recipient", 0, SEED);58 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();274 let data = default_fungible_data();59 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();275 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;60 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();276 <Pallet<T>>::approve(RawOrigin::Signed(caller.clone()).into(), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)?;61 let mode: CollectionMode = CollectionMode::NFT;277 }: transfer_from(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)62 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());27863 let whitelist_account: T::AccountId = account("admin", 0, SEED);279 // ReFungible64 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;280 transfer_from_refungible {65 Nft::<T>::add_to_white_list(RawOrigin::Signed(caller.clone()).into(), 2, whitelist_account.clone())?;281 let caller: T::AccountId = account("caller", 0, SEED);66 }: remove_from_white_list(RawOrigin::Signed(caller.clone()), 2, whitelist_account)282 let collection = create_refungible_collection::<T>(caller.clone())?;67283 let recipient: T::AccountId = account("recipient", 0, SEED);68 set_public_access_mode {284 let data = default_re_fungible_data();69 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();285 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;70 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();286 <Pallet<T>>::approve(RawOrigin::Signed(caller.clone()).into(), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)?;71 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();287 }: transfer_from(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)72 let mode: CollectionMode = CollectionMode::NFT;28873 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());289 set_offchain_schema {74 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;290 let b in 0..OFFCHAIN_SCHEMA_LIMIT;75 }: set_public_access_mode(RawOrigin::Signed(caller.clone()), 2, AccessMode::WhiteList)29176292 let caller: T::AccountId = account("caller", 0, SEED);77 set_mint_permission {293 let collection = create_nft_collection::<T>(caller.clone())?;78 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();294 let data = create_data(b as usize);79 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();295 }: set_offchain_schema(RawOrigin::Signed(caller.clone()), collection, data)80 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();29681 let mode: CollectionMode = CollectionMode::NFT;297 set_const_on_chain_schema {82 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());298 let b in 0..CONST_ON_CHAIN_SCHEMA_LIMIT;83 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;29984 }: set_mint_permission(RawOrigin::Signed(caller.clone()), 2, true)300 let caller: T::AccountId = account("caller", 0, SEED);85301 let collection = create_nft_collection::<T>(caller.clone())?;86 change_collection_owner {302 let data = create_data(b as usize);87 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();303 }: set_const_on_chain_schema(RawOrigin::Signed(caller.clone()), collection, data)88 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();30489 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();305 set_variable_on_chain_schema {90 let mode: CollectionMode = CollectionMode::NFT;306 let b in 0..VARIABLE_ON_CHAIN_SCHEMA_LIMIT;91 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());30792 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;308 let caller: T::AccountId = account("caller", 0, SEED);93 let new_owner: T::AccountId = account("admin", 0, SEED);309 let collection = create_nft_collection::<T>(caller.clone())?;94 }: change_collection_owner(RawOrigin::Signed(caller.clone()), 2, new_owner)310 let data = create_data(b as usize);95311 }: set_variable_on_chain_schema(RawOrigin::Signed(caller.clone()), 2, data)96 add_collection_admin {31297 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();313 set_variable_meta_data_nft {98 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();314 let b in 0..CUSTOM_DATA_LIMIT;99 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();315100 let mode: CollectionMode = CollectionMode::NFT;316 let caller: T::AccountId = account("caller", 0, SEED);101 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());317 let collection = create_nft_collection::<T>(caller.clone())?;102 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;318 let data = default_nft_data();103 let new_admin: T::AccountId = account("admin", 0, SEED);319 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;104 }: add_collection_admin(RawOrigin::Signed(caller.clone()), 2, new_admin)320 let data = create_data(b as usize);105321 }: set_variable_meta_data(RawOrigin::Signed(caller.clone()), collection, 1, data)106 remove_collection_admin {322107 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();323 set_schema_version {108 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();324 let caller: T::AccountId = account("caller", 0, SEED);109 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();325 let collection = create_nft_collection::<T>(caller.clone())?;110 let mode: CollectionMode = CollectionMode::NFT;326 }: set_schema_version(RawOrigin::Signed(caller.clone()), 2, SchemaVersion::Unique)111 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());327112 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;328 set_collection_limits{113 let new_admin: T::AccountId = account("admin", 0, SEED);329 let caller: T::AccountId = account("caller", 0, SEED);114 Nft::<T>::add_collection_admin(RawOrigin::Signed(caller.clone()).into(), 2, new_admin.clone())?;330 let collection = create_nft_collection::<T>(caller.clone())?;115 }: remove_collection_admin(RawOrigin::Signed(caller.clone()), 2, new_admin)331116332 let cl = CollectionLimits {117 set_collection_sponsor {333 account_token_ownership_limit: 0,118 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();334 sponsored_data_size: 0,119 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();335 token_limit: 1,120 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();336 sponsor_transfer_timeout: 0,121 let mode: CollectionMode = CollectionMode::NFT;337 owner_can_destroy: true,122 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());338 owner_can_transfer: true,123 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;339 sponsored_data_rate_limit: None,124 }: set_collection_sponsor(RawOrigin::Signed(caller.clone()), 2, caller.clone())340 };125341 }: set_collection_limits(RawOrigin::Signed(caller.clone()), 2, cl)126 confirm_sponsorship {127 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();128 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();129 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();130 let mode: CollectionMode = CollectionMode::NFT;131 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());132 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;133 Nft::<T>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;134 }: confirm_sponsorship(RawOrigin::Signed(caller.clone()), 2)135136 remove_collection_sponsor {137 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();138 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();139 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();140 let mode: CollectionMode = CollectionMode::NFT;141 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());142 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;143 Nft::<T>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;144 Nft::<T>::confirm_sponsorship(RawOrigin::Signed(caller.clone()).into(), 2)?;145 }: remove_collection_sponsor(RawOrigin::Signed(caller.clone()), 2)146147 // nft item148 create_item_nft {149 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();150 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();151 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();152 let mode: CollectionMode = CollectionMode::NFT;153 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());154 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;155 let data = default_nft_data();156157 }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)158159 #[extra]160 create_item_nft_large {161 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();162 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();163 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();164 let mode: CollectionMode = CollectionMode::NFT;165 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());166 let mut nft_data = CreateNftData {167 const_data: vec![],168 variable_data: vec![]169 };170 for i in 0..1998 {171 nft_data.const_data.push(10);172 nft_data.variable_data.push(10);173 }174 let data = CreateItemData::NFT(nft_data);175 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;176177 }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)178179 // fungible item180 create_item_fungible {181 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();182 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();183 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();184 let mode: CollectionMode = CollectionMode::Fungible(3);185 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());186 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;187 let data = default_fungible_data();188189 }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)190191 // refungible item192 create_item_refungible {193 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();194 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();195 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();196 let mode: CollectionMode = CollectionMode::ReFungible(3);197 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());198 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;199 let data = default_re_fungible_data();200201 }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)202203 burn_item {204 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();205 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();206 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();207 let mode: CollectionMode = CollectionMode::NFT;208 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());209 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;210 let data = default_nft_data();211 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;212213 }: burn_item(RawOrigin::Signed(caller.clone()), 2, 1)214215 transfer_nft {216 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();217 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();218 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();219 let mode: CollectionMode = CollectionMode::NFT;220 let recipient: T::AccountId = account("recipient", 0, SEED);221 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());222 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;223 let data = default_nft_data();224 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;225226 }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)227228 transfer_fungible {229 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();230 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();231 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();232 let mode: CollectionMode = CollectionMode::Fungible(3);233 let recipient: T::AccountId = account("recipient", 0, SEED);234 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());235 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;236 let data = default_fungible_data();237 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;238239 }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)240241 transfer_refungible {242 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();243 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();244 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();245 let mode: CollectionMode = CollectionMode::ReFungible(3);246 let recipient: T::AccountId = account("recipient", 0, SEED);247 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());248 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;249 let data = default_re_fungible_data();250 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;251252 }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)253254 approve {255 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();256 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();257 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();258 let mode: CollectionMode = CollectionMode::ReFungible(3);259 let recipient: T::AccountId = account("recipient", 0, SEED);260 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());261 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;262 let data = default_re_fungible_data();263 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;264265 }: approve(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1)266267 // Nft268 transfer_from_nft {269 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();270 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();271 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();272 let mode: CollectionMode = CollectionMode::NFT;273 let recipient: T::AccountId = account("recipient", 0, SEED);274 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());275 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;276 let data = default_nft_data();277 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;278 Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;279280 }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)281282 // Fungible283 transfer_from_fungible {284 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();285 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();286 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();287 let mode: CollectionMode = CollectionMode::Fungible(3);288 let recipient: T::AccountId = account("recipient", 0, SEED);289 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());290 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;291 let data = default_fungible_data();292 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;293 Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;294295 }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)296297 // ReFungible298 transfer_from_refungible {299 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();300 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();301 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();302 let mode: CollectionMode = CollectionMode::ReFungible(3);303 let recipient: T::AccountId = account("recipient", 0, SEED);304 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());305 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;306 let data = default_re_fungible_data();307 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;308 Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;309310 }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)311312 enable_contract_sponsoring {313 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());314315 }: enable_contract_sponsoring(RawOrigin::Signed(caller.clone()), caller.clone(), true)316317 set_offchain_schema {318 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();319 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();320 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();321 let mode: CollectionMode = CollectionMode::ReFungible(3);322 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());323 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;324325 }: set_offchain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())326327 set_const_on_chain_schema {328 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();329 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();330 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();331 let mode: CollectionMode = CollectionMode::ReFungible(3);332 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());333 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;334 }: set_const_on_chain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())335336 set_variable_on_chain_schema {337 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();338 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();339 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();340 let mode: CollectionMode = CollectionMode::ReFungible(3);341 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());342 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;343 }: set_variable_on_chain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())344345 set_variable_meta_data {346 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();347 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();348 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();349 let mode: CollectionMode = CollectionMode::NFT;350 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());351 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;352 let data = default_nft_data();353 Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;354355 }: set_variable_meta_data(RawOrigin::Signed(caller.clone()), 2, 1, [1, 2, 3].to_vec())356357 set_schema_version {358 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();359 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();360 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();361 let mode: CollectionMode = CollectionMode::NFT;362 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());363 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;364 }: set_schema_version(RawOrigin::Signed(caller.clone()), 2, SchemaVersion::Unique)365366 set_chain_limits {367 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());368 let limits = ChainLimits {369 collection_numbers_limit: 0,370 account_token_ownership_limit: 0,371 collections_admins_limit: 0,372 custom_data_limit: 0,373 nft_sponsor_transfer_timeout: 0,374 fungible_sponsor_transfer_timeout: 0,375 refungible_sponsor_transfer_timeout: 0376 };377 }: set_chain_limits(RawOrigin::Signed(caller.clone()), limits)378379 set_contract_sponsoring_rate_limit {380 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();381 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();382 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();383 let mode: CollectionMode = CollectionMode::NFT;384 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());385 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;386 let block_number: T::BlockNumber = 0.into();387 }: set_contract_sponsoring_rate_limit(RawOrigin::Signed(caller.clone()), caller.clone(), block_number)388389 set_collection_limits{390 let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();391 let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();392 let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();393 let mode: CollectionMode = CollectionMode::NFT;394 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());395 Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;396397 let cl = CollectionLimits {398 account_token_ownership_limit: 0,399 sponsored_data_size: 0,400 token_limit: 0,401 sponsor_transfer_timeout: 0402 };403404 }: set_collection_limits(RawOrigin::Signed(caller.clone()), 2, cl)405406 add_to_contract_white_list{407 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());408 }: add_to_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), caller.clone())409410 remove_from_contract_white_list{411 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());412 Nft::<T>::add_to_contract_white_list(RawOrigin::Signed(caller.clone()).into(), caller.clone(), caller.clone())?;413 }: remove_from_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), caller.clone())414415 toggle_contract_white_list{416 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());417 }: toggle_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), true)418*/419}342}420343pallets/nft/src/default_weights.rsdiffbeforeafterbothno changes
pallets/nft/src/eth/erc.rsdiffbeforeafterboth1use core::char::{decode_utf16, REPLACEMENT_CHARACTER};1use core::char::{decode_utf16, REPLACEMENT_CHARACTER};2use evm_coder::{ToLog, execution::Result, solidity, solidity_interface, types::*};2use evm_coder::{ToLog, execution::Result, generate_stubgen, solidity, solidity_interface, types::*};3use nft_data_structs::{CreateItemData, CreateNftData};3use core::convert::TryInto;4use core::convert::TryInto;4use alloc::format;5use crate::{Allowances, Module, Balance, CollectionHandle, CollectionMode, Config, NftItemList};5use crate::{6 Allowances, Module, Balance, CollectionHandle, CollectionMode, Config, NftItemList,7 ItemListIndex,8};6use frame_support::storage::StorageDoubleMap;9use frame_support::storage::{StorageMap, StorageDoubleMap};7use pallet_evm::AddressMapping;10use pallet_evm::AddressMapping;11use pallet_evm_coder_substrate::dispatch_to_evm;8use super::account::CrossAccountId;12use super::account::CrossAccountId;9use sp_std::vec::Vec;13use sp_std::{vec, vec::Vec};101411#[solidity_interface(name = "ERC165")]15#[solidity_interface(name = "ERC165")]12impl<T: Config> CollectionHandle<T> {16impl<T: Config> CollectionHandle<T> {424643#[solidity_interface(name = "ERC721Metadata", inline_is(InlineNameSymbol))]47#[solidity_interface(name = "ERC721Metadata", inline_is(InlineNameSymbol))]44impl<T: Config> CollectionHandle<T> {48impl<T: Config> CollectionHandle<T> {49 #[solidity(rename_selector = "tokenURI")]45 fn token_uri(&self, token_id: uint256) -> Result<string> {50 fn token_uri(&self, token_id: uint256) -> Result<string> {46 // TODO: We should standartize url prefix, maybe via offchain schema?51 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;47 Ok(format!("unique.network/{}/{}", self.id, token_id))52 Ok(string::from_utf8_lossy(53 &<NftItemList<T>>::get(self.id, token_id)54 .ok_or("token not found")?55 .const_data,56 )57 .into())48 }58 }49}59}5060178 }188 }179}189}190191#[solidity_interface(name = "ERC721Burnable")]192impl<T: Config> CollectionHandle<T> {193 fn burn(&mut self, caller: caller, token_id: uint256) -> Result<void> {194 let caller = T::CrossAccountId::from_eth(caller);195 let token_id = token_id.try_into().map_err(|_| "amount overflow")?;196197 <Module<T>>::burn_item_internal(&caller, &self, token_id, 1).map_err(|_| "burn error")?;198 Ok(())199 }200}201202#[derive(ToLog)]203pub enum ERC721MintableEvents {204 #[allow(dead_code)]205 MintingFinished {},206}207208#[solidity_interface(name = "ERC721Mintable", events(ERC721MintableEvents))]209impl<T: Config> CollectionHandle<T> {210 fn minting_finished(&self) -> Result<bool> {211 Ok(false)212 }213214 fn mint(&mut self, caller: caller, to: address, token_id: uint256) -> Result<bool> {215 let caller = T::CrossAccountId::from_eth(caller);216 let to = T::CrossAccountId::from_eth(to);217 let token_id: u32 = token_id.try_into().map_err(|_| "amount overflow")?;218 if <ItemListIndex>::get(self.id)219 .checked_add(1)220 .ok_or("item id overflow")?221 != token_id222 {223 return Err("item id should be next".into());224 }225226 <Module<T>>::create_item_internal(227 &caller,228 &self,229 &to,230 CreateItemData::NFT(CreateNftData {231 const_data: vec![].try_into().unwrap(),232 variable_data: vec![].try_into().unwrap(),233 }),234 )235 .map_err(|_| "mint error")?;236 Ok(true)237 }238239 #[solidity(rename_selector = "mintWithTokenURI")]240 fn mint_with_token_uri(241 &mut self,242 caller: caller,243 to: address,244 token_id: uint256,245 token_uri: string,246 ) -> Result<bool> {247 let caller = T::CrossAccountId::from_eth(caller);248 let to = T::CrossAccountId::from_eth(to);249 let token_id: u32 = token_id.try_into().map_err(|_| "amount overflow")?;250 if <ItemListIndex>::get(self.id)251 .checked_add(1)252 .ok_or("item id overflow")?253 != token_id254 {255 return Err("item id should be next".into());256 }257258 <Module<T>>::create_item_internal(259 &caller,260 &self,261 &to,262 CreateItemData::NFT(CreateNftData {263 const_data: Vec::<u8>::from(token_uri)264 .try_into()265 .map_err(|_| "token uri is too long")?,266 variable_data: vec![].try_into().unwrap(),267 }),268 )269 .map_err(|_| "mint error")?;270 Ok(true)271 }272273 fn finish_minting(&mut self, _caller: caller) -> Result<bool> {274 Err("not implementable".into())275 }276}180277181#[solidity_interface(name = "ERC721UniqueExtensions")]278#[solidity_interface(name = "ERC721UniqueExtensions")]182impl<T: Config> CollectionHandle<T> {279impl<T: Config> CollectionHandle<T> {197 Ok(())294 Ok(())198 }295 }296297 fn next_token_id(&self) -> Result<uint256> {298 Ok(ItemListIndex::get(self.id)299 .checked_add(1)300 .ok_or("item id overflow")?301 .into())302 }303304 fn set_variable_metadata(305 &mut self,306 caller: caller,307 token_id: uint256,308 data: bytes,309 ) -> Result<void> {310 let caller = T::CrossAccountId::from_eth(caller);311 let token_id = token_id.try_into().map_err(|_| "token id overflow")?;312313 <Module<T>>::set_variable_meta_data_internal(&caller, self, token_id, data)314 .map_err(dispatch_to_evm::<T>)?;315 Ok(())316 }317318 fn get_variable_metadata(&self, token_id: uint256) -> Result<bytes> {319 let token_id = token_id.try_into().map_err(|_| "token id overflow")?;320321 <Module<T>>::get_variable_metadata(self, token_id).map_err(dispatch_to_evm::<T>)322 }323324 fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {325 let caller = T::CrossAccountId::from_eth(caller);326 let to = T::CrossAccountId::from_eth(to);327 let mut expected_index = <ItemListIndex>::get(self.id)328 .checked_add(1)329 .ok_or("item id overflow")?;330331 let total_tokens = token_ids.len();332 for id in token_ids.into_iter() {333 let id: u32 = id.try_into().map_err(|_| "token id overflow")?;334 if id != expected_index {335 return Err("item id should be next".into());336 }337 expected_index = expected_index.checked_add(1).ok_or("item id overflow")?;338 }339340 let data = (0..total_tokens)341 .map(|_| {342 CreateItemData::NFT(CreateNftData {343 const_data: vec![].try_into().unwrap(),344 variable_data: vec![].try_into().unwrap(),345 })346 })347 .collect();348349 <Module<T>>::create_multiple_items_internal(&caller, self, &to, data)350 .map_err(dispatch_to_evm::<T>)?;351 Ok(true)352 }353354 #[solidity(rename_selector = "mintBulkWithTokenURI")]355 fn mint_bulk_with_token_uri(356 &mut self,357 caller: caller,358 to: address,359 tokens: Vec<(uint256, string)>,360 ) -> Result<bool> {361 let caller = T::CrossAccountId::from_eth(caller);362 let to = T::CrossAccountId::from_eth(to);363 let mut expected_index = <ItemListIndex>::get(self.id)364 .checked_add(1)365 .ok_or("item id overflow")?;366367 let mut data = Vec::with_capacity(tokens.len());368 for (id, token_uri) in tokens {369 let id: u32 = id.try_into().map_err(|_| "token id overflow")?;370 if id != expected_index {371 panic!("item id should be next ({}) but got {}", expected_index, id);372 }373 expected_index = expected_index.checked_add(1).ok_or("item id overflow")?;374375 data.push(CreateItemData::NFT(CreateNftData {376 const_data: Vec::<u8>::from(token_uri)377 .try_into()378 .map_err(|_| "token uri is too long")?,379 variable_data: vec![].try_into().unwrap(),380 }));381 }382383 <Module<T>>::create_multiple_items_internal(&caller, self, &to, data)384 .map_err(dispatch_to_evm::<T>)?;385 Ok(true)386 }199}387}200388201#[solidity_interface(389#[solidity_interface(205 ERC721,393 ERC721,206 ERC721Metadata,394 ERC721Metadata,207 ERC721Enumerable,395 ERC721Enumerable,208 ERC721UniqueExtensions396 ERC721UniqueExtensions,397 ERC721Mintable,398 ERC721Burnable,209 )399 )210)]400)]211impl<T: Config> CollectionHandle<T> {}401impl<T: Config> CollectionHandle<T> {}298#[solidity_interface(name = "UniqueFungible", is(ERC165, ERC20))]488#[solidity_interface(name = "UniqueFungible", is(ERC165, ERC20))]299impl<T: Config> CollectionHandle<T> {}489impl<T: Config> CollectionHandle<T> {}490491// Not a tests, but code generators492generate_stubgen!(nft_impl, UniqueNFTCall, true);493generate_stubgen!(nft_iface, UniqueNFTCall, false);494495generate_stubgen!(fungible_impl, UniqueFungibleCall, true);496generate_stubgen!(fungible_iface, UniqueFungibleCall, false);300497pallets/nft/src/eth/mod.rsdiffbeforeafterboth96 .and_then(<CollectionById<T>>::get)96 .and_then(<CollectionById<T>>::get)97 .map(|collection| {97 .map(|collection| {98 match collection.mode {98 match collection.mode {99 CollectionMode::NFT => include_bytes!("stubs/ERC721.bin") as &[u8],99 CollectionMode::NFT => include_bytes!("stubs/UniqueNFT.raw") as &[u8],100 CollectionMode::Fungible(_) => include_bytes!("stubs/ERC20.bin") as &[u8],100 CollectionMode::Fungible(_) => {101 include_bytes!("stubs/UniqueFungible.raw") as &[u8]102 }101 CollectionMode::ReFungible => include_bytes!("stubs/ERC1633.bin") as &[u8],103 CollectionMode::ReFungible => {104 include_bytes!("stubs/UniqueRefungible.raw") as &[u8]105 }102 CollectionMode::Invalid => include_bytes!("stubs/Invalid.bin") as &[u8],106 CollectionMode::Invalid => include_bytes!("stubs/UniqueInvalid.raw") as &[u8],103 }107 }104 .to_owned()108 .to_owned()105 })109 })pallets/nft/src/eth/sponsoring.rsdiffbeforeafterboth1//! Implements EVM sponsoring logic via OnChargeEVMTransaction1//! Implements EVM sponsoring logic via OnChargeEVMTransaction223use crate::{3use crate::{4 ChainLimit, Collection, CollectionById, Config, FungibleTransferBasket, NftTransferBasket,4 Collection, CollectionById, Config, FungibleTransferBasket, NftTransferBasket,5 eth::{account::EvmBackwardsAddressMapping, map_eth_to_id},5 eth::{account::EvmBackwardsAddressMapping, map_eth_to_id},6};6};7use evm_coder::{Call, abi::AbiReader};7use evm_coder::{Call, abi::AbiReader};8use frame_support::{8use frame_support::{9 storage::{StorageMap, StorageDoubleMap, StorageValue},9 storage::{StorageMap, StorageDoubleMap},10};10};11use sp_core::H160;11use sp_core::H160;12use sp_std::prelude::*;12use sp_std::prelude::*;17};17};18use core::convert::TryInto;18use core::convert::TryInto;19use core::marker::PhantomData;19use core::marker::PhantomData;20use nft_data_structs::{NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT};202121struct AnyError;22struct AnyError;222343 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {44 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {44 collection_limits.sponsor_transfer_timeout45 collection_limits.sponsor_transfer_timeout45 } else {46 } else {46 ChainLimit::get().nft_sponsor_transfer_timeout47 NFT_SPONSOR_TRANSFER_TIMEOUT47 };48 };484949 let mut sponsor = true;50 let mut sponsor = true;74 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {75 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {75 collection_limits.sponsor_transfer_timeout76 collection_limits.sponsor_transfer_timeout76 } else {77 } else {77 ChainLimit::get().fungible_sponsor_transfer_timeout78 FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT78 };79 };798080 let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;81 let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;pallets/nft/src/eth/stubs/ERC1633.bindiffbeforeafterbothno changes
pallets/nft/src/eth/stubs/ERC20.bindiffbeforeafterbothbinary blob — no preview
pallets/nft/src/eth/stubs/ERC20.soldiffbeforeafterbothno changes
pallets/nft/src/eth/stubs/ERC721.bindiffbeforeafterbothno changes
pallets/nft/src/eth/stubs/ERC721.soldiffbeforeafterbothno changes
pallets/nft/src/eth/stubs/Invalid.bindiffbeforeafterbothno changes
pallets/nft/src/eth/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/nft/src/eth/stubs/UniqueFungible.soldiffbeforeafterbothno changes
pallets/nft/src/eth/stubs/UniqueInvalid.rawdiffbeforeafterbothno changes
pallets/nft/src/eth/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nft/src/eth/stubs/UniqueNFT.soldiffbeforeafterbothno changes
pallets/nft/src/eth/stubs/UniqueRefungible.rawdiffbeforeafterbothno changes
pallets/nft/src/lib.rsdiffbeforeafterboth31 StorageValue, transactional,31 StorageValue, transactional,32};32};333334use frame_system::{self as system, ensure_signed, ensure_root};34use frame_system::{self as system, ensure_signed};35use sp_core::H160;35use sp_core::H160;36use sp_std::vec;36use sp_std::vec;37use sp_runtime::sp_std::prelude::Vec;37use sp_runtime::{DispatchError, sp_std::prelude::Vec};38use core::ops::{Deref, DerefMut};38use core::ops::{Deref, DerefMut};39use nft_data_structs::{39use nft_data_structs::{40 MAX_DECIMAL_POINTS, MAX_SPONSOR_TIMEOUT, MAX_TOKEN_OWNERSHIP, MAX_REFUNGIBLE_PIECES,40 MAX_DECIMAL_POINTS, MAX_SPONSOR_TIMEOUT, MAX_TOKEN_OWNERSHIP, MAX_REFUNGIBLE_PIECES,41 CUSTOM_DATA_LIMIT, COLLECTION_NUMBER_LIMIT, ACCOUNT_TOKEN_OWNERSHIP_LIMIT,42 VARIABLE_ON_CHAIN_SCHEMA_LIMIT, CONST_ON_CHAIN_SCHEMA_LIMIT, COLLECTION_ADMINS_LIMIT,43 OFFCHAIN_SCHEMA_LIMIT, MAX_TOKEN_PREFIX_LENGTH, MAX_COLLECTION_NAME_LENGTH,41 AccessMode, ChainLimits, Collection, CreateItemData, CollectionLimits, CollectionId,44 MAX_COLLECTION_DESCRIPTION_LENGTH, AccessMode, Collection, CreateItemData, CollectionLimits,42 CollectionMode, TokenId, SchemaVersion, SponsorshipState, Ownership, NftItemType,45 CollectionId, CollectionMode, TokenId, SchemaVersion, SponsorshipState, Ownership, NftItemType,43 FungibleItemType, ReFungibleItemType,46 FungibleItemType, ReFungibleItemType,44};47};49#[cfg(test)]52#[cfg(test)]50mod tests;53mod tests;515452mod default_weights;53mod eth;55mod eth;54mod sponsorship;56mod sponsorship;55pub use sponsorship::NftSponsorshipHandler;57pub use sponsorship::NftSponsorshipHandler;62#[cfg(feature = "runtime-benchmarks")]64#[cfg(feature = "runtime-benchmarks")]63mod benchmarking;65mod benchmarking;6465pub trait WeightInfo {66pub mod weights;66 fn create_collection() -> Weight;67 fn destroy_collection() -> Weight;68 fn add_to_white_list() -> Weight;69 fn remove_from_white_list() -> Weight;70 fn set_public_access_mode() -> Weight;71 fn set_mint_permission() -> Weight;72 fn change_collection_owner() -> Weight;73 fn add_collection_admin() -> Weight;74 fn remove_collection_admin() -> Weight;75 fn set_collection_sponsor() -> Weight;76 fn confirm_sponsorship() -> Weight;77 fn remove_collection_sponsor() -> Weight;78 fn create_item(s: usize) -> Weight;67use weights::WeightInfo;79 fn burn_item() -> Weight;80 fn transfer() -> Weight;81 fn approve() -> Weight;82 fn transfer_from() -> Weight;83 fn set_offchain_schema() -> Weight;84 fn set_const_on_chain_schema() -> Weight;85 fn set_variable_on_chain_schema() -> Weight;86 fn set_variable_meta_data() -> Weight;87 fn enable_contract_sponsoring() -> Weight;88 fn set_schema_version() -> Weight;89 fn set_chain_limits() -> Weight;90 fn set_contract_sponsoring_rate_limit() -> Weight;91 fn set_variable_meta_data_sponsoring_rate_limit() -> Weight;92 fn toggle_contract_white_list() -> Weight;93 fn add_to_contract_white_list() -> Weight;94 fn remove_from_contract_white_list() -> Weight;95 fn set_collection_limits() -> Weight;96}976898decl_error! {69decl_error! {99 /// Error for non-fungible-token module.70 /// Error for non-fungible-token module.176 OutOfGas,147 OutOfGas,177 /// Collection settings not allowing items transferring148 /// Collection settings not allowing items transferring178 TransferNotAllowed,149 TransferNotAllowed,150 /// Can't transfer tokens to ethereum zero address151 AddressIsZero,179 }152 }180}153}181154202 pub fn log(&self, log: impl evm_coder::ToLog) -> DispatchResult {175 pub fn log(&self, log: impl evm_coder::ToLog) -> DispatchResult {203 self.recorder.log_sub(log)176 self.recorder.log_sub(log)204 }177 }178 #[allow(dead_code)]205 fn consume_gas(&self, gas: u64) -> DispatchResult {179 fn consume_gas(&self, gas: u64) -> DispatchResult {206 self.recorder.consume_gas_sub(gas)180 self.recorder.consume_gas_sub(gas)207 }181 }182 fn consume_sload(&self) -> DispatchResult {183 self.recorder.consume_sload_sub()184 }185 fn consume_sstore(&self) -> DispatchResult {186 self.recorder.consume_sstore_sub()187 }208 pub fn submit_logs(self) -> DispatchResult {188 pub fn submit_logs(self) -> DispatchResult {209 self.recorder.submit_logs()189 self.recorder.submit_logs()210 }190 }245 type TreasuryAccountId: Get<Self::AccountId>;225 type TreasuryAccountId: Get<Self::AccountId>;246}226}227228type SelfWeightOf<T> = <T as Config>::WeightInfo;229230trait WeightInfoHelpers: WeightInfo {231 fn transfer() -> Weight {232 Self::transfer_nft()233 .max(Self::transfer_fungible())234 .max(Self::transfer_refungible())235 }236 fn transfer_from() -> Weight {237 Self::transfer_from_nft()238 .max(Self::transfer_from_fungible())239 .max(Self::transfer_from_refungible())240 }241 fn approve() -> Weight {242 // TODO: refungible, fungible243 Self::approve_nft()244 }245 fn set_variable_meta_data(data: u32) -> Weight {246 // TODO: refungible247 Self::set_variable_meta_data_nft(data)248 }249 fn create_item(data: u32) -> Weight {250 Self::create_item_nft(data)251 .max(Self::create_item_fungible())252 .max(Self::create_item_refungible(data))253 }254 fn create_multiple_items(amount: u32) -> Weight {255 Self::create_multiple_items_nft(amount)256 .max(Self::create_multiple_items_fungible(amount))257 .max(Self::create_multiple_items_refungible(amount))258 }259 fn burn_item() -> Weight {260 // TODO: refungible, fungible261 Self::burn_item_nft()262 }263}264impl<T: WeightInfo> WeightInfoHelpers for T {}247265248// # Used definitions266// # Used definitions249//267//280 ItemListIndex: map hasher(blake2_128_concat) CollectionId => TokenId;298 ItemListIndex: map hasher(blake2_128_concat) CollectionId => TokenId;281 //#endregion299 //#endregion282283 //#region Chain limits struct284 pub ChainLimit get(fn chain_limit) config(): ChainLimits;285 //#endregion286300287 //#region Bound counters301 //#region Bound counters288 /// Amount of collections destroyed, used for total amount tracking with302 /// Amount of collections destroyed, used for total amount tracking with435 origin: T::Origin449 origin: T::Origin436 {450 {437 fn deposit_event() = default;451 fn deposit_event() = default;452 const CollectionAdminsLimit: u64 = COLLECTION_ADMINS_LIMIT;438 type Error = Error<T>;453 type Error = Error<T>;439454440 fn on_initialize(_now: T::BlockNumber) -> Weight {455 fn on_initialize(_now: T::BlockNumber) -> Weight {457 ///472 ///458 /// * mode: [CollectionMode] collection type and type dependent data.473 /// * mode: [CollectionMode] collection type and type dependent data.459 // returns collection ID474 // returns collection ID460 #[weight = <T as Config>::WeightInfo::create_collection()]475 #[weight = <SelfWeightOf<T>>::create_collection()]461 #[transactional]476 #[transactional]462 pub fn create_collection(origin,477 pub fn create_collection(origin,463 collection_name: Vec<u16>,478 collection_name: Vec<u16>,486 _ => 0501 _ => 0487 };502 };488489 let chain_limit = ChainLimit::get();490503491 let created_count = CreatedCollectionCount::get();504 let created_count = CreatedCollectionCount::get();492 let destroyed_count = DestroyedCollectionCount::get();505 let destroyed_count = DestroyedCollectionCount::get();493506494 // bound Total number of collections507 // bound Total number of collections495 ensure!(created_count - destroyed_count < chain_limit.collection_numbers_limit, Error::<T>::TotalCollectionsLimitExceeded);508 ensure!(created_count - destroyed_count < COLLECTION_NUMBER_LIMIT, Error::<T>::TotalCollectionsLimitExceeded);496509497 // check params510 // check params498 ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);511 ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);499 ensure!(collection_name.len() <= 64, Error::<T>::CollectionNameLimitExceeded);512 ensure!(collection_name.len() <= MAX_COLLECTION_NAME_LENGTH, Error::<T>::CollectionNameLimitExceeded);500 ensure!(collection_description.len() <= 256, Error::<T>::CollectionDescriptionLimitExceeded);513 ensure!(collection_description.len() <= MAX_COLLECTION_DESCRIPTION_LENGTH, Error::<T>::CollectionDescriptionLimitExceeded);501 ensure!(token_prefix.len() <= 16, Error::<T>::CollectionTokenPrefixLimitExceeded);514 ensure!(token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH, Error::<T>::CollectionTokenPrefixLimitExceeded);502515503 // Generate next collection ID516 // Generate next collection ID504 let next_id = created_count517 let next_id = created_count508 CreatedCollectionCount::put(next_id);521 CreatedCollectionCount::put(next_id);509522510 let limits = CollectionLimits {523 let limits = CollectionLimits {511 sponsored_data_size: chain_limit.custom_data_limit,524 sponsored_data_size: CUSTOM_DATA_LIMIT,512 ..Default::default()525 ..Default::default()513 };526 };514527549 /// # Arguments562 /// # Arguments550 ///563 ///551 /// * collection_id: collection to destroy.564 /// * collection_id: collection to destroy.552 #[weight = <T as Config>::WeightInfo::destroy_collection()]565 #[weight = <SelfWeightOf<T>>::destroy_collection()]553 #[transactional]566 #[transactional]554 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {567 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {555568597 /// * collection_id.610 /// * collection_id.598 ///611 ///599 /// * address.612 /// * address.600 #[weight = <T as Config>::WeightInfo::add_to_white_list()]613 #[weight = <SelfWeightOf<T>>::add_to_white_list()]601 #[transactional]614 #[transactional]602 pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{615 pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{603616626 /// * collection_id.639 /// * collection_id.627 ///640 ///628 /// * address.641 /// * address.629 #[weight = <T as Config>::WeightInfo::remove_from_white_list()]642 #[weight = <SelfWeightOf<T>>::remove_from_white_list()]630 #[transactional]643 #[transactional]631 pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{644 pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{632645654 /// * collection_id.667 /// * collection_id.655 ///668 ///656 /// * mode: [AccessMode]669 /// * mode: [AccessMode]657 #[weight = <T as Config>::WeightInfo::set_public_access_mode()]670 #[weight = <SelfWeightOf<T>>::set_public_access_mode()]658 #[transactional]671 #[transactional]659 pub fn set_public_access_mode(origin, collection_id: CollectionId, mode: AccessMode) -> DispatchResult672 pub fn set_public_access_mode(origin, collection_id: CollectionId, mode: AccessMode) -> DispatchResult660 {673 {679 /// * collection_id.692 /// * collection_id.680 ///693 ///681 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.694 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.682 #[weight = <T as Config>::WeightInfo::set_mint_permission()]695 #[weight = <SelfWeightOf<T>>::set_mint_permission()]683 #[transactional]696 #[transactional]684 pub fn set_mint_permission(origin, collection_id: CollectionId, mint_permission: bool) -> DispatchResult697 pub fn set_mint_permission(origin, collection_id: CollectionId, mint_permission: bool) -> DispatchResult685 {698 {702 /// * collection_id.715 /// * collection_id.703 ///716 ///704 /// * new_owner.717 /// * new_owner.705 #[weight = <T as Config>::WeightInfo::change_collection_owner()]718 #[weight = <SelfWeightOf<T>>::change_collection_owner()]706 #[transactional]719 #[transactional]707 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {720 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {708721726 /// * collection_id: ID of the Collection to add admin for.739 /// * collection_id: ID of the Collection to add admin for.727 ///740 ///728 /// * new_admin_id: Address of new admin to add.741 /// * new_admin_id: Address of new admin to add.729 #[weight = <T as Config>::WeightInfo::add_collection_admin()]742 #[weight = <SelfWeightOf<T>>::add_collection_admin()]730 #[transactional]743 #[transactional]731 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::CrossAccountId) -> DispatchResult {744 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::CrossAccountId) -> DispatchResult {732 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);745 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);737 match admin_arr.binary_search(&new_admin_id) {750 match admin_arr.binary_search(&new_admin_id) {738 Ok(_) => {},751 Ok(_) => {},739 Err(idx) => {752 Err(idx) => {740 let limits = ChainLimit::get();741 ensure!(admin_arr.len() < limits.collections_admins_limit as usize, Error::<T>::CollectionAdminsLimitExceeded);753 ensure!(admin_arr.len() < COLLECTION_ADMINS_LIMIT as usize, Error::<T>::CollectionAdminsLimitExceeded);742 admin_arr.insert(idx, new_admin_id);754 admin_arr.insert(idx, new_admin_id);743 <AdminList<T>>::insert(collection_id, admin_arr);755 <AdminList<T>>::insert(collection_id, admin_arr);744 }756 }758 /// * collection_id: ID of the Collection to remove admin for.770 /// * collection_id: ID of the Collection to remove admin for.759 ///771 ///760 /// * account_id: Address of admin to remove.772 /// * account_id: Address of admin to remove.761 #[weight = <T as Config>::WeightInfo::remove_collection_admin()]773 #[weight = <SelfWeightOf<T>>::remove_collection_admin()]762 #[transactional]774 #[transactional]763 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {775 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {764 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);776 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);782 /// * collection_id.794 /// * collection_id.783 ///795 ///784 /// * new_sponsor.796 /// * new_sponsor.785 #[weight = <T as Config>::WeightInfo::set_collection_sponsor()]797 #[weight = <SelfWeightOf<T>>::set_collection_sponsor()]786 #[transactional]798 #[transactional]787 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {799 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {788 let sender = ensure_signed(origin)?;800 let sender = ensure_signed(origin)?;800 /// # Arguments812 /// # Arguments801 ///813 ///802 /// * collection_id.814 /// * collection_id.803 #[weight = <T as Config>::WeightInfo::confirm_sponsorship()]815 #[weight = <SelfWeightOf<T>>::confirm_sponsorship()]804 #[transactional]816 #[transactional]805 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {817 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {806 let sender = ensure_signed(origin)?;818 let sender = ensure_signed(origin)?;824 /// # Arguments836 /// # Arguments825 ///837 ///826 /// * collection_id.838 /// * collection_id.827 #[weight = <T as Config>::WeightInfo::remove_collection_sponsor()]839 #[weight = <SelfWeightOf<T>>::remove_collection_sponsor()]828 #[transactional]840 #[transactional]829 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {841 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {830 let sender = ensure_signed(origin)?;842 let sender = ensure_signed(origin)?;860 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))872 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))861 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]873 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]862874863 #[weight = <T as Config>::WeightInfo::create_item(data.data_size())]875 #[weight = <SelfWeightOf<T>>::create_item(data.data_size() as u32)]864 #[transactional]876 #[transactional]865 pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResult {877 pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResult {866 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);878 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);889 /// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].901 /// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].890 ///902 ///891 /// * owner: Address, initial owner of the NFT.903 /// * owner: Address, initial owner of the NFT.892 #[weight = <T as Config>::WeightInfo::create_item(items_data.iter()904 #[weight = <SelfWeightOf<T>>::create_multiple_items(items_data.len() as u32)]893 .map(|data| { data.data_size() })894 .sum())]895 #[transactional]905 #[transactional]896 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResult {906 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResult {897907917 /// * collection_id: ID of the collection.927 /// * collection_id: ID of the collection.918 ///928 ///919 /// * value: New flag value.929 /// * value: New flag value.920 #[weight = <T as Config>::WeightInfo::burn_item()]930 #[weight = <SelfWeightOf<T>>::set_transfers_enabled_flag()]921 #[transactional]931 #[transactional]922 pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {932 pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {923933943 /// * collection_id: ID of the collection.953 /// * collection_id: ID of the collection.944 ///954 ///945 /// * item_id: ID of NFT to burn.955 /// * item_id: ID of NFT to burn.946 #[weight = <T as Config>::WeightInfo::burn_item()]956 #[weight = <SelfWeightOf<T>>::burn_item()]947 #[transactional]957 #[transactional]948 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {958 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {949959978 /// * Non-Fungible Mode: Ignored988 /// * Non-Fungible Mode: Ignored979 /// * Fungible Mode: Must specify transferred amount989 /// * Fungible Mode: Must specify transferred amount980 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)990 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)981 #[weight = <T as Config>::WeightInfo::transfer()]991 #[weight = <SelfWeightOf<T>>::transfer()]982 #[transactional]992 #[transactional]983 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {993 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {984 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);994 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1004 /// * collection_id.1014 /// * collection_id.1005 ///1015 ///1006 /// * item_id: ID of the item.1016 /// * item_id: ID of the item.1007 #[weight = <T as Config>::WeightInfo::approve()]1017 #[weight = <SelfWeightOf<T>>::approve()]1008 #[transactional]1018 #[transactional]1009 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResult {1019 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResult {1010 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1020 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1034 /// * item_id: ID of the item.1044 /// * item_id: ID of the item.1035 ///1045 ///1036 /// * value: Amount to transfer.1046 /// * value: Amount to transfer.1037 #[weight = <T as Config>::WeightInfo::transfer_from()]1047 #[weight = <SelfWeightOf<T>>::transfer_from()]1038 #[transactional]1048 #[transactional]1039 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResult {1049 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResult {1040 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1050 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1069 /// * collection_id.1079 /// * collection_id.1070 ///1080 ///1071 /// * schema: String representing the offchain data schema.1081 /// * schema: String representing the offchain data schema.1072 #[weight = <T as Config>::WeightInfo::set_variable_meta_data()]1082 #[weight = <SelfWeightOf<T>>::set_variable_meta_data(data.len() as u32)]1073 #[transactional]1083 #[transactional]1074 pub fn set_variable_meta_data (1084 pub fn set_variable_meta_data (1075 origin,1085 origin,1100 /// * collection_id.1110 /// * collection_id.1101 ///1111 ///1102 /// * schema: SchemaVersion: enum1112 /// * schema: SchemaVersion: enum1103 #[weight = <T as Config>::WeightInfo::set_schema_version()]1113 #[weight = <SelfWeightOf<T>>::set_schema_version()]1104 #[transactional]1114 #[transactional]1105 pub fn set_schema_version(1115 pub fn set_schema_version(1106 origin,1116 origin,1126 /// * collection_id.1136 /// * collection_id.1127 ///1137 ///1128 /// * schema: String representing the offchain data schema.1138 /// * schema: String representing the offchain data schema.1129 #[weight = <T as Config>::WeightInfo::set_offchain_schema()]1139 #[weight = <SelfWeightOf<T>>::set_offchain_schema(schema.len() as u32)]1130 #[transactional]1140 #[transactional]1131 pub fn set_offchain_schema(1141 pub fn set_offchain_schema(1132 origin,1142 origin,1138 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;1148 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;113911491140 // check schema limit1150 // check schema limit1141 ensure!(schema.len() as u32 <= ChainLimit::get().offchain_schema_limit, "");1151 ensure!(schema.len() as u32 <= OFFCHAIN_SCHEMA_LIMIT, "");114211521143 target_collection.offchain_schema = schema;1153 target_collection.offchain_schema = schema;1144 target_collection.save()1154 target_collection.save()1156 /// * collection_id.1166 /// * collection_id.1157 ///1167 ///1158 /// * schema: String representing the const on-chain data schema.1168 /// * schema: String representing the const on-chain data schema.1159 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1169 #[weight = <SelfWeightOf<T>>::set_const_on_chain_schema(schema.len() as u32)]1160 #[transactional]1170 #[transactional]1161 pub fn set_const_on_chain_schema (1171 pub fn set_const_on_chain_schema (1162 origin,1172 origin,1168 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;1178 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;116911791170 // check schema limit1180 // check schema limit1171 ensure!(schema.len() as u32 <= ChainLimit::get().const_on_chain_schema_limit, "");1181 ensure!(schema.len() as u32 <= CONST_ON_CHAIN_SCHEMA_LIMIT, "");117211821173 target_collection.const_on_chain_schema = schema;1183 target_collection.const_on_chain_schema = schema;1174 target_collection.save()1184 target_collection.save()1186 /// * collection_id.1196 /// * collection_id.1187 ///1197 ///1188 /// * schema: String representing the variable on-chain data schema.1198 /// * schema: String representing the variable on-chain data schema.1189 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1199 #[weight = <SelfWeightOf<T>>::set_const_on_chain_schema(schema.len() as u32)]1190 #[transactional]1200 #[transactional]1191 pub fn set_variable_on_chain_schema (1201 pub fn set_variable_on_chain_schema (1192 origin,1202 origin,1198 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;1208 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;119912091200 // check schema limit1210 // check schema limit1201 ensure!(schema.len() as u32 <= ChainLimit::get().variable_on_chain_schema_limit, "");1211 ensure!(schema.len() as u32 <= VARIABLE_ON_CHAIN_SCHEMA_LIMIT, "");120212121203 target_collection.variable_on_chain_schema = schema;1213 target_collection.variable_on_chain_schema = schema;1204 target_collection.save()1214 target_collection.save()1205 }1215 }120612161207 // Sudo permissions function1208 #[weight = <T as Config>::WeightInfo::set_chain_limits()]1217 #[weight = <SelfWeightOf<T>>::set_collection_limits()]1209 #[transactional]1210 pub fn set_chain_limits(1211 origin,1215 #[cfg(not(feature = "runtime-benchmarks"))]1216 ensure_root(origin)?;12171218 <ChainLimit>::put(limits);1219 Ok(())1220 }12211222 #[weight = <T as Config>::WeightInfo::set_collection_limits()]1223 #[transactional]1218 #[transactional]1224 pub fn set_collection_limits(1219 pub fn set_collection_limits(1225 origin,1220 origin,1230 let mut target_collection = Self::get_collection(collection_id)?;1225 let mut target_collection = Self::get_collection(collection_id)?;1231 Self::check_owner_permissions(&target_collection, sender.as_sub())?;1226 Self::check_owner_permissions(&target_collection, sender.as_sub())?;1232 let old_limits = &target_collection.limits;1227 let old_limits = &target_collection.limits;1233 let chain_limits = ChainLimit::get();123412281235 // collection bounds1229 // collection bounds1236 ensure!(new_limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&1230 ensure!(new_limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&1237 new_limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP &&1231 new_limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP &&1238 new_limits.sponsored_data_size <= chain_limits.custom_data_limit,1232 new_limits.sponsored_data_size <= CUSTOM_DATA_LIMIT,1239 Error::<T>::CollectionLimitBoundsExceeded);1233 Error::<T>::CollectionLimitBoundsExceeded);124012341241 // token_limit check prev1235 // token_limit check prev1262 owner: &T::CrossAccountId,1256 owner: &T::CrossAccountId,1263 data: CreateItemData,1257 data: CreateItemData,1264 ) -> DispatchResult {1258 ) -> DispatchResult {1259 ensure!(1260 owner != &T::CrossAccountId::from_eth(H160([0; 20])),1261 Error::<T>::AddressIsZero1262 );12631265 Self::can_create_items_in_collection(collection, sender, owner, 1)?;1264 Self::can_create_items_in_collection(collection, sender, owner, 1)?;1266 Self::validate_create_item_args(collection, &data)?;1265 Self::validate_create_item_args(collection, &data)?;1277 value: u128,1276 value: u128,1278 ) -> DispatchResult {1277 ) -> DispatchResult {1278 ensure!(1279 target_collection.consume_gas(2000000)?;1279 recipient != &T::CrossAccountId::from_eth(H160([0; 20])),1280 Error::<T>::AddressIsZero1281 );12821280 // Limits check1283 // Limits check1281 Self::is_correct_transfer(target_collection, recipient)?;1284 Self::is_correct_transfer(target_collection, recipient)?;128212851283 // Transfer permissions check1286 // Transfer permissions check1284 ensure!(1287 ensure!(1285 Self::is_item_owner(sender, target_collection, item_id)1288 Self::is_item_owner(sender, target_collection, item_id)?1286 || Self::is_owner_or_admin_permissions(target_collection, sender),1289 || Self::is_owner_or_admin_permissions(target_collection, sender)?,1287 Error::<T>::NoPermission1290 Error::<T>::NoPermission1288 );1291 );128912921330 item_id: TokenId,1333 item_id: TokenId,1331 amount: u128,1334 amount: u128,1332 ) -> DispatchResult {1335 ) -> DispatchResult {1333 collection.consume_gas(2000000)?;1334 Self::token_exists(collection, item_id)?;1336 Self::token_exists(collection, item_id)?;133513371336 // Transfer permissions check1338 // Transfer permissions check1337 let bypasses_limits = collection.limits.owner_can_transfer1339 let bypasses_limits = collection.limits.owner_can_transfer1338 && Self::is_owner_or_admin_permissions(collection, sender);1340 && Self::is_owner_or_admin_permissions(collection, sender)?;133913411340 let allowance_limit = if bypasses_limits {1342 let allowance_limit = if bypasses_limits {1341 None1343 None1342 } else if let Some(amount) = Self::owned_amount(sender, collection, item_id) {1344 } else if let Some(amount) = Self::owned_amount(sender, collection, item_id)? {1343 Some(amount)1345 Some(amount)1344 } else {1346 } else {1345 fail!(Error::<T>::NoPermission);1347 fail!(Error::<T>::NoPermission);1350 Self::check_white_list(collection, spender)?;1352 Self::check_white_list(collection, spender)?;1351 }1353 }135213541355 collection.consume_sload()?;1353 let allowance: u128 = amount1356 let allowance: u128 = amount1354 .checked_add(<Allowances<T>>::get(1357 .checked_add(<Allowances<T>>::get(1355 collection.id,1358 collection.id,1359 if let Some(limit) = allowance_limit {1362 if let Some(limit) = allowance_limit {1360 ensure!(limit >= allowance, Error::<T>::TokenValueTooLow);1363 ensure!(limit >= allowance, Error::<T>::TokenValueTooLow);1361 }1364 }1365 collection.consume_sstore()?;1362 <Allowances<T>>::insert(1366 <Allowances<T>>::insert(1363 collection.id,1367 collection.id,1364 (item_id, sender.as_sub(), spender.as_sub()),1368 (item_id, sender.as_sub(), spender.as_sub()),1401 item_id: TokenId,1405 item_id: TokenId,1402 amount: u128,1406 amount: u128,1403 ) -> DispatchResult {1407 ) -> DispatchResult {1408 if sender == from {1409 // Transfer by `from`, because it is either equal to sender, or derived from him1410 return Self::transfer_internal(from, recipient, collection, item_id, amount);1411 }14121413 // Check approval1404 collection.consume_gas(2000000)?;1414 collection.consume_sload()?;1405 // Check approval1406 let approval: u128 =1415 let approval: u128 =1407 <Allowances<T>>::get(collection.id, (item_id, from.as_sub(), sender.as_sub()));1416 <Allowances<T>>::get(collection.id, (item_id, from.as_sub(), sender.as_sub()));140814171413 ensure!(1422 ensure!(1414 approval >= amount1423 approval >= amount1415 || (collection.limits.owner_can_transfer1424 || (collection.limits.owner_can_transfer1416 && Self::is_owner_or_admin_permissions(collection, sender)),1425 && Self::is_owner_or_admin_permissions(collection, sender)?),1417 Error::<T>::NoPermission1426 Error::<T>::NoPermission1418 );1427 );14191428142414331425 // Reduce approval by transferred amount or remove if remaining approval drops to 01434 // Reduce approval by transferred amount or remove if remaining approval drops to 01426 let allowance = approval.saturating_sub(amount);1435 let allowance = approval.saturating_sub(amount);1436 collection.consume_sstore()?;1427 if allowance > 0 {1437 if allowance > 0 {1428 <Allowances<T>>::insert(1438 <Allowances<T>>::insert(1429 collection.id,1439 collection.id,1471 Self::token_exists(collection, item_id)?;1481 Self::token_exists(collection, item_id)?;147214821473 ensure!(1483 ensure!(1474 ChainLimit::get().custom_data_limit >= data.len() as u32,1484 CUSTOM_DATA_LIMIT >= data.len() as u32,1475 Error::<T>::TokenVariableDataLimitExceeded1485 Error::<T>::TokenVariableDataLimitExceeded1476 );1486 );147714871478 // Modify permissions check1488 // Modify permissions check1479 ensure!(1489 ensure!(1480 Self::is_item_owner(sender, collection, item_id)1490 Self::is_item_owner(sender, collection, item_id)?1481 || Self::is_owner_or_admin_permissions(collection, sender),1491 || Self::is_owner_or_admin_permissions(collection, sender)?,1482 Error::<T>::NoPermission1492 Error::<T>::NoPermission1483 );1493 );148414941494 Ok(())1504 Ok(())1495 }1505 }15061507 pub fn get_variable_metadata(1508 collection: &CollectionHandle<T>,1509 item_id: TokenId,1510 ) -> Result<Vec<u8>, DispatchError> {1511 Ok(match collection.mode {1512 CollectionMode::NFT => {1513 <NftItemList<T>>::get(collection.id, item_id)1514 .ok_or(Error::<T>::TokenNotFound)?1515 .variable_data1516 }1517 CollectionMode::ReFungible => {1518 <ReFungibleItemList<T>>::get(collection.id, item_id)1519 .ok_or(Error::<T>::TokenNotFound)?1520 .variable_data1521 }1522 _ => fail!(Error::<T>::UnexpectedCollectionType),1523 })1524 }149615251497 pub fn create_multiple_items_internal(1526 pub fn create_multiple_items_internal(1498 sender: &T::CrossAccountId,1527 sender: &T::CrossAccountId,1519 value: u128,1548 value: u128,1520 ) -> DispatchResult {1549 ) -> DispatchResult {1521 ensure!(1550 ensure!(1522 Self::is_item_owner(sender, collection, item_id)1551 Self::is_item_owner(sender, collection, item_id)?1523 || (collection.limits.owner_can_transfer1552 || (collection.limits.owner_can_transfer1524 && Self::is_owner_or_admin_permissions(collection, sender)),1553 && Self::is_owner_or_admin_permissions(collection, sender)?),1525 Error::<T>::NoPermission1554 Error::<T>::NoPermission1526 );1555 );152715561563 let collection_id = collection.id;1592 let collection_id = collection.id;156415931565 // check token limit and account token limit1594 // check token limit and account token limit1595 collection.consume_sload()?;1566 let account_items: u32 =1596 let account_items: u32 =1567 <AddressTokens<T>>::get(collection_id, recipient.as_sub()).len() as u32;1597 <AddressTokens<T>>::get(collection_id, recipient.as_sub()).len() as u32;1568 ensure!(1598 ensure!(1601 Error::<T>::AccountTokenLimitExceeded1631 Error::<T>::AccountTokenLimitExceeded1602 );1632 );160316331604 if !Self::is_owner_or_admin_permissions(collection, sender) {1634 if !Self::is_owner_or_admin_permissions(collection, sender)? {1605 ensure!(collection.mint_mode, Error::<T>::PublicMintingNotAllowed);1635 ensure!(collection.mint_mode, Error::<T>::PublicMintingNotAllowed);1606 Self::check_white_list(collection, owner)?;1636 Self::check_white_list(collection, owner)?;1607 Self::check_white_list(collection, sender)?;1637 Self::check_white_list(collection, sender)?;1616 ) -> DispatchResult {1646 ) -> DispatchResult {1617 match target_collection.mode {1647 match target_collection.mode {1618 CollectionMode::NFT => {1648 CollectionMode::NFT => {1619 if let CreateItemData::NFT(data) = data {1649 if !matches!(data, CreateItemData::NFT(_)) {1620 // check sizes1621 ensure!(1622 ChainLimit::get().custom_data_limit >= data.const_data.len() as u32,1623 Error::<T>::TokenConstDataLimitExceeded1624 );1625 ensure!(1626 ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32,1627 Error::<T>::TokenVariableDataLimitExceeded1628 );1629 } else {1630 fail!(Error::<T>::NotNftDataUsedToMintNftCollectionToken);1650 fail!(Error::<T>::NotNftDataUsedToMintNftCollectionToken);1631 }1651 }1632 }1652 }1633 CollectionMode::Fungible(_) => {1653 CollectionMode::Fungible(_) => {1634 if let CreateItemData::Fungible(_) = data {1654 if !matches!(data, CreateItemData::Fungible(_)) {1635 } else {1636 fail!(Error::<T>::NotFungibleDataUsedToMintFungibleCollectionToken);1655 fail!(Error::<T>::NotFungibleDataUsedToMintFungibleCollectionToken);1637 }1656 }1638 }1657 }1639 CollectionMode::ReFungible => {1658 CollectionMode::ReFungible => {1640 if let CreateItemData::ReFungible(data) = data {1659 if let CreateItemData::ReFungible(data) = data {1641 // check sizes1642 ensure!(1643 ChainLimit::get().custom_data_limit >= data.const_data.len() as u32,1644 Error::<T>::TokenConstDataLimitExceeded1645 );1646 ensure!(1647 ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32,1648 Error::<T>::TokenVariableDataLimitExceeded1649 );16501651 // Check refungibility limits1660 // Check refungibility limits1652 ensure!(1661 ensure!(1675 CreateItemData::NFT(data) => {1684 CreateItemData::NFT(data) => {1676 let item = NftItemType {1685 let item = NftItemType {1677 owner: owner.clone(),1686 owner: owner.clone(),1678 const_data: data.const_data,1687 const_data: data.const_data.into_inner(),1679 variable_data: data.variable_data,1688 variable_data: data.variable_data.into_inner(),1680 };1689 };168116901682 Self::add_nft_item(collection, item)?;1691 Self::add_nft_item(collection, item)?;169217011693 let item = ReFungibleItemType {1702 let item = ReFungibleItemType {1694 owner: owner_list,1703 owner: owner_list,1695 const_data: data.const_data,1704 const_data: data.const_data.into_inner(),1696 variable_data: data.variable_data,1705 variable_data: data.variable_data.into_inner(),1697 };1706 };169817071699 Self::add_refungible_item(collection, item)?;1708 Self::add_refungible_item(collection, item)?;1711 let collection_id = collection.id;1720 let collection_id = collection.id;171217211713 // Does new owner already have an account?1722 // Does new owner already have an account?1723 collection.consume_sload()?;1714 let balance: u128 = <FungibleItemList<T>>::get(collection_id, owner.as_sub()).value;1724 let balance: u128 = <FungibleItemList<T>>::get(collection_id, owner.as_sub()).value;171517251716 // Mint1726 // Mint1717 let item = FungibleItemType {1727 let item = FungibleItemType {1718 value: balance.checked_add(value).ok_or(Error::<T>::NumOverflow)?,1728 value: balance.checked_add(value).ok_or(Error::<T>::NumOverflow)?,1719 };1729 };1730 collection.consume_sstore()?;1720 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), item);1731 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), item);172117321722 // Update balance1733 // Update balance1734 collection.consume_sload()?;1723 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1735 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1724 .checked_add(value)1736 .checked_add(value)1725 .ok_or(Error::<T>::NumOverflow)?;1737 .ok_or(Error::<T>::NumOverflow)?;1738 collection.consume_sstore()?;1726 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);1739 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);172717401741 collection.log(ERC20Events::Transfer {1742 from: H160::default(),1743 to: *owner.as_eth(),1744 value: value.into(),1745 })?;1728 Self::deposit_event(RawEvent::ItemCreated(collection_id, 0, owner.clone()));1746 Self::deposit_event(RawEvent::ItemCreated(collection_id, 0, owner.clone()));1729 Ok(())1747 Ok(())1730 }1748 }1746 let value = item_owner.fraction;1764 let value = item_owner.fraction;1747 let owner = item_owner.owner.clone();1765 let owner = item_owner.owner.clone();174817661749 Self::add_token_index(collection_id, current_index, &owner)?;1767 Self::add_token_index(collection, current_index, &owner)?;175017681751 <ItemListIndex>::insert(collection_id, current_index);1769 <ItemListIndex>::insert(collection_id, current_index);1752 <ReFungibleItemList<T>>::insert(collection_id, current_index, itemcopy);1770 <ReFungibleItemList<T>>::insert(collection_id, current_index, itemcopy);1772 .ok_or(Error::<T>::NumOverflow)?;1790 .ok_or(Error::<T>::NumOverflow)?;177317911774 let item_owner = item.owner.clone();1792 let item_owner = item.owner.clone();1775 Self::add_token_index(collection_id, current_index, &item.owner)?;1793 Self::add_token_index(collection, current_index, &item.owner)?;177617941777 <ItemListIndex>::insert(collection_id, current_index);1795 <ItemListIndex>::insert(collection_id, current_index);1778 <NftItemList<T>>::insert(collection_id, current_index, item);1796 <NftItemList<T>>::insert(collection_id, current_index, item);1810 .iter()1828 .iter()1811 .find(|&i| i.owner == *owner)1829 .find(|&i| i.owner == *owner)1812 .ok_or(Error::<T>::TokenNotFound)?;1830 .ok_or(Error::<T>::TokenNotFound)?;1813 Self::remove_token_index(collection_id, item_id, owner)?;1831 Self::remove_token_index(collection, item_id, owner)?;181418321815 // update balance1833 // update balance1816 let new_balance = <Balance<T>>::get(collection_id, rft_balance.owner.as_sub())1834 let new_balance = <Balance<T>>::get(collection_id, rft_balance.owner.as_sub())184318611844 let item =1862 let item =1845 <NftItemList<T>>::get(collection_id, item_id).ok_or(Error::<T>::TokenNotFound)?;1863 <NftItemList<T>>::get(collection_id, item_id).ok_or(Error::<T>::TokenNotFound)?;1846 Self::remove_token_index(collection_id, item_id, &item.owner)?;1864 Self::remove_token_index(collection, item_id, &item.owner)?;184718651848 // update balance1866 // update balance1849 let new_balance = <Balance<T>>::get(collection_id, item.owner.as_sub())1867 let new_balance = <Balance<T>>::get(collection_id, item.owner.as_sub())1853 <NftItemList<T>>::remove(collection_id, item_id);1871 <NftItemList<T>>::remove(collection_id, item_id);1854 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);1872 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);185518731874 collection.log(ERC721Events::Transfer {1875 from: *item.owner.as_eth(),1876 to: H160::default(),1877 token_id: item_id.into(),1878 })?;1856 Self::deposit_event(RawEvent::ItemDestroyed(collection.id, item_id));1879 Self::deposit_event(RawEvent::ItemDestroyed(collection.id, item_id));1857 Ok(())1880 Ok(())1858 }1881 }1909 fn is_owner_or_admin_permissions(1932 fn is_owner_or_admin_permissions(1910 collection: &CollectionHandle<T>,1933 collection: &CollectionHandle<T>,1911 subject: &T::CrossAccountId,1934 subject: &T::CrossAccountId,1912 ) -> bool {1935 ) -> Result<bool, DispatchError> {1936 collection.consume_sload()?;1913 *subject.as_sub() == collection.owner1937 Ok(*subject.as_sub() == collection.owner1914 || <AdminList<T>>::get(collection.id).contains(subject)1938 || <AdminList<T>>::get(collection.id).contains(subject))1915 }1939 }191619401917 fn check_owner_or_admin_permissions(1941 fn check_owner_or_admin_permissions(1918 collection: &CollectionHandle<T>,1942 collection: &CollectionHandle<T>,1919 subject: &T::CrossAccountId,1943 subject: &T::CrossAccountId,1920 ) -> DispatchResult {1944 ) -> DispatchResult {1921 ensure!(1945 ensure!(1922 Self::is_owner_or_admin_permissions(collection, subject),1946 Self::is_owner_or_admin_permissions(collection, subject)?,1923 Error::<T>::NoPermission1947 Error::<T>::NoPermission1924 );1948 );192519491926 Ok(())1950 Ok(())1927 }1951 }192819521929 fn owned_amount(1953 fn owned_amount(1954 subject: &T::CrossAccountId,1955 collection: &CollectionHandle<T>,1956 item_id: TokenId,1957 ) -> Result<Option<u128>, DispatchError> {1958 collection.consume_sload()?;1959 Ok(Self::owned_amount_unchecked(subject, collection, item_id))1960 }19611962 fn owned_amount_unchecked(1930 subject: &T::CrossAccountId,1963 subject: &T::CrossAccountId,1931 target_collection: &CollectionHandle<T>,1964 target_collection: &CollectionHandle<T>,1932 item_id: TokenId,1965 item_id: TokenId,1953 subject: &T::CrossAccountId,1986 subject: &T::CrossAccountId,1954 target_collection: &CollectionHandle<T>,1987 target_collection: &CollectionHandle<T>,1955 item_id: TokenId,1988 item_id: TokenId,1956 ) -> bool {1989 ) -> Result<bool, DispatchError> {1957 match target_collection.mode {1990 Ok(match target_collection.mode {1958 CollectionMode::Fungible(_) => true,1991 CollectionMode::Fungible(_) => true,1959 _ => Self::owned_amount(subject, target_collection, item_id).is_some(),1992 _ => Self::owned_amount(subject, target_collection, item_id)?.is_some(),1960 }1993 })1961 }1994 }196219951963 fn check_white_list(1996 fn check_white_list(1964 collection: &CollectionHandle<T>,1997 collection: &CollectionHandle<T>,1965 address: &T::CrossAccountId,1998 address: &T::CrossAccountId,1966 ) -> DispatchResult {1999 ) -> DispatchResult {1967 let collection_id = collection.id;2000 collection.consume_sload()?;19681969 let mes = Error::<T>::AddresNotInWhiteList;1970 ensure!(2001 ensure!(1971 <WhiteList<T>>::contains_key(collection_id, address.as_sub()),2002 <WhiteList<T>>::contains_key(collection.id, address.as_sub()),1972 mes2003 Error::<T>::AddresNotInWhiteList,1973 );2004 );19741975 Ok(())2005 Ok(())2000 ) -> DispatchResult {2030 ) -> DispatchResult {2001 let collection_id = collection.id;2031 let collection_id = collection.id;200220322033 collection.consume_sload()?;2034 collection.consume_sload()?;2035 let mut recipient_balance = <FungibleItemList<T>>::get(collection_id, recipient.as_sub());2003 let mut balance = <FungibleItemList<T>>::get(collection_id, owner.as_sub());2036 let mut balance = <FungibleItemList<T>>::get(collection_id, owner.as_sub());20372038 recipient_balance.value = recipient_balance2039 .value2040 .checked_add(value)2041 .ok_or(Error::<T>::NumOverflow)?;2004 ensure!(balance.value >= value, Error::<T>::TokenValueTooLow);2042 balance.value = balance20052043 .value2006 // Send balance to recipient (updates balanceOf of recipient)2044 .checked_sub(value)2045 .ok_or(Error::<T>::TokenValueTooLow)?;20462047 // update balanceOf2007 Self::add_fungible_item(collection, recipient, value)?;2048 collection.consume_sstore()?;20082049 collection.consume_sstore()?;2009 // update balanceOf of sender2050 if balance.value != 0 {2010 <Balance<T>>::insert(collection_id, owner.as_sub(), balance.value - value);2051 <Balance<T>>::insert(collection_id, owner.as_sub(), balance.value);2052 } else {2053 <Balance<T>>::remove(collection_id, owner.as_sub());2054 }2055 <Balance<T>>::insert(collection_id, recipient.as_sub(), recipient_balance.value);201120562012 // Reduce or remove sender2057 // Reduce or remove sender2058 collection.consume_sstore()?;2059 collection.consume_sstore()?;2013 if balance.value == value {2060 if balance.value != 0 {2014 <FungibleItemList<T>>::remove(collection_id, owner.as_sub());2061 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), balance);2015 } else {2062 } else {2016 balance.value -= value;2017 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), balance);2063 <FungibleItemList<T>>::remove(collection_id, owner.as_sub());2018 }2064 }2065 <FungibleItemList<T>>::insert(collection_id, recipient.as_sub(), recipient_balance);201920662020 collection.log(ERC20Events::Transfer {2067 collection.log(ERC20Events::Transfer {2021 from: *owner.as_eth(),2068 from: *owner.as_eth(),2041 new_owner: T::CrossAccountId,2088 new_owner: T::CrossAccountId,2042 ) -> DispatchResult {2089 ) -> DispatchResult {2043 let collection_id = collection.id;2090 let collection_id = collection.id;2091 collection.consume_sload()?;2044 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id)2092 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id)2045 .ok_or(Error::<T>::TokenNotFound)?;2093 .ok_or(Error::<T>::TokenNotFound)?;20462094205321012054 ensure!(amount >= value, Error::<T>::TokenValueTooLow);2102 ensure!(amount >= value, Error::<T>::TokenValueTooLow);205521032104 collection.consume_sload()?;2056 // update balance2105 // update balance2057 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2106 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2058 .checked_sub(value)2107 .checked_sub(value)2059 .ok_or(Error::<T>::NumOverflow)?;2108 .ok_or(Error::<T>::NumOverflow)?;2109 collection.consume_sstore()?;2060 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);2110 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);206121112112 collection.consume_sload()?;2062 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2113 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2063 .checked_add(value)2114 .checked_add(value)2064 .ok_or(Error::<T>::NumOverflow)?;2115 .ok_or(Error::<T>::NumOverflow)?;2116 collection.consume_sstore()?;2065 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);2117 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);206621182067 let old_owner = item.owner.clone();2119 let old_owner = item.owner.clone();2078 .find(|i| i.owner == owner)2130 .find(|i| i.owner == owner)2079 .expect("old owner does present in refungible")2131 .expect("old owner does present in refungible")2080 .owner = new_owner.clone();2132 .owner = new_owner.clone();2133 collection.consume_sstore()?;2081 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2134 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);208221352083 // update index collection2136 // update index collection2084 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;2137 Self::move_token_index(collection, item_id, &old_owner, &new_owner)?;2085 } else {2138 } else {2086 new_full_item2139 new_full_item2087 .owner2140 .owner2105 owner: new_owner.clone(),2158 owner: new_owner.clone(),2106 fraction: value,2159 fraction: value,2107 });2160 });2108 Self::add_token_index(collection_id, item_id, &new_owner)?;2161 Self::add_token_index(collection, item_id, &new_owner)?;2109 }2162 }211021632164 collection.consume_sstore()?;2111 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2165 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2112 }2166 }211321672129 new_owner: T::CrossAccountId,2183 new_owner: T::CrossAccountId,2130 ) -> DispatchResult {2184 ) -> DispatchResult {2131 let collection_id = collection.id;2185 let collection_id = collection.id;2186 collection.consume_sload()?;2132 let mut item =2187 let mut item =2133 <NftItemList<T>>::get(collection_id, item_id).ok_or(Error::<T>::TokenNotFound)?;2188 <NftItemList<T>>::get(collection_id, item_id).ok_or(Error::<T>::TokenNotFound)?;213421892135 ensure!(sender == item.owner, Error::<T>::MustBeTokenOwner);2190 ensure!(sender == item.owner, Error::<T>::MustBeTokenOwner);213621912192 collection.consume_sload()?;2137 // update balance2193 // update balance2138 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2194 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2139 .checked_sub(1)2195 .checked_sub(1)2140 .ok_or(Error::<T>::NumOverflow)?;2196 .ok_or(Error::<T>::NumOverflow)?;2197 collection.consume_sstore()?;2141 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);2198 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);214221992200 collection.consume_sload()?;2143 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2201 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2144 .checked_add(1)2202 .checked_add(1)2145 .ok_or(Error::<T>::NumOverflow)?;2203 .ok_or(Error::<T>::NumOverflow)?;2204 collection.consume_sstore()?;2146 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);2205 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);214722062148 // change owner2207 // change owner2149 let old_owner = item.owner.clone();2208 let old_owner = item.owner.clone();2150 item.owner = new_owner.clone();2209 item.owner = new_owner.clone();2210 collection.consume_sstore()?;2151 <NftItemList<T>>::insert(collection_id, item_id, item);2211 <NftItemList<T>>::insert(collection_id, item_id, item);215222122153 // update index collection2213 // update index collection2154 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;2214 Self::move_token_index(collection, item_id, &old_owner, &new_owner)?;215522152156 collection.log(ERC721Events::Transfer {2216 collection.log(ERC721Events::Transfer {2157 from: *sender.as_eth(),2217 from: *sender.as_eth(),2232 let current_index = <ItemListIndex>::get(collection_id).checked_add(1).unwrap();2292 let current_index = <ItemListIndex>::get(collection_id).checked_add(1).unwrap();223322932234 Self::add_token_index(collection_id, current_index, &item.owner).unwrap();2294 Self::add_token_index(2295 &CollectionHandle::get(collection_id).unwrap(),2296 current_index,2297 &item.owner,2298 )2299 .unwrap();223523002251 let current_index = <ItemListIndex>::get(collection_id).checked_add(1).unwrap();2316 let current_index = <ItemListIndex>::get(collection_id).checked_add(1).unwrap();225223172253 Self::add_token_index(collection_id, current_index, owner).unwrap();2318 Self::add_token_index(2319 &CollectionHandle::get(collection_id).unwrap(),2320 current_index,2321 owner,2322 )2323 .unwrap();225423242272 let owner = item.owner.first().unwrap().owner.clone();2342 let owner = item.owner.first().unwrap().owner.clone();227323432274 Self::add_token_index(collection_id, current_index, &owner).unwrap();2344 Self::add_token_index(2345 &CollectionHandle::get(collection_id).unwrap(),2346 current_index,2347 &owner,2348 )2349 .unwrap();227523502283 }2358 }228423592285 fn add_token_index(2360 fn add_token_index(2286 collection_id: CollectionId,2361 collection: &CollectionHandle<T>,2287 item_index: TokenId,2362 item_index: TokenId,2288 owner: &T::CrossAccountId,2363 owner: &T::CrossAccountId,2289 ) -> DispatchResult {2364 ) -> DispatchResult {2290 // add to account limit2365 // add to account limit2366 collection.consume_sload()?;2291 if <AccountItemCount<T>>::contains_key(owner.as_sub()) {2367 if <AccountItemCount<T>>::contains_key(owner.as_sub()) {2292 // bound Owned tokens by a single address2368 // bound Owned tokens by a single address2369 collection.consume_sload()?;2293 let count = <AccountItemCount<T>>::get(owner.as_sub());2370 let count = <AccountItemCount<T>>::get(owner.as_sub());2294 ensure!(2371 ensure!(2295 count < ChainLimit::get().account_token_ownership_limit,2372 count < ACCOUNT_TOKEN_OWNERSHIP_LIMIT,2296 Error::<T>::AddressOwnershipLimitExceeded2373 Error::<T>::AddressOwnershipLimitExceeded2297 );2374 );229823752376 collection.consume_sstore()?;2299 <AccountItemCount<T>>::insert(2377 <AccountItemCount<T>>::insert(2300 owner.as_sub(),2378 owner.as_sub(),2301 count.checked_add(1).ok_or(Error::<T>::NumOverflow)?,2379 count.checked_add(1).ok_or(Error::<T>::NumOverflow)?,2302 );2380 );2303 } else {2381 } else {2382 collection.consume_sstore()?;2304 <AccountItemCount<T>>::insert(owner.as_sub(), 1);2383 <AccountItemCount<T>>::insert(owner.as_sub(), 1);2305 }2384 }230623852386 collection.consume_sload()?;2307 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.as_sub());2387 let list_exists = <AddressTokens<T>>::contains_key(collection.id, owner.as_sub());2308 if list_exists {2388 if list_exists {2389 collection.consume_sload()?;2309 let mut list = <AddressTokens<T>>::get(collection_id, owner.as_sub());2390 let mut list = <AddressTokens<T>>::get(collection.id, owner.as_sub());2310 let item_contains = list.contains(&item_index.clone());2391 let item_contains = list.contains(&item_index.clone());231123922312 if !item_contains {2393 if !item_contains {2313 list.push(item_index);2394 list.push(item_index);2314 }2395 }231523962397 collection.consume_sstore()?;2316 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), list);2398 <AddressTokens<T>>::insert(collection.id, owner.as_sub(), list);2317 } else {2399 } else {2318 let itm = vec![item_index];2400 let itm = vec![item_index];2401 collection.consume_sstore()?;2319 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), itm);2402 <AddressTokens<T>>::insert(collection.id, owner.as_sub(), itm);2320 }2403 }232124042322 Ok(())2405 Ok(())2323 }2406 }232424072325 fn remove_token_index(2408 fn remove_token_index(2326 collection_id: CollectionId,2409 collection: &CollectionHandle<T>,2327 item_index: TokenId,2410 item_index: TokenId,2328 owner: &T::CrossAccountId,2411 owner: &T::CrossAccountId,2329 ) -> DispatchResult {2412 ) -> DispatchResult {2330 // update counter2413 // update counter2414 collection.consume_sload()?;2415 collection.consume_sstore()?;2331 <AccountItemCount<T>>::insert(2416 <AccountItemCount<T>>::insert(2332 owner.as_sub(),2417 owner.as_sub(),2333 <AccountItemCount<T>>::get(owner.as_sub())2418 <AccountItemCount<T>>::get(owner.as_sub())2334 .checked_sub(1)2419 .checked_sub(1)2335 .ok_or(Error::<T>::NumOverflow)?,2420 .ok_or(Error::<T>::NumOverflow)?,2336 );2421 );233724222423 collection.consume_sload()?;2338 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.as_sub());2424 let list_exists = <AddressTokens<T>>::contains_key(collection.id, owner.as_sub());2339 if list_exists {2425 if list_exists {2426 collection.consume_sload()?;2340 let mut list = <AddressTokens<T>>::get(collection_id, owner.as_sub());2427 let mut list = <AddressTokens<T>>::get(collection.id, owner.as_sub());2341 let item_contains = list.contains(&item_index.clone());2428 let item_contains = list.contains(&item_index.clone());234224292343 if item_contains {2430 if item_contains {2344 list.retain(|&item| item != item_index);2431 list.retain(|&item| item != item_index);2432 collection.consume_sstore()?;2345 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), list);2433 <AddressTokens<T>>::insert(collection.id, owner.as_sub(), list);2346 }2434 }2347 }2435 }234824362349 Ok(())2437 Ok(())2350 }2438 }235124392352 fn move_token_index(2440 fn move_token_index(2353 collection_id: CollectionId,2441 collection: &CollectionHandle<T>,2354 item_index: TokenId,2442 item_index: TokenId,2355 old_owner: &T::CrossAccountId,2443 old_owner: &T::CrossAccountId,2356 new_owner: &T::CrossAccountId,2444 new_owner: &T::CrossAccountId,2357 ) -> DispatchResult {2445 ) -> DispatchResult {2358 Self::remove_token_index(collection_id, item_index, old_owner)?;2446 Self::remove_token_index(collection, item_index, old_owner)?;2359 Self::add_token_index(collection_id, item_index, new_owner)?;2447 Self::add_token_index(collection, item_index, new_owner)?;236024482361 Ok(())2449 Ok(())2362 }2450 }pallets/nft/src/mock.rsdiffbeforeafterboth129 fn as_sub(&self) -> &u64 {129 fn as_sub(&self) -> &u64 {130 &self.0130 &self.0131 }131 }132 fn from_eth(_eth: sp_core::H160) -> Self {132 fn from_eth(eth: sp_core::H160) -> Self {133 let mut sub_raw = [0; 8];134 sub_raw.copy_from_slice(ð.0[0..8]);135 let sub = u64::from_be_bytes(sub_raw);133 unimplemented!()136 Self(sub, eth)134 }137 }135 fn as_eth(&self) -> &sp_core::H160 {138 fn as_eth(&self) -> &sp_core::H160 {136 &self.1139 &self.1pallets/nft/src/sponsorship.rsdiffbeforeafterboth1use crate::{1use crate::{2 Config, Call, CollectionById, CreateItemBasket, VariableMetaDataBasket,2 Config, Call, CollectionById, CreateItemBasket, VariableMetaDataBasket,3 ReFungibleTransferBasket, FungibleTransferBasket, NftTransferBasket, ChainLimit,3 ReFungibleTransferBasket, FungibleTransferBasket, NftTransferBasket, CreateItemData,4 CreateItemData, CollectionMode,4 CollectionMode,5};5};6use core::marker::PhantomData;6use core::marker::PhantomData;7use up_sponsorship::SponsorshipHandler;7use up_sponsorship::SponsorshipHandler;8use frame_support::{8use frame_support::{9 traits::IsSubType,9 traits::{IsSubType},10 storage::{StorageMap, StorageDoubleMap, StorageValue},10 storage::{StorageMap, StorageDoubleMap},11};11};12use nft_data_structs::{TokenId, CollectionId};12use nft_data_structs::{13 TokenId, CollectionId, NFT_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,14 FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,15};131614pub struct NftSponsorshipHandler<T>(PhantomData<T>);17pub struct NftSponsorshipHandler<T>(PhantomData<T>);47 item_id: &TokenId,50 item_id: &TokenId,48 ) -> Option<T::AccountId> {51 ) -> Option<T::AccountId> {49 let collection = CollectionById::<T>::get(collection_id)?;52 let collection = CollectionById::<T>::get(collection_id)?;50 let limits = ChainLimit::get();515352 let mut sponsor_transfer = false;54 let mut sponsor_transfer = false;53 if collection.sponsorship.confirmed() {55 if collection.sponsorship.confirmed() {62 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {64 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {63 collection_limits.sponsor_transfer_timeout65 collection_limits.sponsor_transfer_timeout64 } else {66 } else {65 limits.nft_sponsor_transfer_timeout67 NFT_SPONSOR_TRANSFER_TIMEOUT66 };68 };676968 let mut sponsored = true;70 let mut sponsored = true;84 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {86 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {85 collection_limits.sponsor_transfer_timeout87 collection_limits.sponsor_transfer_timeout86 } else {88 } else {87 limits.fungible_sponsor_transfer_timeout89 FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT88 };90 };899190 let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;92 let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;107 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {109 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {108 collection_limits.sponsor_transfer_timeout110 collection_limits.sponsor_transfer_timeout109 } else {111 } else {110 limits.refungible_sponsor_transfer_timeout112 REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT111 };113 };112114113 let mut sponsored = true;115 let mut sponsored = true;pallets/nft/src/tests.rsdiffbeforeafterboth1// Tests to be written here1// Tests to be written here2use super::*;2use super::*;3use crate::mock::*;3use crate::mock::*;4use crate::{AccessMode, CollectionMode, Ownership, ChainLimits, CreateItemData};4use crate::{AccessMode, CollectionMode, Ownership, CreateItemData};5use nft_data_structs::{5use nft_data_structs::{6 CreateNftData, CreateFungibleData, CreateReFungibleData, CollectionId, TokenId,6 CreateNftData, CreateFungibleData, CreateReFungibleData, CollectionId, TokenId,7 MAX_DECIMAL_POINTS,7 MAX_DECIMAL_POINTS,8};8};9use frame_support::{assert_noop, assert_ok};9use frame_support::{assert_noop, assert_ok};10use frame_system::{RawOrigin};10use sp_std::convert::TryInto;111112fn default_collection_numbers_limit() -> u32 {13 1014}1516fn default_limits() {17 assert_ok!(TemplateModule::set_chain_limits(18 RawOrigin::Root.into(),19 ChainLimits {20 collection_numbers_limit: default_collection_numbers_limit(),21 account_token_ownership_limit: 10,22 collections_admins_limit: 5,23 custom_data_limit: 2048,24 nft_sponsor_transfer_timeout: 15,25 fungible_sponsor_transfer_timeout: 15,26 refungible_sponsor_transfer_timeout: 15,27 const_on_chain_schema_limit: 1024,28 offchain_schema_limit: 1024,29 variable_on_chain_schema_limit: 1024,30 }31 ));32}3334fn default_nft_data() -> CreateNftData {12fn default_nft_data() -> CreateNftData {35 CreateNftData {13 CreateNftData {36 const_data: vec![1, 2, 3],14 const_data: vec![1, 2, 3].try_into().unwrap(),37 variable_data: vec![3, 2, 1],15 variable_data: vec![3, 2, 1].try_into().unwrap(),38 }16 }39}17}4018442245fn default_re_fungible_data() -> CreateReFungibleData {23fn default_re_fungible_data() -> CreateReFungibleData {46 CreateReFungibleData {24 CreateReFungibleData {47 const_data: vec![1, 2, 3],25 const_data: vec![1, 2, 3].try_into().unwrap(),48 variable_data: vec![3, 2, 1],26 variable_data: vec![3, 2, 1].try_into().unwrap(),49 pieces: 1023,27 pieces: 1023,50 }28 }51}29}112#[test]90#[test]113fn set_version_schema() {91fn set_version_schema() {114 new_test_ext().execute_with(|| {92 new_test_ext().execute_with(|| {115 default_limits();116 let origin1 = Origin::signed(1);93 let origin1 = Origin::signed(1);117 let collection_id = create_test_collection(&CollectionMode::NFT, 1);94 let collection_id = create_test_collection(&CollectionMode::NFT, 1);11895133#[test]110#[test]134fn create_fungible_collection_fails_with_large_decimal_numbers() {111fn create_fungible_collection_fails_with_large_decimal_numbers() {135 new_test_ext().execute_with(|| {112 new_test_ext().execute_with(|| {136 default_limits();137138 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();113 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();139 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();114 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();140 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();115 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();156#[test]131#[test]157fn create_nft_item() {132fn create_nft_item() {158 new_test_ext().execute_with(|| {133 new_test_ext().execute_with(|| {159 default_limits();160 let collection_id = create_test_collection(&CollectionMode::NFT, 1);134 let collection_id = create_test_collection(&CollectionMode::NFT, 1);161135162 let data = default_nft_data();136 let data = default_nft_data();163 create_test_item(collection_id, &data.clone().into());137 create_test_item(collection_id, &data.clone().into());164 let item = TemplateModule::nft_item_id(collection_id, 1).unwrap();138 let item = TemplateModule::nft_item_id(collection_id, 1).unwrap();165 assert_eq!(item.const_data, data.const_data);139 assert_eq!(item.const_data, data.const_data.into_inner());166 assert_eq!(item.variable_data, data.variable_data);140 assert_eq!(item.variable_data, data.variable_data.into_inner());167 });141 });168}142}169143172#[test]146#[test]173fn create_nft_multiple_items() {147fn create_nft_multiple_items() {174 new_test_ext().execute_with(|| {148 new_test_ext().execute_with(|| {175 default_limits();176177 create_test_collection(&CollectionMode::NFT, 1);149 create_test_collection(&CollectionMode::NFT, 1);178150179 let origin1 = Origin::signed(1);151 let origin1 = Origin::signed(1);190 .map(|d| { d.into() })162 .map(|d| { d.into() })191 .collect()163 .collect()192 ));164 ));193 for (index, data) in items_data.iter().enumerate() {165 for (index, data) in items_data.into_iter().enumerate() {194 let item = TemplateModule::nft_item_id(1, (index + 1) as TokenId).unwrap();166 let item = TemplateModule::nft_item_id(1, (index + 1) as TokenId).unwrap();195 assert_eq!(item.const_data.to_vec(), data.const_data);167 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());196 assert_eq!(item.variable_data.to_vec(), data.variable_data);168 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());197 }169 }198 });170 });199}171}200172201#[test]173#[test]202fn create_refungible_item() {174fn create_refungible_item() {203 new_test_ext().execute_with(|| {175 new_test_ext().execute_with(|| {204 default_limits();205 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);176 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);206177207 let data = default_re_fungible_data();178 let data = default_re_fungible_data();208 create_test_item(collection_id, &data.clone().into());179 create_test_item(collection_id, &data.clone().into());209 let item = TemplateModule::refungible_item_id(collection_id, 1).unwrap();180 let item = TemplateModule::refungible_item_id(collection_id, 1).unwrap();210 assert_eq!(item.const_data, data.const_data);181 assert_eq!(item.const_data, data.const_data.into_inner());211 assert_eq!(item.variable_data, data.variable_data);182 assert_eq!(item.variable_data, data.variable_data.into_inner());212 assert_eq!(183 assert_eq!(213 item.owner[0],184 item.owner[0],214 Ownership {185 Ownership {222#[test]193#[test]223fn create_multiple_refungible_items() {194fn create_multiple_refungible_items() {224 new_test_ext().execute_with(|| {195 new_test_ext().execute_with(|| {225 default_limits();226227 create_test_collection(&CollectionMode::ReFungible, 1);196 create_test_collection(&CollectionMode::ReFungible, 1);228197229 let origin1 = Origin::signed(1);198 let origin1 = Origin::signed(1);244 .map(|d| { d.into() })213 .map(|d| { d.into() })245 .collect()214 .collect()246 ));215 ));247 for (index, data) in items_data.iter().enumerate() {216 for (index, data) in items_data.into_iter().enumerate() {248 let item = TemplateModule::refungible_item_id(1, (index + 1) as TokenId).unwrap();217 let item = TemplateModule::refungible_item_id(1, (index + 1) as TokenId).unwrap();249 assert_eq!(item.const_data.to_vec(), data.const_data);218 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());250 assert_eq!(item.variable_data.to_vec(), data.variable_data);219 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());251 assert_eq!(220 assert_eq!(252 item.owner[0],221 item.owner[0],253 Ownership {222 Ownership {262#[test]231#[test]263fn create_fungible_item() {232fn create_fungible_item() {264 new_test_ext().execute_with(|| {233 new_test_ext().execute_with(|| {265 default_limits();266267 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);234 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);268235269 let data = default_fungible_data();236 let data = default_fungible_data();302#[test]269#[test]303fn transfer_fungible_item() {270fn transfer_fungible_item() {304 new_test_ext().execute_with(|| {271 new_test_ext().execute_with(|| {305 default_limits();306307 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);272 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);308273309 let origin1 = Origin::signed(1);274 let origin1 = Origin::signed(1);344#[test]309#[test]345fn transfer_refungible_item() {310fn transfer_refungible_item() {346 new_test_ext().execute_with(|| {311 new_test_ext().execute_with(|| {347 default_limits();348349 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);312 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);350313351 let data = default_re_fungible_data();314 let data = default_re_fungible_data();355 let origin2 = Origin::signed(2);318 let origin2 = Origin::signed(2);356 {319 {357 let item = TemplateModule::refungible_item_id(collection_id, 1).unwrap();320 let item = TemplateModule::refungible_item_id(collection_id, 1).unwrap();358 assert_eq!(item.const_data, data.const_data);321 assert_eq!(item.const_data, data.const_data.into_inner());359 assert_eq!(item.variable_data, data.variable_data);322 assert_eq!(item.variable_data, data.variable_data.into_inner());360 assert_eq!(323 assert_eq!(361 item.owner[0],324 item.owner[0],362 Ownership {325 Ownership {441#[test]404#[test]442fn transfer_nft_item() {405fn transfer_nft_item() {443 new_test_ext().execute_with(|| {406 new_test_ext().execute_with(|| {444 default_limits();445446 let collection_id = create_test_collection(&CollectionMode::NFT, 1);407 let collection_id = create_test_collection(&CollectionMode::NFT, 1);447408448 let data = default_nft_data();409 let data = default_nft_data();464#[test]425#[test]465fn nft_approve_and_transfer_from() {426fn nft_approve_and_transfer_from() {466 new_test_ext().execute_with(|| {427 new_test_ext().execute_with(|| {467 default_limits();468469 let collection_id = create_test_collection(&CollectionMode::NFT, 1);428 let collection_id = create_test_collection(&CollectionMode::NFT, 1);470429471 let data = default_nft_data();430 let data = default_nft_data();503#[test]462#[test]504fn nft_approve_and_transfer_from_white_list() {463fn nft_approve_and_transfer_from_white_list() {505 new_test_ext().execute_with(|| {464 new_test_ext().execute_with(|| {506 default_limits();507508 let collection_id = create_test_collection(&CollectionMode::NFT, 1);465 let collection_id = create_test_collection(&CollectionMode::NFT, 1);509466510 let origin1 = Origin::signed(1);467 let origin1 = Origin::signed(1);514 create_test_item(collection_id, &data.clone().into());471 create_test_item(collection_id, &data.clone().into());515472516 assert_eq!(473 assert_eq!(517 TemplateModule::nft_item_id(1, 1).unwrap().const_data,474 &TemplateModule::nft_item_id(1, 1).unwrap().const_data,518 data.const_data475 &data.const_data.into_inner()519 );476 );520 assert_eq!(TemplateModule::balance_count(1, 1), 1);477 assert_eq!(TemplateModule::balance_count(1, 1), 1);521 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);478 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);573#[test]530#[test]574fn refungible_approve_and_transfer_from() {531fn refungible_approve_and_transfer_from() {575 new_test_ext().execute_with(|| {532 new_test_ext().execute_with(|| {576 default_limits();577578 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);533 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);579534580 let origin1 = Origin::signed(1);535 let origin1 = Origin::signed(1);636#[test]591#[test]637fn fungible_approve_and_transfer_from() {592fn fungible_approve_and_transfer_from() {638 new_test_ext().execute_with(|| {593 new_test_ext().execute_with(|| {639 default_limits();640641 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);594 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);642595643 let data = default_fungible_data();596 let data = default_fungible_data();710#[test]663#[test]711fn change_collection_owner() {664fn change_collection_owner() {712 new_test_ext().execute_with(|| {665 new_test_ext().execute_with(|| {713 default_limits();714715 let collection_id = create_test_collection(&CollectionMode::NFT, 1);666 let collection_id = create_test_collection(&CollectionMode::NFT, 1);716667717 let origin1 = Origin::signed(1);668 let origin1 = Origin::signed(1);730#[test]681#[test]731fn destroy_collection() {682fn destroy_collection() {732 new_test_ext().execute_with(|| {683 new_test_ext().execute_with(|| {733 default_limits();734735 let collection_id = create_test_collection(&CollectionMode::NFT, 1);684 let collection_id = create_test_collection(&CollectionMode::NFT, 1);736685737 let origin1 = Origin::signed(1);686 let origin1 = Origin::signed(1);742#[test]691#[test]743fn burn_nft_item() {692fn burn_nft_item() {744 new_test_ext().execute_with(|| {693 new_test_ext().execute_with(|| {745 default_limits();746747 let collection_id = create_test_collection(&CollectionMode::NFT, 1);694 let collection_id = create_test_collection(&CollectionMode::NFT, 1);748695749 let origin1 = Origin::signed(1);696 let origin1 = Origin::signed(1);773#[test]720#[test]774fn burn_fungible_item() {721fn burn_fungible_item() {775 new_test_ext().execute_with(|| {722 new_test_ext().execute_with(|| {776 default_limits();777778 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);723 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);779724780 let origin1 = Origin::signed(1);725 let origin1 = Origin::signed(1);804#[test]749#[test]805fn burn_refungible_item() {750fn burn_refungible_item() {806 new_test_ext().execute_with(|| {751 new_test_ext().execute_with(|| {807 default_limits();808809 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);752 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);810 let origin1 = Origin::signed(1);753 let origin1 = Origin::signed(1);811754851#[test]794#[test]852fn add_collection_admin() {795fn add_collection_admin() {853 new_test_ext().execute_with(|| {796 new_test_ext().execute_with(|| {854 default_limits();855856 let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);797 let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);857 create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);798 create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);858 create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);799 create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);879#[test]820#[test]880fn remove_collection_admin() {821fn remove_collection_admin() {881 new_test_ext().execute_with(|| {822 new_test_ext().execute_with(|| {882 default_limits();883884 let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);823 let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);885 create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);824 create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);886 create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);825 create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);916#[test]855#[test]917fn balance_of() {856fn balance_of() {918 new_test_ext().execute_with(|| {857 new_test_ext().execute_with(|| {919 default_limits();920921 let nft_collection_id = create_test_collection(&CollectionMode::NFT, 1);858 let nft_collection_id = create_test_collection(&CollectionMode::NFT, 1);922 let fungible_collection_id = create_test_collection(&CollectionMode::Fungible(3), 2);859 let fungible_collection_id = create_test_collection(&CollectionMode::Fungible(3), 2);923 let re_fungible_collection_id = create_test_collection(&CollectionMode::ReFungible, 3);860 let re_fungible_collection_id = create_test_collection(&CollectionMode::ReFungible, 3);969#[test]906#[test]970fn approve() {907fn approve() {971 new_test_ext().execute_with(|| {908 new_test_ext().execute_with(|| {972 default_limits();973974 let collection_id = create_test_collection(&CollectionMode::NFT, 1);909 let collection_id = create_test_collection(&CollectionMode::NFT, 1);975910976 let data = default_nft_data();911 let data = default_nft_data();987#[test]922#[test]988fn transfer_from() {923fn transfer_from() {989 new_test_ext().execute_with(|| {924 new_test_ext().execute_with(|| {990 default_limits();991992 let collection_id = create_test_collection(&CollectionMode::NFT, 1);925 let collection_id = create_test_collection(&CollectionMode::NFT, 1);993 let origin1 = Origin::signed(1);926 let origin1 = Origin::signed(1);994 let origin2 = Origin::signed(2);927 let origin2 = Origin::signed(2);1051#[test]984#[test]1052fn owner_can_add_address_to_white_list() {985fn owner_can_add_address_to_white_list() {1053 new_test_ext().execute_with(|| {986 new_test_ext().execute_with(|| {1054 default_limits();10551056 let collection_id = create_test_collection(&CollectionMode::NFT, 1);987 let collection_id = create_test_collection(&CollectionMode::NFT, 1);10579881058 let origin1 = Origin::signed(1);989 let origin1 = Origin::signed(1);1068#[test]999#[test]1069fn admin_can_add_address_to_white_list() {1000fn admin_can_add_address_to_white_list() {1070 new_test_ext().execute_with(|| {1001 new_test_ext().execute_with(|| {1071 default_limits();10721073 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1002 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1074 let origin1 = Origin::signed(1);1003 let origin1 = Origin::signed(1);1075 let origin2 = Origin::signed(2);1004 let origin2 = Origin::signed(2);1091#[test]1020#[test]1092fn nonprivileged_user_cannot_add_address_to_white_list() {1021fn nonprivileged_user_cannot_add_address_to_white_list() {1093 new_test_ext().execute_with(|| {1022 new_test_ext().execute_with(|| {1094 default_limits();10951096 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1023 let collection_id = create_test_collection(&CollectionMode::NFT, 1);109710241098 let origin2 = Origin::signed(2);1025 let origin2 = Origin::signed(2);1106#[test]1033#[test]1107fn nobody_can_add_address_to_white_list_of_nonexisting_collection() {1034fn nobody_can_add_address_to_white_list_of_nonexisting_collection() {1108 new_test_ext().execute_with(|| {1035 new_test_ext().execute_with(|| {1109 default_limits();11101111 let origin1 = Origin::signed(1);1036 let origin1 = Origin::signed(1);111210371113 assert_noop!(1038 assert_noop!(1120#[test]1045#[test]1121fn nobody_can_add_address_to_white_list_of_deleted_collection() {1046fn nobody_can_add_address_to_white_list_of_deleted_collection() {1122 new_test_ext().execute_with(|| {1047 new_test_ext().execute_with(|| {1123 default_limits();11241125 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1048 let collection_id = create_test_collection(&CollectionMode::NFT, 1);112610491127 let origin1 = Origin::signed(1);1050 let origin1 = Origin::signed(1);1140#[test]1063#[test]1141fn address_is_already_added_to_white_list() {1064fn address_is_already_added_to_white_list() {1142 new_test_ext().execute_with(|| {1065 new_test_ext().execute_with(|| {1143 default_limits();11441145 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1066 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1146 let origin1 = Origin::signed(1);1067 let origin1 = Origin::signed(1);114710681162#[test]1083#[test]1163fn owner_can_remove_address_from_white_list() {1084fn owner_can_remove_address_from_white_list() {1164 new_test_ext().execute_with(|| {1085 new_test_ext().execute_with(|| {1165 default_limits();11661167 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1086 let collection_id = create_test_collection(&CollectionMode::NFT, 1);116810871169 let origin1 = Origin::signed(1);1088 let origin1 = Origin::signed(1);1184#[test]1103#[test]1185fn admin_can_remove_address_from_white_list() {1104fn admin_can_remove_address_from_white_list() {1186 new_test_ext().execute_with(|| {1105 new_test_ext().execute_with(|| {1187 default_limits();11881189 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1106 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1190 let origin1 = Origin::signed(1);1107 let origin1 = Origin::signed(1);1191 let origin2 = Origin::signed(2);1108 let origin2 = Origin::signed(2);1213#[test]1130#[test]1214fn nonprivileged_user_cannot_remove_address_from_white_list() {1131fn nonprivileged_user_cannot_remove_address_from_white_list() {1215 new_test_ext().execute_with(|| {1132 new_test_ext().execute_with(|| {1216 default_limits();12171218 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1133 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1219 let origin1 = Origin::signed(1);1134 let origin1 = Origin::signed(1);1220 let origin2 = Origin::signed(2);1135 let origin2 = Origin::signed(2);1235#[test]1150#[test]1236fn nobody_can_remove_address_from_white_list_of_nonexisting_collection() {1151fn nobody_can_remove_address_from_white_list_of_nonexisting_collection() {1237 new_test_ext().execute_with(|| {1152 new_test_ext().execute_with(|| {1238 default_limits();1239 let origin1 = Origin::signed(1);1153 let origin1 = Origin::signed(1);124011541241 assert_noop!(1155 assert_noop!(1248#[test]1162#[test]1249fn nobody_can_remove_address_from_white_list_of_deleted_collection() {1163fn nobody_can_remove_address_from_white_list_of_deleted_collection() {1250 new_test_ext().execute_with(|| {1164 new_test_ext().execute_with(|| {1251 default_limits();12521253 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1165 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1254 let origin1 = Origin::signed(1);1166 let origin1 = Origin::signed(1);1255 let origin2 = Origin::signed(2);1167 let origin2 = Origin::signed(2);1272#[test]1184#[test]1273fn address_is_already_removed_from_white_list() {1185fn address_is_already_removed_from_white_list() {1274 new_test_ext().execute_with(|| {1186 new_test_ext().execute_with(|| {1275 default_limits();12761277 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1187 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1278 let origin1 = Origin::signed(1);1188 let origin1 = Origin::signed(1);127911891300#[test]1210#[test]1301fn white_list_test_1() {1211fn white_list_test_1() {1302 new_test_ext().execute_with(|| {1212 new_test_ext().execute_with(|| {1303 default_limits();13041305 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1213 let collection_id = create_test_collection(&CollectionMode::NFT, 1);130612141307 let origin1 = Origin::signed(1);1215 let origin1 = Origin::signed(1);1330#[test]1238#[test]1331fn white_list_test_2() {1239fn white_list_test_2() {1332 new_test_ext().execute_with(|| {1240 new_test_ext().execute_with(|| {1333 default_limits();13341335 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1241 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1336 let origin1 = Origin::signed(1);1242 let origin1 = Origin::signed(1);133712431381#[test]1287#[test]1382fn white_list_test_3() {1288fn white_list_test_3() {1383 new_test_ext().execute_with(|| {1289 new_test_ext().execute_with(|| {1384 default_limits();13851386 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1290 let collection_id = create_test_collection(&CollectionMode::NFT, 1);138712911388 let origin1 = Origin::signed(1);1292 let origin1 = Origin::signed(1);1411#[test]1315#[test]1412fn white_list_test_4() {1316fn white_list_test_4() {1413 new_test_ext().execute_with(|| {1317 new_test_ext().execute_with(|| {1414 default_limits();14151416 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1318 let collection_id = create_test_collection(&CollectionMode::NFT, 1);141713191418 let origin1 = Origin::signed(1);1320 let origin1 = Origin::signed(1);1463#[test]1365#[test]1464fn white_list_test_5() {1366fn white_list_test_5() {1465 new_test_ext().execute_with(|| {1367 new_test_ext().execute_with(|| {1466 default_limits();14671468 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1368 let collection_id = create_test_collection(&CollectionMode::NFT, 1);146913691470 let origin1 = Origin::signed(1);1370 let origin1 = Origin::signed(1);1488#[test]1388#[test]1489fn white_list_test_6() {1389fn white_list_test_6() {1490 new_test_ext().execute_with(|| {1390 new_test_ext().execute_with(|| {1491 default_limits();14921493 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1391 let collection_id = create_test_collection(&CollectionMode::NFT, 1);149413921495 let origin1 = Origin::signed(1);1393 let origin1 = Origin::signed(1);1516#[test]1414#[test]1517fn white_list_test_7() {1415fn white_list_test_7() {1518 new_test_ext().execute_with(|| {1416 new_test_ext().execute_with(|| {1519 default_limits();15201521 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1417 let collection_id = create_test_collection(&CollectionMode::NFT, 1);152214181523 let data = default_nft_data();1419 let data = default_nft_data();1548#[test]1444#[test]1549fn white_list_test_8() {1445fn white_list_test_8() {1550 new_test_ext().execute_with(|| {1446 new_test_ext().execute_with(|| {1551 default_limits();15521553 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1447 let collection_id = create_test_collection(&CollectionMode::NFT, 1);155414481555 let data = default_nft_data();1449 let data = default_nft_data();1598#[test]1492#[test]1599fn white_list_test_9() {1493fn white_list_test_9() {1600 new_test_ext().execute_with(|| {1494 new_test_ext().execute_with(|| {1601 default_limits();16021603 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1495 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1604 let origin1 = Origin::signed(1);1496 let origin1 = Origin::signed(1);160514971623#[test]1515#[test]1624fn white_list_test_10() {1516fn white_list_test_10() {1625 new_test_ext().execute_with(|| {1517 new_test_ext().execute_with(|| {1626 default_limits();16271628 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1518 let collection_id = create_test_collection(&CollectionMode::NFT, 1);162915191630 let origin1 = Origin::signed(1);1520 let origin1 = Origin::signed(1);1660#[test]1550#[test]1661fn white_list_test_11() {1551fn white_list_test_11() {1662 new_test_ext().execute_with(|| {1552 new_test_ext().execute_with(|| {1663 default_limits();16641665 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1553 let collection_id = create_test_collection(&CollectionMode::NFT, 1);166615541667 let origin1 = Origin::signed(1);1555 let origin1 = Origin::signed(1);1694#[test]1582#[test]1695fn white_list_test_12() {1583fn white_list_test_12() {1696 new_test_ext().execute_with(|| {1584 new_test_ext().execute_with(|| {1697 default_limits();16981699 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1585 let collection_id = create_test_collection(&CollectionMode::NFT, 1);170015861701 let origin1 = Origin::signed(1);1587 let origin1 = Origin::signed(1);1723#[test]1609#[test]1724fn white_list_test_13() {1610fn white_list_test_13() {1725 new_test_ext().execute_with(|| {1611 new_test_ext().execute_with(|| {1726 default_limits();17271728 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1612 let collection_id = create_test_collection(&CollectionMode::NFT, 1);172916131730 let origin1 = Origin::signed(1);1614 let origin1 = Origin::signed(1);1749#[test]1633#[test]1750fn white_list_test_14() {1634fn white_list_test_14() {1751 new_test_ext().execute_with(|| {1635 new_test_ext().execute_with(|| {1752 default_limits();17531754 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1636 let collection_id = create_test_collection(&CollectionMode::NFT, 1);175516371756 let origin1 = Origin::signed(1);1638 let origin1 = Origin::signed(1);1786#[test]1668#[test]1787fn white_list_test_15() {1669fn white_list_test_15() {1788 new_test_ext().execute_with(|| {1670 new_test_ext().execute_with(|| {1789 default_limits();17901791 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1671 let collection_id = create_test_collection(&CollectionMode::NFT, 1);179216721793 let origin1 = Origin::signed(1);1673 let origin1 = Origin::signed(1);1815#[test]1695#[test]1816fn white_list_test_16() {1696fn white_list_test_16() {1817 new_test_ext().execute_with(|| {1697 new_test_ext().execute_with(|| {1818 default_limits();18191820 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1698 let collection_id = create_test_collection(&CollectionMode::NFT, 1);182116991822 let origin1 = Origin::signed(1);1700 let origin1 = Origin::signed(1);1851#[test]1729#[test]1852fn total_number_collections_bound() {1730fn total_number_collections_bound() {1853 new_test_ext().execute_with(|| {1731 new_test_ext().execute_with(|| {1854 default_limits();18551856 create_test_collection(&CollectionMode::NFT, 1);1732 create_test_collection(&CollectionMode::NFT, 1);1857 });1733 });1858}1734}1861#[test]1737#[test]1862fn total_number_collections_bound_neg() {1738fn total_number_collections_bound_neg() {1863 new_test_ext().execute_with(|| {1739 new_test_ext().execute_with(|| {1864 default_limits();18651866 let origin1 = Origin::signed(1);1740 let origin1 = Origin::signed(1);186717411868 for i in 0..default_collection_numbers_limit() {1742 for i in 0..COLLECTION_NUMBER_LIMIT {1869 create_test_collection(&CollectionMode::NFT, i + 1);1743 create_test_collection(&CollectionMode::NFT, i + 1);1870 }1744 }187117451891#[test]1765#[test]1892fn owned_tokens_bound() {1766fn owned_tokens_bound() {1893 new_test_ext().execute_with(|| {1767 new_test_ext().execute_with(|| {1894 default_limits();18951896 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1768 let collection_id = create_test_collection(&CollectionMode::NFT, 1);189717691898 let data = default_nft_data();1770 let data = default_nft_data();1905#[test]1777#[test]1906fn owned_tokens_bound_neg() {1778fn owned_tokens_bound_neg() {1907 new_test_ext().execute_with(|| {1779 new_test_ext().execute_with(|| {1908 assert_ok!(TemplateModule::set_chain_limits(1909 RawOrigin::Root.into(),1910 ChainLimits {1911 collection_numbers_limit: 10,1912 account_token_ownership_limit: 1,1913 collections_admins_limit: 5,1914 custom_data_limit: 2048,1915 nft_sponsor_transfer_timeout: 15,1916 fungible_sponsor_transfer_timeout: 15,1917 refungible_sponsor_transfer_timeout: 15,1918 const_on_chain_schema_limit: 1024,1919 offchain_schema_limit: 1024,1920 variable_on_chain_schema_limit: 1024,1921 }1922 ));19231924 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1780 let collection_id = create_test_collection(&CollectionMode::NFT, 1);192517811926 let origin1 = Origin::signed(1);1782 let origin1 = Origin::signed(1);1927 let data = default_nft_data();1928 create_test_item(collection_id, &data.clone().into());192917831784 for _ in 0..ACCOUNT_TOKEN_OWNERSHIP_LIMIT {1785 let data = default_nft_data();1786 create_test_item(collection_id, &data.clone().into());1787 }17881789 let data = default_nft_data();1930 assert_noop!(1790 assert_noop!(1931 TemplateModule::create_item(origin1, 1, account(1), data.into()),1791 TemplateModule::create_item(origin1, 1, account(1), data.into()),1932 Error::<Test>::AddressOwnershipLimitExceeded1792 Error::<Test>::AddressOwnershipLimitExceeded1938#[test]1798#[test]1939fn collection_admins_bound() {1799fn collection_admins_bound() {1940 new_test_ext().execute_with(|| {1800 new_test_ext().execute_with(|| {1941 assert_ok!(TemplateModule::set_chain_limits(1942 RawOrigin::Root.into(),1943 ChainLimits {1944 collection_numbers_limit: 10,1945 account_token_ownership_limit: 10,1946 collections_admins_limit: 2,1947 custom_data_limit: 2048,1948 nft_sponsor_transfer_timeout: 15,1949 fungible_sponsor_transfer_timeout: 15,1950 refungible_sponsor_transfer_timeout: 15,1951 const_on_chain_schema_limit: 1024,1952 offchain_schema_limit: 1024,1953 variable_on_chain_schema_limit: 1024,1954 }1955 ));19561957 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1801 let collection_id = create_test_collection(&CollectionMode::NFT, 1);195818021959 let origin1 = Origin::signed(1);1803 let origin1 = Origin::signed(1);1975#[test]1819#[test]1976fn collection_admins_bound_neg() {1820fn collection_admins_bound_neg() {1977 new_test_ext().execute_with(|| {1821 new_test_ext().execute_with(|| {1978 assert_ok!(TemplateModule::set_chain_limits(1979 RawOrigin::Root.into(),1980 ChainLimits {1981 collection_numbers_limit: 10,1982 account_token_ownership_limit: 1,1983 collections_admins_limit: 1,1984 custom_data_limit: 2048,1985 nft_sponsor_transfer_timeout: 15,1986 fungible_sponsor_transfer_timeout: 15,1987 refungible_sponsor_transfer_timeout: 15,1988 const_on_chain_schema_limit: 1024,1989 offchain_schema_limit: 1024,1990 variable_on_chain_schema_limit: 1024,1991 }1992 ));19931994 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1822 let collection_id = create_test_collection(&CollectionMode::NFT, 1);199518231996 let origin1 = Origin::signed(1);1824 let origin1 = Origin::signed(1);199718251998 assert_ok!(TemplateModule::add_collection_admin(1826 for i in 0..COLLECTION_ADMINS_LIMIT {1827 assert_ok!(TemplateModule::add_collection_admin(1999 origin1.clone(),1828 origin1.clone(),2000 collection_id,1829 collection_id,2001 account(2)1830 account(2 + i)2002 ));1831 ));1832 }2003 assert_noop!(1833 assert_noop!(2004 TemplateModule::add_collection_admin(origin1, collection_id, account(3)),1834 TemplateModule::add_collection_admin(1835 origin1,1836 collection_id,1837 account(3 + COLLECTION_ADMINS_LIMIT)1838 ),2005 Error::<Test>::CollectionAdminsLimitExceeded1839 Error::<Test>::CollectionAdminsLimitExceeded2006 );1840 );2007 });1841 });2008}1842}20092010// NFT custom data size. Negative test const_data.2011#[test]2012fn custom_data_size_nft_const_data_bound_neg() {2013 new_test_ext().execute_with(|| {2014 assert_ok!(TemplateModule::set_chain_limits(2015 RawOrigin::Root.into(),2016 ChainLimits {2017 collection_numbers_limit: 10,2018 account_token_ownership_limit: 10,2019 collections_admins_limit: 5,2020 custom_data_limit: 2,2021 nft_sponsor_transfer_timeout: 15,2022 fungible_sponsor_transfer_timeout: 15,2023 refungible_sponsor_transfer_timeout: 15,2024 const_on_chain_schema_limit: 1024,2025 offchain_schema_limit: 1024,2026 variable_on_chain_schema_limit: 1024,2027 }2028 ));20292030 let collection_id = create_test_collection(&CollectionMode::NFT, 1);20312032 let origin1 = Origin::signed(1);2033 let too_big_const_data = CreateItemData::NFT(CreateNftData {2034 const_data: vec![1, 2, 3, 4],2035 variable_data: vec![],2036 });20372038 assert_noop!(2039 TemplateModule::create_item(origin1, collection_id, account(1), too_big_const_data),2040 Error::<Test>::TokenConstDataLimitExceeded2041 );2042 });2043}20442045// NFT custom data size. Negative test variable_data.2046#[test]2047fn custom_data_size_nft_variable_data_bound_neg() {2048 new_test_ext().execute_with(|| {2049 assert_ok!(TemplateModule::set_chain_limits(2050 RawOrigin::Root.into(),2051 ChainLimits {2052 collection_numbers_limit: 10,2053 account_token_ownership_limit: 10,2054 collections_admins_limit: 5,2055 custom_data_limit: 2,2056 nft_sponsor_transfer_timeout: 15,2057 fungible_sponsor_transfer_timeout: 15,2058 refungible_sponsor_transfer_timeout: 15,2059 const_on_chain_schema_limit: 1024,2060 offchain_schema_limit: 1024,2061 variable_on_chain_schema_limit: 1024,2062 }2063 ));20642065 let collection_id = create_test_collection(&CollectionMode::NFT, 1);20662067 let origin1 = Origin::signed(1);2068 let too_big_const_data = CreateItemData::NFT(CreateNftData {2069 const_data: vec![],2070 variable_data: vec![1, 2, 3, 4],2071 });20722073 assert_noop!(2074 TemplateModule::create_item(origin1, collection_id, account(1), too_big_const_data),2075 Error::<Test>::TokenVariableDataLimitExceeded2076 );2077 });2078}20792080// Re fungible custom data size. Negative test const_data.2081#[test]2082fn custom_data_size_re_fungible_const_data_bound_neg() {2083 new_test_ext().execute_with(|| {2084 assert_ok!(TemplateModule::set_chain_limits(2085 RawOrigin::Root.into(),2086 ChainLimits {2087 collection_numbers_limit: 10,2088 account_token_ownership_limit: 10,2089 collections_admins_limit: 5,2090 custom_data_limit: 2,2091 nft_sponsor_transfer_timeout: 15,2092 fungible_sponsor_transfer_timeout: 15,2093 refungible_sponsor_transfer_timeout: 15,2094 const_on_chain_schema_limit: 1024,2095 offchain_schema_limit: 1024,2096 variable_on_chain_schema_limit: 1024,2097 }2098 ));20992100 let collection_id = create_test_collection(&CollectionMode::NFT, 1);21012102 let origin1 = Origin::signed(1);2103 let too_big_const_data = CreateItemData::NFT(CreateNftData {2104 const_data: vec![1, 2, 3, 4],2105 variable_data: vec![],2106 });21072108 assert_noop!(2109 TemplateModule::create_item(origin1, collection_id, account(1), too_big_const_data),2110 Error::<Test>::TokenConstDataLimitExceeded2111 );2112 });2113}21142115// Re fungible custom data size. Negative test variable_data.2116#[test]2117fn custom_data_size_re_fungible_variable_data_bound_neg() {2118 new_test_ext().execute_with(|| {2119 assert_ok!(TemplateModule::set_chain_limits(2120 RawOrigin::Root.into(),2121 ChainLimits {2122 collection_numbers_limit: 10,2123 account_token_ownership_limit: 10,2124 collections_admins_limit: 5,2125 custom_data_limit: 2,2126 nft_sponsor_transfer_timeout: 15,2127 fungible_sponsor_transfer_timeout: 15,2128 refungible_sponsor_transfer_timeout: 15,2129 const_on_chain_schema_limit: 1024,2130 offchain_schema_limit: 1024,2131 variable_on_chain_schema_limit: 1024,2132 }2133 ));21342135 let collection_id = create_test_collection(&CollectionMode::NFT, 1);21362137 let origin1 = Origin::signed(1);2138 let too_big_const_data = CreateItemData::NFT(CreateNftData {2139 const_data: vec![],2140 variable_data: vec![1, 2, 3, 4],2141 });21422143 assert_noop!(2144 TemplateModule::create_item(origin1, collection_id, account(1), too_big_const_data),2145 Error::<Test>::TokenVariableDataLimitExceeded2146 );2147 });2148}2149// #endregion1843// #endregion215018442151#[test]1845#[test]2152fn set_const_on_chain_schema() {1846fn set_const_on_chain_schema() {2153 new_test_ext().execute_with(|| {1847 new_test_ext().execute_with(|| {2154 default_limits();21552156 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1848 let collection_id = create_test_collection(&CollectionMode::NFT, 1);215718492158 let origin1 = Origin::signed(1);1850 let origin1 = Origin::signed(1);2180#[test]1872#[test]2181fn set_variable_on_chain_schema() {1873fn set_variable_on_chain_schema() {2182 new_test_ext().execute_with(|| {1874 new_test_ext().execute_with(|| {2183 default_limits();21842185 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1875 let collection_id = create_test_collection(&CollectionMode::NFT, 1);218618762187 let origin1 = Origin::signed(1);1877 let origin1 = Origin::signed(1);2209#[test]1899#[test]2210fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {1900fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {2211 new_test_ext().execute_with(|| {1901 new_test_ext().execute_with(|| {2212 default_limits();22132214 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1902 let collection_id = create_test_collection(&CollectionMode::NFT, 1);221519032216 let origin1 = Origin::signed(1);1904 let origin1 = Origin::signed(1);221719052218 let data = default_nft_data();1906 let data = default_nft_data();2219 create_test_item(1, &data.into());1907 create_test_item(1, &data.into());222019082221 let variable_data = b"test set_variable_meta_data method.".to_vec();1909 let variable_data = b"test data".to_vec();2222 assert_ok!(TemplateModule::set_variable_meta_data(1910 assert_ok!(TemplateModule::set_variable_meta_data(2223 origin1,1911 origin1,2224 collection_id,1912 collection_id,2238#[test]1926#[test]2239fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {1927fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {2240 new_test_ext().execute_with(|| {1928 new_test_ext().execute_with(|| {2241 default_limits();22422243 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);1929 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);224419302245 let origin1 = Origin::signed(1);1931 let origin1 = Origin::signed(1);224619322247 let data = default_re_fungible_data();1933 let data = default_re_fungible_data();2248 create_test_item(1, &data.into());1934 create_test_item(1, &data.into());224919352250 let variable_data = b"test set_variable_meta_data method.".to_vec();1936 let variable_data = b"test data".to_vec();2251 assert_ok!(TemplateModule::set_variable_meta_data(1937 assert_ok!(TemplateModule::set_variable_meta_data(2252 origin1,1938 origin1,2253 collection_id,1939 collection_id,2267#[test]1953#[test]2268fn set_variable_meta_data_on_fungible_token_fails() {1954fn set_variable_meta_data_on_fungible_token_fails() {2269 new_test_ext().execute_with(|| {1955 new_test_ext().execute_with(|| {2270 default_limits();22712272 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);1956 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);227319572274 let origin1 = Origin::signed(1);1958 let origin1 = Origin::signed(1);227519592276 let data = default_fungible_data();1960 let data = default_fungible_data();2277 create_test_item(1, &data.into());1961 create_test_item(1, &data.into());227819622279 let variable_data = b"test set_variable_meta_data method.".to_vec();1963 let variable_data = b"test data".to_vec();2280 assert_noop!(1964 assert_noop!(2281 TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data),1965 TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data),2282 Error::<Test>::CantStoreMetadataInFungibleTokens1966 Error::<Test>::CantStoreMetadataInFungibleTokens2287#[test]1971#[test]2288fn set_variable_meta_data_on_nft_token_fails_for_big_data() {1972fn set_variable_meta_data_on_nft_token_fails_for_big_data() {2289 new_test_ext().execute_with(|| {1973 new_test_ext().execute_with(|| {2290 assert_ok!(TemplateModule::set_chain_limits(2291 RawOrigin::Root.into(),2292 ChainLimits {2293 collection_numbers_limit: default_collection_numbers_limit(),2294 account_token_ownership_limit: 10,2295 collections_admins_limit: 5,2296 custom_data_limit: 10,2297 nft_sponsor_transfer_timeout: 15,2298 fungible_sponsor_transfer_timeout: 15,2299 refungible_sponsor_transfer_timeout: 15,2300 const_on_chain_schema_limit: 1024,2301 offchain_schema_limit: 1024,2302 variable_on_chain_schema_limit: 1024,2303 }2304 ));23052306 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1974 let collection_id = create_test_collection(&CollectionMode::NFT, 1);230719752308 let origin1 = Origin::signed(1);1976 let origin1 = Origin::signed(1);2321#[test]1989#[test]2322fn set_variable_meta_data_on_re_fungible_token_fails_for_big_data() {1990fn set_variable_meta_data_on_re_fungible_token_fails_for_big_data() {2323 new_test_ext().execute_with(|| {1991 new_test_ext().execute_with(|| {2324 assert_ok!(TemplateModule::set_chain_limits(2325 RawOrigin::Root.into(),2326 ChainLimits {2327 collection_numbers_limit: default_collection_numbers_limit(),2328 account_token_ownership_limit: 10,2329 collections_admins_limit: 5,2330 custom_data_limit: 10,2331 nft_sponsor_transfer_timeout: 15,2332 fungible_sponsor_transfer_timeout: 15,2333 refungible_sponsor_transfer_timeout: 15,2334 const_on_chain_schema_limit: 1024,2335 offchain_schema_limit: 1024,2336 variable_on_chain_schema_limit: 1024,2337 }2338 ));23392340 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);1992 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);234119932342 let origin1 = Origin::signed(1);1994 let origin1 = Origin::signed(1);2355#[test]2007#[test]2356fn collection_transfer_flag_works() {2008fn collection_transfer_flag_works() {2357 new_test_ext().execute_with(|| {2009 new_test_ext().execute_with(|| {2358 default_limits();23592360 let origin1 = Origin::signed(1);2010 let origin1 = Origin::signed(1);236120112362 let collection_id = create_test_collection(&CollectionMode::NFT, 1);2012 let collection_id = create_test_collection(&CollectionMode::NFT, 1);2382#[test]2032#[test]2383fn collection_transfer_flag_works_neg() {2033fn collection_transfer_flag_works_neg() {2384 new_test_ext().execute_with(|| {2034 new_test_ext().execute_with(|| {2385 default_limits();23862387 let origin1 = Origin::signed(1);2035 let origin1 = Origin::signed(1);238820362389 let collection_id = create_test_collection(&CollectionMode::NFT, 1);2037 let collection_id = create_test_collection(&CollectionMode::NFT, 1);pallets/nft/src/weights.rsdiffbeforeafterbothno changes
primitives/nft/Cargo.tomldiffbeforeafterboth9version = '0.9.0'9version = '0.9.0'101011[dependencies]11[dependencies]12codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ['derive'] }12codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ['derive'] }13serde = { version = "1.0.119", features = ['derive'], default-features = false }13serde = { version = "1.0.119", features = ['derive'], default-features = false, optional = true }14max-encoded-len = { default-features = false, features = ['derive'], version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }14frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }15frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }15frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }16frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }16sp-core = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }17sp-core = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }18sp-std = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }17sp-runtime = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }19sp-runtime = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }20derivative = "2.2.0"182119[features]22[features]20default = ["std"]23default = ["std"]21std = [24std = [25 "serde1",22 "serde/std",26 "serde/std",23 "codec/std",27 "codec/std",28 "max-encoded-len/std",24 "frame-system/std",29 "frame-system/std",25 "frame-support/std",30 "frame-support/std",26 "sp-runtime/std",31 "sp-runtime/std",27 "sp-core/std",32 "sp-core/std",33 "sp-std/std",28]34]35serde1 = ["serde"]36limit-testing = []primitives/nft/src/lib.rsdiffbeforeafterboth1#![cfg_attr(not(feature = "std"), no_std)]1#![cfg_attr(not(feature = "std"), no_std)]223#[cfg(feature = "serde")]3pub use serde::{Serialize, Deserialize};4pub use serde::{Serialize, Deserialize};455use sp_runtime::sp_std::prelude::Vec;6use sp_runtime::sp_std::prelude::Vec;6use codec::{Decode, Encode};7use codec::{Decode, Encode};8use max_encoded_len::MaxEncodedLen;7pub use frame_support::{9pub use frame_support::{8 construct_runtime, decl_event, decl_module, decl_storage, decl_error,10 BoundedVec, construct_runtime, decl_event, decl_module, decl_storage, decl_error,9 dispatch::DispatchResult,11 dispatch::DispatchResult,10 ensure, fail, parameter_types,12 ensure, fail, parameter_types,11 traits::{13 traits::{19 },21 },20 StorageValue, transactional,22 StorageValue, transactional,21};23};24use derivative::Derivative;222523pub const MAX_DECIMAL_POINTS: DecimalPoints = 30;26pub const MAX_DECIMAL_POINTS: DecimalPoints = 30;24pub const MAX_REFUNGIBLE_PIECES: u128 = 1_000_000_000_000_000_000_000;27pub const MAX_REFUNGIBLE_PIECES: u128 = 1_000_000_000_000_000_000_000;25pub const MAX_SPONSOR_TIMEOUT: u32 = 10_368_000;28pub const MAX_SPONSOR_TIMEOUT: u32 = 10_368_000;26pub const MAX_TOKEN_OWNERSHIP: u32 = 10_000_000;29pub const MAX_TOKEN_OWNERSHIP: u32 = 10_000_000;3031pub const COLLECTION_NUMBER_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) {32 10000033} else {34 1035};36pub const CUSTOM_DATA_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) {37 204838} else {39 1040};41pub const COLLECTION_ADMINS_LIMIT: u64 = 5;42pub const ACCOUNT_TOKEN_OWNERSHIP_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) {43 100000044} else {45 1046};4748// Timeouts for item types in passed blocks49pub const NFT_SPONSOR_TRANSFER_TIMEOUT: u32 = 5;50pub const FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT: u32 = 5;51pub const REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT: u32 = 5;5253// Schema limits54pub const OFFCHAIN_SCHEMA_LIMIT: u32 = 1024;55pub const VARIABLE_ON_CHAIN_SCHEMA_LIMIT: u32 = 1024;56pub const CONST_ON_CHAIN_SCHEMA_LIMIT: u32 = 1024;5758pub const MAX_COLLECTION_NAME_LENGTH: usize = 64;59pub const MAX_COLLECTION_DESCRIPTION_LENGTH: usize = 256;60pub const MAX_TOKEN_PREFIX_LENGTH: usize = 16;6162/// How much items can be created per single63/// create_many call64pub const MAX_ITEMS_PER_BATCH: u32 = 200;6566parameter_types! {67 pub const CustomDataLimit: u32 = CUSTOM_DATA_LIMIT;68}276928pub type CollectionId = u32;70pub type CollectionId = u32;29pub type TokenId = u32;71pub type TokenId = u32;30pub type DecimalPoints = u8;72pub type DecimalPoints = u8;317332#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]74#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]33#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]75#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]34pub enum CollectionMode {76pub enum CollectionMode {35 Invalid,77 Invalid,36 NFT,78 NFT,61}103}6210463#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]105#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]64#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]106#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]65pub enum AccessMode {107pub enum AccessMode {66 Normal,108 Normal,67 WhiteList,109 WhiteList,73}115}7411675#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]117#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]76#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]118#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]77pub enum SchemaVersion {119pub enum SchemaVersion {78 ImageURL,120 ImageURL,79 Unique,121 Unique,85}127}8612887#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]129#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]88#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]130#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]89pub struct Ownership<AccountId> {131pub struct Ownership<AccountId> {90 pub owner: AccountId,132 pub owner: AccountId,91 pub fraction: u128,133 pub fraction: u128,92}134}9313594#[derive(Encode, Decode, Debug, Clone, PartialEq)]136#[derive(Encode, Decode, Debug, Clone, PartialEq)]95#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]137#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]96pub enum SponsorshipState<AccountId> {138pub enum SponsorshipState<AccountId> {97 /// The fees are applied to the transaction sender139 /// The fees are applied to the transaction sender98 Disabled,140 Disabled,128}170}129171130#[derive(Encode, Decode, Clone, PartialEq)]172#[derive(Encode, Decode, Clone, PartialEq)]131#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]173#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]132pub struct Collection<T: frame_system::Config> {174pub struct Collection<T: frame_system::Config> {133 pub owner: T::AccountId,175 pub owner: T::AccountId,134 pub mode: CollectionMode,176 pub mode: CollectionMode,148}190}149191150#[derive(Encode, Decode, Debug, Clone, PartialEq)]192#[derive(Encode, Decode, Debug, Clone, PartialEq)]151#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]193#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]152pub struct NftItemType<AccountId> {194pub struct NftItemType<AccountId> {153 pub owner: AccountId,195 pub owner: AccountId,154 pub const_data: Vec<u8>,196 pub const_data: Vec<u8>,155 pub variable_data: Vec<u8>,197 pub variable_data: Vec<u8>,156}198}157199158#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]200#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]159#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]201#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]160pub struct FungibleItemType {202pub struct FungibleItemType {161 pub value: u128,203 pub value: u128,162}204}163205164#[derive(Encode, Decode, Debug, Clone, PartialEq)]206#[derive(Encode, Decode, Debug, Clone, PartialEq)]165#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]207#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]166pub struct ReFungibleItemType<AccountId> {208pub struct ReFungibleItemType<AccountId> {167 pub owner: Vec<Ownership<AccountId>>,209 pub owner: Vec<Ownership<AccountId>>,168 pub const_data: Vec<u8>,210 pub const_data: Vec<u8>,169 pub variable_data: Vec<u8>,211 pub variable_data: Vec<u8>,170}212}171213172#[derive(Encode, Decode, Debug, Clone, PartialEq)]214#[derive(Encode, Decode, Debug, Clone, PartialEq)]173#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]215#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]174pub struct CollectionLimits<BlockNumber: Encode + Decode> {216pub struct CollectionLimits<BlockNumber: Encode + Decode> {175 pub account_token_ownership_limit: u32,217 pub account_token_ownership_limit: u32,176 pub sponsored_data_size: u32,218 pub sponsored_data_size: u32,200 }242 }201}243}202244203#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]245/// BoundedVec doesn't supports serde204#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]246#[cfg(feature = "serde1")]205pub struct ChainLimits {247mod bounded_serde {248 use core::convert::TryFrom;206 pub collection_numbers_limit: u32,249 use frame_support::{BoundedVec, traits::Get};250 use serde::{251 ser::{self, Serialize},252 de::{self, Deserialize, Error},253 };254 use sp_std::vec::Vec;255207 pub account_token_ownership_limit: u32,256 pub fn serialize<D, V, S>(value: &BoundedVec<V, S>, serializer: D) -> Result<D::Ok, D::Error>208 pub collections_admins_limit: u64,257 where209 pub custom_data_limit: u32,258 D: ser::Serializer,210211 // Timeouts for item types in passed blocks212 pub nft_sponsor_transfer_timeout: u32,259 V: Serialize,260 {213 pub fungible_sponsor_transfer_timeout: u32,261 let vec: &Vec<_> = &value;262 vec.serialize(serializer)263 }264214 pub refungible_sponsor_transfer_timeout: u32,265 pub fn deserialize<'de, D, V, S>(deserializer: D) -> Result<BoundedVec<V, S>, D::Error>215266 where216 // Schema limits217 pub offchain_schema_limit: u32,267 D: de::Deserializer<'de>,218 pub variable_on_chain_schema_limit: u32,268 V: de::Deserialize<'de>,219 pub const_on_chain_schema_limit: u32,269 S: Get<u32>,270 {271 // TODO: Implement custom visitor, which will limit vec size at parse time? Will serde only be used by chainspec?272 let vec = <Vec<V>>::deserialize(deserializer)?;273 let len = vec.len();274 TryFrom::try_from(vec).map_err(|_| D::Error::invalid_length(len, &"lesser size"))275 }220}276}221277222#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]278#[derive(Encode, Decode, MaxEncodedLen, Default, PartialEq, Clone, Derivative)]223#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]279#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]280#[derivative(Debug)]224pub struct CreateNftData {281pub struct CreateNftData {282 #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]283 #[derivative(Debug = "ignore")]225 pub const_data: Vec<u8>,284 pub const_data: BoundedVec<u8, CustomDataLimit>,285 #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]286 #[derivative(Debug = "ignore")]226 pub variable_data: Vec<u8>,287 pub variable_data: BoundedVec<u8, CustomDataLimit>,227}288}228289229#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]290#[derive(Encode, Decode, MaxEncodedLen, Default, Debug, Clone, PartialEq)]230#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]291#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]231pub struct CreateFungibleData {292pub struct CreateFungibleData {232 pub value: u128,293 pub value: u128,233}294}234295235#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]296#[derive(Encode, Decode, MaxEncodedLen, Default, PartialEq, Clone, Derivative)]236#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]297#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]298#[derivative(Debug)]237pub struct CreateReFungibleData {299pub struct CreateReFungibleData {300 #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]301 #[derivative(Debug = "ignore")]238 pub const_data: Vec<u8>,302 pub const_data: BoundedVec<u8, CustomDataLimit>,303 #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]304 #[derivative(Debug = "ignore")]239 pub variable_data: Vec<u8>,305 pub variable_data: BoundedVec<u8, CustomDataLimit>,240 pub pieces: u128,306 pub pieces: u128,241}307}242308243#[derive(Encode, Decode, Debug, Clone, PartialEq)]309#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug)]244#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]310#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]245pub enum CreateItemData {311pub enum CreateItemData {246 NFT(CreateNftData),312 NFT(CreateNftData),247 Fungible(CreateFungibleData),313 Fungible(CreateFungibleData),runtime/Cargo.tomldiffbeforeafterboth23 'frame-support/runtime-benchmarks',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',25 'frame-system/runtime-benchmarks',26 'pallet-evm-migration/runtime-benchmarks',26 'pallet-balances/runtime-benchmarks',27 'pallet-balances/runtime-benchmarks',27 'pallet-timestamp/runtime-benchmarks',28 'pallet-timestamp/runtime-benchmarks',28 'pallet-nft/runtime-benchmarks',29 'pallet-nft/runtime-benchmarks',29 'pallet-inflation/runtime-benchmarks',30 'pallet-inflation/runtime-benchmarks',31 'pallet-xcm/runtime-benchmarks',30 'sp-runtime/runtime-benchmarks',32 'sp-runtime/runtime-benchmarks',33 'xcm-builder/runtime-benchmarks',31]34]32std = [35std = [33 'codec/std',36 'codec/std',37 'max-encoded-len/std',34 'cumulus-pallet-aura-ext/std',38 'cumulus-pallet-aura-ext/std',35 'cumulus-pallet-parachain-system/std',39 'cumulus-pallet-parachain-system/std',36 'cumulus-pallet-xcm/std',40 'cumulus-pallet-xcm/std',55 'pallet-treasury/std',59 'pallet-treasury/std',56 'pallet-vesting/std',60 'pallet-vesting/std',57 'pallet-evm/std',61 'pallet-evm/std',62 'pallet-evm-migration/std',58 'pallet-evm-contract-helpers/std',63 'pallet-evm-contract-helpers/std',59 'pallet-evm-transaction-payment/std',64 'pallet-evm-transaction-payment/std',60 'pallet-evm-coder-substrate/std',65 'pallet-evm-coder-substrate/std',84 'xcm-builder/std',89 'xcm-builder/std',85 'xcm-executor/std',90 'xcm-executor/std',86]91]92limit-testing = [93 'pallet-nft/limit-testing',94 'nft-data-structs/limit-testing',95]879688################################################################################97################################################################################89# Substrate Dependencies98# Substrate Dependencies378# local dependencies387# local dependencies379388380[dependencies]389[dependencies]390max-encoded-len = { default-features = false, features = ['derive'], version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.8' }391derivative = "2.2.0"381pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }392pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }382pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }393pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }383nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }394nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }384pallet-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }395pallet-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }385# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }396# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }386pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }397pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }387pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }398pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }399pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }388pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }400pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }389pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }401pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }390pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }402pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }runtime/src/chain_extension.rsdiffbeforeafterboth6//6//778use codec::{Decode, Encode};8use codec::{Decode, Encode};9use max_encoded_len::MaxEncodedLen;10use derivative::Derivative;91110pub use pallet_contracts::chain_extension::RetVal;12pub use pallet_contracts::chain_extension::RetVal;11use pallet_contracts::chain_extension::{13use pallet_contracts::chain_extension::{20use pallet_nft::CrossAccountId;22use pallet_nft::CrossAccountId;21use nft_data_structs::*;23use nft_data_structs::*;2223use crate::Vec;242425/// Create item parameters25/// Create item parameters26#[derive(Debug, PartialEq, Encode, Decode)]26#[derive(Debug, PartialEq, Encode, Decode, MaxEncodedLen)]27pub struct NFTExtCreateItem<E: Ext> {27pub struct NFTExtCreateItem<AccountId> {28 pub owner: <E::T as SysConfig>::AccountId,28 pub owner: AccountId,29 pub collection_id: u32,29 pub collection_id: u32,30 pub data: CreateItemData,30 pub data: CreateItemData,31}31}323233/// Transfer parameters33/// Transfer parameters34#[derive(Debug, PartialEq, Encode, Decode)]34#[derive(Debug, PartialEq, Encode, Decode, MaxEncodedLen)]35pub struct NFTExtTransfer<E: Ext> {35pub struct NFTExtTransfer<AccountId> {36 pub recipient: <E::T as SysConfig>::AccountId,36 pub recipient: AccountId,37 pub collection_id: u32,37 pub collection_id: u32,38 pub token_id: u32,38 pub token_id: u32,39 pub amount: u128,39 pub amount: u128,40}40}414142#[derive(Debug, PartialEq, Encode, Decode)]42#[derive(Derivative, PartialEq, Encode, Decode, MaxEncodedLen)]43#[derivative(Debug)]43pub struct NFTExtCreateMultipleItems<E: Ext> {44pub struct NFTExtCreateMultipleItems<AccountId> {44 pub owner: <E::T as SysConfig>::AccountId,45 pub owner: AccountId,45 pub collection_id: u32,46 pub collection_id: u32,47 #[derivative(Debug = "ignore")]46 pub data: Vec<CreateItemData>,48 pub data: BoundedVec<CreateItemData, MaxItemsPerBatch>,47}49}485049#[derive(Debug, PartialEq, Encode, Decode)]51#[derive(Debug, PartialEq, Encode, Decode, MaxEncodedLen)]50pub struct NFTExtApprove<E: Ext> {52pub struct NFTExtApprove<AccountId> {51 pub spender: <E::T as SysConfig>::AccountId,53 pub spender: AccountId,52 pub collection_id: u32,54 pub collection_id: u32,53 pub item_id: u32,55 pub item_id: u32,54 pub amount: u128,56 pub amount: u128,55}57}565857#[derive(Debug, PartialEq, Encode, Decode)]59#[derive(Debug, PartialEq, Encode, Decode, MaxEncodedLen)]58pub struct NFTExtTransferFrom<E: Ext> {60pub struct NFTExtTransferFrom<AccountId> {59 pub owner: <E::T as SysConfig>::AccountId,61 pub owner: AccountId,60 pub recipient: <E::T as SysConfig>::AccountId,62 pub recipient: AccountId,61 pub collection_id: u32,63 pub collection_id: u32,62 pub item_id: u32,64 pub item_id: u32,63 pub amount: u128,65 pub amount: u128,64}66}656766#[derive(Debug, PartialEq, Encode, Decode)]68#[derive(Derivative, PartialEq, Encode, Decode, MaxEncodedLen)]69#[derivative(Debug)]67pub struct NFTExtSetVariableMetaData {70pub struct NFTExtSetVariableMetaData {68 pub collection_id: u32,71 pub collection_id: u32,69 pub item_id: u32,72 pub item_id: u32,73 #[derivative(Debug = "ignore")]70 pub data: Vec<u8>,74 pub data: BoundedVec<u8, MaxDataSize>,71}75}727673#[derive(Debug, PartialEq, Encode, Decode)]77#[derive(Debug, PartialEq, Encode, Decode, MaxEncodedLen)]74pub struct NFTExtToggleWhiteList<E: Ext> {78pub struct NFTExtToggleWhiteList<AccountId> {75 pub collection_id: u32,79 pub collection_id: u32,76 pub address: <E::T as SysConfig>::AccountId,80 pub address: AccountId,77 pub whitelisted: bool,81 pub whitelisted: bool,78}82}7983828683pub type NftWeightInfoOf<C> = <C as pallet_nft::Config>::WeightInfo;87pub type NftWeightInfoOf<C> = <C as pallet_nft::Config>::WeightInfo;8889pub type AccountIdOf<C> = <C as SysConfig>::AccountId;849085impl<C: Config + pallet_contracts::Config> ChainExtension<C> for NFTExtension {91impl<C: Config + pallet_contracts::Config> ChainExtension<C> for NFTExtension {86 fn call<E: Ext>(func_id: u32, env: Environment<E, InitState>) -> Result<RetVal, DispatchError>92 fn call<E: Ext>(func_id: u32, env: Environment<E, InitState>) -> Result<RetVal, DispatchError>93 match func_id {99 match func_id {94 0 => {100 0 => {95 let mut env = env.buf_in_buf_out();101 let mut env = env.buf_in_buf_out();96 let input: NFTExtTransfer<E> = env.read_as()?;102 let input: NFTExtTransfer<AccountIdOf<C>> = env.read_as()?;97 env.charge_weight(NftWeightInfoOf::<C>::transfer())?;103 env.charge_weight(NftWeightInfoOf::<C>::transfer())?;9810499 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;105 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;106 input.amount,112 input.amount,107 )?;113 )?;108114109 pallet_nft::Module::<C>::submit_logs(collection)?;115 collection.submit_logs()?;110 Ok(RetVal::Converging(0))116 Ok(RetVal::Converging(0))111 }117 }112 1 => {118 1 => {113 // Create Item119 // Create Item114 let mut env = env.buf_in_buf_out();120 let mut env = env.buf_in_buf_out();115 let input: NFTExtCreateItem<E> = env.read_as()?;121 let input: NFTExtCreateItem<AccountIdOf<C>> = env.read_as()?;116 env.charge_weight(NftWeightInfoOf::<C>::create_item(input.data.data_size()))?;122 env.charge_weight(NftWeightInfoOf::<C>::create_item(input.data.data_size()))?;117123118 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;124 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;124 input.data,130 input.data,125 )?;131 )?;126132127 pallet_nft::Module::<C>::submit_logs(collection)?;133 collection.submit_logs()?;128 Ok(RetVal::Converging(0))134 Ok(RetVal::Converging(0))129 }135 }130 2 => {136 2 => {131 // Create multiple items137 // Create multiple items132 let mut env = env.buf_in_buf_out();138 let mut env = env.buf_in_buf_out();133 let input: NFTExtCreateMultipleItems<E> = env.read_as()?;139 let input: NFTExtCreateMultipleItems<AccountIdOf<C>> = env.read_as()?;134 env.charge_weight(NftWeightInfoOf::<C>::create_item(140 env.charge_weight(NftWeightInfoOf::<C>::create_item(135 input.data.iter().map(|i| i.data_size()).sum(),141 input.data.iter().map(|i| i.data_size()).sum(),136 ))?;142 ))?;141 &C::CrossAccountId::from_sub(env.ext().address().clone()),147 &C::CrossAccountId::from_sub(env.ext().address().clone()),142 &collection,148 &collection,143 &C::CrossAccountId::from_sub(input.owner),149 &C::CrossAccountId::from_sub(input.owner),144 input.data,150 input.data.into_inner(),145 )?;151 )?;146152147 pallet_nft::Module::<C>::submit_logs(collection)?;153 collection.submit_logs()?;148 Ok(RetVal::Converging(0))154 Ok(RetVal::Converging(0))149 }155 }150 3 => {156 3 => {151 // Approve157 // Approve152 let mut env = env.buf_in_buf_out();158 let mut env = env.buf_in_buf_out();153 let input: NFTExtApprove<E> = env.read_as()?;159 let input: NFTExtApprove<AccountIdOf<C>> = env.read_as()?;154 env.charge_weight(NftWeightInfoOf::<C>::approve())?;160 env.charge_weight(NftWeightInfoOf::<C>::approve())?;155161156 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;162 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;163 input.amount,169 input.amount,164 )?;170 )?;165171166 pallet_nft::Module::<C>::submit_logs(collection)?;172 collection.submit_logs()?;167 Ok(RetVal::Converging(0))173 Ok(RetVal::Converging(0))168 }174 }169 4 => {175 4 => {170 // Transfer from176 // Transfer from171 let mut env = env.buf_in_buf_out();177 let mut env = env.buf_in_buf_out();172 let input: NFTExtTransferFrom<E> = env.read_as()?;178 let input: NFTExtTransferFrom<AccountIdOf<C>> = env.read_as()?;173 env.charge_weight(NftWeightInfoOf::<C>::transfer_from())?;179 env.charge_weight(NftWeightInfoOf::<C>::transfer_from())?;174180175 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;181 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;183 input.amount,189 input.amount,184 )?;190 )?;185191186 pallet_nft::Module::<C>::submit_logs(collection)?;192 collection.submit_logs()?;187 Ok(RetVal::Converging(0))193 Ok(RetVal::Converging(0))188 }194 }189 5 => {195 5 => {198 &C::CrossAccountId::from_sub(env.ext().address().clone()),204 &C::CrossAccountId::from_sub(env.ext().address().clone()),199 &collection,205 &collection,200 input.item_id,206 input.item_id,201 input.data,207 input.data.into_inner(),202 )?;208 )?;203209204 pallet_nft::Module::<C>::submit_logs(collection)?;210 collection.submit_logs()?;205 Ok(RetVal::Converging(0))211 Ok(RetVal::Converging(0))206 }212 }207 6 => {213 6 => {208 // Toggle whitelist214 // Toggle whitelist209 let mut env = env.buf_in_buf_out();215 let mut env = env.buf_in_buf_out();210 let input: NFTExtToggleWhiteList<E> = env.read_as()?;216 let input: NFTExtToggleWhiteList<AccountIdOf<C>> = env.read_as()?;211 env.charge_weight(NftWeightInfoOf::<C>::add_to_white_list())?;217 env.charge_weight(NftWeightInfoOf::<C>::add_to_white_list())?;212218213 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;219 let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;219 input.whitelisted,225 input.whitelisted,220 )?;226 )?;221227222 pallet_nft::Module::<C>::submit_logs(collection)?;228 collection.submit_logs()?;223 Ok(RetVal::Converging(0))229 Ok(RetVal::Converging(0))224 }230 }225 _ => Err(DispatchError::Other("unknown chain_extension func_id")),231 _ => Err(DispatchError::Other("unknown chain_extension func_id")),runtime/src/lib.rsdiffbeforeafterboth72use sp_runtime::{72use sp_runtime::{73 traits::{Dispatchable},73 traits::{Dispatchable},74};74};75// use pallet_contracts::chain_extension::UncheckedFrom;767577// pub use pallet_timestamp::Call as TimestampCall;76// pub use pallet_timestamp::Call as TimestampCall;78pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;77pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;120/// Digest item type.119/// Digest item type.121pub type DigestItem = generic::DigestItem<Hash>;120pub type DigestItem = generic::DigestItem<Hash>;122123mod nft_weights;124121125/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know122/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know126/// the specifics of the runtime. They can then be made to be agnostic over specific formats123/// the specifics of the runtime. They can then be made to be agnostic over specific formats253 type Currency = Balances;250 type Currency = Balances;254 type Event = Event;251 type Event = Event;255 type OnMethodCall = (252 type OnMethodCall = (253 pallet_evm_migration::OnMethodCall<Self>,256 pallet_nft::NftErcSupport<Self>,254 pallet_nft::NftErcSupport<Self>,257 pallet_evm_contract_helpers::HelpersOnMethodCall<Self>,255 pallet_evm_contract_helpers::HelpersOnMethodCall<Self>,258 );256 );264 type FindAuthor = EthereumFindAuthor<Aura>;262 type FindAuthor = EthereumFindAuthor<Aura>;265}263}264265impl pallet_evm_migration::Config for Runtime {266 type WeightInfo = pallet_evm_migration::weights::SubstrateWeight<Self>;267}266268267pub struct EthereumFindAuthor<F>(core::marker::PhantomData<F>);269pub struct EthereumFindAuthor<F>(core::marker::PhantomData<F>);268impl<F: FindAuthor<u32>> FindAuthor<H160> for EthereumFindAuthor<F> {270impl<F: FindAuthor<u32>> FindAuthor<H160> for EthereumFindAuthor<F> {379 items as Balance * 15 * CENTIUNIQUE + (bytes as Balance) * 6 * CENTIUNIQUE381 items as Balance * 15 * CENTIUNIQUE + (bytes as Balance) * 6 * CENTIUNIQUE380}382}381383382/*384/*383parameter_types! {385parameter_types! {384 pub TombstoneDeposit: Balance = deposit(386 pub TombstoneDeposit: Balance = deposit(385 1,387 1,386 sp_std::mem::size_of::<pallet_contracts::Pallet<Runtime>> as u32,388 sp_std::mem::size_of::<pallet_contracts::Pallet<Runtime>> as u32,387 );389 );388 pub DepositPerContract: Balance = TombstoneDeposit::get();390 pub DepositPerContract: Balance = TombstoneDeposit::get();389 pub const DepositPerStorageByte: Balance = deposit(0, 1);391 pub const DepositPerStorageByte: Balance = deposit(0, 1);390 pub const DepositPerStorageItem: Balance = deposit(1, 0);392 pub const DepositPerStorageItem: Balance = deposit(1, 0);391 pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);393 pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);392 pub const SurchargeReward: Balance = 150 * MILLIUNIQUE;394 pub const SurchargeReward: Balance = 150 * MILLIUNIQUE;393 pub const SignedClaimHandicap: u32 = 2;395 pub const SignedClaimHandicap: u32 = 2;394 pub const MaxDepth: u32 = 32;396 pub const MaxDepth: u32 = 32;395 pub const MaxValueSize: u32 = 16 * 1024;397 pub const MaxValueSize: u32 = 16 * 1024;396 pub const MaxCodeSize: u32 = 1024 * 1024 * 25; // 25 Mb398 pub const MaxCodeSize: u32 = 1024 * 1024 * 25; // 25 Mb397 // The lazy deletion runs inside on_initialize.399 // The lazy deletion runs inside on_initialize.398 pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *400 pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *399 RuntimeBlockWeights::get().max_block;401 RuntimeBlockWeights::get().max_block;400 // The weight needed for decoding the queue should be less or equal than a fifth402 // The weight needed for decoding the queue should be less or equal than a fifth401 // of the overall weight dedicated to the lazy deletion.403 // of the overall weight dedicated to the lazy deletion.402 pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (404 pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (403 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -405 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -404 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)406 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)405 )) / 5) as u32;407 )) / 5) as u32;406 pub Schedule: pallet_contracts::Schedule<Runtime> = Default::default();408 pub Schedule: pallet_contracts::Schedule<Runtime> = Default::default();407}409}408410409impl pallet_contracts::Config for Runtime {411impl pallet_contracts::Config for Runtime {410 type Time = Timestamp;412 type Time = Timestamp;411 type Randomness = RandomnessCollectiveFlip;413 type Randomness = RandomnessCollectiveFlip;412 type Currency = Balances;414 type Currency = Balances;413 type Event = Event;415 type Event = Event;414 type RentPayment = ();416 type RentPayment = ();415 type SignedClaimHandicap = SignedClaimHandicap;417 type SignedClaimHandicap = SignedClaimHandicap;416 type TombstoneDeposit = TombstoneDeposit;418 type TombstoneDeposit = TombstoneDeposit;417 type DepositPerContract = DepositPerContract;419 type DepositPerContract = DepositPerContract;418 type DepositPerStorageByte = DepositPerStorageByte;420 type DepositPerStorageByte = DepositPerStorageByte;419 type DepositPerStorageItem = DepositPerStorageItem;421 type DepositPerStorageItem = DepositPerStorageItem;420 type RentFraction = RentFraction;422 type RentFraction = RentFraction;421 type SurchargeReward = SurchargeReward;423 type SurchargeReward = SurchargeReward;422 type WeightPrice = pallet_transaction_payment::Module<Self>;424 type WeightPrice = pallet_transaction_payment::Pallet<Self>;423 type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;425 type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;424 type ChainExtension = NFTExtension;426 type ChainExtension = NFTExtension;425 type DeletionQueueDepth = DeletionQueueDepth;427 type DeletionQueueDepth = DeletionQueueDepth;426 type DeletionWeightLimit = DeletionWeightLimit;428 type DeletionWeightLimit = DeletionWeightLimit;427 type Schedule = Schedule;429 type Schedule = Schedule;428 type CallStack = [pallet_contracts::Frame<Self>; 31];430 type CallStack = [pallet_contracts::Frame<Self>; 31];429}431}430*/432*/431433432parameter_types! {434parameter_types! {433 pub const TransactionByteFee: Balance = 501 * MICROUNIQUE; // Targeting 0.1 Unique per NFT transfer435 pub const TransactionByteFee: Balance = 501 * MICROUNIQUE; // Targeting 0.1 Unique per NFT transfer691/// Used for the pallet nft in `./nft.rs`693/// Used for the pallet nft in `./nft.rs`692impl pallet_nft::Config for Runtime {694impl pallet_nft::Config for Runtime {693 type Event = Event;695 type Event = Event;694 type WeightInfo = nft_weights::WeightInfo;696 type WeightInfo = pallet_nft::weights::SubstrateWeight<Self>;695697696 type EvmBackwardsAddressMapping = pallet_nft::MapBackwardsAddressTruncated;698 type EvmBackwardsAddressMapping = pallet_nft::MapBackwardsAddressTruncated;697 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;699 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;820 EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,822 EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,821 EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,823 EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,822 EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,824 EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,825 EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,823 }826 }824);827);8258281181 let mut batches = Vec::<BenchmarkBatch>::new();1184 let mut batches = Vec::<BenchmarkBatch>::new();1182 let params = (&config, &whitelist);1185 let params = (&config, &whitelist);118311861187 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);1184 add_benchmark!(params, batches, pallet_nft, Nft);1188 add_benchmark!(params, batches, pallet_nft, Nft);1185 add_benchmark!(params, batches, pallet_inflation, Inflation);1189 add_benchmark!(params, batches, pallet_inflation, Inflation);11861190runtime/src/nft_weights.rsdiffbeforeafterbothno changes
tests/package.jsondiffbeforeafterboth4 "description": "Substrate Nft tests",4 "description": "Substrate Nft tests",5 "main": "",5 "main": "",6 "devDependencies": {6 "devDependencies": {7 "@polkadot/dev": "0.62.43",7 "@polkadot/dev": "0.62.60",8 "@polkadot/ts": "0.3.89",8 "@polkadot/ts": "0.4.4",9 "@polkadot/typegen": "5.0.1",9 "@polkadot/typegen": "5.5.1",10 "@types/chai": "^4.2.17",10 "@types/chai": "^4.2.17",11 "@types/chai-as-promised": "^7.1.3",11 "@types/chai-as-promised": "^7.1.3",12 "@types/mocha": "^8.2.2",12 "@types/mocha": "^8.2.2",23 "scripts": {23 "scripts": {24 "lint": "eslint --ext .ts,.js src/",24 "lint": "eslint --ext .ts,.js src/",25 "fix": "eslint --ext .ts,.js src/ --fix",25 "fix": "eslint --ext .ts,.js src/ --fix",26 "test": "mocha --timeout 9999999 -r ts-node/register ./**/*.test.ts ./**/eth/**/*.test.ts",26 "test": "mocha --timeout 9999999 -r ts-node/register './**/*.test.ts'",27 "testEth": "mocha --timeout 9999999 -r ts-node/register ./**/eth/**/*.test.ts",27 "testEth": "mocha --timeout 9999999 -r ts-node/register './**/eth/**/*.test.ts'",28 "load": "mocha --timeout 9999999 -r ts-node/register ./**/*.load.ts",28 "load": "mocha --timeout 9999999 -r ts-node/register './**/*.load.ts'",29 "loadTransfer": "ts-node src/transfer.nload.ts",29 "loadTransfer": "ts-node src/transfer.nload.ts",30 "testCollision": "mocha --timeout 9999999 -r ts-node/register ./src/collision-tests/*.test.ts",30 "testCollision": "mocha --timeout 9999999 -r ts-node/register ./src/collision-tests/*.test.ts",31 "testAddCollectionAdmin": "mocha --timeout 9999999 -r ts-node/register ./**/addCollectionAdmin.test.ts",31 "testAddCollectionAdmin": "mocha --timeout 9999999 -r ts-node/register ./**/addCollectionAdmin.test.ts",66 "license": "SEE LICENSE IN ../LICENSE",66 "license": "SEE LICENSE IN ../LICENSE",67 "homepage": "",67 "homepage": "",68 "dependencies": {68 "dependencies": {69 "@polkadot/api": "5.0.1",69 "@polkadot/api": "5.5.1",70 "@polkadot/api-contract": "5.0.1",70 "@polkadot/api-contract": "5.5.1",71 "@polkadot/util-crypto": "^7.2.1",71 "bignumber.js": "^9.0.1",72 "bignumber.js": "^9.0.1",72 "chai-as-promised": "^7.1.1",73 "chai-as-promised": "^7.1.1",73 "solc": "^0.8.6",74 "solc": "^0.8.6",tests/src/addCollectionAdmin.test.tsdiffbeforeafterboth117 ];117 ];118 const collectionId = await createCollectionExpectSuccess();118 const collectionId = await createCollectionExpectSuccess();119119120 const chainLimit = await api.query.nft.chainLimit() as unknown as { CollectionAdminsLimit: BN };120 const chainAdminLimit = (api.consts.nft.collectionAdminsLimit as any).toNumber();121 const chainAdminLimit = chainLimit.CollectionAdminsLimit.toNumber();122 expect(chainAdminLimit).to.be.equal(5);121 expect(chainAdminLimit).to.be.equal(5);123122124 for (let i = 0; i < chainAdminLimit; i++) {123 for (let i = 0; i < chainAdminLimit; i++) {tests/src/addToWhiteList.test.tsdiffbeforeafterboth17 enableWhiteListExpectSuccess,17 enableWhiteListExpectSuccess,18 normalizeAccountId,18 normalizeAccountId,19 addCollectionAdminExpectSuccess,19 addCollectionAdminExpectSuccess,20 addToWhiteListExpectFail,20} from './util/helpers';21} from './util/helpers';212222chai.use(chaiAsPromised);23chai.use(chaiAsPromised);98 });99 });99 });100 });101102 it('Negative. Add to the white list by regular user', async () => {103 const collectionId = await createCollectionExpectSuccess();104 await addToWhiteListExpectFail(Bob, collectionId, Charlie.address);105 });100106101 it('Execute the extrinsic with parameters: Collection ID and address to add to the white list', async () => {107 it('Execute the extrinsic with parameters: Collection ID and address to add to the white list', async () => {102 const collectionId = await createCollectionExpectSuccess();108 const collectionId = await createCollectionExpectSuccess();tests/src/change-collection-owner.test.tsdiffbeforeafterboth15 enableWhiteListExpectSuccess,15 enableWhiteListExpectSuccess,16 setMintPermissionExpectSuccess,16 setMintPermissionExpectSuccess,17 destroyCollectionExpectSuccess,17 destroyCollectionExpectSuccess,18 setCollectionSponsorExpectFailure,19 confirmSponsorshipExpectFailure,20 removeCollectionSponsorExpectFailure,21 enableWhiteListExpectFail,22 setMintPermissionExpectFailure,23 destroyCollectionExpectFailure,24 setPublicAccessModeExpectSuccess,18} from './util/helpers';25} from './util/helpers';192620chai.use(chaiAsPromised);27chai.use(chaiAsPromised);53 await submitTransactionAsync(alice, changeOwnerTx);60 await submitTransactionAsync(alice, changeOwnerTx);546155 const badChangeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, alice.address);62 const badChangeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, alice.address);56 await expect(submitTransactionAsync(alice, badChangeOwnerTx)).to.be.rejected;63 await expect(submitTransactionExpectFailAsync(alice, badChangeOwnerTx)).to.be.rejected;576458 const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();65 const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();59 expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(bob.address);66 expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(bob.address);97 );104 );98 await submitTransactionAsync(bob, tx1);105 await submitTransactionAsync(bob, tx1);99106107 await setPublicAccessModeExpectSuccess(bob, collectionId, 'WhiteList');100 await enableWhiteListExpectSuccess(bob, collectionId);108 await enableWhiteListExpectSuccess(bob, collectionId);101 await setMintPermissionExpectSuccess(bob, collectionId, true);109 await setMintPermissionExpectSuccess(bob, collectionId, true);102 await destroyCollectionExpectSuccess(collectionId, '//Bob');110 await destroyCollectionExpectSuccess(collectionId, '//Bob');103 });111 });104 });112 });113114 it('New collectionOwner has access to changeCollectionOwner', async () => {115 await usingApi(async api => {116 const collectionId = await createCollectionExpectSuccess();117 const alice = privateKey('//Alice');118 const bob = privateKey('//Bob');119 const charlie = privateKey('//Charlie');120 121 const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();122 expect(collection.Owner).to.be.deep.eq(alice.address);123 124 const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, bob.address);125 await submitTransactionAsync(alice, changeOwnerTx);126 127 const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();128 expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(bob.address);129130 const changeOwnerTx2 = api.tx.nft.changeCollectionOwner(collectionId, charlie.address);131 await submitTransactionAsync(bob, changeOwnerTx2);132 133 // ownership lost134 const collectionAfterOwnerChange2: any = (await api.query.nft.collectionById(collectionId)).toJSON();135 expect(collectionAfterOwnerChange2.Owner).to.be.deep.eq(charlie.address);136 });137 });105});138});106139107describe('Negative Integration Test changeCollectionOwner(collection_id, new_owner):', () => {140describe('Negative Integration Test changeCollectionOwner(collection_id, new_owner):', () => {169 await submitTransactionAsync(alice, changeOwnerTx);202 await submitTransactionAsync(alice, changeOwnerTx);170203171 const badChangeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, alice.address);204 const badChangeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, alice.address);172 await expect(submitTransactionAsync(alice, badChangeOwnerTx)).to.be.rejected;205 await expect(submitTransactionExpectFailAsync(alice, badChangeOwnerTx)).to.be.rejected;173206174 const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();207 const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();175 expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(bob.address);208 expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(bob.address);176209177 await expect(setCollectionSponsorExpectSuccess(collectionId, charlie.address, '//Alice')).to.be.rejected;210 await setCollectionSponsorExpectFailure(collectionId, charlie.address, '//Alice');178 await expect(confirmSponsorshipExpectSuccess(collectionId, '//Alice')).to.be.rejected;211 await confirmSponsorshipExpectFailure(collectionId, '//Alice');179 await expect(removeCollectionSponsorExpectSuccess(collectionId, '//Alice')).to.be.rejected;212 await removeCollectionSponsorExpectFailure(collectionId, '//Alice');180213181 const collectionLimits = {214 const collectionLimits = {182 AccountTokenOwnershipLimit: 1,215 AccountTokenOwnershipLimit: 1,190 collectionId,223 collectionId,191 collectionLimits,224 collectionLimits,192 );225 );193 await expect(submitTransactionAsync(alice, tx1)).to.be.rejected;226 await expect(submitTransactionExpectFailAsync(alice, tx1)).to.be.rejected;194227195 await expect(enableWhiteListExpectSuccess(alice, collectionId)).to.be.rejected;228 await enableWhiteListExpectFail(alice, collectionId);196 await expect(setMintPermissionExpectSuccess(alice, collectionId, true)).to.be.rejected;229 await setMintPermissionExpectFailure(alice, collectionId, true);197 await expect(destroyCollectionExpectSuccess(collectionId, '//Alice')).to.be.rejected;230 await destroyCollectionExpectFailure(collectionId, '//Alice');198 });231 });199 });232 });200});233});tests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth34 await usingApi(async (api) => {34 await usingApi(async (api) => {35 const collectionId = await createCollectionExpectSuccess();35 const collectionId = await createCollectionExpectSuccess();363637 const chainLimit = await api.query.nft.chainLimit() as unknown as { CollectionAdminsLimit: BN };37 const chainAdminLimit = (api.consts.nft.collectionAdminsLimit as any).toNumber();38 const chainAdminLimit = chainLimit.CollectionAdminsLimit.toNumber();39 expect(chainAdminLimit).to.be.equal(5);38 expect(chainAdminLimit).to.be.equal(5);403941 const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, Eve.address);40 const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, Eve.address);tests/src/eth/api/ContractHelpers.soldiffbeforeafterbothno changes
tests/src/eth/api/UniqueFungible.soldiffbeforeafterbothno changes
tests/src/eth/api/UniqueNFT.soldiffbeforeafterbothno changes
tests/src/eth/base.test.tsdiffbeforeafterbothno changes
tests/src/eth/crossTransfer.test.tsdiffbeforeafterbothno changes
tests/src/eth/fungible.test.tsdiffbeforeafterboth4//4//556import privateKey from '../substrate/privateKey';6import privateKey from '../substrate/privateKey';7import { approveExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess } from '../util/helpers';7import { approveExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE } from '../util/helpers';8import { collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3, normalizeEvents, recordEvents, subToEth, transferBalanceToEth } from './util/helpers';8import { collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, transferBalanceToEth } from './util/helpers';9import fungibleAbi from './fungibleAbi.json';9import fungibleAbi from './fungibleAbi.json';10import { expect } from 'chai';10import { expect } from 'chai';1111192 });192 });193});193});194195describe('Fungible: Fees', () => {196 itWeb3('approve() call fee is less than 0.2UNQ', async ({ web3, api }) => {197 const collection = await createCollectionExpectSuccess({198 mode: { type: 'Fungible', decimalPoints: 0 },199 });200 const alice = privateKey('//Alice');201202 const owner = await createEthAccountWithBalance(api, web3);203 const spender = createEthAccount(web3);204205 await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });206207 const address = collectionIdToAddress(collection);208 const contract = new web3.eth.Contract(fungibleAbi as any, address, { from: owner, ...GAS_ARGS });209210 const cost = await recordEthFee(api, owner, () => contract.methods.approve(spender, 100).send({ from: owner }));211 expect(cost < BigInt(0.2 * Number(UNIQUE)));212 });213214 itWeb3('transferFrom() call fee is less than 0.2UNQ', async ({ web3, api }) => {215 const collection = await createCollectionExpectSuccess({216 mode: {type: 'Fungible', decimalPoints: 0},217 });218 const alice = privateKey('//Alice');219 220 const owner = await createEthAccountWithBalance(api, web3);221 const spender = await createEthAccountWithBalance(api, web3);222223 await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });224225 const address = collectionIdToAddress(collection);226 const contract = new web3.eth.Contract(fungibleAbi as any, address, { from: owner, ...GAS_ARGS });227228 await contract.methods.approve(spender, 100).send({ from: owner });229230 const cost = await recordEthFee(api, spender, () => contract.methods.transferFrom(owner, spender, 100).send({ from: spender }));231 expect(cost < BigInt(0.2 * Number(UNIQUE)));232 });233234 itWeb3('transfer() call fee is less than 0.2UNQ', async ({ web3, api }) => {235 const collection = await createCollectionExpectSuccess({236 mode: { type: 'Fungible', decimalPoints: 0 },237 });238 const alice = privateKey('//Alice');239240 const owner = await createEthAccountWithBalance(api, web3);241 const receiver = createEthAccount(web3);242243 await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });244245 const address = collectionIdToAddress(collection);246 const contract = new web3.eth.Contract(fungibleAbi as any, address, { from: owner, ...GAS_ARGS });247248 const cost = await recordEthFee(api, owner, () => contract.methods.transfer(receiver, 100).send({ from: owner }));249 expect(cost < BigInt(0.2 * Number(UNIQUE)));250 });251});194252195describe('Fungible: Substrate calls', () => {253describe('Fungible: Substrate calls', () => {196 itWeb3('Events emitted for approve()', async ({ web3 }) => {254 itWeb3('Events emitted for approve()', async ({ web3 }) => {tests/src/eth/helpersSmoke.test.tsdiffbeforeafterboth1import { expect } from 'chai';1import { expect } from 'chai';2import waitNewBlocks from '../substrate/wait-new-blocks';2import waitNewBlocks from '../substrate/wait-new-blocks';3import { createEthAccountWithBalance, deployFlipper, itWeb3, usingWeb3Http, contractHelpers } from './util/helpers';3import { createEthAccountWithBalance, deployFlipper, itWeb3, contractHelpers } from './util/helpers';445itWeb3('Contract owner is recorded', async ({ api, web3 }) => {5describe('Helpers sanity check', () => {6 await usingWeb3Http(async web3Http => {7 const owner = await createEthAccountWithBalance(api, web3Http);89 const flipper = await deployFlipper(web3Http, owner);10 await waitNewBlocks(api, 1);1112 expect(await contractHelpers(web3, owner).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner);13 });14});1516itWeb3('Flipper is working', async({api}) => {6 itWeb3('Contract owner is recorded', async ({ api, web3 }) => {7 const owner = await createEthAccountWithBalance(api, web3);89 const flipper = await deployFlipper(web3, owner);10 await waitNewBlocks(api, 1);1112 expect(await contractHelpers(web3, owner).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner);13 });1417 await usingWeb3Http(async web3Http => {15 itWeb3('Flipper is working', async ({ api, web3 }) => {18 const owner = await createEthAccountWithBalance(api, web3Http);16 const owner = await createEthAccountWithBalance(api, web3);19 const flipper = await deployFlipper(web3Http, owner);17 const flipper = await deployFlipper(web3, owner);20 await waitNewBlocks(api, 1);18 await waitNewBlocks(api, 1);211922 expect(await flipper.methods.getValue().call()).to.be.false;20 expect(await flipper.methods.getValue().call()).to.be.false;23 await flipper.methods.flip().send({from: owner});21 await flipper.methods.flip().send({ from: owner });24 await waitNewBlocks(api, 1);22 await waitNewBlocks(api, 1);25 expect(await flipper.methods.getValue().call()).to.be.true;23 expect(await flipper.methods.getValue().call()).to.be.true;26 });24 });27});25});tests/src/eth/marketplace/MarketPlaceKSM.abidiffbeforeafterbothno changes
tests/src/eth/marketplace/MarketPlaceKSM.bindiffbeforeafterbothno changes
tests/src/eth/marketplace/MarketPlaceKSM.soldiffbeforeafterbothno changes
tests/src/eth/marketplace/MarketPlaceUNQ.abidiffbeforeafterbothno changes
tests/src/eth/marketplace/MarketPlaceUNQ.bindiffbeforeafterbothno changes
tests/src/eth/marketplace/MarketPlaceUNQ.soldiffbeforeafterbothno changes
tests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterbothno changes
tests/src/eth/migration.test.tsdiffbeforeafterbothno changes
tests/src/eth/nonFungible.test.tsdiffbeforeafterboth4//4//556import privateKey from '../substrate/privateKey';6import privateKey from '../substrate/privateKey';7import { approveExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess } from '../util/helpers';7import { approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, setVariableMetaDataExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE } from '../util/helpers';8import { collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3, normalizeEvents, recordEvents, subToEth, transferBalanceToEth } from './util/helpers';8import { collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, transferBalanceToEth } from './util/helpers';9import nonFungibleAbi from './nonFungibleAbi.json';9import nonFungibleAbi from './nonFungibleAbi.json';10import { expect } from 'chai';10import { expect } from 'chai';11import waitNewBlocks from '../substrate/wait-new-blocks';11import waitNewBlocks from '../substrate/wait-new-blocks';12import { submitTransactionAsync } from '../substrate/substrate-api';121313describe('NFT: Information getting', () => {14describe('NFT: Information getting', () => {14 itWeb3('totalSupply', async ({ api, web3 }) => {15 itWeb3('totalSupply', async ({ api, web3 }) => {64});65});656666describe('NFT: Plain calls', () => {67describe('NFT: Plain calls', () => {68 itWeb3('Can perform mint()', async ({ web3, api }) => {69 const collection = await createCollectionExpectSuccess({70 mode: { type: 'NFT' },71 });72 const alice = privateKey('//Alice');7374 const caller = await createEthAccountWithBalance(api, web3);75 const changeAdminTx = api.tx.nft.addCollectionAdmin(collection, { ethereum: caller });76 await submitTransactionAsync(alice, changeAdminTx);77 const receiver = createEthAccount(web3);7879 const address = collectionIdToAddress(collection);80 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});8182 {83 const nextTokenId = await contract.methods.nextTokenId().call();84 expect(nextTokenId).to.be.equal('1');85 const result = await contract.methods.mintWithTokenURI(86 receiver,87 nextTokenId,88 'Test URI',89 ).send({from: caller});90 const events = normalizeEvents(result.events);9192 expect(events).to.be.deep.equal([93 {94 address,95 event: 'Transfer',96 args: {97 from: '0x0000000000000000000000000000000000000000',98 to: receiver,99 tokenId: nextTokenId,100 },101 },102 ]);103104 await waitNewBlocks(api, 1);105 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');106 }107 });108 itWeb3('Can perform mintBulk()', async ({ web3, api }) => {109 const collection = await createCollectionExpectSuccess({110 mode: { type: 'NFT' },111 });112 const alice = privateKey('//Alice');113114 const caller = await createEthAccountWithBalance(api, web3);115 const changeAdminTx = api.tx.nft.addCollectionAdmin(collection, { ethereum: caller });116 await submitTransactionAsync(alice, changeAdminTx);117 const receiver = createEthAccount(web3);118119 const address = collectionIdToAddress(collection);120 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});121122 {123 const nextTokenId = await contract.methods.nextTokenId().call();124 expect(nextTokenId).to.be.equal('1');125 const result = await contract.methods.mintBulkWithTokenURI(126 receiver,127 [128 [nextTokenId, 'Test URI 0'],129 [+nextTokenId + 1, 'Test URI 1'],130 [+nextTokenId + 2, 'Test URI 2'],131 ],132 ).send({ from: caller });133 const events = normalizeEvents(result.events);134135 expect(events).to.be.deep.equal([136 {137 address,138 event: 'Transfer',139 args: {140 from: '0x0000000000000000000000000000000000000000',141 to: receiver,142 tokenId: nextTokenId,143 },144 },145 {146 address,147 event: 'Transfer',148 args: {149 from: '0x0000000000000000000000000000000000000000',150 to: receiver,151 tokenId: String(+nextTokenId + 1),152 },153 },154 {155 address,156 event: 'Transfer',157 args: {158 from: '0x0000000000000000000000000000000000000000',159 to: receiver,160 tokenId: String(+nextTokenId + 2),161 },162 },163 ]);164165 await waitNewBlocks(api, 1);166 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI 0');167 expect(await contract.methods.tokenURI(+nextTokenId + 1).call()).to.be.equal('Test URI 1');168 expect(await contract.methods.tokenURI(+nextTokenId + 2).call()).to.be.equal('Test URI 2');169 }170 });171172 itWeb3('Can perform burn()', async ({ web3, api }) => {173 const collection = await createCollectionExpectSuccess({174 mode: {type: 'NFT'},175 });176 const alice = privateKey('//Alice');177178 const owner = await createEthAccountWithBalance(api, web3);179180 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });181 182 const address = collectionIdToAddress(collection);183 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});184185 {186 const result = await contract.methods.burn(tokenId).send({ from: owner });187 const events = normalizeEvents(result.events);188 189 expect(events).to.be.deep.equal([190 {191 address,192 event: 'Transfer',193 args: {194 from: owner,195 to: '0x0000000000000000000000000000000000000000',196 tokenId: tokenId.toString(),197 },198 },199 ]);200 }201 });20267 itWeb3('Can perform approve()', async ({ web3, api }) => {203 itWeb3('Can perform approve()', async ({ web3, api }) => {68 const collection = await createCollectionExpectSuccess({204 const collection = await createCollectionExpectSuccess({190 expect(+balance).to.equal(1);326 expect(+balance).to.equal(1);191 }327 }192 });328 });329330 itWeb3('Can perform getVariableMetadata', async ({ web3, api }) => {331 const collection = await createCollectionExpectSuccess({332 mode: { type: 'NFT' },333 });334 const alice = privateKey('//Alice');335336 const owner = await createEthAccountWithBalance(api, web3);337338 const item = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });339 await setVariableMetaDataExpectSuccess(alice, collection, item, [1, 2, 3]);340341 const address = collectionIdToAddress(collection);342 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, { from: owner, ...GAS_ARGS });343 344 expect(await contract.methods.getVariableMetadata(item).call()).to.be.equal('0x010203');345 });346347 itWeb3('Can perform setVariableMetadata', async ({ web3, api }) => {348 const collection = await createCollectionExpectSuccess({349 mode: { type: 'NFT' },350 });351 const alice = privateKey('//Alice');352353 const owner = await createEthAccountWithBalance(api, web3);354355 const item = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });356357 const address = collectionIdToAddress(collection);358 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, { from: owner, ...GAS_ARGS });359 360 expect(await contract.methods.setVariableMetadata(item, '0x010203').send({ from: owner }));361 await waitNewBlocks(api, 1);362 expect(await contract.methods.getVariableMetadata(item).call()).to.be.equal('0x010203');363 });193});364});194365366describe('NFT: Fees', () => {367 itWeb3('approve() call fee is less than 0.2UNQ', async ({ web3, api }) => {368 const collection = await createCollectionExpectSuccess({369 mode: { type: 'NFT' },370 });371 const alice = privateKey('//Alice');372373 const owner = await createEthAccountWithBalance(api, web3);374 const spender = createEthAccount(web3);375376 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });377378 const address = collectionIdToAddress(collection);379 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, { from: owner, ...GAS_ARGS });380381 const cost = await recordEthFee(api, owner, () => contract.methods.approve(spender, tokenId).send({ from: owner }));382 expect(cost < BigInt(0.2 * Number(UNIQUE)));383 });384385 itWeb3('transferFrom() call fee is less than 0.2UNQ', async ({ web3, api }) => {386 const collection = await createCollectionExpectSuccess({387 mode: { type: 'NFT' },388 });389 const alice = privateKey('//Alice');390 391 const owner = await createEthAccountWithBalance(api, web3);392 const spender = await createEthAccountWithBalance(api, web3);393394 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });395396 const address = collectionIdToAddress(collection);397 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, { from: owner, ...GAS_ARGS });398399 await contract.methods.approve(spender, tokenId).send({ from: owner });400401 const cost = await recordEthFee(api, spender, () => contract.methods.transferFrom(owner, spender, tokenId).send({ from: spender }));402 expect(cost < BigInt(0.2 * Number(UNIQUE)));403 });404405 itWeb3('transfer() call fee is less than 0.2UNQ', async ({ web3, api }) => {406 const collection = await createCollectionExpectSuccess({407 mode: { type: 'NFT' },408 });409 const alice = privateKey('//Alice');410411 const owner = await createEthAccountWithBalance(api, web3);412 const receiver = createEthAccount(web3);413414 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });415416 const address = collectionIdToAddress(collection);417 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, { from: owner, ...GAS_ARGS });418419 const cost = await recordEthFee(api, owner, () => contract.methods.transfer(receiver, tokenId).send({ from: owner }));420 expect(cost < BigInt(0.2 * Number(UNIQUE)));421 });422});423195describe('NFT: Substrate calls', () => {424describe('NFT: Substrate calls', () => {425 itWeb3('Events emitted for mint()', async ({ web3 }) => {426 const collection = await createCollectionExpectSuccess({427 mode: { type: 'NFT' },428 });429 const alice = privateKey('//Alice');430431 const address = collectionIdToAddress(collection);432 const contract = new web3.eth.Contract(nonFungibleAbi as any, address);433434 let tokenId: number;435 const events = await recordEvents(contract, async () => {436 tokenId = await createItemExpectSuccess(alice, collection, 'NFT');437 });438439 expect(events).to.be.deep.equal([440 {441 address,442 event: 'Transfer',443 args: {444 from: '0x0000000000000000000000000000000000000000',445 to: subToEth(alice.address),446 tokenId: tokenId!.toString(),447 },448 },449 ]);450 });451452 itWeb3('Events emitted for burn()', async ({ web3 }) => {453 const collection = await createCollectionExpectSuccess({454 mode: { type: 'NFT' },455 });456 const alice = privateKey('//Alice');457458 const address = collectionIdToAddress(collection);459 const contract = new web3.eth.Contract(nonFungibleAbi as any, address);460461 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');462 const events = await recordEvents(contract, async () => {463 await burnItemExpectSuccess(alice, collection, tokenId);464 });465466 expect(events).to.be.deep.equal([467 {468 address,469 event: 'Transfer',470 args: {471 from: subToEth(alice.address),472 to: '0x0000000000000000000000000000000000000000',473 tokenId: tokenId.toString(),474 },475 },476 ]);477 });478196 itWeb3('Events emitted for approve()', async ({ web3 }) => {479 itWeb3('Events emitted for approve()', async ({ web3 }) => {197 const collection = await createCollectionExpectSuccess({480 const collection = await createCollectionExpectSuccess({198 mode: { type: 'NFT' },481 mode: { type: 'NFT' },284 },567 },285 ]);568 ]);286 });569 });287});570});571tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth49 "name": "ApprovalForAll",49 "name": "ApprovalForAll",50 "type": "event"50 "type": "event"51 },51 },52 {53 "anonymous": false,54 "inputs": [],55 "name": "MintingFinished",56 "type": "event"57 },52 {58 {53 "anonymous": false,59 "anonymous": false,54 "inputs": [60 "inputs": [89 ],95 ],90 "name": "approve",96 "name": "approve",91 "outputs": [],97 "outputs": [],92 "stateMutability": "payable",98 "stateMutability": "nonpayable",93 "type": "function"99 "type": "function"94 },100 },95 {101 {111 "stateMutability": "view",117 "stateMutability": "view",112 "type": "function"118 "type": "function"113 },119 },120 {121 "inputs": [122 {123 "internalType": "uint256",124 "name": "tokenId",125 "type": "uint256"126 }127 ],128 "name": "burn",129 "outputs": [],130 "stateMutability": "nonpayable",131 "type": "function"132 },133 {134 "inputs": [],135 "name": "finishMinting",136 "outputs": [137 {138 "internalType": "bool",139 "name": "",140 "type": "bool"141 }142 ],143 "stateMutability": "nonpayable",144 "type": "function"145 },114 {146 {115 "inputs": [147 "inputs": [116 {148 {130 "stateMutability": "view",162 "stateMutability": "view",131 "type": "function"163 "type": "function"132 },164 },133 {165 {166 "inputs": [167 {168 "internalType": "uint256",169 "name": "tokenId",170 "type": "uint256"171 }172 ],173 "name": "getVariableMetadata",174 "outputs": [175 {176 "internalType": "bytes",177 "name": "",178 "type": "bytes"179 }180 ],181 "stateMutability": "view",182 "type": "function"183 },184 {134 "inputs": [185 "inputs": [135 {186 {136 "internalType": "address",187 "internalType": "address",144 }195 }145 ],196 ],146 "name": "isApprovedForAll",197 "name": "isApprovedForAll",198 "outputs": [199 {200 "internalType": "address",201 "name": "",202 "type": "address"203 }204 ],205 "stateMutability": "view",206 "type": "function"207 },208 {209 "inputs": [210 {211 "internalType": "address",212 "name": "to",213 "type": "address"214 },215 {216 "internalType": "uint256",217 "name": "tokenId",218 "type": "uint256"219 }220 ],221 "name": "mint",147 "outputs": [222 "outputs": [148 {223 {149 "internalType": "bool",224 "internalType": "bool",150 "name": "",225 "name": "",151 "type": "bool"226 "type": "bool"152 }227 }153 ],228 ],229 "stateMutability": "nonpayable",230 "type": "function"231 },232 {233 "inputs": [234 {235 "internalType": "address",236 "name": "to",237 "type": "address"238 },239 {240 "internalType": "uint256[]",241 "name": "tokenIds",242 "type": "uint256[]"243 }244 ],245 "name": "mintBulk",246 "outputs": [247 {248 "internalType": "bool",249 "name": "",250 "type": "bool"251 }252 ],253 "stateMutability": "nonpayable",254 "type": "function"255 },256 {257 "inputs": [258 {259 "internalType": "address",260 "name": "to",261 "type": "address"262 },263 {264 "components": [265 {266 "internalType": "uint256",267 "name": "field_0",268 "type": "uint256"269 },270 {271 "internalType": "string",272 "name": "field_1",273 "type": "string"274 }275 ],276 "internalType": "struct Tuple0[]",277 "name": "tokens",278 "type": "tuple[]"279 }280 ],281 "name": "mintBulkWithTokenURI",282 "outputs": [283 {284 "internalType": "bool",285 "name": "",286 "type": "bool"287 }288 ],289 "stateMutability": "nonpayable",290 "type": "function"291 },292 {293 "inputs": [294 {295 "internalType": "address",296 "name": "to",297 "type": "address"298 },299 {300 "internalType": "uint256",301 "name": "tokenId",302 "type": "uint256"303 },304 {305 "internalType": "string",306 "name": "tokenUri",307 "type": "string"308 }309 ],310 "name": "mintWithTokenURI",311 "outputs": [312 {313 "internalType": "bool",314 "name": "",315 "type": "bool"316 }317 ],318 "stateMutability": "nonpayable",319 "type": "function"320 },321 {322 "inputs": [],323 "name": "mintingFinished",324 "outputs": [325 {326 "internalType": "bool",327 "name": "",328 "type": "bool"329 }330 ],154 "stateMutability": "view",331 "stateMutability": "view",155 "type": "function"332 "type": "function"156 },333 },157 {334 {158 "inputs": [],335 "inputs": [],159 "name": "name",336 "name": "name",160 "outputs": [337 "outputs": [161 {338 {162 "internalType": "string",339 "internalType": "string",163 "name": "res_name",340 "name": "",164 "type": "string"341 "type": "string"165 }342 }166 ],343 ],167 "stateMutability": "view",344 "stateMutability": "view",168 "type": "function"345 "type": "function"169 },346 },347 {348 "inputs": [],349 "name": "nextTokenId",350 "outputs": [351 {352 "internalType": "uint256",353 "name": "",354 "type": "uint256"355 }356 ],357 "stateMutability": "view",358 "type": "function"359 },170 {360 {171 "inputs": [361 "inputs": [172 {362 {206 ],396 ],207 "name": "safeTransferFrom",397 "name": "safeTransferFrom",208 "outputs": [],398 "outputs": [],209 "stateMutability": "payable",399 "stateMutability": "nonpayable",210 "type": "function"400 "type": "function"211 },401 },212 {402 {232 "type": "bytes"422 "type": "bytes"233 }423 }234 ],424 ],235 "name": "safeTransferFrom",425 "name": "safeTransferFromWithData",236 "outputs": [],426 "outputs": [],237 "stateMutability": "payable",427 "stateMutability": "nonpayable",238 "type": "function"428 "type": "function"239 },429 },240 {430 {255 "stateMutability": "nonpayable",445 "stateMutability": "nonpayable",256 "type": "function"446 "type": "function"257 },447 },448 {449 "inputs": [450 {451 "internalType": "uint256",452 "name": "tokenId",453 "type": "uint256"454 },455 {456 "internalType": "bytes",457 "name": "data",458 "type": "bytes"459 }460 ],461 "name": "setVariableMetadata",462 "outputs": [],463 "stateMutability": "nonpayable",464 "type": "function"465 },258 {466 {259 "inputs": [467 "inputs": [260 {468 {261 "internalType": "bytes4",469 "internalType": "uint32",262 "name": "interfaceID",470 "name": "interfaceId",263 "type": "bytes4"471 "type": "uint32"264 }472 }265 ],473 ],266 "name": "supportsInterface",474 "name": "supportsInterface",271 "type": "bool"479 "type": "bool"272 }480 }273 ],481 ],274 "stateMutability": "pure",482 "stateMutability": "view",275 "type": "function"483 "type": "function"276 },484 },277 {485 {280 "outputs": [488 "outputs": [281 {489 {282 "internalType": "string",490 "internalType": "string",283 "name": "res_symbol",491 "name": "",284 "type": "string"492 "type": "string"285 }493 }286 ],494 ],364 },572 },365 {573 {366 "inputs": [574 "inputs": [367 {368 "internalType": "address",369 "name": "from",370 "type": "address"371 },372 {575 {373 "internalType": "address",576 "internalType": "address",374 "name": "to",577 "name": "to",380 "type": "uint256"583 "type": "uint256"381 }584 }382 ],585 ],383 "name": "transferFrom",586 "name": "transfer",384 "outputs": [],587 "outputs": [],385 "stateMutability": "payable",588 "stateMutability": "nonpayable",386 "type": "function"589 "type": "function"387 },590 },388 {591 {389 "inputs": [592 "inputs": [593 {594 "internalType": "address",595 "name": "from",596 "type": "address"597 },390 {598 {391 "internalType": "address",599 "internalType": "address",392 "name": "to",600 "name": "to",398 "type": "uint256"606 "type": "uint256"399 }607 }400 ],608 ],401 "name": "transfer",609 "name": "transferFrom",402 "outputs": [],610 "outputs": [],403 "stateMutability": "payable",611 "stateMutability": "nonpayable",404 "type": "function"612 "type": "function"405 }613 }406]614]tests/src/eth/payable.test.tsdiffbeforeafterbothno changes
tests/src/eth/proxy/UniqueFungibleProxy.abidiffbeforeafterbothno changes
tests/src/eth/proxy/UniqueFungibleProxy.bindiffbeforeafterbothno changes
tests/src/eth/proxy/UniqueFungibleProxy.soldiffbeforeafterbothno changes
tests/src/eth/proxy/UniqueNFTProxy.abidiffbeforeafterbothno changes
tests/src/eth/proxy/UniqueNFTProxy.bindiffbeforeafterbothno changes
tests/src/eth/proxy/UniqueNFTProxy.soldiffbeforeafterbothno changes
tests/src/eth/proxy/fungibleProxy.test.tsdiffbeforeafterbothno changes
tests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterbothno changes
tests/src/eth/util/helpers.tsdiffbeforeafterboth17import config from '../../config';17import config from '../../config';18import privateKey from '../../substrate/privateKey';18import privateKey from '../../substrate/privateKey';19import contractHelpersAbi from './contractHelpersAbi.json';19import contractHelpersAbi from './contractHelpersAbi.json';20import getBalance from '../../substrate/get-balance';21import waitNewBlocks from '../../substrate/wait-new-blocks';202221export const GAS_ARGS = { gas: 0x1000000, gasPrice: '0x01' };23export const GAS_ARGS = { gas: 0x1000000, gasPrice: '0x01' };222437 }39 }38}40}394140type Web3HttpMarker = {web3Http: true};42/**4143 * @deprecated Web3 update solved issue with deployment over ws provider44 */42export async function usingWeb3Http<T>(cb: (web3: Web3 & Web3HttpMarker) => Promise<T> | T): Promise<T> {45export async function usingWeb3Http<T>(cb: (web3: Web3) => Promise<T> | T): Promise<T> {43 const provider = new Web3.providers.HttpProvider(config.frontierUrl);46 const provider = new Web3.providers.HttpProvider(config.frontierUrl);44 const web3: Web3 & Web3HttpMarker = new Web3(provider) as any;47 const web3: Web3 = new Web3(provider);45 web3.web3Http = true;464847 return await cb(web3);49 return await cb(web3);48}50}141 return normalizeEvents(out);143 return normalizeEvents(out);142}144}143145144export function subToEth(eth: string): string {146export function subToEthLowercase(eth: string): string {145 const bytes = addressToEvm(eth);147 const bytes = addressToEvm(eth);146 const string = '0x' + Buffer.from(bytes).toString('hex');148 return '0x' + Buffer.from(bytes).toString('hex');147 return Web3.utils.toChecksumAddress(string);148}149}150151export function subToEth(eth: string): string {152 return Web3.utils.toChecksumAddress(subToEthLowercase(eth));153}149154150export function compileContract(name: string, src: string) {155export function compileContract(name: string, src: string) {151 const out = JSON.parse(solc.compile(JSON.stringify({156 const out = JSON.parse(solc.compile(JSON.stringify({175 };180 };176}181}177182178export async function deployFlipper(web3: Web3 & Web3HttpMarker, deployer: string) {183export async function deployFlipper(web3: Web3, deployer: string) {179 const compiled = compileContract('Flipper', `184 const compiled = compileContract('Flipper', `180 contract Flipper {185 contract Flipper {181 bool value = false;186 bool value = false;197 return flipper;202 return flipper;198}203}199204200export async function deployCollector(web3: Web3 & Web3HttpMarker, deployer: string) {205export async function deployCollector(web3: Web3, deployer: string) {201 const compiled = compileContract('Collector', `206 const compiled = compileContract('Collector', `202 contract Collector {207 contract Collector {203 uint256 collected;208 uint256 collected;204 function giveMoney() public payable {209 fallback() external payable {205 collected += msg.value;210 giveMoney();206 }211 }207 function getCollected() public view returns (uint256) {212 function giveMoney() public payable {208 return collected;213 collected += msg.value;209 }214 }210 }215 function getCollected() public view returns (uint256) {216 return collected;217 }218 function getUnaccounted() public view returns (uint256) {219 return address(this).balance - collected;220 }221222 function withdraw(address payable target) public {223 target.transfer(collected);224 collected = 0;225 }226 }211 `);227 `);212 const Collector = new web3.eth.Contract(compiled.abi, undefined, {228 const Collector = new web3.eth.Contract(compiled.abi, undefined, {213 data: compiled.object,229 data: compiled.object,214 from: deployer,230 from: deployer,223 return new web3.eth.Contract(contractHelpersAbi as any, '0x842899ECF380553E8a4de75bF534cdf6fBF64049', {from: caller, ...GAS_ARGS});239 return new web3.eth.Contract(contractHelpersAbi as any, '0x842899ECF380553E8a4de75bF534cdf6fBF64049', {from: caller, ...GAS_ARGS});224}240}241242export async function executeEthTxOnSub(api: ApiPromise, from: IKeyringPair, to: any, mkTx: (methods: any) => any, { value = 0 }: {value?: bigint | number} = { }) {243 const tx = api.tx.evm.call(244 subToEth(from.address),245 to.options.address,246 mkTx(to.methods).encodeABI(),247 value,248 GAS_ARGS.gas,249 GAS_ARGS.gasPrice,250 null,251 );252 const events = await submitTransactionAsync(from, tx);253 expect(events.find(({ event: {section, method}})=>section === 'evm' && method === 'Executed')).to.be.not.undefined;254}255256export async function ethBalanceViaSub(api: ApiPromise, address: string): Promise<bigint> {257 return (await getBalance(api, [evmToAddress(address)]))[0];258}259260export async function recordEthFee(api: ApiPromise, user: string, call: () => Promise<any>): Promise<bigint> {261 const before = await ethBalanceViaSub(api, user);262263 await call();264 await waitNewBlocks(api, 1);265266 const after = await ethBalanceViaSub(api, user);267268 // Can't use .to.be.less, because chai doesn't supports bigint269 expect(after < before).to.be.true;270271 return before - after;272}273tests/src/pallet-presence.test.tsdiffbeforeafterboth23 'parachainsystem',23 'parachainsystem',24 'parachaininfo',24 'parachaininfo',25 'evm',25 'evm',26 'evmcodersubstrate',27 'evmcontracthelpers',28 'evmmigration',29 'evmtransactionpayment',26 'ethereum',30 'ethereum',27 'xcmpqueue',31 'xcmpqueue',28 'polkadotxcm',32 'polkadotxcm',59 });63 });60 it('No extra pallets are included', async () => {64 it('No extra pallets are included', async () => {61 await usingApi(async api => {65 await usingApi(async api => {62 expect(getModuleNames(api).length).to.be.equal(requiredPallets.length + consensusPallets.length);66 expect(getModuleNames(api).sort()).to.be.deep.equal([...requiredPallets, ...consensusPallets].sort());63 });67 });64 });68 });65});69});tests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth37 });37 });38 });38 });3940 it('Remove collection admin by admin.', async () => {41 await usingApi(async (api: ApiPromise) => {42 const collectionId = await createCollectionExpectSuccess();43 const Alice = privateKey('//Alice');44 const Bob = privateKey('//Bob');45 const Charlie = privateKey('//Charlie');46 const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();47 expect(collection.Owner).to.be.deep.eq(Alice.address);48 // first - add collection admin Bob49 const addAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));50 await submitTransactionAsync(Alice, addAdminTx);5152 const addAdminTx2 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Charlie.address));53 await submitTransactionAsync(Alice, addAdminTx2);5455 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId)).toJSON();56 expect(adminListAfterAddAdmin).to.be.deep.contains(normalizeAccountId(Bob.address));5758 // then remove bob from admins of collection59 const removeAdminTx = api.tx.nft.removeCollectionAdmin(collectionId, normalizeAccountId(Bob.address));60 await submitTransactionAsync(Charlie, removeAdminTx);6162 const adminListAfterRemoveAdmin: any = (await api.query.nft.adminList(collectionId)).toJSON;63 expect(adminListAfterRemoveAdmin).not.to.be.deep.contains(normalizeAccountId(Bob.address));64 });65 });396640 it('Remove admin from collection that has no admins', async () => {67 it('Remove admin from collection that has no admins', async () => {41 await usingApi(async (api: ApiPromise) => {68 await usingApi(async (api: ApiPromise) => {tests/src/removeCollectionSponsor.test.tsdiffbeforeafterboth112 await removeCollectionSponsorExpectFailure(collectionId, '//Bob');112 await removeCollectionSponsorExpectFailure(collectionId, '//Bob');113 });113 });114115 it('(!negative test!) Remove sponsor for a collection by regular user', async () => {116 const collectionId = await createCollectionExpectSuccess();117 await setCollectionSponsorExpectSuccess(collectionId, bob.address);118 await removeCollectionSponsorExpectFailure(collectionId, '//Bob');119 });114120115 it('(!negative test!) Remove sponsor in a destroyed collection', async () => {121 it('(!negative test!) Remove sponsor in a destroyed collection', async () => {116 const collectionId = await createCollectionExpectSuccess();122 const collectionId = await createCollectionExpectSuccess();tests/src/removeFromWhiteList.test.tsdiffbeforeafterboth125 });125 });126 });126 });127128 it('Regular user can`t remove from whitelist', async () => {129 await usingApi(async () => {130 const collectionWithoutWhitelistId = await createCollectionExpectSuccess();131 await enableWhiteListExpectSuccess(alice, collectionWithoutWhitelistId);132 await addToWhiteListExpectSuccess(alice, collectionWithoutWhitelistId, charlie.address);133 await removeFromWhiteListExpectFailure(bob, collectionWithoutWhitelistId, normalizeAccountId(charlie.address));134 });135 });127});136});tests/src/setChainLimits.test.tsdiffbeforeafterboth13 IChainLimits,13 IChainLimits,14} from './util/helpers';14} from './util/helpers';151516describe('Negative Integration Test setChainLimits', () => {16describe.skip('Negative Integration Test setChainLimits', () => {17 let alice: IKeyringPair;17 let alice: IKeyringPair;18 let bob: IKeyringPair;18 let bob: IKeyringPair;19 let dave: IKeyringPair;19 let dave: IKeyringPair;tests/src/setPublicAccessMode.test.tsdiffbeforeafterboth101 Bob = privateKey('//Bob');101 Bob = privateKey('//Bob');102 });102 });103 });103 });104 it('Set the collection that has been deleted', async () => {104 it('setPublicAccessMode by collection admin', async () => {105 await usingApi(async (api: ApiPromise) => {105 await usingApi(async (api: ApiPromise) => {106 // tslint:disable-next-line: no-bitwise106 // tslint:disable-next-line: no-bitwise107 const collectionId = await createCollectionExpectSuccess();107 const collectionId = await createCollectionExpectSuccess();tests/src/setSchemaVersion.test.tsdiffbeforeafterboth242425let alice: IKeyringPair;25let alice: IKeyringPair;26let bob: IKeyringPair;26let bob: IKeyringPair;27let charlie: IKeyringPair;27let collectionIdForTesting: number;28let collectionIdForTesting: number;282929/*30/*117 await usingApi(async () => {118 await usingApi(async () => {118 const keyring = new Keyring({ type: 'sr25519' });119 const keyring = new Keyring({ type: 'sr25519' });119 alice = keyring.addFromUri('//Alice');120 alice = keyring.addFromUri('//Alice');121 charlie = keyring.addFromUri('//Charlie');120 });122 });121 });123 });122 it('execute setSchemaVersion for not exists collection', async () => {124 it('execute setSchemaVersion for not exists collection', async () => {151 await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;151 await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;152 });152 });153 });153 });154 it('Regular user can`t execute setSchemaVersion with image url and unique ', async () => {155 await usingApi(async (api: ApiPromise) => {156 tx = api.tx.nft.setSchemaVersion(collectionIdForTesting, 'Unique');157 await expect(submitTransactionAsync(charlie, tx)).to.be.rejected;158 });159 });154});160});155161tests/src/substrate/get-balance.tsdiffbeforeafterboth6import { ApiPromise } from '@polkadot/api';6import { ApiPromise } from '@polkadot/api';7import {AccountInfo} from '@polkadot/types/interfaces/system';7import {AccountInfo} from '@polkadot/types/interfaces/system';8import promisifySubstrate from './promisify-substrate';8import promisifySubstrate from './promisify-substrate';9import { IKeyringPair } from '@polkadot/types/types';10import { submitTransactionAsync } from './substrate-api';11import { getGenericResult } from '../util/helpers';12import { expect } from 'chai';91310export default async function getBalance(api: ApiPromise, accounts: string[]): Promise<Array<bigint>> {14export default async function getBalance(api: ApiPromise, accounts: string[]): Promise<Array<bigint>> {11 const balance = promisifySubstrate(api, (acc: string[]) => api.query.system.account.multi(acc));15 const balance = promisifySubstrate(api, (acc: string[]) => api.query.system.account.multi(acc));12 const responce = await balance(accounts) as unknown as AccountInfo[];16 const responce = await balance(accounts) as unknown as AccountInfo[];13 return responce.map((r) => r.data.free.toBigInt().valueOf());17 return responce.map((r) => r.data.free.toBigInt().valueOf());14}18}151920export async function getBalanceSingle(api: ApiPromise, account: string): Promise<bigint> {21 return (await getBalance(api, [account]))[0];22}2324export async function transferBalanceExpectSuccess(api: ApiPromise, from: IKeyringPair, to: string, amount: bigint | string) {25 const tx = api.tx.balances.transfer(to, amount);26 const events = await submitTransactionAsync(from, tx);27 const result = getGenericResult(events);28 expect(result.success).to.be.true;29}tests/src/transfer.test.tsdiffbeforeafterboth60 // tslint:disable-next-line:no-unused-expression60 // tslint:disable-next-line:no-unused-expression61 expect(result.success).to.be.false;61 expect(result.success).to.be.false;62 };62 };63 expect(badTransaction()).to.be.rejectedWith('Inability to pay some fees , e.g. account balance too low');63 await expect(badTransaction()).to.be.rejectedWith('Inability to pay some fees , e.g. account balance too low');64 });64 });65 });65 });6666tests/src/util/helpers.tsdiffbeforeafterboth535354export const U128_MAX = (1n << 128n) - 1n;54export const U128_MAX = (1n << 128n) - 1n;5556const MICROUNIQUE = 1_000_000_000n;57const MILLIUNIQUE = 1_000n * MICROUNIQUE;58const CENTIUNIQUE = 10n * MILLIUNIQUE;59export const UNIQUE = 100n * CENTIUNIQUE;556056type GenericResult = {61type GenericResult = {57 success: boolean,62 success: boolean,1006 });1011 });1007}1012}10131014export async function setPublicAccessModeExpectFail(1015 sender: IKeyringPair, collectionId: number,1016 accessMode: 'Normal' | 'WhiteList',1017) {1018 await usingApi(async (api) => {10191020 // Run the transaction1021 const tx = api.tx.nft.setPublicAccessMode(collectionId, accessMode);1022 const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;1023 const result = getGenericResult(events);10241025 // What to expect1026 // tslint:disable-next-line:no-unused-expression1027 expect(result.success).to.be.false;1028 });1029}100810301009export async function enableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {1031export async function enableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {1010 await setPublicAccessModeExpectSuccess(sender, collectionId, 'WhiteList');1032 await setPublicAccessModeExpectSuccess(sender, collectionId, 'WhiteList');1011}1033}10341035export async function enableWhiteListExpectFail(sender: IKeyringPair, collectionId: number) {1036 await setPublicAccessModeExpectFail(sender, collectionId, 'WhiteList');1037}101210381013export async function disableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {1039export async function disableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {1014 await setPublicAccessModeExpectSuccess(sender, collectionId, 'Normal');1040 await setPublicAccessModeExpectSuccess(sender, collectionId, 'Normal');1088 });1114 });1089}1115}11161117export async function addToWhiteListExpectFail(sender: IKeyringPair, collectionId: number, address: string | AccountId) {1118 await usingApi(async (api) => {1119 // Run the transaction1120 const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(address));1121 const events = await expect(submitTransactionAsync(sender, tx)).to.be.rejected;1122 const result = getGenericResult(events);11231124 // What to expect1125 // tslint:disable-next-line:no-unused-expression1126 expect(result.success).to.be.false;1127 });1128}109011291091export async function removeFromWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {1130export async function removeFromWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {1092 await usingApi(async (api) => {1131 await usingApi(async (api) => {1130 });1169 });1131}1170}113211711172export async function queryNftOwner(api: ApiPromise, collectionId: number, tokenId: number): Promise<CrossAccountId> {1173 return normalizeAccountId((await api.query.nft.nftItemList(collectionId, tokenId) as any).toJSON().Owner);1174}tests/yarn.lockdiffbeforeafterboth2# yarn lockfile v12# yarn lockfile v133445"@babel/cli@^7.14.5":5"@babel/cli@^7.14.8":6 version "7.14.5"6 version "7.14.8"7 resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.14.5.tgz#9551b194f02360729de6060785bbdcce52c69f0a"7 resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.14.8.tgz#fac73c0e2328a8af9fd3560c06b096bfa3730933"8 integrity sha512-poegjhRvXHWO0EAsnYajwYZuqcz7gyfxwfaecUESxDujrqOivf3zrjFbub8IJkrqEaz3fvJWh001EzxBub54fg==8 integrity sha512-lcy6Lymft9Rpfqmrqdd4oTDdUx9ZwaAhAfywVrHG4771Pa6PPT0danJ1kDHBXYqh4HHSmIdA+nlmfxfxSDPtBg==9 dependencies:9 dependencies:10 commander "^4.0.1"10 commander "^4.0.1"11 convert-source-map "^1.1.0"11 convert-source-map "^1.1.0"42 resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08"42 resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08"43 integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==43 integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==444445"@babel/core@^7.1.0", "@babel/core@^7.14.6", "@babel/core@^7.7.2", "@babel/core@^7.7.5":45"@babel/compat-data@^7.15.0":46 version "7.15.0"47 resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176"48 integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==4950"@babel/core@^7.1.0", "@babel/core@^7.7.2", "@babel/core@^7.7.5":46 version "7.14.6"51 version "7.14.6"47 resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab"52 resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab"48 integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==53 integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==63 semver "^6.3.0"68 semver "^6.3.0"64 source-map "^0.5.0"69 source-map "^0.5.0"657071"@babel/core@^7.15.0":72 version "7.15.0"73 resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.0.tgz#749e57c68778b73ad8082775561f67f5196aafa8"74 integrity sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==75 dependencies:76 "@babel/code-frame" "^7.14.5"77 "@babel/generator" "^7.15.0"78 "@babel/helper-compilation-targets" "^7.15.0"79 "@babel/helper-module-transforms" "^7.15.0"80 "@babel/helpers" "^7.14.8"81 "@babel/parser" "^7.15.0"82 "@babel/template" "^7.14.5"83 "@babel/traverse" "^7.15.0"84 "@babel/types" "^7.15.0"85 convert-source-map "^1.7.0"86 debug "^4.1.0"87 gensync "^1.0.0-beta.2"88 json5 "^2.1.2"89 semver "^6.3.0"90 source-map "^0.5.0"9166"@babel/generator@^7.14.5", "@babel/generator@^7.7.2":92"@babel/generator@^7.14.5", "@babel/generator@^7.7.2":67 version "7.14.5"93 version "7.14.5"68 resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.5.tgz#848d7b9f031caca9d0cd0af01b063f226f52d785"94 resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.5.tgz#848d7b9f031caca9d0cd0af01b063f226f52d785"72 jsesc "^2.5.1"98 jsesc "^2.5.1"73 source-map "^0.5.0"99 source-map "^0.5.0"74100101"@babel/generator@^7.15.0":102 version "7.15.0"103 resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15"104 integrity sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==105 dependencies:106 "@babel/types" "^7.15.0"107 jsesc "^2.5.1"108 source-map "^0.5.0"10975"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.14.5":110"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.14.5":76 version "7.14.5"111 version "7.14.5"77 resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz#7bf478ec3b71726d56a8ca5775b046fc29879e61"112 resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz#7bf478ec3b71726d56a8ca5775b046fc29879e61"97 browserslist "^4.16.6"132 browserslist "^4.16.6"98 semver "^6.3.0"133 semver "^6.3.0"99134100"@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.14.6":135"@babel/helper-compilation-targets@^7.15.0":136 version "7.15.0"137 resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818"138 integrity sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==139 dependencies:140 "@babel/compat-data" "^7.15.0"141 "@babel/helper-validator-option" "^7.14.5"142 browserslist "^4.16.6"143 semver "^6.3.0"144145"@babel/helper-create-class-features-plugin@^7.14.5":101 version "7.14.6"146 version "7.14.6"102 resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz#f114469b6c06f8b5c59c6c4e74621f5085362542"147 resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz#f114469b6c06f8b5c59c6c4e74621f5085362542"103 integrity sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg==148 integrity sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg==109 "@babel/helper-replace-supers" "^7.14.5"154 "@babel/helper-replace-supers" "^7.14.5"110 "@babel/helper-split-export-declaration" "^7.14.5"155 "@babel/helper-split-export-declaration" "^7.14.5"111156157"@babel/helper-create-class-features-plugin@^7.15.0":158 version "7.15.0"159 resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz#c9a137a4d137b2d0e2c649acf536d7ba1a76c0f7"160 integrity sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==161 dependencies:162 "@babel/helper-annotate-as-pure" "^7.14.5"163 "@babel/helper-function-name" "^7.14.5"164 "@babel/helper-member-expression-to-functions" "^7.15.0"165 "@babel/helper-optimise-call-expression" "^7.14.5"166 "@babel/helper-replace-supers" "^7.15.0"167 "@babel/helper-split-export-declaration" "^7.14.5"168112"@babel/helper-create-regexp-features-plugin@^7.14.5":169"@babel/helper-create-regexp-features-plugin@^7.14.5":113 version "7.14.5"170 version "7.14.5"114 resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4"171 resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4"168 dependencies:225 dependencies:169 "@babel/types" "^7.14.5"226 "@babel/types" "^7.14.5"170227228"@babel/helper-member-expression-to-functions@^7.15.0":229 version "7.15.0"230 resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b"231 integrity sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==232 dependencies:233 "@babel/types" "^7.15.0"234171"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5":235"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5":172 version "7.14.5"236 version "7.14.5"173 resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3"237 resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3"189 "@babel/traverse" "^7.14.5"253 "@babel/traverse" "^7.14.5"190 "@babel/types" "^7.14.5"254 "@babel/types" "^7.14.5"191255256"@babel/helper-module-transforms@^7.15.0":257 version "7.15.0"258 resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08"259 integrity sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==260 dependencies:261 "@babel/helper-module-imports" "^7.14.5"262 "@babel/helper-replace-supers" "^7.15.0"263 "@babel/helper-simple-access" "^7.14.8"264 "@babel/helper-split-export-declaration" "^7.14.5"265 "@babel/helper-validator-identifier" "^7.14.9"266 "@babel/template" "^7.14.5"267 "@babel/traverse" "^7.15.0"268 "@babel/types" "^7.15.0"269192"@babel/helper-optimise-call-expression@^7.14.5":270"@babel/helper-optimise-call-expression@^7.14.5":193 version "7.14.5"271 version "7.14.5"194 resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c"272 resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c"220 "@babel/traverse" "^7.14.5"298 "@babel/traverse" "^7.14.5"221 "@babel/types" "^7.14.5"299 "@babel/types" "^7.14.5"222300301"@babel/helper-replace-supers@^7.15.0":302 version "7.15.0"303 resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4"304 integrity sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==305 dependencies:306 "@babel/helper-member-expression-to-functions" "^7.15.0"307 "@babel/helper-optimise-call-expression" "^7.14.5"308 "@babel/traverse" "^7.15.0"309 "@babel/types" "^7.15.0"310223"@babel/helper-simple-access@^7.14.5":311"@babel/helper-simple-access@^7.14.5":224 version "7.14.5"312 version "7.14.5"225 resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4"313 resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4"226 integrity sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw==314 integrity sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw==227 dependencies:315 dependencies:228 "@babel/types" "^7.14.5"316 "@babel/types" "^7.14.5"229317318"@babel/helper-simple-access@^7.14.8":319 version "7.14.8"320 resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924"321 integrity sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==322 dependencies:323 "@babel/types" "^7.14.8"324230"@babel/helper-skip-transparent-expression-wrappers@^7.14.5":325"@babel/helper-skip-transparent-expression-wrappers@^7.14.5":231 version "7.14.5"326 version "7.14.5"232 resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz#96f486ac050ca9f44b009fbe5b7d394cab3a0ee4"327 resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz#96f486ac050ca9f44b009fbe5b7d394cab3a0ee4"246 resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8"341 resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8"247 integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==342 integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==248343344"@babel/helper-validator-identifier@^7.14.9":345 version "7.14.9"346 resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48"347 integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==348249"@babel/helper-validator-option@^7.14.5":349"@babel/helper-validator-option@^7.14.5":250 version "7.14.5"350 version "7.14.5"251 resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3"351 resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3"270 "@babel/traverse" "^7.14.5"370 "@babel/traverse" "^7.14.5"271 "@babel/types" "^7.14.5"371 "@babel/types" "^7.14.5"272372373"@babel/helpers@^7.14.8":374 version "7.15.3"375 resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.15.3.tgz#c96838b752b95dcd525b4e741ed40bb1dc2a1357"376 integrity sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==377 dependencies:378 "@babel/template" "^7.14.5"379 "@babel/traverse" "^7.15.0"380 "@babel/types" "^7.15.0"381273"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5":382"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5":274 version "7.14.5"383 version "7.14.5"275 resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9"384 resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9"284 resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.6.tgz#d85cc68ca3cac84eae384c06f032921f5227f4b2"393 resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.6.tgz#d85cc68ca3cac84eae384c06f032921f5227f4b2"285 integrity sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ==394 integrity sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ==286395396"@babel/parser@^7.15.0":397 version "7.15.3"398 resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.3.tgz#3416d9bea748052cfcb63dbcc27368105b1ed862"399 integrity sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==400287"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5":401"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5":288 version "7.14.5"402 version "7.14.5"289 resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz#4b467302e1548ed3b1be43beae2cc9cf45e0bb7e"403 resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz#4b467302e1548ed3b1be43beae2cc9cf45e0bb7e"293 "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5"407 "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5"294 "@babel/plugin-proposal-optional-chaining" "^7.14.5"408 "@babel/plugin-proposal-optional-chaining" "^7.14.5"295409296"@babel/plugin-proposal-async-generator-functions@^7.14.7":410"@babel/plugin-proposal-async-generator-functions@^7.14.9":297 version "7.14.7"411 version "7.14.9"298 resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.7.tgz#784a48c3d8ed073f65adcf30b57bcbf6c8119ace"412 resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz#7028dc4fa21dc199bbacf98b39bab1267d0eaf9a"299 integrity sha512-RK8Wj7lXLY3bqei69/cc25gwS5puEc3dknoFPFbqfy3XxYQBQFvu4ioWpafMBAB+L9NyptQK4nMOa5Xz16og8Q==413 integrity sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==300 dependencies:414 dependencies:301 "@babel/helper-plugin-utils" "^7.14.5"415 "@babel/helper-plugin-utils" "^7.14.5"302 "@babel/helper-remap-async-to-generator" "^7.14.5"416 "@babel/helper-remap-async-to-generator" "^7.14.5"577 dependencies:691 dependencies:578 "@babel/helper-plugin-utils" "^7.14.5"692 "@babel/helper-plugin-utils" "^7.14.5"579693580"@babel/plugin-transform-classes@^7.14.5":694"@babel/plugin-transform-classes@^7.14.9":581 version "7.14.5"695 version "7.14.9"582 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz#0e98e82097b38550b03b483f9b51a78de0acb2cf"696 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz#2a391ffb1e5292710b00f2e2c210e1435e7d449f"583 integrity sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA==697 integrity sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==584 dependencies:698 dependencies:585 "@babel/helper-annotate-as-pure" "^7.14.5"699 "@babel/helper-annotate-as-pure" "^7.14.5"586 "@babel/helper-function-name" "^7.14.5"700 "@babel/helper-function-name" "^7.14.5"665 "@babel/helper-plugin-utils" "^7.14.5"779 "@babel/helper-plugin-utils" "^7.14.5"666 babel-plugin-dynamic-import-node "^2.3.3"780 babel-plugin-dynamic-import-node "^2.3.3"667781668"@babel/plugin-transform-modules-commonjs@^7.14.5":782"@babel/plugin-transform-modules-commonjs@^7.15.0":669 version "7.14.5"783 version "7.15.0"670 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz#7aaee0ea98283de94da98b28f8c35701429dad97"784 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz#3305896e5835f953b5cdb363acd9e8c2219a5281"671 integrity sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A==785 integrity sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==672 dependencies:786 dependencies:673 "@babel/helper-module-transforms" "^7.14.5"787 "@babel/helper-module-transforms" "^7.15.0"674 "@babel/helper-plugin-utils" "^7.14.5"788 "@babel/helper-plugin-utils" "^7.14.5"675 "@babel/helper-simple-access" "^7.14.5"789 "@babel/helper-simple-access" "^7.14.8"676 babel-plugin-dynamic-import-node "^2.3.3"790 babel-plugin-dynamic-import-node "^2.3.3"677791678"@babel/plugin-transform-modules-systemjs@^7.14.5":792"@babel/plugin-transform-modules-systemjs@^7.14.5":694 "@babel/helper-module-transforms" "^7.14.5"808 "@babel/helper-module-transforms" "^7.14.5"695 "@babel/helper-plugin-utils" "^7.14.5"809 "@babel/helper-plugin-utils" "^7.14.5"696810697"@babel/plugin-transform-named-capturing-groups-regex@^7.14.7":811"@babel/plugin-transform-named-capturing-groups-regex@^7.14.9":698 version "7.14.7"812 version "7.14.9"699 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.7.tgz#60c06892acf9df231e256c24464bfecb0908fd4e"813 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz#c68f5c5d12d2ebaba3762e57c2c4f6347a46e7b2"700 integrity sha512-DTNOTaS7TkW97xsDMrp7nycUVh6sn/eq22VaxWfEdzuEbRsiaOU0pqU7DlyUGHVsbQbSghvjKRpEl+nUCKGQSg==814 integrity sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==701 dependencies:815 dependencies:702 "@babel/helper-create-regexp-features-plugin" "^7.14.5"816 "@babel/helper-create-regexp-features-plugin" "^7.14.5"703817777 dependencies:891 dependencies:778 "@babel/helper-plugin-utils" "^7.14.5"892 "@babel/helper-plugin-utils" "^7.14.5"779893780"@babel/plugin-transform-runtime@^7.14.5":894"@babel/plugin-transform-runtime@^7.15.0":781 version "7.14.5"895 version "7.15.0"782 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.14.5.tgz#30491dad49c6059f8f8fa5ee8896a0089e987523"896 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.15.0.tgz#d3aa650d11678ca76ce294071fda53d7804183b3"783 integrity sha512-fPMBhh1AV8ZyneiCIA+wYYUH1arzlXR1UMcApjvchDhfKxhy2r2lReJv8uHEyihi4IFIGlr1Pdx7S5fkESDQsg==897 integrity sha512-sfHYkLGjhzWTq6xsuQ01oEsUYjkHRux9fW1iUA68dC7Qd8BS1Unq4aZ8itmQp95zUzIcyR2EbNMTzAicFj+guw==784 dependencies:898 dependencies:785 "@babel/helper-module-imports" "^7.14.5"899 "@babel/helper-module-imports" "^7.14.5"786 "@babel/helper-plugin-utils" "^7.14.5"900 "@babel/helper-plugin-utils" "^7.14.5"825 dependencies:939 dependencies:826 "@babel/helper-plugin-utils" "^7.14.5"940 "@babel/helper-plugin-utils" "^7.14.5"827941828"@babel/plugin-transform-typescript@^7.14.5":942"@babel/plugin-transform-typescript@^7.15.0":829 version "7.14.6"943 version "7.15.0"830 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.6.tgz#6e9c2d98da2507ebe0a883b100cde3c7279df36c"944 resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.0.tgz#553f230b9d5385018716586fc48db10dd228eb7e"831 integrity sha512-XlTdBq7Awr4FYIzqhmYY80WN0V0azF74DMPyFqVHBvf81ZUgc4X7ZOpx6O8eLDK6iM5cCQzeyJw0ynTaefixRA==945 integrity sha512-WIIEazmngMEEHDaPTx0IZY48SaAmjVWe3TRSX7cmJXn0bEv9midFzAjxiruOWYIVf5iQ10vFx7ASDpgEO08L5w==832 dependencies:946 dependencies:833 "@babel/helper-create-class-features-plugin" "^7.14.6"947 "@babel/helper-create-class-features-plugin" "^7.15.0"834 "@babel/helper-plugin-utils" "^7.14.5"948 "@babel/helper-plugin-utils" "^7.14.5"835 "@babel/plugin-syntax-typescript" "^7.14.5"949 "@babel/plugin-syntax-typescript" "^7.14.5"836950849 "@babel/helper-create-regexp-features-plugin" "^7.14.5"963 "@babel/helper-create-regexp-features-plugin" "^7.14.5"850 "@babel/helper-plugin-utils" "^7.14.5"964 "@babel/helper-plugin-utils" "^7.14.5"851965852"@babel/preset-env@^7.14.7":966"@babel/preset-env@^7.15.0":853 version "7.14.7"967 version "7.15.0"854 resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.14.7.tgz#5c70b22d4c2d893b03d8c886a5c17422502b932a"968 resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.15.0.tgz#e2165bf16594c9c05e52517a194bf6187d6fe464"855 integrity sha512-itOGqCKLsSUl0Y+1nSfhbuuOlTs0MJk2Iv7iSH+XT/mR8U1zRLO7NjWlYXB47yhK4J/7j+HYty/EhFZDYKa/VA==969 integrity sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q==856 dependencies:970 dependencies:857 "@babel/compat-data" "^7.14.7"971 "@babel/compat-data" "^7.15.0"858 "@babel/helper-compilation-targets" "^7.14.5"972 "@babel/helper-compilation-targets" "^7.15.0"859 "@babel/helper-plugin-utils" "^7.14.5"973 "@babel/helper-plugin-utils" "^7.14.5"860 "@babel/helper-validator-option" "^7.14.5"974 "@babel/helper-validator-option" "^7.14.5"861 "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.14.5"975 "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.14.5"862 "@babel/plugin-proposal-async-generator-functions" "^7.14.7"976 "@babel/plugin-proposal-async-generator-functions" "^7.14.9"863 "@babel/plugin-proposal-class-properties" "^7.14.5"977 "@babel/plugin-proposal-class-properties" "^7.14.5"864 "@babel/plugin-proposal-class-static-block" "^7.14.5"978 "@babel/plugin-proposal-class-static-block" "^7.14.5"865 "@babel/plugin-proposal-dynamic-import" "^7.14.5"979 "@babel/plugin-proposal-dynamic-import" "^7.14.5"892 "@babel/plugin-transform-async-to-generator" "^7.14.5"1006 "@babel/plugin-transform-async-to-generator" "^7.14.5"893 "@babel/plugin-transform-block-scoped-functions" "^7.14.5"1007 "@babel/plugin-transform-block-scoped-functions" "^7.14.5"894 "@babel/plugin-transform-block-scoping" "^7.14.5"1008 "@babel/plugin-transform-block-scoping" "^7.14.5"895 "@babel/plugin-transform-classes" "^7.14.5"1009 "@babel/plugin-transform-classes" "^7.14.9"896 "@babel/plugin-transform-computed-properties" "^7.14.5"1010 "@babel/plugin-transform-computed-properties" "^7.14.5"897 "@babel/plugin-transform-destructuring" "^7.14.7"1011 "@babel/plugin-transform-destructuring" "^7.14.7"898 "@babel/plugin-transform-dotall-regex" "^7.14.5"1012 "@babel/plugin-transform-dotall-regex" "^7.14.5"903 "@babel/plugin-transform-literals" "^7.14.5"1017 "@babel/plugin-transform-literals" "^7.14.5"904 "@babel/plugin-transform-member-expression-literals" "^7.14.5"1018 "@babel/plugin-transform-member-expression-literals" "^7.14.5"905 "@babel/plugin-transform-modules-amd" "^7.14.5"1019 "@babel/plugin-transform-modules-amd" "^7.14.5"906 "@babel/plugin-transform-modules-commonjs" "^7.14.5"1020 "@babel/plugin-transform-modules-commonjs" "^7.15.0"907 "@babel/plugin-transform-modules-systemjs" "^7.14.5"1021 "@babel/plugin-transform-modules-systemjs" "^7.14.5"908 "@babel/plugin-transform-modules-umd" "^7.14.5"1022 "@babel/plugin-transform-modules-umd" "^7.14.5"909 "@babel/plugin-transform-named-capturing-groups-regex" "^7.14.7"1023 "@babel/plugin-transform-named-capturing-groups-regex" "^7.14.9"910 "@babel/plugin-transform-new-target" "^7.14.5"1024 "@babel/plugin-transform-new-target" "^7.14.5"911 "@babel/plugin-transform-object-super" "^7.14.5"1025 "@babel/plugin-transform-object-super" "^7.14.5"912 "@babel/plugin-transform-parameters" "^7.14.5"1026 "@babel/plugin-transform-parameters" "^7.14.5"921 "@babel/plugin-transform-unicode-escapes" "^7.14.5"1035 "@babel/plugin-transform-unicode-escapes" "^7.14.5"922 "@babel/plugin-transform-unicode-regex" "^7.14.5"1036 "@babel/plugin-transform-unicode-regex" "^7.14.5"923 "@babel/preset-modules" "^0.1.4"1037 "@babel/preset-modules" "^0.1.4"924 "@babel/types" "^7.14.5"1038 "@babel/types" "^7.15.0"925 babel-plugin-polyfill-corejs2 "^0.2.2"1039 babel-plugin-polyfill-corejs2 "^0.2.2"926 babel-plugin-polyfill-corejs3 "^0.2.2"1040 babel-plugin-polyfill-corejs3 "^0.2.2"927 babel-plugin-polyfill-regenerator "^0.2.2"1041 babel-plugin-polyfill-regenerator "^0.2.2"928 core-js-compat "^3.15.0"1042 core-js-compat "^3.16.0"929 semver "^6.3.0"1043 semver "^6.3.0"9301044931"@babel/preset-modules@^0.1.4":1045"@babel/preset-modules@^0.1.4":951 "@babel/plugin-transform-react-jsx-development" "^7.14.5"1065 "@babel/plugin-transform-react-jsx-development" "^7.14.5"952 "@babel/plugin-transform-react-pure-annotations" "^7.14.5"1066 "@babel/plugin-transform-react-pure-annotations" "^7.14.5"9531067954"@babel/preset-typescript@^7.14.5":1068"@babel/preset-typescript@^7.15.0":955 version "7.14.5"1069 version "7.15.0"956 resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.14.5.tgz#aa98de119cf9852b79511f19e7f44a2d379bcce0"1070 resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.15.0.tgz#e8fca638a1a0f64f14e1119f7fe4500277840945"957 integrity sha512-u4zO6CdbRKbS9TypMqrlGH7sd2TAJppZwn3c/ZRLeO/wGsbddxgbPDUZVNrie3JWYLQ9vpineKlsrWFvO6Pwkw==1071 integrity sha512-lt0Y/8V3y06Wq/8H/u0WakrqciZ7Fz7mwPDHWUJAXlABL5hiUG42BNlRXiELNjeWjO5rWmnNKlx+yzJvxezHow==958 dependencies:1072 dependencies:959 "@babel/helper-plugin-utils" "^7.14.5"1073 "@babel/helper-plugin-utils" "^7.14.5"960 "@babel/helper-validator-option" "^7.14.5"1074 "@babel/helper-validator-option" "^7.14.5"961 "@babel/plugin-transform-typescript" "^7.14.5"1075 "@babel/plugin-transform-typescript" "^7.15.0"9621076963"@babel/register@^7.14.5":1077"@babel/register@^7.15.3":964 version "7.14.5"1078 version "7.15.3"965 resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.14.5.tgz#d0eac615065d9c2f1995842f85d6e56c345f3233"1079 resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.15.3.tgz#6b40a549e06ec06c885b2ec42c3dd711f55fe752"966 integrity sha512-TjJpGz/aDjFGWsItRBQMOFTrmTI9tr79CHOK+KIvLeCkbxuOAk2M5QHjvruIMGoo9OuccMh5euplPzc5FjAKGg==1080 integrity sha512-mj4IY1ZJkorClxKTImccn4T81+UKTo4Ux0+OFSV9hME1ooqS9UV+pJ6BjD0qXPK4T3XW/KNa79XByjeEMZz+fw==967 dependencies:1081 dependencies:968 clone-deep "^4.0.1"1082 clone-deep "^4.0.1"969 find-cache-dir "^2.0.0"1083 find-cache-dir "^2.0.0"978 dependencies:1092 dependencies:979 regenerator-runtime "^0.13.4"1093 regenerator-runtime "^0.13.4"98010941095"@babel/runtime@^7.15.3":1096 version "7.15.3"1097 resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b"1098 integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==1099 dependencies:1100 regenerator-runtime "^0.13.4"1101981"@babel/template@^7.14.5", "@babel/template@^7.3.3":1102"@babel/template@^7.14.5", "@babel/template@^7.3.3":982 version "7.14.5"1103 version "7.14.5"983 resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4"1104 resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4"1002 debug "^4.1.0"1123 debug "^4.1.0"1003 globals "^11.1.0"1124 globals "^11.1.0"100411251126"@babel/traverse@^7.15.0":1127 version "7.15.0"1128 resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.0.tgz#4cca838fd1b2a03283c1f38e141f639d60b3fc98"1129 integrity sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==1130 dependencies:1131 "@babel/code-frame" "^7.14.5"1132 "@babel/generator" "^7.15.0"1133 "@babel/helper-function-name" "^7.14.5"1134 "@babel/helper-hoist-variables" "^7.14.5"1135 "@babel/helper-split-export-declaration" "^7.14.5"1136 "@babel/parser" "^7.15.0"1137 "@babel/types" "^7.15.0"1138 debug "^4.1.0"1139 globals "^11.1.0"11401005"@babel/types@^7.0.0", "@babel/types@^7.14.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":1141"@babel/types@^7.0.0", "@babel/types@^7.14.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":1006 version "7.14.5"1142 version "7.14.5"1007 resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff"1143 resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff"1010 "@babel/helper-validator-identifier" "^7.14.5"1146 "@babel/helper-validator-identifier" "^7.14.5"1011 to-fast-properties "^2.0.0"1147 to-fast-properties "^2.0.0"101211481149"@babel/types@^7.14.8", "@babel/types@^7.15.0":1150 version "7.15.0"1151 resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd"1152 integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==1153 dependencies:1154 "@babel/helper-validator-identifier" "^7.14.9"1155 to-fast-properties "^2.0.0"11561013"@bcoe/v8-coverage@^0.2.3":1157"@bcoe/v8-coverage@^0.2.3":1014 version "0.2.3"1158 version "0.2.3"1015 resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"1159 resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"1016 integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==1160 integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==101711611018"@eslint/eslintrc@^0.4.2":1019 version "0.4.2"1020 resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179"1021 integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==1022 dependencies:1023 ajv "^6.12.4"1024 debug "^4.1.1"1025 espree "^7.3.0"1026 globals "^13.9.0"1027 ignore "^4.0.6"1028 import-fresh "^3.2.1"1029 js-yaml "^3.13.1"1030 minimatch "^3.0.4"1031 strip-json-comments "^3.1.1"10321033"@eslint/eslintrc@^0.4.3":1162"@eslint/eslintrc@^0.4.3":1034 version "0.4.3"1163 version "0.4.3"1035 resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"1164 resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"1251 resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"1380 resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"1252 integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==1381 integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==125313821254"@jest/console@^27.0.2":1383"@jest/console@^27.0.6":1255 version "27.0.2"1384 version "27.0.6"1256 resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.2.tgz#b8eeff8f21ac51d224c851e1729d2630c18631e6"1385 resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.6.tgz#3eb72ea80897495c3d73dd97aab7f26770e2260f"1257 integrity sha512-/zYigssuHLImGeMAACkjI4VLAiiJznHgAl3xnFT19iWyct2LhrH3KXOjHRmxBGTkiPLZKKAJAgaPpiU9EZ9K+w==1386 integrity sha512-fMlIBocSHPZ3JxgWiDNW/KPj6s+YRd0hicb33IrmelCcjXo/pXPwvuiKFmZz+XuqI/1u7nbUK10zSsWL/1aegg==1258 dependencies:1387 dependencies:1259 "@jest/types" "^27.0.2"1388 "@jest/types" "^27.0.6"1260 "@types/node" "*"1389 "@types/node" "*"1261 chalk "^4.0.0"1390 chalk "^4.0.0"1262 jest-message-util "^27.0.2"1391 jest-message-util "^27.0.6"1263 jest-util "^27.0.2"1392 jest-util "^27.0.6"1264 slash "^3.0.0"1393 slash "^3.0.0"126513941266"@jest/core@^27.0.5":1395"@jest/core@^27.0.6":1267 version "27.0.5"1396 version "27.0.6"1268 resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.5.tgz#59e9e69e7374d65dbb22e3fc1bd52e80991eae72"1397 resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.6.tgz#c5f642727a0b3bf0f37c4b46c675372d0978d4a1"1269 integrity sha512-g73//jF0VwsOIrWUC9Cqg03lU3QoAMFxVjsm6n6yNmwZcQPN/o8w+gLWODw5VfKNFZT38otXHWxc6b8eGDUpEA==1398 integrity sha512-SsYBm3yhqOn5ZLJCtccaBcvD/ccTLCeuDv8U41WJH/V1MW5eKUkeMHT9U+Pw/v1m1AIWlnIW/eM2XzQr0rEmow==1270 dependencies:1399 dependencies:1271 "@jest/console" "^27.0.2"1400 "@jest/console" "^27.0.6"1272 "@jest/reporters" "^27.0.5"1401 "@jest/reporters" "^27.0.6"1273 "@jest/test-result" "^27.0.2"1402 "@jest/test-result" "^27.0.6"1274 "@jest/transform" "^27.0.5"1403 "@jest/transform" "^27.0.6"1275 "@jest/types" "^27.0.2"1404 "@jest/types" "^27.0.6"1276 "@types/node" "*"1405 "@types/node" "*"1277 ansi-escapes "^4.2.1"1406 ansi-escapes "^4.2.1"1278 chalk "^4.0.0"1407 chalk "^4.0.0"1279 emittery "^0.8.1"1408 emittery "^0.8.1"1280 exit "^0.1.2"1409 exit "^0.1.2"1281 graceful-fs "^4.2.4"1410 graceful-fs "^4.2.4"1282 jest-changed-files "^27.0.2"1411 jest-changed-files "^27.0.6"1283 jest-config "^27.0.5"1412 jest-config "^27.0.6"1284 jest-haste-map "^27.0.5"1413 jest-haste-map "^27.0.6"1285 jest-message-util "^27.0.2"1414 jest-message-util "^27.0.6"1286 jest-regex-util "^27.0.1"1415 jest-regex-util "^27.0.6"1287 jest-resolve "^27.0.5"1416 jest-resolve "^27.0.6"1288 jest-resolve-dependencies "^27.0.5"1417 jest-resolve-dependencies "^27.0.6"1289 jest-runner "^27.0.5"1418 jest-runner "^27.0.6"1290 jest-runtime "^27.0.5"1419 jest-runtime "^27.0.6"1291 jest-snapshot "^27.0.5"1420 jest-snapshot "^27.0.6"1292 jest-util "^27.0.2"1421 jest-util "^27.0.6"1293 jest-validate "^27.0.2"1422 jest-validate "^27.0.6"1294 jest-watcher "^27.0.2"1423 jest-watcher "^27.0.6"1295 micromatch "^4.0.4"1424 micromatch "^4.0.4"1296 p-each-series "^2.1.0"1425 p-each-series "^2.1.0"1297 rimraf "^3.0.0"1426 rimraf "^3.0.0"1298 slash "^3.0.0"1427 slash "^3.0.0"1299 strip-ansi "^6.0.0"1428 strip-ansi "^6.0.0"130014291301"@jest/environment@^27.0.5":1430"@jest/environment@^27.0.6":1302 version "27.0.5"1431 version "27.0.6"1303 resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.5.tgz#a294ad4acda2e250f789fb98dc667aad33d3adc9"1432 resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.6.tgz#ee293fe996db01d7d663b8108fa0e1ff436219d2"1304 integrity sha512-IAkJPOT7bqn0GiX5LPio6/e1YpcmLbrd8O5EFYpAOZ6V+9xJDsXjdgN2vgv9WOKIs/uA1kf5WeD96HhlBYO+FA==1433 integrity sha512-4XywtdhwZwCpPJ/qfAkqExRsERW+UaoSRStSHCCiQTUpoYdLukj+YJbQSFrZjhlUDRZeNiU9SFH0u7iNimdiIg==1305 dependencies:1434 dependencies:1306 "@jest/fake-timers" "^27.0.5"1435 "@jest/fake-timers" "^27.0.6"1307 "@jest/types" "^27.0.2"1436 "@jest/types" "^27.0.6"1308 "@types/node" "*"1437 "@types/node" "*"1309 jest-mock "^27.0.3"1438 jest-mock "^27.0.6"131014391311"@jest/fake-timers@^27.0.5":1440"@jest/fake-timers@^27.0.6":1312 version "27.0.5"1441 version "27.0.6"1313 resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.5.tgz#304d5aedadf4c75cff3696995460b39d6c6e72f6"1442 resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.6.tgz#cbad52f3fe6abe30e7acb8cd5fa3466b9588e3df"1314 integrity sha512-d6Tyf7iDoKqeUdwUKrOBV/GvEZRF67m7lpuWI0+SCD9D3aaejiOQZxAOxwH2EH/W18gnfYaBPLi0VeTGBHtQBg==1443 integrity sha512-sqd+xTWtZ94l3yWDKnRTdvTeZ+A/V7SSKrxsrOKSqdyddb9CeNRF8fbhAU0D7ZJBpTTW2nbp6MftmKJDZfW2LQ==1315 dependencies:1444 dependencies:1316 "@jest/types" "^27.0.2"1445 "@jest/types" "^27.0.6"1317 "@sinonjs/fake-timers" "^7.0.2"1446 "@sinonjs/fake-timers" "^7.0.2"1318 "@types/node" "*"1447 "@types/node" "*"1319 jest-message-util "^27.0.2"1448 jest-message-util "^27.0.6"1320 jest-mock "^27.0.3"1449 jest-mock "^27.0.6"1321 jest-util "^27.0.2"1450 jest-util "^27.0.6"132214511323"@jest/globals@^27.0.5":1452"@jest/globals@^27.0.6":1324 version "27.0.5"1453 version "27.0.6"1325 resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.5.tgz#f63b8bfa6ea3716f8df50f6a604b5c15b36ffd20"1454 resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.6.tgz#48e3903f99a4650673d8657334d13c9caf0e8f82"1326 integrity sha512-qqKyjDXUaZwDuccpbMMKCCMBftvrbXzigtIsikAH/9ca+kaae8InP2MDf+Y/PdCSMuAsSpHS6q6M25irBBUh+Q==1455 integrity sha512-DdTGCP606rh9bjkdQ7VvChV18iS7q0IMJVP1piwTWyWskol4iqcVwthZmoJEf7obE1nc34OpIyoVGPeqLC+ryw==1327 dependencies:1456 dependencies:1328 "@jest/environment" "^27.0.5"1457 "@jest/environment" "^27.0.6"1329 "@jest/types" "^27.0.2"1458 "@jest/types" "^27.0.6"1330 expect "^27.0.2"1459 expect "^27.0.6"133114601332"@jest/reporters@^27.0.5":1461"@jest/reporters@^27.0.6":1333 version "27.0.5"1462 version "27.0.6"1334 resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.5.tgz#cd730b77d9667b8ff700ad66d4edc293bb09716a"1463 resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.6.tgz#91e7f2d98c002ad5df94d5b5167c1eb0b9fd5b00"1335 integrity sha512-4uNg5+0eIfRafnpgu3jCZws3NNcFzhu5JdRd1mKQ4/53+vkIqwB6vfZ4gn5BdGqOaLtYhlOsPaL5ATkKzyBrJw==1464 integrity sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA==1336 dependencies:1465 dependencies:1337 "@bcoe/v8-coverage" "^0.2.3"1466 "@bcoe/v8-coverage" "^0.2.3"1338 "@jest/console" "^27.0.2"1467 "@jest/console" "^27.0.6"1339 "@jest/test-result" "^27.0.2"1468 "@jest/test-result" "^27.0.6"1340 "@jest/transform" "^27.0.5"1469 "@jest/transform" "^27.0.6"1341 "@jest/types" "^27.0.2"1470 "@jest/types" "^27.0.6"1342 chalk "^4.0.0"1471 chalk "^4.0.0"1343 collect-v8-coverage "^1.0.0"1472 collect-v8-coverage "^1.0.0"1344 exit "^0.1.2"1473 exit "^0.1.2"1349 istanbul-lib-report "^3.0.0"1478 istanbul-lib-report "^3.0.0"1350 istanbul-lib-source-maps "^4.0.0"1479 istanbul-lib-source-maps "^4.0.0"1351 istanbul-reports "^3.0.2"1480 istanbul-reports "^3.0.2"1352 jest-haste-map "^27.0.5"1481 jest-haste-map "^27.0.6"1353 jest-resolve "^27.0.5"1482 jest-resolve "^27.0.6"1354 jest-util "^27.0.2"1483 jest-util "^27.0.6"1355 jest-worker "^27.0.2"1484 jest-worker "^27.0.6"1356 slash "^3.0.0"1485 slash "^3.0.0"1357 source-map "^0.6.0"1486 source-map "^0.6.0"1358 string-length "^4.0.1"1487 string-length "^4.0.1"1359 terminal-link "^2.0.0"1488 terminal-link "^2.0.0"1360 v8-to-istanbul "^8.0.0"1489 v8-to-istanbul "^8.0.0"136114901362"@jest/source-map@^27.0.1":1491"@jest/source-map@^27.0.6":1363 version "27.0.1"1492 version "27.0.6"1364 resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.1.tgz#2afbf73ddbaddcb920a8e62d0238a0a9e0a8d3e4"1493 resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.6.tgz#be9e9b93565d49b0548b86e232092491fb60551f"1365 integrity sha512-yMgkF0f+6WJtDMdDYNavmqvbHtiSpwRN2U/W+6uztgfqgkq/PXdKPqjBTUF1RD/feth4rH5N3NW0T5+wIuln1A==1494 integrity sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g==1366 dependencies:1495 dependencies:1367 callsites "^3.0.0"1496 callsites "^3.0.0"1368 graceful-fs "^4.2.4"1497 graceful-fs "^4.2.4"1369 source-map "^0.6.0"1498 source-map "^0.6.0"137014991371"@jest/test-result@^27.0.2":1500"@jest/test-result@^27.0.6":1372 version "27.0.2"1501 version "27.0.6"1373 resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.2.tgz#0451049e32ceb609b636004ccc27c8fa22263f10"1502 resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.6.tgz#3fa42015a14e4fdede6acd042ce98c7f36627051"1374 integrity sha512-gcdWwL3yP5VaIadzwQtbZyZMgpmes8ryBAJp70tuxghiA8qL4imJyZex+i+USQH2H4jeLVVszhwntgdQ97fccA==1503 integrity sha512-ja/pBOMTufjX4JLEauLxE3LQBPaI2YjGFtXexRAjt1I/MbfNlMx0sytSX3tn5hSLzQsR3Qy2rd0hc1BWojtj9w==1375 dependencies:1504 dependencies:1376 "@jest/console" "^27.0.2"1505 "@jest/console" "^27.0.6"1377 "@jest/types" "^27.0.2"1506 "@jest/types" "^27.0.6"1378 "@types/istanbul-lib-coverage" "^2.0.0"1507 "@types/istanbul-lib-coverage" "^2.0.0"1379 collect-v8-coverage "^1.0.0"1508 collect-v8-coverage "^1.0.0"138015091381"@jest/test-sequencer@^27.0.5":1510"@jest/test-sequencer@^27.0.6":1382 version "27.0.5"1511 version "27.0.6"1383 resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.5.tgz#c58b21db49afc36c0e3921d7ddf1fb7954abfded"1512 resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz#80a913ed7a1130545b1cd777ff2735dd3af5d34b"1384 integrity sha512-opztnGs+cXzZ5txFG2+omBaV5ge/0yuJNKbhE3DREMiXE0YxBuzyEa6pNv3kk2JuucIlH2Xvgmn9kEEHSNt/SA==1513 integrity sha512-bISzNIApazYOlTHDum9PwW22NOyDa6VI31n6JucpjTVM0jD6JDgqEZ9+yn575nDdPF0+4csYDxNNW13NvFQGZA==1385 dependencies:1514 dependencies:1386 "@jest/test-result" "^27.0.2"1515 "@jest/test-result" "^27.0.6"1387 graceful-fs "^4.2.4"1516 graceful-fs "^4.2.4"1388 jest-haste-map "^27.0.5"1517 jest-haste-map "^27.0.6"1389 jest-runtime "^27.0.5"1518 jest-runtime "^27.0.6"139015191391"@jest/transform@^27.0.5":1520"@jest/transform@^27.0.6":1392 version "27.0.5"1521 version "27.0.6"1393 resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.5.tgz#2dcb78953708af713941ac845b06078bc74ed873"1522 resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.6.tgz#189ad7107413208f7600f4719f81dd2f7278cc95"1394 integrity sha512-lBD6OwKXSc6JJECBNk4mVxtSVuJSBsQrJ9WCBisfJs7EZuYq4K6vM9HmoB7hmPiLIDGeyaerw3feBV/bC4z8tg==1523 integrity sha512-rj5Dw+mtIcntAUnMlW/Vju5mr73u8yg+irnHwzgtgoeI6cCPOvUwQ0D1uQtc/APmWgvRweEb1g05pkUpxH3iCA==1395 dependencies:1524 dependencies:1396 "@babel/core" "^7.1.0"1525 "@babel/core" "^7.1.0"1397 "@jest/types" "^27.0.2"1526 "@jest/types" "^27.0.6"1398 babel-plugin-istanbul "^6.0.0"1527 babel-plugin-istanbul "^6.0.0"1399 chalk "^4.0.0"1528 chalk "^4.0.0"1400 convert-source-map "^1.4.0"1529 convert-source-map "^1.4.0"1401 fast-json-stable-stringify "^2.0.0"1530 fast-json-stable-stringify "^2.0.0"1402 graceful-fs "^4.2.4"1531 graceful-fs "^4.2.4"1403 jest-haste-map "^27.0.5"1532 jest-haste-map "^27.0.6"1404 jest-regex-util "^27.0.1"1533 jest-regex-util "^27.0.6"1405 jest-util "^27.0.2"1534 jest-util "^27.0.6"1406 micromatch "^4.0.4"1535 micromatch "^4.0.4"1407 pirates "^4.0.1"1536 pirates "^4.0.1"1408 slash "^3.0.0"1537 slash "^3.0.0"1409 source-map "^0.6.1"1538 source-map "^0.6.1"1410 write-file-atomic "^3.0.0"1539 write-file-atomic "^3.0.0"141115401412"@jest/types@^27.0.2":1541"@jest/types@^27.0.6":1413 version "27.0.2"1542 version "27.0.6"1414 resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.2.tgz#e153d6c46bda0f2589f0702b071f9898c7bbd37e"1543 resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.6.tgz#9a992bc517e0c49f035938b8549719c2de40706b"1415 integrity sha512-XpjCtJ/99HB4PmyJ2vgmN7vT+JLP7RW1FBT9RgnMFS4Dt7cvIyBee8O3/j98aUZ34ZpenPZFqmaaObWSeL65dg==1544 integrity sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g==1416 dependencies:1545 dependencies:1417 "@types/istanbul-lib-coverage" "^2.0.0"1546 "@types/istanbul-lib-coverage" "^2.0.0"1418 "@types/istanbul-reports" "^3.0.0"1547 "@types/istanbul-reports" "^3.0.0"1559 dependencies:1688 dependencies:1560 "@octokit/openapi-types" "^7.3.2"1689 "@octokit/openapi-types" "^7.3.2"156116901562"@polkadot/api-contract@5.0.1":1691"@polkadot/api-contract@5.5.1":1563 version "5.0.1"1692 version "5.5.1"1564 resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-5.0.1.tgz#520a7b3cd990a76374b79e12eca5bf629cc565a1"1693 resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-5.5.1.tgz#4cdd0d6f4352050c58464d5958bdb779770bd2dc"1565 integrity sha512-qZ2wnXHDyU2c1/V9GKpbcZKBfVua4YFsU/LHKevZLkJfnGFBgNRdwAuKgVe5h2FCt2W2/pt618WgxG0UDWwjcw==1694 integrity sha512-/1O1AnpCu+LM2EKhRY83r36blG8KOr0JCVFeSfT0u52tM4wMdLlUy1XV/XTZayuCucdJ6I0pjUudCljm92aiGw==1566 dependencies:1695 dependencies:1567 "@babel/runtime" "^7.14.6"1696 "@babel/runtime" "^7.15.3"1568 "@polkadot/api" "5.0.1"1697 "@polkadot/api" "5.5.1"1569 "@polkadot/types" "5.0.1"1698 "@polkadot/types" "5.5.1"1570 "@polkadot/util" "^7.0.1"1699 "@polkadot/util" "^7.2.1"1571 rxjs "^7.2.0"1700 rxjs "^7.3.0"157217011573"@polkadot/api-derive@5.0.1":1702"@polkadot/api-derive@5.5.1":1574 version "5.0.1"1703 version "5.5.1"1575 resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-5.0.1.tgz#08064c10ed159826ffd07013dcdde1d8b63186a0"1704 resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-5.5.1.tgz#6fdba748d90024f2fcdeb7827d178ff8d0ad308e"1576 integrity sha512-JZpH1JVLu3PvX4+A71iDLtNr6LL103dAFou61DxyJF4obyTmS2lzigG3xXqUFShiPDb19ywxQpsE4gAOP6emuQ==1705 integrity sha512-dkpl3CnroBYAlLx571KoyjI72TqRweWI61z7tzNeR8qwniNyWDEILTErUfzy5jYAO7XrZpW1Gn4WMMH+kEcqZQ==1577 dependencies:1706 dependencies:1578 "@babel/runtime" "^7.14.6"1707 "@babel/runtime" "^7.15.3"1579 "@polkadot/api" "5.0.1"1708 "@polkadot/api" "5.5.1"1580 "@polkadot/rpc-core" "5.0.1"1709 "@polkadot/rpc-core" "5.5.1"1581 "@polkadot/types" "5.0.1"1710 "@polkadot/types" "5.5.1"1582 "@polkadot/util" "^7.0.1"1711 "@polkadot/util" "^7.2.1"1583 "@polkadot/util-crypto" "^7.0.1"1712 "@polkadot/util-crypto" "^7.2.1"1584 rxjs "^7.2.0"1713 rxjs "^7.3.0"158517141586"@polkadot/api@5.0.1":1715"@polkadot/api@5.5.1":1587 version "5.0.1"1716 version "5.5.1"1588 resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-5.0.1.tgz#9607b53009322f9264f7dcc8705c466bd33aa516"1717 resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-5.5.1.tgz#0298c6d883c2264a68ae93a3b59b98263aed53d3"1589 integrity sha512-5JDpM2Fjc80gHBju1B/rMBGDfAvY8UiU4XVlivJRk+mTVD3OTwbtTro4nmwJOub05xQCJvD/bnCuxG8eFSoq+Q==1718 integrity sha512-GS/MoRc7NB61jz7TzwX0WAA3JS7DSj3xH4ac39LcuPHXu0VMQw6LgT/5KIzYxTx+79Iwth62bKelW/Mgk23wUg==1590 dependencies:1719 dependencies:1591 "@babel/runtime" "^7.14.6"1720 "@babel/runtime" "^7.15.3"1592 "@polkadot/api-derive" "5.0.1"1721 "@polkadot/api-derive" "5.5.1"1593 "@polkadot/keyring" "^7.0.1"1722 "@polkadot/keyring" "^7.2.1"1594 "@polkadot/rpc-core" "5.0.1"1723 "@polkadot/rpc-core" "5.5.1"1595 "@polkadot/rpc-provider" "5.0.1"1724 "@polkadot/rpc-provider" "5.5.1"1596 "@polkadot/types" "5.0.1"1725 "@polkadot/types" "5.5.1"1597 "@polkadot/types-known" "5.0.1"1726 "@polkadot/types-known" "5.5.1"1598 "@polkadot/util" "^7.0.1"1727 "@polkadot/util" "^7.2.1"1599 "@polkadot/util-crypto" "^7.0.1"1728 "@polkadot/util-crypto" "^7.2.1"1600 eventemitter3 "^4.0.7"1729 eventemitter3 "^4.0.7"1601 rxjs "^7.2.0"1730 rxjs "^7.3.0"160217311603"@polkadot/dev@0.62.43":1732"@polkadot/dev@0.62.60":1604 version "0.62.43"1733 version "0.62.60"1605 resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.62.43.tgz#567591bf3c38dded4b4c1f3ec8bf3d3198a23b6d"1734 resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.62.60.tgz#450007c189a8433d8627bcc1fc01d2ffb1becfc3"1606 integrity sha512-ZSgYUbC6A+WtRSY5nq7yeGYW+wv3g8cds2zndL4GeClIdVHksgEW6+ch3Hx6LMkE3y4q9Kjvs50oHeemBDut4Q==1735 integrity sha512-VHZ4d/hhRSNFe0RXp3L/ZcAk1t2JQ1/lsznONAz4I9SZ2pn5kAQrWRF6eukgfQscrlqCH5njDAxwgXe6ODNVRw==1607 dependencies:1736 dependencies:1608 "@babel/cli" "^7.14.5"1737 "@babel/cli" "^7.14.8"1609 "@babel/core" "^7.14.6"1738 "@babel/core" "^7.15.0"1610 "@babel/plugin-proposal-class-properties" "^7.14.5"1739 "@babel/plugin-proposal-class-properties" "^7.14.5"1611 "@babel/plugin-proposal-nullish-coalescing-operator" "^7.14.5"1740 "@babel/plugin-proposal-nullish-coalescing-operator" "^7.14.5"1612 "@babel/plugin-proposal-numeric-separator" "^7.14.5"1741 "@babel/plugin-proposal-numeric-separator" "^7.14.5"1618 "@babel/plugin-syntax-import-meta" "^7.10.4"1747 "@babel/plugin-syntax-import-meta" "^7.10.4"1619 "@babel/plugin-syntax-top-level-await" "^7.14.5"1748 "@babel/plugin-syntax-top-level-await" "^7.14.5"1620 "@babel/plugin-transform-regenerator" "^7.14.5"1749 "@babel/plugin-transform-regenerator" "^7.14.5"1621 "@babel/plugin-transform-runtime" "^7.14.5"1750 "@babel/plugin-transform-runtime" "^7.15.0"1622 "@babel/preset-env" "^7.14.7"1751 "@babel/preset-env" "^7.15.0"1623 "@babel/preset-react" "^7.14.5"1752 "@babel/preset-react" "^7.14.5"1624 "@babel/preset-typescript" "^7.14.5"1753 "@babel/preset-typescript" "^7.15.0"1625 "@babel/register" "^7.14.5"1754 "@babel/register" "^7.15.3"1626 "@babel/runtime" "^7.14.6"1755 "@babel/runtime" "^7.15.3"1756 "@rollup/plugin-alias" "^3.1.5"1757 "@rollup/plugin-commonjs" "^19.0.2"1758 "@rollup/plugin-inject" "^4.0.2"1759 "@rollup/plugin-json" "^4.1.0"1760 "@rollup/plugin-node-resolve" "^13.0.4"1627 "@rushstack/eslint-patch" "^1.0.6"1761 "@rushstack/eslint-patch" "^1.0.6"1628 "@typescript-eslint/eslint-plugin" "4.28.0"1762 "@typescript-eslint/eslint-plugin" "4.29.2"1629 "@typescript-eslint/parser" "4.28.0"1763 "@typescript-eslint/parser" "4.29.2"1630 "@vue/component-compiler-utils" "^3.2.2"1764 "@vue/component-compiler-utils" "^3.2.2"1631 babel-jest "^27.0.5"1765 babel-jest "^27.0.6"1632 babel-plugin-module-extension-resolver "^1.0.0-rc.2"1766 babel-plugin-module-extension-resolver "^1.0.0-rc.2"1633 babel-plugin-module-resolver "^4.1.0"1767 babel-plugin-module-resolver "^4.1.0"1634 babel-plugin-styled-components "^1.12.0"1768 babel-plugin-styled-components "^1.13.2"1635 browserslist "^4.16.6"1769 browserslist "^4.16.7"1636 chalk "^4.1.1"1770 chalk "^4.1.2"1637 coveralls "^3.1.0"1771 coveralls "^3.1.1"1638 eslint "^7.29.0"1772 eslint "^7.32.0"1639 eslint-config-standard "^16.0.3"1773 eslint-config-standard "^16.0.3"1640 eslint-import-resolver-node "^0.3.4"1774 eslint-import-resolver-node "^0.3.6"1641 eslint-plugin-header "^3.1.1"1775 eslint-plugin-header "^3.1.1"1642 eslint-plugin-import "^2.23.4"1776 eslint-plugin-import "^2.24.0"1777 eslint-plugin-import-newlines "^1.1.4"1643 eslint-plugin-node "^11.1.0"1778 eslint-plugin-node "^11.1.0"1644 eslint-plugin-promise "^5.1.0"1779 eslint-plugin-promise "^5.1.0"1645 eslint-plugin-react "^7.24.0"1780 eslint-plugin-react "^7.24.0"1651 gh-release "^6.0.0"1786 gh-release "^6.0.0"1652 glob "^7.1.7"1787 glob "^7.1.7"1653 glob2base "^0.0.12"1788 glob2base "^0.0.12"1654 jest "^27.0.5"1789 jest "^27.0.6"1655 jest-cli "^27.0.5"1790 jest-cli "^27.0.6"1656 jest-config "^27.0.5"1791 jest-config "^27.0.6"1657 jest-haste-map "^27.0.5"1792 jest-haste-map "^27.0.6"1658 jest-resolve "^27.0.5"1793 jest-resolve "^27.0.6"1659 madge "^4.0.2"1794 madge "^4.0.2"1660 minimatch "^3.0.4"1795 minimatch "^3.0.4"1661 mkdirp "^1.0.4"1796 mkdirp "^1.0.4"1662 prettier "^2.3.1"1797 prettier "^2.3.2"1663 rimraf "^3.0.2"1798 rimraf "^3.0.2"1664 typescript "^4.3.4"1799 rollup "^2.56.2"1800 typescript "^4.3.5"1665 yargs "^17.0.1"1801 yargs "^17.1.1"166618021667"@polkadot/keyring@^7.0.1":1803"@polkadot/keyring@^7.2.1":1668 version "7.0.1"1804 version "7.2.1"1669 resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-7.0.1.tgz#666e903661b98279dc16d512be69f5ace4b58d8d"1805 resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-7.2.1.tgz#5ed8e6c0edc61e3dd99ee647a227b9e3d955e8e6"1670 integrity sha512-eSvG8Q4gUTRDFWj2lqTY/9NekGP8dtp+W6WmouKh0DDwHRawaVeDaq6UJYQv6XoBG1i+ZGPvErRQeGMPOn/mUQ==1806 integrity sha512-WmiTsHKELX16uZWLvebDBckZIAXeJFfbcOM6m/VbMOjSV5C6xIKqiV3232Mn8ZuPKgsOf25Q78/IwJW1Dq53Qg==1671 dependencies:1807 dependencies:1672 "@babel/runtime" "^7.14.6"1808 "@babel/runtime" "^7.15.3"1673 "@polkadot/util" "7.0.1"1809 "@polkadot/util" "7.2.1"1674 "@polkadot/util-crypto" "7.0.1"1810 "@polkadot/util-crypto" "7.2.1"167518111676"@polkadot/networks@7.0.1", "@polkadot/networks@^7.0.1":1812"@polkadot/networks@7.2.1", "@polkadot/networks@^7.2.1":1677 version "7.0.1"1813 version "7.2.1"1678 resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-7.0.1.tgz#e07c4b88e25711433e76d24fce4c7273c25dd38b"1814 resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-7.2.1.tgz#20c8d81fba4b48162bf360759d8d54c55d30128b"1679 integrity sha512-bJSvI7UgEpxmBKS8TMh+I1mfmCMwhClGdSs29kwU+K61IjBTKTt3yQJ/SflYIQV7QftGbz3oMfSkGbQbRHZqvQ==1815 integrity sha512-YX8oQ7QQ2oq3YowwOiv/C82l849V0ZEzpR26YrPgKSXbYFbasho3Akf0zalndZJZV1Bb8EiOkzGoJ3ffogSPxA==1680 dependencies:1816 dependencies:1681 "@babel/runtime" "^7.14.6"1817 "@babel/runtime" "^7.15.3"168218181683"@polkadot/rpc-core@5.0.1":1819"@polkadot/rpc-core@5.5.1":1684 version "5.0.1"1820 version "5.5.1"1685 resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-5.0.1.tgz#8460287532fe61c31505564df53e92ef6feba875"1821 resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-5.5.1.tgz#4ce0646becabe7736dfb81eb902e5933158646c8"1686 integrity sha512-JMNOVQijjyJZNu9B8CJwIrQzGYzAp03uCBSbqYfzWBFnYVLKh7JmvOlkLnODM8uUYq0gVN4BaDUSPc39GpELAQ==1822 integrity sha512-hP7a55iSpgZVqxAIpK+v63eV/nD14Tm7C1rUmfKIS6gGJFJf+sQbTmp6d7+fuKxvYfFqBrFLU8IraOhLOQ5W3Q==1687 dependencies:1823 dependencies:1688 "@babel/runtime" "^7.14.6"1824 "@babel/runtime" "^7.15.3"1689 "@polkadot/rpc-provider" "5.0.1"1825 "@polkadot/rpc-provider" "5.5.1"1690 "@polkadot/types" "5.0.1"1826 "@polkadot/types" "5.5.1"1691 "@polkadot/util" "^7.0.1"1827 "@polkadot/util" "^7.2.1"1692 rxjs "^7.2.0"1828 rxjs "^7.3.0"169318291694"@polkadot/rpc-provider@5.0.1":1830"@polkadot/rpc-provider@5.5.1":1695 version "5.0.1"1831 version "5.5.1"1696 resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-5.0.1.tgz#ef022a123eb9073634b59c6e0f6e1705e96066a5"1832 resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-5.5.1.tgz#633f4a48605623092fb9017433f2b3cd70cd96bc"1697 integrity sha512-t+VKhMtQfQVgkZDqYnP/44KlBDmcCVo1/MvJ+DoNd7RUWUIBJt3v71G5gDSNeGMTyvxn0KK0qL4j+Nqr6c4FUQ==1833 integrity sha512-wOCKeeyUa7Dw3nxKkQntnfOO471icdzqT2V7bwloBOo+G2MX8nHImO0mW3QMfJygn4qoARF1PBo1PLbDUEDgog==1698 dependencies:1834 dependencies:1699 "@babel/runtime" "^7.14.6"1835 "@babel/runtime" "^7.15.3"1700 "@polkadot/types" "5.0.1"1836 "@polkadot/types" "5.5.1"1701 "@polkadot/util" "^7.0.1"1837 "@polkadot/util" "^7.2.1"1702 "@polkadot/util-crypto" "^7.0.1"1838 "@polkadot/util-crypto" "^7.2.1"1703 "@polkadot/x-fetch" "^7.0.1"1839 "@polkadot/x-fetch" "^7.2.1"1704 "@polkadot/x-global" "^7.0.1"1840 "@polkadot/x-global" "^7.2.1"1705 "@polkadot/x-ws" "^7.0.1"1841 "@polkadot/x-ws" "^7.2.1"1706 eventemitter3 "^4.0.7"1842 eventemitter3 "^4.0.7"170718431708"@polkadot/ts@0.3.89":1844"@polkadot/ts@0.4.4":1709 version "0.3.89"1845 version "0.4.4"1710 resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.3.89.tgz#c7a704ea284d04fcf4d581f5df156d5945480033"1846 resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.4.4.tgz#e86aa47c2bcbc70ac8385b31014c81927c4b0a88"1711 integrity sha512-GC0H8wmVKebkieN2MHScjDDonzigIzkjl1Q4V1OhoRcfQbeZZ7vijeiVwP8Hw3wIw4GLKxxXeDrkKPWl/bcaHw==1847 integrity sha512-lzB8lg8GfdJlA7RdeoOJVFopecN4i++JndbUs6jW7AgRz+joeXQIIRomVgCNE52nW1uWpXMELnlvEP812v7sVw==1712 dependencies:1848 dependencies:1713 "@types/chrome" "^0.0.144"1849 "@types/chrome" "^0.0.145"171418501715"@polkadot/typegen@5.0.1":1851"@polkadot/typegen@5.5.1":1716 version "5.0.1"1852 version "5.5.1"1717 resolved "https://registry.yarnpkg.com/@polkadot/typegen/-/typegen-5.0.1.tgz#718b517f4f1578441911096603577bd0a2a968e0"1853 resolved "https://registry.yarnpkg.com/@polkadot/typegen/-/typegen-5.5.1.tgz#b31010716a142290d12f48ead6166851599055d0"1718 integrity sha512-iFLJoWgIkn+J6MDw3AUWveP9qxVn1C+VeLJbpZ21St5WyeE148Tml0BmYnKLSXlaPMhZEwB+/IV3jpQ35dH4bw==1854 integrity sha512-ua55CVqT3+Y5fX9stpYUO+UhiJJ1RDTZ6vM2/Lndmsuda4lHQnUDrCnMmxKhM5OcyIlJlY5mF9dyO0kl5mTm+w==1719 dependencies:1855 dependencies:1720 "@babel/core" "^7.14.6"1856 "@babel/core" "^7.15.0"1721 "@babel/register" "^7.14.5"1857 "@babel/register" "^7.15.3"1722 "@babel/runtime" "^7.14.6"1858 "@babel/runtime" "^7.15.3"1723 "@polkadot/api" "5.0.1"1859 "@polkadot/api" "5.5.1"1724 "@polkadot/rpc-provider" "5.0.1"1860 "@polkadot/rpc-provider" "5.5.1"1725 "@polkadot/types" "5.0.1"1861 "@polkadot/types" "5.5.1"1726 "@polkadot/util" "^7.0.1"1862 "@polkadot/types-support" "5.5.1"1863 "@polkadot/util" "^7.2.1"1727 handlebars "^4.7.7"1864 handlebars "^4.7.7"1728 websocket "^1.0.34"1865 websocket "^1.0.34"1729 yargs "^17.0.1"1866 yargs "^17.1.0"173018671731"@polkadot/types-known@5.0.1":1868"@polkadot/types-known@5.5.1":1732 version "5.0.1"1869 version "5.5.1"1733 resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-5.0.1.tgz#21feb327fc4323733bf027c8d874a2aa3014b21f"1870 resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-5.5.1.tgz#b00b0d45cbd07b4e0c3199f8ba00d10a1bd3f63d"1734 integrity sha512-AIhPlN4r14ZW4wdwHZD2nIe1DE61ZO9PsyrCyAU3ysl6Cw6TI+txDCN3aS/8XYuC7wDLEgLB9vJv2sVWdCzqJg==1871 integrity sha512-bxBRmZ0a3lwEyWkWOKqmDJfpNKh3cp9xo6IidrQU2S5OPMjFFercB+HwJjkNE1cMtShwBYTvDheUImNkdm+FXA==1735 dependencies:1872 dependencies:1736 "@babel/runtime" "^7.14.6"1873 "@babel/runtime" "^7.15.3"1737 "@polkadot/networks" "^7.0.1"1874 "@polkadot/networks" "^7.2.1"1738 "@polkadot/types" "5.0.1"1875 "@polkadot/types" "5.5.1"1739 "@polkadot/util" "^7.0.1"1876 "@polkadot/util" "^7.2.1"174018771741"@polkadot/types@5.0.1":1878"@polkadot/types-support@5.5.1":1742 version "5.0.1"1879 version "5.5.1"1743 resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-5.0.1.tgz#2a4e23e452f999eeae175b595470df0e426a930d"1880 resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-5.5.1.tgz#15556c2f31e79f0a6a821c7723f702757cb89462"1744 integrity sha512-aN6JKeF7ZYi5irYAaUoDqth6qlOlB15C5vhlDOojEorYLfRs/R+GCrO+lPSs+bKmSxh7BSRh500ikI/xD4nx5A==1881 integrity sha512-57i1SdK8B+miGTAlDNdvbBuN6FguTnwzv2UPE2Zv3iQznTSZBkQZN16tIK/yMkQfhtO4ZzPcAnnSPZMncqh/Mg==1745 dependencies:1882 dependencies:1746 "@babel/runtime" "^7.14.6"1883 "@babel/runtime" "^7.15.3"1747 "@polkadot/util" "^7.0.1"1884 "@polkadot/util" "^7.2.1"1748 "@polkadot/util-crypto" "^7.0.1"1749 rxjs "^7.2.0"175018851751"@polkadot/util-crypto@7.0.1", "@polkadot/util-crypto@^7.0.1":1886"@polkadot/types@5.5.1":1752 version "7.0.1"1887 version "5.5.1"1753 resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-7.0.1.tgz#03109dc11323dad174fb2214d395855495def16a"1888 resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-5.5.1.tgz#057e8f0fc2369c0741c0f9b0224418e8f25a6938"1754 integrity sha512-dbvdsICoyOVw/K45RmHOP7wXE/7vj+NzEKGcKbiDt39nglHm6g2BTJ947PwwyNusTTAx82Q2iJ9vIZ1Kl0xG+g==1889 integrity sha512-+Cm7Y6D/98WqL8ofONyZrVvE2CxzK3/z18bATIQIWhG2w9ir9PdWaFMZ3fLCRw2Ggaq88AknguK6kXeEPcKPrA==1755 dependencies:1890 dependencies:1756 "@babel/runtime" "^7.14.6"1891 "@babel/runtime" "^7.15.3"1757 "@polkadot/networks" "7.0.1"1892 "@polkadot/util" "^7.2.1"1893 "@polkadot/util-crypto" "^7.2.1"1894 rxjs "^7.3.0"18951896"@polkadot/util-crypto@7.2.1", "@polkadot/util-crypto@^7.2.1":1758 "@polkadot/util" "7.0.1"1897 version "7.2.1"1898 resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-7.2.1.tgz#7f1bbf031dac75090699083fc9e825c22e5d5f61"1899 integrity sha512-X3iGba/1JTL/0MNzMNEIlO9DNyKlwFV839jfGLDKhPbCuDmWp0NdQjF3mBmbvNwkXvn07WmhE7g3q9n5iTzqvQ==1900 dependencies:1901 "@babel/runtime" "^7.15.3"1902 "@polkadot/networks" "7.2.1"1903 "@polkadot/util" "7.2.1"1759 "@polkadot/wasm-crypto" "^4.1.2"1904 "@polkadot/wasm-crypto" "^4.1.2"1760 "@polkadot/x-randomvalues" "7.0.1"1905 "@polkadot/x-randomvalues" "7.2.1"1761 base-x "^3.0.8"1906 base-x "^3.0.8"1762 base64-js "^1.5.1"1907 base64-js "^1.5.1"1763 blakejs "^1.1.1"1908 blakejs "^1.1.1"1764 bn.js "^4.11.9"1909 bn.js "^4.11.9"1765 create-hash "^1.2.0"1910 create-hash "^1.2.0"1911 ed2curve "^0.3.0"1766 elliptic "^6.5.4"1912 elliptic "^6.5.4"1767 hash.js "^1.1.7"1913 hash.js "^1.1.7"1768 js-sha3 "^0.8.0"1914 js-sha3 "^0.8.0"1769 scryptsy "^2.1.0"1915 scryptsy "^2.1.0"1770 tweetnacl "^1.0.3"1916 tweetnacl "^1.0.3"1771 xxhashjs "^0.2.2"1917 xxhashjs "^0.2.2"177219181773"@polkadot/util@7.0.1", "@polkadot/util@^7.0.1":1919"@polkadot/util@7.2.1", "@polkadot/util@^7.2.1":1774 version "7.0.1"1920 version "7.2.1"1775 resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-7.0.1.tgz#79afd40473016876f51d65ebb9900a20108fe0a4"1921 resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-7.2.1.tgz#abcad49f884534ff042c37480f63b9750c69341d"1776 integrity sha512-EtQlZL6ok0Ep+zRz2QHMUoJo/b3kFHVN2qqyD2+9sdqg0FGLmkzNFM+K6dasCMLXieJ1l0HoFsQppSo/leUeaA==1922 integrity sha512-GilFg3i5dmu0H6dHEyh5bUw3yywmnFpEHfxFmKghL1ABDEr4qD0d/XAJ9UrzLFCBKbdTZsR0MDjgjVI2N84J1A==1777 dependencies:1923 dependencies:1778 "@babel/runtime" "^7.14.6"1924 "@babel/runtime" "^7.15.3"1779 "@polkadot/x-textdecoder" "7.0.1"1925 "@polkadot/x-textdecoder" "7.2.1"1780 "@polkadot/x-textencoder" "7.0.1"1926 "@polkadot/x-textencoder" "7.2.1"1781 "@types/bn.js" "^4.11.6"1927 "@types/bn.js" "^4.11.6"1782 bn.js "^4.11.9"1928 bn.js "^4.11.9"1783 camelcase "^5.3.1"1929 camelcase "^5.3.1"1806 "@polkadot/wasm-crypto-asmjs" "^4.1.2"1952 "@polkadot/wasm-crypto-asmjs" "^4.1.2"1807 "@polkadot/wasm-crypto-wasm" "^4.1.2"1953 "@polkadot/wasm-crypto-wasm" "^4.1.2"180819541809"@polkadot/x-fetch@^7.0.1":1955"@polkadot/x-fetch@^7.2.1":1810 version "7.0.1"1956 version "7.2.1"1811 resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-7.0.1.tgz#2db6fa19f4f4d9b2f4cf50ba78bf3aa947d7b982"1957 resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-7.2.1.tgz#c9bee0316d31cd150b2cb6646ccdb77c6dc3d42d"1812 integrity sha512-9R38FjtlJcvdpEA7tVGmTmH4aiBCTABuLJdVSn3cYkgWfxDHeFMqjdFzTJ6Asa5cY0Ds3ZKsh9uccTQBQzV/HQ==1958 integrity sha512-osdZNPfrB50d7tfjVs4QRjfsb6xqC09JEeYzbUl24hUXPwtkQE8/379jayu1usPe9/JI2wKYGscdf/nRl4pBkA==1813 dependencies:1959 dependencies:1814 "@babel/runtime" "^7.14.6"1960 "@babel/runtime" "^7.15.3"1815 "@polkadot/x-global" "7.0.1"1961 "@polkadot/x-global" "7.2.1"1816 "@types/node-fetch" "^2.5.11"1962 "@types/node-fetch" "^2.5.12"1817 node-fetch "^2.6.1"1963 node-fetch "^2.6.1"181819641819"@polkadot/x-global@7.0.1", "@polkadot/x-global@^7.0.1":1965"@polkadot/x-global@7.2.1", "@polkadot/x-global@^7.2.1":1820 version "7.0.1"1966 version "7.2.1"1821 resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-7.0.1.tgz#44fb248d3aaea557753318327149772969e96bff"1967 resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-7.2.1.tgz#32207936b7f939a21da608f82ca20535f9148cda"1822 integrity sha512-gVVACSdRhHYRJejLEAL0mM9BZfY8N50VT2+15A7ALD1tVqwS4tz3P9vRW3Go7ZjfyAc83aEmh0PiQ8Nm1R+2Cg==1968 integrity sha512-VNW+76TxEPqvBy3XMNV05mJRPRGZcYh3k5HjW4+asYeFunMahH4zjmCulhtD9SRI/TqdfHTiqDOqKNKe2xJcVg==1823 dependencies:1969 dependencies:1824 "@babel/runtime" "^7.14.6"1970 "@babel/runtime" "^7.15.3"182519711826"@polkadot/x-randomvalues@7.0.1":1972"@polkadot/x-randomvalues@7.2.1":1827 version "7.0.1"1973 version "7.2.1"1828 resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-7.0.1.tgz#32036ae5d48645a062f6a1c3ebbf227236c806b8"1974 resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-7.2.1.tgz#708b7a54bd90ec091ab54e125d8b52e0853ea86b"1829 integrity sha512-UNoIFaz1xJPozruT+lo8BTeT8A3NM3PgWuru7Vs8OsIz0Phkg7lUWlpHu9PZHyQCyKlUryvkOA692IlVlNYy2Q==1975 integrity sha512-B4sjwX+gFweZ1YM1Cg/S9hAEx9E/gV/vqLW89PJB6+hyvsPS9eiVvfVpaOsohc7AgmuINm/bSQbNZvtC+BbbKw==1830 dependencies:1976 dependencies:1831 "@babel/runtime" "^7.14.6"1977 "@babel/runtime" "^7.15.3"1832 "@polkadot/x-global" "7.0.1"1978 "@polkadot/x-global" "7.2.1"183319791834"@polkadot/x-textdecoder@7.0.1":1980"@polkadot/x-textdecoder@7.2.1":1835 version "7.0.1"1981 version "7.2.1"1836 resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-7.0.1.tgz#bb9bba94b2eb1612dd35c299f43ab74515db74d9"1982 resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-7.2.1.tgz#c52074dba9943a12583f3f8672a49399f10e00f3"1837 integrity sha512-CFRnpI0cp1h2N1+ec551BLVLwV6OHG6Gj62EYcIOXR+o/SX/6MXm3Qcehm2YvfTKqktyIUSWmTwbWjGjuqPrpA==1983 integrity sha512-yXSZ0P/D/8HT8gbkdTjw/1AKZIVbX3+mIfiDiN3VqUBzruV7ak5hA+D01I0woBGDqxWISoLQFtGrxPAQ8pwAcg==1838 dependencies:1984 dependencies:1839 "@babel/runtime" "^7.14.6"1985 "@babel/runtime" "^7.15.3"1840 "@polkadot/x-global" "7.0.1"1986 "@polkadot/x-global" "7.2.1"184119871842"@polkadot/x-textencoder@7.0.1":1988"@polkadot/x-textencoder@7.2.1":1843 version "7.0.1"1989 version "7.2.1"1844 resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-7.0.1.tgz#181d403c5dc1d94fd1e2147fd1c5c528d30d8805"1990 resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-7.2.1.tgz#2326b3b7f9a5e445d7e560c438effbe800e2b1f6"1845 integrity sha512-m+QL1HNiu5GMz6cfr/udSA6fUTv3RyIybJb7v43EQCxqlj/L0J3cUHapFd6tqH9PElD6jPkH1pXcgYN8e7dWTQ==1991 integrity sha512-1aqfxmfKSOWeOxmGBmk+RYrpqGtWywS6t0y/R3FI+k+s8NfIfGdcjMcupKq7khPh92PvVGkur+CnM/y6chn4XA==1846 dependencies:1992 dependencies:1847 "@babel/runtime" "^7.14.6"1993 "@babel/runtime" "^7.15.3"1848 "@polkadot/x-global" "7.0.1"1994 "@polkadot/x-global" "7.2.1"184919951850"@polkadot/x-ws@^7.0.1":1996"@polkadot/x-ws@^7.2.1":1851 version "7.0.1"1997 version "7.2.1"1852 resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-7.0.1.tgz#8c22a61c0dd9b82865c7631e22ac147c2b73b118"1998 resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-7.2.1.tgz#5971ab630911cdecd0a46db6fb899e9086954e58"1853 integrity sha512-VUn/6sCJUpvW9WhUK+DKo1uDrw4yO84twRcy5JSzvSiBTaSplhU9Q4qGFl2Atr3WIzAYYx1jQSm/j6AhPRji1w==1999 integrity sha512-sYnOF0qNdMuGFiRGWAtpkQQYIP44JFzGywap0CskhNEyCc+zDBi4l/ta3qHjeGta+h9rdVjDeYk2J86EsKlkSw==1854 dependencies:2000 dependencies:1855 "@babel/runtime" "^7.14.6"2001 "@babel/runtime" "^7.15.3"1856 "@polkadot/x-global" "7.0.1"2002 "@polkadot/x-global" "7.2.1"1857 "@types/websocket" "^1.0.3"2003 "@types/websocket" "^1.0.4"1858 websocket "^1.0.34"2004 websocket "^1.0.34"185920052006"@rollup/plugin-alias@^3.1.5":2007 version "3.1.5"2008 resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.5.tgz#73356a3a1eab2e1e2fd952f9f53cd89fc740d952"2009 integrity sha512-yzUaSvCC/LJPbl9rnzX3HN7vy0tq7EzHoEiQl1ofh4n5r2Rd5bj/+zcJgaGA76xbw95/JjWQyvHg9rOJp2y0oQ==2010 dependencies:2011 slash "^3.0.0"20122013"@rollup/plugin-commonjs@^19.0.2":2014 version "19.0.2"2015 resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-19.0.2.tgz#1ccc3d63878d1bc9846f8969f09dd3b3e4ecc244"2016 integrity sha512-gBjarfqlC7qs0AutpRW/hrFNm+cd2/QKxhwyFa+srbg1oX7rDsEU3l+W7LAUhsAp9mPJMAkXDhLbQaVwEaE8bA==2017 dependencies:2018 "@rollup/pluginutils" "^3.1.0"2019 commondir "^1.0.1"2020 estree-walker "^2.0.1"2021 glob "^7.1.6"2022 is-reference "^1.2.1"2023 magic-string "^0.25.7"2024 resolve "^1.17.0"20252026"@rollup/plugin-inject@^4.0.2":2027 version "4.0.2"2028 resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.2.tgz#55b21bb244a07675f7fdde577db929c82fc17395"2029 integrity sha512-TSLMA8waJ7Dmgmoc8JfPnwUwVZgLjjIAM6MqeIFqPO2ODK36JqE0Cf2F54UTgCUuW8da93Mvoj75a6KAVWgylw==2030 dependencies:2031 "@rollup/pluginutils" "^3.0.4"2032 estree-walker "^1.0.1"2033 magic-string "^0.25.5"20342035"@rollup/plugin-json@^4.1.0":2036 version "4.1.0"2037 resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3"2038 integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==2039 dependencies:2040 "@rollup/pluginutils" "^3.0.8"20412042"@rollup/plugin-node-resolve@^13.0.4":2043 version "13.0.4"2044 resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.4.tgz#b10222f4145a019740acb7738402130d848660c0"2045 integrity sha512-eYq4TFy40O8hjeDs+sIxEH/jc9lyuI2k9DM557WN6rO5OpnC2qXMBNj4IKH1oHrnAazL49C5p0tgP0/VpqJ+/w==2046 dependencies:2047 "@rollup/pluginutils" "^3.1.0"2048 "@types/resolve" "1.17.1"2049 builtin-modules "^3.1.0"2050 deepmerge "^4.2.2"2051 is-module "^1.0.0"2052 resolve "^1.19.0"20532054"@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0":2055 version "3.1.0"2056 resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"2057 integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==2058 dependencies:2059 "@types/estree" "0.0.39"2060 estree-walker "^1.0.1"2061 picomatch "^2.2.2"20621860"@rushstack/eslint-patch@^1.0.6":2063"@rushstack/eslint-patch@^1.0.6":1861 version "1.0.6"2064 version "1.0.6"1862 resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.0.6.tgz#023d72a5c4531b4ce204528971700a78a85a0c50"2065 resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.0.6.tgz#023d72a5c4531b4ce204528971700a78a85a0c50"1945 resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.18.tgz#0c8e298dbff8205e2266606c1ea5fbdba29b46e4"2148 resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.18.tgz#0c8e298dbff8205e2266606c1ea5fbdba29b46e4"1946 integrity sha512-rS27+EkB/RE1Iz3u0XtVL5q36MGDWbgYe7zWiodyKNUnthxY0rukK5V36eiUCtCisB7NN8zKYH6DO2M37qxFEQ==2149 integrity sha512-rS27+EkB/RE1Iz3u0XtVL5q36MGDWbgYe7zWiodyKNUnthxY0rukK5V36eiUCtCisB7NN8zKYH6DO2M37qxFEQ==194721501948"@types/chrome@^0.0.144":2151"@types/chrome@^0.0.145":1949 version "0.0.144"2152 version "0.0.145"1950 resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.144.tgz#7dd9188e355aa17e3ad397f50b5cd3ad12caf788"2153 resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.145.tgz#6c53ae0af5f25350b07bfd24cf459b5fe65cd9b8"1951 integrity sha512-BgoiO7/KP9hRNrCR2Wq+aKWT5Dh9bTofuWaRtcqPcj8YKhZojQgb6sSdIqvds2C+eO63BwaR9KHVMYYgZdGGBg==2154 integrity sha512-vLvTMmfc8mvwOZzkmn2UwlWSNu0t0txBkyuIv8NgihRkvFCe6XJX65YZAgAP/RdBit3enhU2GTxCr+prn4uZmA==1952 dependencies:2155 dependencies:1953 "@types/filesystem" "*"2156 "@types/filesystem" "*"1954 "@types/har-format" "*"2157 "@types/har-format" "*"195521582159"@types/estree@*":2160 version "0.0.50"2161 resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83"2162 integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==21632164"@types/estree@0.0.39":2165 version "0.0.39"2166 resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"2167 integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==21681956"@types/filesystem@*":2169"@types/filesystem@*":1957 version "0.0.30"2170 version "0.0.30"1958 resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.30.tgz#a7373a2edf34d13e298baf7ee1101f738b2efb7e"2171 resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.30.tgz#a7373a2edf34d13e298baf7ee1101f738b2efb7e"2011 resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.2.tgz#91daa226eb8c2ff261e6a8cbf8c7304641e095e0"2224 resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.2.tgz#91daa226eb8c2ff261e6a8cbf8c7304641e095e0"2012 integrity sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==2225 integrity sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==201322262014"@types/node-fetch@^2.5.11":2227"@types/node-fetch@^2.5.12":2015 version "2.5.11"2228 version "2.5.12"2016 resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.11.tgz#ce22a2e65fc8999f4dbdb7ddbbcf187d755169e4"2229 resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66"2017 integrity sha512-2upCKaqVZETDRb8A2VTaRymqFBEgH8u6yr96b/u3+1uQEPDRo3mJLEiPk7vdXBHRtjwkjqzFYMJXrt0Z9QsYjQ==2230 integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==2018 dependencies:2231 dependencies:2019 "@types/node" "*"2232 "@types/node" "*"2020 form-data "^3.0.0"2233 form-data "^3.0.0"2046 resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.0.tgz#2e8332cc7363f887d32ec5496b207d26ba8052bb"2259 resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.0.tgz#2e8332cc7363f887d32ec5496b207d26ba8052bb"2047 integrity sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw==2260 integrity sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw==204822612262"@types/resolve@1.17.1":2263 version "1.17.1"2264 resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6"2265 integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==2266 dependencies:2267 "@types/node" "*"22682049"@types/secp256k1@^4.0.1":2269"@types/secp256k1@^4.0.1":2050 version "4.0.2"2270 version "4.0.2"2051 resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.2.tgz#20c29a87149d980f64464e56539bf4810fdb5d1d"2271 resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.2.tgz#20c29a87149d980f64464e56539bf4810fdb5d1d"2058 resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff"2278 resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff"2059 integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==2279 integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==206022802061"@types/websocket@^1.0.3":2281"@types/websocket@^1.0.4":2062 version "1.0.3"2282 version "1.0.4"2063 resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.3.tgz#49e09f939afd0ccdee4f7108d4712ec9feb0f153"2283 resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.4.tgz#1dc497280d8049a5450854dd698ee7e6ea9e60b8"2064 integrity sha512-ZdoTSwmDsKR7l1I8fpfQtmTI/hUwlOvE3q0iyJsp4tXU0MkdrYowimDzwxjhQvxU4qjhHLd3a6ig0OXRbLgIdw==2284 integrity sha512-qn1LkcFEKK8RPp459jkjzsfpbsx36BBt3oC3pITYtkoBw/aVX+EZFa5j3ThCRTNpLFvIMr5dSTD4RaMdilIOpA==2065 dependencies:2285 dependencies:2066 "@types/node" "*"2286 "@types/node" "*"206722872077 dependencies:2297 dependencies:2078 "@types/yargs-parser" "*"2298 "@types/yargs-parser" "*"207922992080"@typescript-eslint/eslint-plugin@4.28.0":2300"@typescript-eslint/eslint-plugin@4.29.2":2081 version "4.28.0"2301 version "4.29.2"2082 resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.0.tgz#1a66f03b264844387beb7dc85e1f1d403bd1803f"2302 resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.2.tgz#f54dc0a32b8f61c6024ab8755da05363b733838d"2083 integrity sha512-KcF6p3zWhf1f8xO84tuBailV5cN92vhS+VT7UJsPzGBm9VnQqfI9AsiMUFUCYHTYPg1uCCo+HyiDnpDuvkAMfQ==2303 integrity sha512-x4EMgn4BTfVd9+Z+r+6rmWxoAzBaapt4QFqE+d8L8sUtYZYLDTK6VG/y/SMMWA5t1/BVU5Kf+20rX4PtWzUYZg==2084 dependencies:2304 dependencies:2085 "@typescript-eslint/experimental-utils" "4.28.0"2305 "@typescript-eslint/experimental-utils" "4.29.2"2086 "@typescript-eslint/scope-manager" "4.28.0"2306 "@typescript-eslint/scope-manager" "4.29.2"2087 debug "^4.3.1"2307 debug "^4.3.1"2088 functional-red-black-tree "^1.0.1"2308 functional-red-black-tree "^1.0.1"2089 regexpp "^3.1.0"2309 regexpp "^3.1.0"2103 semver "^7.3.5"2323 semver "^7.3.5"2104 tsutils "^3.21.0"2324 tsutils "^3.21.0"210523252106"@typescript-eslint/experimental-utils@4.28.0":2107 version "4.28.0"2108 resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.0.tgz#13167ed991320684bdc23588135ae62115b30ee0"2109 integrity sha512-9XD9s7mt3QWMk82GoyUpc/Ji03vz4T5AYlHF9DcoFNfJ/y3UAclRsfGiE2gLfXtyC+JRA3trR7cR296TEb1oiQ==2110 dependencies:2111 "@types/json-schema" "^7.0.7"2112 "@typescript-eslint/scope-manager" "4.28.0"2113 "@typescript-eslint/types" "4.28.0"2114 "@typescript-eslint/typescript-estree" "4.28.0"2115 eslint-scope "^5.1.1"2116 eslint-utils "^3.0.0"21172118"@typescript-eslint/experimental-utils@4.28.5":2326"@typescript-eslint/experimental-utils@4.28.5":2119 version "4.28.5"2327 version "4.28.5"2120 resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.5.tgz#66c28bef115b417cf9d80812a713e0e46bb42a64"2328 resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.5.tgz#66c28bef115b417cf9d80812a713e0e46bb42a64"2127 eslint-scope "^5.1.1"2335 eslint-scope "^5.1.1"2128 eslint-utils "^3.0.0"2336 eslint-utils "^3.0.0"212923372130"@typescript-eslint/parser@4.28.0":2338"@typescript-eslint/experimental-utils@4.29.2":2131 version "4.28.0"2339 version "4.29.2"2132 resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.28.0.tgz#2404c16751a28616ef3abab77c8e51d680a12caa"2340 resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.2.tgz#5f67fb5c5757ef2cb3be64817468ba35c9d4e3b7"2133 integrity sha512-7x4D22oPY8fDaOCvkuXtYYTQ6mTMmkivwEzS+7iml9F9VkHGbbZ3x4fHRwxAb5KeuSkLqfnYjs46tGx2Nour4A==2341 integrity sha512-P6mn4pqObhftBBPAv4GQtEK7Yos1fz/MlpT7+YjH9fTxZcALbiiPKuSIfYP/j13CeOjfq8/fr9Thr2glM9ub7A==2134 dependencies:2342 dependencies:2135 "@typescript-eslint/scope-manager" "4.28.0"2343 "@types/json-schema" "^7.0.7"2344 "@typescript-eslint/scope-manager" "4.29.2"2136 "@typescript-eslint/types" "4.28.0"2345 "@typescript-eslint/types" "4.29.2"2346 "@typescript-eslint/typescript-estree" "4.29.2"2347 eslint-scope "^5.1.1"2348 eslint-utils "^3.0.0"23492350"@typescript-eslint/parser@4.29.2":2137 "@typescript-eslint/typescript-estree" "4.28.0"2351 version "4.29.2"2352 resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.2.tgz#1c7744f4c27aeb74610c955d3dce9250e95c370a"2353 integrity sha512-WQ6BPf+lNuwteUuyk1jD/aHKqMQ9jrdCn7Gxt9vvBnzbpj7aWEf+aZsJ1zvTjx5zFxGCt000lsbD9tQPEL8u6g==2354 dependencies:2355 "@typescript-eslint/scope-manager" "4.29.2"2356 "@typescript-eslint/types" "4.29.2"2357 "@typescript-eslint/typescript-estree" "4.29.2"2138 debug "^4.3.1"2358 debug "^4.3.1"213923592140"@typescript-eslint/parser@^4.28.5":2360"@typescript-eslint/parser@^4.28.5":2147 "@typescript-eslint/typescript-estree" "4.28.5"2367 "@typescript-eslint/typescript-estree" "4.28.5"2148 debug "^4.3.1"2368 debug "^4.3.1"214923692150"@typescript-eslint/scope-manager@4.28.0":2151 version "4.28.0"2152 resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.0.tgz#6a3009d2ab64a30fc8a1e257a1a320067f36a0ce"2153 integrity sha512-eCALCeScs5P/EYjwo6se9bdjtrh8ByWjtHzOkC4Tia6QQWtQr3PHovxh3TdYTuFcurkYI4rmFsRFpucADIkseg==2154 dependencies:2155 "@typescript-eslint/types" "4.28.0"2156 "@typescript-eslint/visitor-keys" "4.28.0"21572158"@typescript-eslint/scope-manager@4.28.5":2370"@typescript-eslint/scope-manager@4.28.5":2159 version "4.28.5"2371 version "4.28.5"2160 resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.5.tgz#3a1b70c50c1535ac33322786ea99ebe403d3b923"2372 resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.5.tgz#3a1b70c50c1535ac33322786ea99ebe403d3b923"2163 "@typescript-eslint/types" "4.28.5"2375 "@typescript-eslint/types" "4.28.5"2164 "@typescript-eslint/visitor-keys" "4.28.5"2376 "@typescript-eslint/visitor-keys" "4.28.5"216523772378"@typescript-eslint/scope-manager@4.29.2":2379 version "4.29.2"2380 resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz#442b0f029d981fa402942715b1718ac7fcd5aa1b"2381 integrity sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA==2382 dependencies:2383 "@typescript-eslint/types" "4.29.2"2384 "@typescript-eslint/visitor-keys" "4.29.2"23852166"@typescript-eslint/types@4.27.0":2386"@typescript-eslint/types@4.27.0":2167 version "4.27.0"2387 version "4.27.0"2168 resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.27.0.tgz#712b408519ed699baff69086bc59cd2fc13df8d8"2388 resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.27.0.tgz#712b408519ed699baff69086bc59cd2fc13df8d8"2169 integrity sha512-I4ps3SCPFCKclRcvnsVA/7sWzh7naaM/b4pBO2hVxnM3wrU51Lveybdw5WoIktU/V4KfXrTt94V9b065b/0+wA==2389 integrity sha512-I4ps3SCPFCKclRcvnsVA/7sWzh7naaM/b4pBO2hVxnM3wrU51Lveybdw5WoIktU/V4KfXrTt94V9b065b/0+wA==217023902171"@typescript-eslint/types@4.28.0":2172 version "4.28.0"2173 resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.0.tgz#a33504e1ce7ac51fc39035f5fe6f15079d4dafb0"2174 integrity sha512-p16xMNKKoiJCVZY5PW/AfILw2xe1LfruTcfAKBj3a+wgNYP5I9ZEKNDOItoRt53p4EiPV6iRSICy8EPanG9ZVA==21752176"@typescript-eslint/types@4.28.5":2391"@typescript-eslint/types@4.28.5":2177 version "4.28.5"2392 version "4.28.5"2178 resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.5.tgz#d33edf8e429f0c0930a7c3d44e9b010354c422e9"2393 resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.5.tgz#d33edf8e429f0c0930a7c3d44e9b010354c422e9"2179 integrity sha512-MruOu4ZaDOLOhw4f/6iudyks/obuvvZUAHBDSW80Trnc5+ovmViLT2ZMDXhUV66ozcl6z0LJfKs1Usldgi/WCA==2394 integrity sha512-MruOu4ZaDOLOhw4f/6iudyks/obuvvZUAHBDSW80Trnc5+ovmViLT2ZMDXhUV66ozcl6z0LJfKs1Usldgi/WCA==218023952181"@typescript-eslint/typescript-estree@4.28.0":2396"@typescript-eslint/types@4.29.2":2182 version "4.28.0"2397 version "4.29.2"2183 resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.0.tgz#e66d4e5aa2ede66fec8af434898fe61af10c71cf"2398 resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.2.tgz#fc0489c6b89773f99109fb0aa0aaddff21f52fcd"2184 integrity sha512-m19UQTRtxMzKAm8QxfKpvh6OwQSXaW1CdZPoCaQuLwAq7VZMNuhJmZR4g5281s2ECt658sldnJfdpSZZaxUGMQ==2399 integrity sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ==2185 dependencies:2186 "@typescript-eslint/types" "4.28.0"2187 "@typescript-eslint/visitor-keys" "4.28.0"2188 debug "^4.3.1"2189 globby "^11.0.3"2190 is-glob "^4.0.1"2191 semver "^7.3.5"2192 tsutils "^3.21.0"219324002194"@typescript-eslint/typescript-estree@4.28.5":2401"@typescript-eslint/typescript-estree@4.28.5":2195 version "4.28.5"2402 version "4.28.5"2204 semver "^7.3.5"2411 semver "^7.3.5"2205 tsutils "^3.21.0"2412 tsutils "^3.21.0"220624132414"@typescript-eslint/typescript-estree@4.29.2":2415 version "4.29.2"2416 resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.2.tgz#a0ea8b98b274adbb2577100ba545ddf8bf7dc219"2417 integrity sha512-TJ0/hEnYxapYn9SGn3dCnETO0r+MjaxtlWZ2xU+EvytF0g4CqTpZL48SqSNn2hXsPolnewF30pdzR9a5Lj3DNg==2418 dependencies:2419 "@typescript-eslint/types" "4.29.2"2420 "@typescript-eslint/visitor-keys" "4.29.2"2421 debug "^4.3.1"2422 globby "^11.0.3"2423 is-glob "^4.0.1"2424 semver "^7.3.5"2425 tsutils "^3.21.0"24262207"@typescript-eslint/typescript-estree@^4.8.2":2427"@typescript-eslint/typescript-estree@^4.8.2":2208 version "4.27.0"2428 version "4.27.0"2209 resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.27.0.tgz#189a7b9f1d0717d5cccdcc17247692dedf7a09da"2429 resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.27.0.tgz#189a7b9f1d0717d5cccdcc17247692dedf7a09da"2225 "@typescript-eslint/types" "4.27.0"2445 "@typescript-eslint/types" "4.27.0"2226 eslint-visitor-keys "^2.0.0"2446 eslint-visitor-keys "^2.0.0"222724472228"@typescript-eslint/visitor-keys@4.28.0":2229 version "4.28.0"2230 resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.0.tgz#255c67c966ec294104169a6939d96f91c8a89434"2231 integrity sha512-PjJyTWwrlrvM5jazxYF5ZPs/nl0kHDZMVbuIcbpawVXaDPelp3+S9zpOz5RmVUfS/fD5l5+ZXNKnWhNYjPzCvw==2232 dependencies:2233 "@typescript-eslint/types" "4.28.0"2234 eslint-visitor-keys "^2.0.0"22352236"@typescript-eslint/visitor-keys@4.28.5":2448"@typescript-eslint/visitor-keys@4.28.5":2237 version "4.28.5"2449 version "4.28.5"2238 resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.5.tgz#ffee2c602762ed6893405ee7c1144d9cc0a29675"2450 resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.5.tgz#ffee2c602762ed6893405ee7c1144d9cc0a29675"2241 "@typescript-eslint/types" "4.28.5"2453 "@typescript-eslint/types" "4.28.5"2242 eslint-visitor-keys "^2.0.0"2454 eslint-visitor-keys "^2.0.0"224324552456"@typescript-eslint/visitor-keys@4.29.2":2457 version "4.29.2"2458 resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz#d2da7341f3519486f50655159f4e5ecdcb2cd1df"2459 integrity sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag==2460 dependencies:2461 "@typescript-eslint/types" "4.29.2"2462 eslint-visitor-keys "^2.0.0"24632244"@ungap/promise-all-settled@1.1.2":2464"@ungap/promise-all-settled@1.1.2":2245 version "1.1.2"2465 version "1.1.2"2246 resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"2466 resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"2606 resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"2826 resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"2607 integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==2827 integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==260828282609babel-jest@^27.0.5:2829babel-jest@^27.0.6:2610 version "27.0.5"2830 version "27.0.6"2611 resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.5.tgz#cd34c033ada05d1362211e5152391fd7a88080c8"2831 resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.6.tgz#e99c6e0577da2655118e3608b68761a5a69bd0d8"2612 integrity sha512-bTMAbpCX7ldtfbca2llYLeSFsDM257aspyAOpsdrdSrBqoLkWCy4HPYTXtXWaSLgFPjrJGACL65rzzr4RFGadw==2832 integrity sha512-iTJyYLNc4wRofASmofpOc5NK9QunwMk+TLFgGXsTFS8uEqmd8wdI7sga0FPe2oVH3b5Agt/EAK1QjPEuKL8VfA==2613 dependencies:2833 dependencies:2614 "@jest/transform" "^27.0.5"2834 "@jest/transform" "^27.0.6"2615 "@jest/types" "^27.0.2"2835 "@jest/types" "^27.0.6"2616 "@types/babel__core" "^7.1.14"2836 "@types/babel__core" "^7.1.14"2617 babel-plugin-istanbul "^6.0.0"2837 babel-plugin-istanbul "^6.0.0"2618 babel-preset-jest "^27.0.1"2838 babel-preset-jest "^27.0.6"2619 chalk "^4.0.0"2839 chalk "^4.0.0"2620 graceful-fs "^4.2.4"2840 graceful-fs "^4.2.4"2621 slash "^3.0.0"2841 slash "^3.0.0"2638 istanbul-lib-instrument "^4.0.0"2858 istanbul-lib-instrument "^4.0.0"2639 test-exclude "^6.0.0"2859 test-exclude "^6.0.0"264028602641babel-plugin-jest-hoist@^27.0.1:2861babel-plugin-jest-hoist@^27.0.6:2642 version "27.0.1"2862 version "27.0.6"2643 resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.1.tgz#a6d10e484c93abff0f4e95f437dad26e5736ea11"2863 resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz#f7c6b3d764af21cb4a2a1ab6870117dbde15b456"2644 integrity sha512-sqBF0owAcCDBVEDtxqfYr2F36eSHdx7lAVGyYuOBRnKdD6gzcy0I0XrAYCZgOA3CRrLhmR+Uae9nogPzmAtOfQ==2864 integrity sha512-CewFeM9Vv2gM7Yr9n5eyyLVPRSiBnk6lKZRjgwYnGKSl9M14TMn2vkN02wTF04OGuSDLEzlWiMzvjXuW9mB6Gw==2645 dependencies:2865 dependencies:2646 "@babel/template" "^7.3.3"2866 "@babel/template" "^7.3.3"2647 "@babel/types" "^7.3.3"2867 "@babel/types" "^7.3.3"2688 dependencies:2908 dependencies:2689 "@babel/helper-define-polyfill-provider" "^0.2.2"2909 "@babel/helper-define-polyfill-provider" "^0.2.2"269029102691babel-plugin-styled-components@^1.12.0:2911babel-plugin-styled-components@^1.13.2:2692 version "1.12.0"2912 version "1.13.2"2693 resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.12.0.tgz#1dec1676512177de6b827211e9eda5a30db4f9b9"2913 resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.13.2.tgz#ebe0e6deff51d7f93fceda1819e9b96aeb88278d"2694 integrity sha512-FEiD7l5ZABdJPpLssKXjBUJMYqzbcNzBowfXDCdJhOpbhWiewapUaY+LZGT8R4Jg2TwOjGjG4RKeyrO5p9sBkA==2914 integrity sha512-Vb1R3d4g+MUfPQPVDMCGjm3cDocJEUTR7Xq7QS95JWWeksN1wdFRYpD2kulDgI3Huuaf1CZd+NK4KQmqUFh5dA==2695 dependencies:2915 dependencies:2696 "@babel/helper-annotate-as-pure" "^7.0.0"2916 "@babel/helper-annotate-as-pure" "^7.0.0"2697 "@babel/helper-module-imports" "^7.0.0"2917 "@babel/helper-module-imports" "^7.0.0"2721 "@babel/plugin-syntax-optional-chaining" "^7.8.3"2941 "@babel/plugin-syntax-optional-chaining" "^7.8.3"2722 "@babel/plugin-syntax-top-level-await" "^7.8.3"2942 "@babel/plugin-syntax-top-level-await" "^7.8.3"272329432724babel-preset-jest@^27.0.1:2944babel-preset-jest@^27.0.6:2725 version "27.0.1"2945 version "27.0.6"2726 resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.1.tgz#7a50c75d16647c23a2cf5158d5bb9eb206b10e20"2946 resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz#909ef08e9f24a4679768be2f60a3df0856843f9d"2727 integrity sha512-nIBIqCEpuiyhvjQs2mVNwTxQQa2xk70p9Dd/0obQGBf8FBzbnI8QhQKzLsWMN2i6q+5B0OcWDtrboBX5gmOLyA==2947 integrity sha512-WObA0/Biw2LrVVwZkF/2GqbOdzhKD6Fkdwhoy9ASIrOWr/zodcSpQh72JOkEn6NWyjmnPDjNSqaGN4KnpKzhXw==2728 dependencies:2948 dependencies:2729 babel-plugin-jest-hoist "^27.0.1"2949 babel-plugin-jest-hoist "^27.0.6"2730 babel-preset-current-node-syntax "^1.0.0"2950 babel-preset-current-node-syntax "^1.0.0"273129512732balanced-match@^1.0.0:2952balanced-match@^1.0.0:2966 escalade "^3.1.1"3186 escalade "^3.1.1"2967 node-releases "^1.1.71"3187 node-releases "^1.1.71"296831883189browserslist@^4.16.7:3190 version "4.16.7"3191 resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.7.tgz#108b0d1ef33c4af1b587c54f390e7041178e4335"3192 integrity sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==3193 dependencies:3194 caniuse-lite "^1.0.30001248"3195 colorette "^1.2.2"3196 electron-to-chromium "^1.3.793"3197 escalade "^3.1.1"3198 node-releases "^1.1.73"31992969bs58@^4.0.0:3200bs58@^4.0.0:2970 version "4.0.1"3201 version "4.0.1"2971 resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a"3202 resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a"3024 resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"3255 resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"3025 integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=3256 integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=302632573258builtin-modules@^3.1.0:3259 version "3.2.0"3260 resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887"3261 integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==32623027bytes@3.1.0:3263bytes@3.1.0:3028 version "3.1.0"3264 version "3.1.0"3029 resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"3265 resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"3085 resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001238.tgz#e6a8b45455c5de601718736d0242feef0ecdda15"3321 resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001238.tgz#e6a8b45455c5de601718736d0242feef0ecdda15"3086 integrity sha512-bZGam2MxEt7YNsa2VwshqWQMwrYs5tR5WZQRYSuFxsBQunWjBuXhN4cS9nV5FFb1Z9y+DoQcQ0COyQbv6A+CKw==3322 integrity sha512-bZGam2MxEt7YNsa2VwshqWQMwrYs5tR5WZQRYSuFxsBQunWjBuXhN4cS9nV5FFb1Z9y+DoQcQ0COyQbv6A+CKw==308733233324caniuse-lite@^1.0.30001248:3325 version "1.0.30001251"3326 resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz#6853a606ec50893115db660f82c094d18f096d85"3327 integrity sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==33283088caseless@~0.12.0:3329caseless@~0.12.0:3089 version "0.12.0"3330 version "0.12.0"3090 resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"3331 resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"3134 ansi-styles "^4.1.0"3375 ansi-styles "^4.1.0"3135 supports-color "^7.1.0"3376 supports-color "^7.1.0"313633773378chalk@^4.1.2:3379 version "4.1.2"3380 resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"3381 integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==3382 dependencies:3383 ansi-styles "^4.1.0"3384 supports-color "^7.1.0"33853137changelog-parser@^2.0.0:3386changelog-parser@^2.0.0:3138 version "2.8.0"3387 version "2.8.0"3139 resolved "https://registry.yarnpkg.com/changelog-parser/-/changelog-parser-2.8.0.tgz#c14293e3e8fab797913c722de965480198650108"3388 resolved "https://registry.yarnpkg.com/changelog-parser/-/changelog-parser-2.8.0.tgz#c14293e3e8fab797913c722de965480198650108"3472 browserslist "^4.16.6"3721 browserslist "^4.16.6"3473 semver "7.0.0"3722 semver "7.0.0"347437233475core-js-compat@^3.15.0:3724core-js-compat@^3.16.0:3476 version "3.15.1"3725 version "3.16.1"3477 resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.15.1.tgz#1afe233716d37ee021956ef097594071b2b585a7"3726 resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.1.tgz#c44b7caa2dcb94b673a98f27eee1c8312f55bc2d"3478 integrity sha512-xGhzYMX6y7oEGQGAJmP2TmtBLvR4nZmRGEcFa3ubHOq5YEp51gGN9AovVa0AoujGZIq+Wm6dISiYyGNfdflYww==3727 integrity sha512-NHXQXvRbd4nxp9TEmooTJLUf94ySUG6+DSsscBpTftN1lQLQ4LjnWvc7AoIo4UjDsFF3hB8Uh5LLCRRdaiT5MQ==3479 dependencies:3728 dependencies:3480 browserslist "^4.16.6"3729 browserslist "^4.16.7"3481 semver "7.0.0"3730 semver "7.0.0"348237313483core-util-is@1.0.2, core-util-is@~1.0.0:3732core-util-is@1.0.2, core-util-is@~1.0.0:3493 object-assign "^4"3742 object-assign "^4"3494 vary "^1"3743 vary "^1"349537443496coveralls@^3.1.0:3745coveralls@^3.1.1:3497 version "3.1.0"3746 version "3.1.1"3498 resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b"3747 resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.1.tgz#f5d4431d8b5ae69c5079c8f8ca00d64ac77cf081"3499 integrity sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ==3748 integrity sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==3500 dependencies:3749 dependencies:3501 js-yaml "^3.13.1"3750 js-yaml "^3.13.1"3502 lcov-parse "^1.0.0"3751 lcov-parse "^1.0.0"3883 node-source-walk "^4.2.0"4132 node-source-walk "^4.2.0"3884 typescript "^3.9.7"4133 typescript "^3.9.7"388541343886diff-sequences@^27.0.1:4135diff-sequences@^27.0.6:3887 version "27.0.1"4136 version "27.0.6"3888 resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.1.tgz#9c9801d52ed5f576ff0a20e3022a13ee6e297e7c"4137 resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723"3889 integrity sha512-XPLijkfJUh/PIBnfkcSHgvD6tlYixmcMAn3osTk6jt+H0v/mgURto1XUiD9DKuGX5NDoVS6dSlA23gd9FUaCFg==4138 integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==389041393891diff@5.0.0:4140diff@5.0.0:3892 version "5.0.0"4141 version "5.0.0"3970 jsbn "~0.1.0"4219 jsbn "~0.1.0"3971 safer-buffer "^2.1.0"4220 safer-buffer "^2.1.0"397242214222ed2curve@^0.3.0:4223 version "0.3.0"4224 resolved "https://registry.yarnpkg.com/ed2curve/-/ed2curve-0.3.0.tgz#322b575152a45305429d546b071823a93129a05d"4225 integrity sha512-8w2fmmq3hv9rCrcI7g9hms2pMunQr1JINfcjwR9tAyZqhtyaMN991lF/ZfHfr5tzZQ8c7y7aBgZbjfbd0fjFwQ==4226 dependencies:4227 tweetnacl "1.x.x"42283973ee-first@1.1.1:4229ee-first@1.1.1:3974 version "1.1.1"4230 version "1.1.1"3975 resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"4231 resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"3980 resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz#0728587f1b9b970ec9ffad932496429aef750d09"4236 resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz#0728587f1b9b970ec9ffad932496429aef750d09"3981 integrity sha512-2Tg+7jSl3oPxgsBsWKh5H83QazTkmWG/cnNwJplmyZc7KcN61+I10oUgaXSVk/NwfvN3BdkKDR4FYuRBQQ2v0A==4237 integrity sha512-2Tg+7jSl3oPxgsBsWKh5H83QazTkmWG/cnNwJplmyZc7KcN61+I10oUgaXSVk/NwfvN3BdkKDR4FYuRBQQ2v0A==398242384239electron-to-chromium@^1.3.793:4240 version "1.3.807"4241 resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.807.tgz#c2eb803f4f094869b1a24151184ffbbdbf688b1f"4242 integrity sha512-p8uxxg2a23zRsvQ2uwA/OOI+O4BQxzaR7YKMIGGGQCpYmkFX2CVF5f0/hxLMV7yCr7nnJViCwHLhPfs52rIYCA==42433983elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4:4244elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4:3984 version "6.5.4"4245 version "6.5.4"3985 resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"4246 resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"4151 resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516"4412 resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516"4152 integrity sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==4413 integrity sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==415344144154eslint-import-resolver-node@^0.3.4:4415eslint-import-resolver-node@^0.3.5, eslint-import-resolver-node@^0.3.6:4155 version "0.3.4"4416 version "0.3.6"4156 resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717"4417 resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"4157 integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==4418 integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==4158 dependencies:4419 dependencies:4159 debug "^2.6.9"4420 debug "^3.2.7"4160 resolve "^1.13.1"4421 resolve "^1.20.0"416144224162eslint-module-utils@^2.6.1:4423eslint-module-utils@^2.6.2:4163 version "2.6.1"4424 version "2.6.2"4164 resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233"4425 resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534"4165 integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==4426 integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==4166 dependencies:4427 dependencies:4167 debug "^3.2.7"4428 debug "^3.2.7"4168 pkg-dir "^2.0.0"4429 pkg-dir "^2.0.0"4180 resolved "https://registry.yarnpkg.com/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz#6ce512432d57675265fac47292b50d1eff11acd6"4441 resolved "https://registry.yarnpkg.com/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz#6ce512432d57675265fac47292b50d1eff11acd6"4181 integrity sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==4442 integrity sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==418244434183eslint-plugin-import@^2.23.4:4444eslint-plugin-import-newlines@^1.1.4:4184 version "2.23.4"4445 version "1.1.4"4185 resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97"4446 resolved "https://registry.yarnpkg.com/eslint-plugin-import-newlines/-/eslint-plugin-import-newlines-1.1.4.tgz#d69d03fe512b2f54bc781d1dfc51a4ad99df7a52"4186 integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ==4447 integrity sha512-GCIM+524XQOFcEPinEyrvktQHkQq+k+kYCwbRrIioGBVGnk3RGDFWv5BPqBQCDci6SNZCVgIOi3/FmtDetbxvA==44484449eslint-plugin-import@^2.24.0:4450 version "2.24.0"4451 resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz#697ffd263e24da5e84e03b282f5fb62251777177"4452 integrity sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg==4187 dependencies:4453 dependencies:4188 array-includes "^3.1.3"4454 array-includes "^3.1.3"4189 array.prototype.flat "^1.2.4"4455 array.prototype.flat "^1.2.4"4190 debug "^2.6.9"4456 debug "^2.6.9"4191 doctrine "^2.1.0"4457 doctrine "^2.1.0"4192 eslint-import-resolver-node "^0.3.4"4458 eslint-import-resolver-node "^0.3.5"4193 eslint-module-utils "^2.6.1"4459 eslint-module-utils "^2.6.2"4194 find-up "^2.0.0"4460 find-up "^2.0.0"4195 has "^1.0.3"4461 has "^1.0.3"4196 is-core-module "^2.4.0"4462 is-core-module "^2.4.0"4285 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"4551 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"4286 integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==4552 integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==428745534288eslint@^7.29.0:4554eslint@^7.31.0:4289 version "7.29.0"4555 version "7.31.0"4290 resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.29.0.tgz#ee2a7648f2e729485e4d0bd6383ec1deabc8b3c0"4556 resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.31.0.tgz#f972b539424bf2604907a970860732c5d99d3aca"4291 integrity sha512-82G/JToB9qIy/ArBzIWG9xvvwL3R86AlCjtGw+A29OMZDqhTybz/MByORSukGxeI+YPCR4coYyITKk8BFH9nDA==4557 integrity sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA==4292 dependencies:4558 dependencies:4293 "@babel/code-frame" "7.12.11"4559 "@babel/code-frame" "7.12.11"4294 "@eslint/eslintrc" "^0.4.2"4560 "@eslint/eslintrc" "^0.4.3"4561 "@humanwhocodes/config-array" "^0.5.0"4295 ajv "^6.10.0"4562 ajv "^6.10.0"4296 chalk "^4.0.0"4563 chalk "^4.0.0"4297 cross-spawn "^7.0.2"4564 cross-spawn "^7.0.2"4330 text-table "^0.2.0"4597 text-table "^0.2.0"4331 v8-compile-cache "^2.0.3"4598 v8-compile-cache "^2.0.3"433245994333eslint@^7.31.0:4600eslint@^7.32.0:4334 version "7.31.0"4601 version "7.32.0"4335 resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.31.0.tgz#f972b539424bf2604907a970860732c5d99d3aca"4602 resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"4336 integrity sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA==4603 integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==4337 dependencies:4604 dependencies:4338 "@babel/code-frame" "7.12.11"4605 "@babel/code-frame" "7.12.11"4339 "@eslint/eslintrc" "^0.4.3"4606 "@eslint/eslintrc" "^0.4.3"4414 resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"4681 resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"4415 integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==4682 integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==441646834684estree-walker@^1.0.1:4685 version "1.0.1"4686 resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"4687 integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==46884689estree-walker@^2.0.1:4690 version "2.0.2"4691 resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"4692 integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==46934417esutils@^2.0.2:4694esutils@^2.0.2:4418 version "2.0.3"4695 version "2.0.3"4419 resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"4696 resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"4574 snapdragon "^0.8.1"4851 snapdragon "^0.8.1"4575 to-regex "^3.0.1"4852 to-regex "^3.0.1"457648534577expect@^27.0.2:4854expect@^27.0.6:4578 version "27.0.2"4855 version "27.0.6"4579 resolved "https://registry.yarnpkg.com/expect/-/expect-27.0.2.tgz#e66ca3a4c9592f1c019fa1d46459a9d2084f3422"4856 resolved "https://registry.yarnpkg.com/expect/-/expect-27.0.6.tgz#a4d74fbe27222c718fff68ef49d78e26a8fd4c05"4580 integrity sha512-YJFNJe2+P2DqH+ZrXy+ydRQYO87oxRUonZImpDodR1G7qo3NYd3pL+NQ9Keqpez3cehczYwZDBC3A7xk3n7M/w==4857 integrity sha512-psNLt8j2kwg42jGBDSfAlU49CEZxejN1f1PlANWDZqIhBOVU/c2Pm888FcjWJzFewhIsNWfZJeLjUjtKGiPuSw==4581 dependencies:4858 dependencies:4582 "@jest/types" "^27.0.2"4859 "@jest/types" "^27.0.6"4583 ansi-styles "^5.0.0"4860 ansi-styles "^5.0.0"4584 jest-get-type "^27.0.1"4861 jest-get-type "^27.0.6"4585 jest-matcher-utils "^27.0.2"4862 jest-matcher-utils "^27.0.6"4586 jest-message-util "^27.0.2"4863 jest-message-util "^27.0.6"4587 jest-regex-util "^27.0.1"4864 jest-regex-util "^27.0.6"458848654589express@^4.14.0:4866express@^4.14.0:4590 version "4.17.1"4867 version "4.17.1"5857 resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"6134 resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"5858 integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==6135 integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==585961366137is-module@^1.0.0:6138 version "1.0.0"6139 resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"6140 integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=61415860is-negative-zero@^2.0.1:6142is-negative-zero@^2.0.1:5861 version "2.0.1"6143 version "2.0.1"5862 resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24"6144 resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24"5931 resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"6213 resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"5932 integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==6214 integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==593362156216is-reference@^1.2.1:6217 version "1.2.1"6218 resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"6219 integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==6220 dependencies:6221 "@types/estree" "*"62225934is-regex@^1.1.3:6223is-regex@^1.1.3:5935 version "1.1.3"6224 version "1.1.3"5936 resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f"6225 resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f"6088 has-to-string-tag-x "^1.2.0"6377 has-to-string-tag-x "^1.2.0"6089 is-object "^1.0.1"6378 is-object "^1.0.1"609063796091jest-changed-files@^27.0.2:6380jest-changed-files@^27.0.6:6092 version "27.0.2"6381 version "27.0.6"6093 resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.2.tgz#997253042b4a032950fc5f56abf3c5d1f8560801"6382 resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.6.tgz#bed6183fcdea8a285482e3b50a9a7712d49a7a8b"6094 integrity sha512-eMeb1Pn7w7x3wue5/vF73LPCJ7DKQuC9wQUR5ebP9hDPpk5hzcT/3Hmz3Q5BOFpR3tgbmaWhJcMTVgC8Z1NuMw==6383 integrity sha512-BuL/ZDauaq5dumYh5y20sn4IISnf1P9A0TDswTxUi84ORGtVa86ApuBHqICL0vepqAnZiY6a7xeSPWv2/yy4eA==6095 dependencies:6384 dependencies:6096 "@jest/types" "^27.0.2"6385 "@jest/types" "^27.0.6"6097 execa "^5.0.0"6386 execa "^5.0.0"6098 throat "^6.0.1"6387 throat "^6.0.1"609963886100jest-circus@^27.0.5:6389jest-circus@^27.0.6:6101 version "27.0.5"6390 version "27.0.6"6102 resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.5.tgz#b5e327f1d6857c8485126f8e364aefa4378debaa"6391 resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.6.tgz#dd4df17c4697db6a2c232aaad4e9cec666926668"6103 integrity sha512-p5rO90o1RTh8LPOG6l0Fc9qgp5YGv+8M5CFixhMh7gGHtGSobD1AxX9cjFZujILgY8t30QZ7WVvxlnuG31r8TA==6392 integrity sha512-OJlsz6BBeX9qR+7O9lXefWoc2m9ZqcZ5Ohlzz0pTEAG4xMiZUJoacY8f4YDHxgk0oKYxj277AfOk9w6hZYvi1Q==6104 dependencies:6393 dependencies:6105 "@jest/environment" "^27.0.5"6394 "@jest/environment" "^27.0.6"6106 "@jest/test-result" "^27.0.2"6395 "@jest/test-result" "^27.0.6"6107 "@jest/types" "^27.0.2"6396 "@jest/types" "^27.0.6"6108 "@types/node" "*"6397 "@types/node" "*"6109 chalk "^4.0.0"6398 chalk "^4.0.0"6110 co "^4.6.0"6399 co "^4.6.0"6111 dedent "^0.7.0"6400 dedent "^0.7.0"6112 expect "^27.0.2"6401 expect "^27.0.6"6113 is-generator-fn "^2.0.0"6402 is-generator-fn "^2.0.0"6114 jest-each "^27.0.2"6403 jest-each "^27.0.6"6115 jest-matcher-utils "^27.0.2"6404 jest-matcher-utils "^27.0.6"6116 jest-message-util "^27.0.2"6405 jest-message-util "^27.0.6"6117 jest-runtime "^27.0.5"6406 jest-runtime "^27.0.6"6118 jest-snapshot "^27.0.5"6407 jest-snapshot "^27.0.6"6119 jest-util "^27.0.2"6408 jest-util "^27.0.6"6120 pretty-format "^27.0.2"6409 pretty-format "^27.0.6"6121 slash "^3.0.0"6410 slash "^3.0.0"6122 stack-utils "^2.0.3"6411 stack-utils "^2.0.3"6123 throat "^6.0.1"6412 throat "^6.0.1"612464136125jest-cli@^27.0.5:6414jest-cli@^27.0.6:6126 version "27.0.5"6415 version "27.0.6"6127 resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.5.tgz#f359ba042624cffb96b713010a94bffb7498a37c"6416 resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.6.tgz#d021e5f4d86d6a212450d4c7b86cb219f1e6864f"6128 integrity sha512-kZqY020QFOFQKVE2knFHirTBElw3/Q0kUbDc3nMfy/x+RQ7zUY89SUuzpHHJoSX1kX7Lq569ncvjNqU3Td/FCA==6417 integrity sha512-qUUVlGb9fdKir3RDE+B10ULI+LQrz+MCflEH2UJyoUjoHHCbxDrMxSzjQAPUMsic4SncI62ofYCcAvW6+6rhhg==6129 dependencies:6418 dependencies:6130 "@jest/core" "^27.0.5"6419 "@jest/core" "^27.0.6"6131 "@jest/test-result" "^27.0.2"6420 "@jest/test-result" "^27.0.6"6132 "@jest/types" "^27.0.2"6421 "@jest/types" "^27.0.6"6133 chalk "^4.0.0"6422 chalk "^4.0.0"6134 exit "^0.1.2"6423 exit "^0.1.2"6135 graceful-fs "^4.2.4"6424 graceful-fs "^4.2.4"6136 import-local "^3.0.2"6425 import-local "^3.0.2"6137 jest-config "^27.0.5"6426 jest-config "^27.0.6"6138 jest-util "^27.0.2"6427 jest-util "^27.0.6"6139 jest-validate "^27.0.2"6428 jest-validate "^27.0.6"6140 prompts "^2.0.1"6429 prompts "^2.0.1"6141 yargs "^16.0.3"6430 yargs "^16.0.3"614264316143jest-config@^27.0.5:6432jest-config@^27.0.6:6144 version "27.0.5"6433 version "27.0.6"6145 resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.5.tgz#683da3b0d8237675c29c817f6e3aba1481028e19"6434 resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.6.tgz#119fb10f149ba63d9c50621baa4f1f179500277f"6146 integrity sha512-zCUIXag7QIXKEVN4kUKbDBDi9Q53dV5o3eNhGqe+5zAbt1vLs4VE3ceWaYrOub0L4Y7E9pGfM84TX/0ARcE+Qw==6435 integrity sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w==6147 dependencies:6436 dependencies:6148 "@babel/core" "^7.1.0"6437 "@babel/core" "^7.1.0"6149 "@jest/test-sequencer" "^27.0.5"6438 "@jest/test-sequencer" "^27.0.6"6150 "@jest/types" "^27.0.2"6439 "@jest/types" "^27.0.6"6151 babel-jest "^27.0.5"6440 babel-jest "^27.0.6"6152 chalk "^4.0.0"6441 chalk "^4.0.0"6153 deepmerge "^4.2.2"6442 deepmerge "^4.2.2"6154 glob "^7.1.1"6443 glob "^7.1.1"6155 graceful-fs "^4.2.4"6444 graceful-fs "^4.2.4"6156 is-ci "^3.0.0"6445 is-ci "^3.0.0"6157 jest-circus "^27.0.5"6446 jest-circus "^27.0.6"6158 jest-environment-jsdom "^27.0.5"6447 jest-environment-jsdom "^27.0.6"6159 jest-environment-node "^27.0.5"6448 jest-environment-node "^27.0.6"6160 jest-get-type "^27.0.1"6449 jest-get-type "^27.0.6"6161 jest-jasmine2 "^27.0.5"6450 jest-jasmine2 "^27.0.6"6162 jest-regex-util "^27.0.1"6451 jest-regex-util "^27.0.6"6163 jest-resolve "^27.0.5"6452 jest-resolve "^27.0.6"6164 jest-runner "^27.0.5"6453 jest-runner "^27.0.6"6165 jest-util "^27.0.2"6454 jest-util "^27.0.6"6166 jest-validate "^27.0.2"6455 jest-validate "^27.0.6"6167 micromatch "^4.0.4"6456 micromatch "^4.0.4"6168 pretty-format "^27.0.2"6457 pretty-format "^27.0.6"616964586170jest-diff@^27.0.2:6459jest-diff@^27.0.6:6171 version "27.0.2"6460 version "27.0.6"6172 resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.2.tgz#f315b87cee5dc134cf42c2708ab27375cc3f5a7e"6461 resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e"6173 integrity sha512-BFIdRb0LqfV1hBt8crQmw6gGQHVDhM87SpMIZ45FPYKReZYG5er1+5pIn2zKqvrJp6WNox0ylR8571Iwk2Dmgw==6462 integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg==6174 dependencies:6463 dependencies:6175 chalk "^4.0.0"6464 chalk "^4.0.0"6176 diff-sequences "^27.0.1"6465 diff-sequences "^27.0.6"6177 jest-get-type "^27.0.1"6466 jest-get-type "^27.0.6"6178 pretty-format "^27.0.2"6467 pretty-format "^27.0.6"617964686180jest-docblock@^27.0.1:6469jest-docblock@^27.0.6:6181 version "27.0.1"6470 version "27.0.6"6182 resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.1.tgz#bd9752819b49fa4fab1a50b73eb58c653b962e8b"6471 resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.6.tgz#cc78266acf7fe693ca462cbbda0ea4e639e4e5f3"6183 integrity sha512-TA4+21s3oebURc7VgFV4r7ltdIJ5rtBH1E3Tbovcg7AV+oLfD5DcJ2V2vJ5zFA9sL5CFd/d2D6IpsAeSheEdrA==6472 integrity sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA==6184 dependencies:6473 dependencies:6185 detect-newline "^3.0.0"6474 detect-newline "^3.0.0"618664756187jest-each@^27.0.2:6476jest-each@^27.0.6:6188 version "27.0.2"6477 version "27.0.6"6189 resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.2.tgz#865ddb4367476ced752167926b656fa0dcecd8c7"6478 resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.6.tgz#cee117071b04060158dc8d9a66dc50ad40ef453b"6190 integrity sha512-OLMBZBZ6JkoXgUenDtseFRWA43wVl2BwmZYIWQws7eS7pqsIvePqj/jJmEnfq91ALk3LNphgwNK/PRFBYi7ITQ==6479 integrity sha512-m6yKcV3bkSWrUIjxkE9OC0mhBZZdhovIW5ergBYirqnkLXkyEn3oUUF/QZgyecA1cF1QFyTE8bRRl8Tfg1pfLA==6191 dependencies:6480 dependencies:6192 "@jest/types" "^27.0.2"6481 "@jest/types" "^27.0.6"6193 chalk "^4.0.0"6482 chalk "^4.0.0"6194 jest-get-type "^27.0.1"6483 jest-get-type "^27.0.6"6195 jest-util "^27.0.2"6484 jest-util "^27.0.6"6196 pretty-format "^27.0.2"6485 pretty-format "^27.0.6"619764866198jest-environment-jsdom@^27.0.5:6487jest-environment-jsdom@^27.0.6:6199 version "27.0.5"6488 version "27.0.6"6200 resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.5.tgz#c36771977cf4490a9216a70473b39161d193c212"6489 resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz#f66426c4c9950807d0a9f209c590ce544f73291f"6201 integrity sha512-ToWhViIoTl5738oRaajTMgYhdQL73UWPoV4GqHGk2DPhs+olv8OLq5KoQW8Yf+HtRao52XLqPWvl46dPI88PdA==6490 integrity sha512-FvetXg7lnXL9+78H+xUAsra3IeZRTiegA3An01cWeXBspKXUhAwMM9ycIJ4yBaR0L7HkoMPaZsozCLHh4T8fuw==6202 dependencies:6491 dependencies:6203 "@jest/environment" "^27.0.5"6492 "@jest/environment" "^27.0.6"6204 "@jest/fake-timers" "^27.0.5"6493 "@jest/fake-timers" "^27.0.6"6205 "@jest/types" "^27.0.2"6494 "@jest/types" "^27.0.6"6206 "@types/node" "*"6495 "@types/node" "*"6207 jest-mock "^27.0.3"6496 jest-mock "^27.0.6"6208 jest-util "^27.0.2"6497 jest-util "^27.0.6"6209 jsdom "^16.6.0"6498 jsdom "^16.6.0"621064996211jest-environment-node@^27.0.5:6500jest-environment-node@^27.0.6:6212 version "27.0.5"6501 version "27.0.6"6213 resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.5.tgz#b7238fc2b61ef2fb9563a3b7653a95fa009a6a54"6502 resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.6.tgz#a6699b7ceb52e8d68138b9808b0c404e505f3e07"6214 integrity sha512-47qqScV/WMVz5OKF5TWpAeQ1neZKqM3ySwNveEnLyd+yaE/KT6lSMx/0SOx60+ZUcVxPiESYS+Kt2JS9y4PpkQ==6503 integrity sha512-+Vi6yLrPg/qC81jfXx3IBlVnDTI6kmRr08iVa2hFCWmJt4zha0XW7ucQltCAPhSR0FEKEoJ3i+W4E6T0s9is0w==6215 dependencies:6504 dependencies:6216 "@jest/environment" "^27.0.5"6505 "@jest/environment" "^27.0.6"6217 "@jest/fake-timers" "^27.0.5"6506 "@jest/fake-timers" "^27.0.6"6218 "@jest/types" "^27.0.2"6507 "@jest/types" "^27.0.6"6219 "@types/node" "*"6508 "@types/node" "*"6220 jest-mock "^27.0.3"6509 jest-mock "^27.0.6"6221 jest-util "^27.0.2"6510 jest-util "^27.0.6"622265116223jest-get-type@^27.0.1:6512jest-get-type@^27.0.6:6224 version "27.0.1"6513 version "27.0.6"6225 resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.1.tgz#34951e2b08c8801eb28559d7eb732b04bbcf7815"6514 resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe"6226 integrity sha512-9Tggo9zZbu0sHKebiAijyt1NM77Z0uO4tuWOxUCujAiSeXv30Vb5D4xVF4UR4YWNapcftj+PbByU54lKD7/xMg==6515 integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg==622765166228jest-haste-map@^27.0.5:6517jest-haste-map@^27.0.6:6229 version "27.0.5"6518 version "27.0.6"6230 resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.5.tgz#2e1e55073b5328410a2c0d74b334e513d71f3470"6519 resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.6.tgz#4683a4e68f6ecaa74231679dca237279562c8dc7"6231 integrity sha512-3LFryGSHxwPFHzKIs6W0BGA2xr6g1MvzSjR3h3D8K8Uqy4vbRm/grpGHzbPtIbOPLC6wFoViRrNEmd116QWSkw==6520 integrity sha512-4ldjPXX9h8doB2JlRzg9oAZ2p6/GpQUNAeiYXqcpmrKbP0Qev0wdZlxSMOmz8mPOEnt4h6qIzXFLDi8RScX/1w==6232 dependencies:6521 dependencies:6233 "@jest/types" "^27.0.2"6522 "@jest/types" "^27.0.6"6234 "@types/graceful-fs" "^4.1.2"6523 "@types/graceful-fs" "^4.1.2"6235 "@types/node" "*"6524 "@types/node" "*"6236 anymatch "^3.0.3"6525 anymatch "^3.0.3"6237 fb-watchman "^2.0.0"6526 fb-watchman "^2.0.0"6238 graceful-fs "^4.2.4"6527 graceful-fs "^4.2.4"6239 jest-regex-util "^27.0.1"6528 jest-regex-util "^27.0.6"6240 jest-serializer "^27.0.1"6529 jest-serializer "^27.0.6"6241 jest-util "^27.0.2"6530 jest-util "^27.0.6"6242 jest-worker "^27.0.2"6531 jest-worker "^27.0.6"6243 micromatch "^4.0.4"6532 micromatch "^4.0.4"6244 walker "^1.0.7"6533 walker "^1.0.7"6245 optionalDependencies:6534 optionalDependencies:6246 fsevents "^2.3.2"6535 fsevents "^2.3.2"624765366248jest-jasmine2@^27.0.5:6537jest-jasmine2@^27.0.6:6249 version "27.0.5"6538 version "27.0.6"6250 resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.5.tgz#8a6eb2a685cdec3af13881145c77553e4e197776"6539 resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz#fd509a9ed3d92bd6edb68a779f4738b100655b37"6251 integrity sha512-m3TojR19sFmTn79QoaGy1nOHBcLvtLso6Zh7u+gYxZWGcza4rRPVqwk1hciA5ZOWWZIJOukAcore8JRX992FaA==6540 integrity sha512-cjpH2sBy+t6dvCeKBsHpW41mjHzXgsavaFMp+VWRf0eR4EW8xASk1acqmljFtK2DgyIECMv2yCdY41r2l1+4iA==6252 dependencies:6541 dependencies:6253 "@babel/traverse" "^7.1.0"6542 "@babel/traverse" "^7.1.0"6254 "@jest/environment" "^27.0.5"6543 "@jest/environment" "^27.0.6"6255 "@jest/source-map" "^27.0.1"6544 "@jest/source-map" "^27.0.6"6256 "@jest/test-result" "^27.0.2"6545 "@jest/test-result" "^27.0.6"6257 "@jest/types" "^27.0.2"6546 "@jest/types" "^27.0.6"6258 "@types/node" "*"6547 "@types/node" "*"6259 chalk "^4.0.0"6548 chalk "^4.0.0"6260 co "^4.6.0"6549 co "^4.6.0"6261 expect "^27.0.2"6550 expect "^27.0.6"6262 is-generator-fn "^2.0.0"6551 is-generator-fn "^2.0.0"6263 jest-each "^27.0.2"6552 jest-each "^27.0.6"6264 jest-matcher-utils "^27.0.2"6553 jest-matcher-utils "^27.0.6"6265 jest-message-util "^27.0.2"6554 jest-message-util "^27.0.6"6266 jest-runtime "^27.0.5"6555 jest-runtime "^27.0.6"6267 jest-snapshot "^27.0.5"6556 jest-snapshot "^27.0.6"6268 jest-util "^27.0.2"6557 jest-util "^27.0.6"6269 pretty-format "^27.0.2"6558 pretty-format "^27.0.6"6270 throat "^6.0.1"6559 throat "^6.0.1"627165606272jest-leak-detector@^27.0.2:6561jest-leak-detector@^27.0.6:6273 version "27.0.2"6562 version "27.0.6"6274 resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.2.tgz#ce19aa9dbcf7a72a9d58907a970427506f624e69"6563 resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz#545854275f85450d4ef4b8fe305ca2a26450450f"6275 integrity sha512-TZA3DmCOfe8YZFIMD1GxFqXUkQnIoOGQyy4hFCA2mlHtnAaf+FeOMxi0fZmfB41ZL+QbFG6BVaZF5IeFIVy53Q==6564 integrity sha512-2/d6n2wlH5zEcdctX4zdbgX8oM61tb67PQt4Xh8JFAIy6LRKUnX528HulkaG6nD5qDl5vRV1NXejCe1XRCH5gQ==6276 dependencies:6565 dependencies:6277 jest-get-type "^27.0.1"6566 jest-get-type "^27.0.6"6278 pretty-format "^27.0.2"6567 pretty-format "^27.0.6"627965686280jest-matcher-utils@^27.0.2:6569jest-matcher-utils@^27.0.6:6281 version "27.0.2"6570 version "27.0.6"6282 resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.2.tgz#f14c060605a95a466cdc759acc546c6f4cbfc4f0"6571 resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.6.tgz#2a8da1e86c620b39459f4352eaa255f0d43e39a9"6283 integrity sha512-Qczi5xnTNjkhcIB0Yy75Txt+Ez51xdhOxsukN7awzq2auZQGPHcQrJ623PZj0ECDEMOk2soxWx05EXdXGd1CbA==6572 integrity sha512-OFgF2VCQx9vdPSYTHWJ9MzFCehs20TsyFi6bIHbk5V1u52zJOnvF0Y/65z3GLZHKRuTgVPY4Z6LVePNahaQ+tA==6284 dependencies:6573 dependencies:6285 chalk "^4.0.0"6574 chalk "^4.0.0"6286 jest-diff "^27.0.2"6575 jest-diff "^27.0.6"6287 jest-get-type "^27.0.1"6576 jest-get-type "^27.0.6"6288 pretty-format "^27.0.2"6577 pretty-format "^27.0.6"628965786290jest-message-util@^27.0.2:6579jest-message-util@^27.0.6:6291 version "27.0.2"6580 version "27.0.6"6292 resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.2.tgz#181c9b67dff504d8f4ad15cba10d8b80f272048c"6581 resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.6.tgz#158bcdf4785706492d164a39abca6a14da5ab8b5"6293 integrity sha512-rTqWUX42ec2LdMkoUPOzrEd1Tcm+R1KfLOmFK+OVNo4MnLsEaxO5zPDb2BbdSmthdM/IfXxOZU60P/WbWF8BTw==6582 integrity sha512-rBxIs2XK7rGy+zGxgi+UJKP6WqQ+KrBbD1YMj517HYN3v2BG66t3Xan3FWqYHKZwjdB700KiAJ+iES9a0M+ixw==6294 dependencies:6583 dependencies:6295 "@babel/code-frame" "^7.12.13"6584 "@babel/code-frame" "^7.12.13"6296 "@jest/types" "^27.0.2"6585 "@jest/types" "^27.0.6"6297 "@types/stack-utils" "^2.0.0"6586 "@types/stack-utils" "^2.0.0"6298 chalk "^4.0.0"6587 chalk "^4.0.0"6299 graceful-fs "^4.2.4"6588 graceful-fs "^4.2.4"6300 micromatch "^4.0.4"6589 micromatch "^4.0.4"6301 pretty-format "^27.0.2"6590 pretty-format "^27.0.6"6302 slash "^3.0.0"6591 slash "^3.0.0"6303 stack-utils "^2.0.3"6592 stack-utils "^2.0.3"630465936305jest-mock@^27.0.3:6594jest-mock@^27.0.6:6306 version "27.0.3"6595 version "27.0.6"6307 resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.3.tgz#5591844f9192b3335c0dca38e8e45ed297d4d23d"6596 resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.6.tgz#0efdd40851398307ba16778728f6d34d583e3467"6308 integrity sha512-O5FZn5XDzEp+Xg28mUz4ovVcdwBBPfAhW9+zJLO0Efn2qNbYcDaJvSlRiQ6BCZUCVOJjALicuJQI9mRFjv1o9Q==6597 integrity sha512-lzBETUoK8cSxts2NYXSBWT+EJNzmUVtVVwS1sU9GwE1DLCfGsngg+ZVSIe0yd0ZSm+y791esiuo+WSwpXJQ5Bw==6309 dependencies:6598 dependencies:6310 "@jest/types" "^27.0.2"6599 "@jest/types" "^27.0.6"6311 "@types/node" "*"6600 "@types/node" "*"631266016313jest-pnp-resolver@^1.2.2:6602jest-pnp-resolver@^1.2.2:6314 version "1.2.2"6603 version "1.2.2"6315 resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c"6604 resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c"6316 integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==6605 integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==631766066318jest-regex-util@^27.0.1:6607jest-regex-util@^27.0.6:6319 version "27.0.1"6608 version "27.0.6"6320 resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.1.tgz#69d4b1bf5b690faa3490113c47486ed85dd45b68"6609 resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5"6321 integrity sha512-6nY6QVcpTgEKQy1L41P4pr3aOddneK17kn3HJw6SdwGiKfgCGTvH02hVXL0GU8GEKtPH83eD2DIDgxHXOxVohQ==6610 integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ==632266116323jest-resolve-dependencies@^27.0.5:6612jest-resolve-dependencies@^27.0.6:6324 version "27.0.5"6613 version "27.0.6"6325 resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.5.tgz#819ccdddd909c65acddb063aac3a49e4ba1ed569"6614 resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.6.tgz#3e619e0ef391c3ecfcf6ef4056207a3d2be3269f"6326 integrity sha512-xUj2dPoEEd59P+nuih4XwNa4nJ/zRd/g4rMvjHrZPEBWeWRq/aJnnM6mug+B+Nx+ILXGtfWHzQvh7TqNV/WbuA==6615 integrity sha512-mg9x9DS3BPAREWKCAoyg3QucCr0n6S8HEEsqRCKSPjPcu9HzRILzhdzY3imsLoZWeosEbJZz6TKasveczzpJZA==6327 dependencies:6616 dependencies:6328 "@jest/types" "^27.0.2"6617 "@jest/types" "^27.0.6"6329 jest-regex-util "^27.0.1"6618 jest-regex-util "^27.0.6"6330 jest-snapshot "^27.0.5"6619 jest-snapshot "^27.0.6"633166206332jest-resolve@^27.0.5:6621jest-resolve@^27.0.6:6333 version "27.0.5"6622 version "27.0.6"6334 resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.5.tgz#937535a5b481ad58e7121eaea46d1424a1e0c507"6623 resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.6.tgz#e90f436dd4f8fbf53f58a91c42344864f8e55bff"6335 integrity sha512-Md65pngRh8cRuWVdWznXBB5eDt391OJpdBaJMxfjfuXCvOhM3qQBtLMCMTykhuUKiBMmy5BhqCW7AVOKmPrW+Q==6624 integrity sha512-yKmIgw2LgTh7uAJtzv8UFHGF7Dm7XfvOe/LQ3Txv101fLM8cx2h1QVwtSJ51Q/SCxpIiKfVn6G2jYYMDNHZteA==6336 dependencies:6625 dependencies:6337 "@jest/types" "^27.0.2"6626 "@jest/types" "^27.0.6"6338 chalk "^4.0.0"6627 chalk "^4.0.0"6339 escalade "^3.1.1"6628 escalade "^3.1.1"6340 graceful-fs "^4.2.4"6629 graceful-fs "^4.2.4"6341 jest-pnp-resolver "^1.2.2"6630 jest-pnp-resolver "^1.2.2"6342 jest-util "^27.0.2"6631 jest-util "^27.0.6"6343 jest-validate "^27.0.2"6632 jest-validate "^27.0.6"6344 resolve "^1.20.0"6633 resolve "^1.20.0"6345 slash "^3.0.0"6634 slash "^3.0.0"634666356347jest-runner@^27.0.5:6636jest-runner@^27.0.6:6348 version "27.0.5"6637 version "27.0.6"6349 resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.5.tgz#b6fdc587e1a5056339205914294555c554efc08a"6638 resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.6.tgz#1325f45055539222bbc7256a6976e993ad2f9520"6350 integrity sha512-HNhOtrhfKPArcECgBTcWOc+8OSL8GoFoa7RsHGnfZR1C1dFohxy9eLtpYBS+koybAHlJLZzNCx2Y/Ic3iEtJpQ==6639 integrity sha512-W3Bz5qAgaSChuivLn+nKOgjqNxM7O/9JOJoKDCqThPIg2sH/d4A/lzyiaFgnb9V1/w29Le11NpzTJSzga1vyYQ==6351 dependencies:6640 dependencies:6352 "@jest/console" "^27.0.2"6641 "@jest/console" "^27.0.6"6353 "@jest/environment" "^27.0.5"6642 "@jest/environment" "^27.0.6"6354 "@jest/test-result" "^27.0.2"6643 "@jest/test-result" "^27.0.6"6355 "@jest/transform" "^27.0.5"6644 "@jest/transform" "^27.0.6"6356 "@jest/types" "^27.0.2"6645 "@jest/types" "^27.0.6"6357 "@types/node" "*"6646 "@types/node" "*"6358 chalk "^4.0.0"6647 chalk "^4.0.0"6359 emittery "^0.8.1"6648 emittery "^0.8.1"6360 exit "^0.1.2"6649 exit "^0.1.2"6361 graceful-fs "^4.2.4"6650 graceful-fs "^4.2.4"6362 jest-docblock "^27.0.1"6651 jest-docblock "^27.0.6"6363 jest-environment-jsdom "^27.0.5"6652 jest-environment-jsdom "^27.0.6"6364 jest-environment-node "^27.0.5"6653 jest-environment-node "^27.0.6"6365 jest-haste-map "^27.0.5"6654 jest-haste-map "^27.0.6"6366 jest-leak-detector "^27.0.2"6655 jest-leak-detector "^27.0.6"6367 jest-message-util "^27.0.2"6656 jest-message-util "^27.0.6"6368 jest-resolve "^27.0.5"6657 jest-resolve "^27.0.6"6369 jest-runtime "^27.0.5"6658 jest-runtime "^27.0.6"6370 jest-util "^27.0.2"6659 jest-util "^27.0.6"6371 jest-worker "^27.0.2"6660 jest-worker "^27.0.6"6372 source-map-support "^0.5.6"6661 source-map-support "^0.5.6"6373 throat "^6.0.1"6662 throat "^6.0.1"637466636375jest-runtime@^27.0.5:6664jest-runtime@^27.0.6:6376 version "27.0.5"6665 version "27.0.6"6377 resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.5.tgz#cd5d1aa9754d30ddf9f13038b3cb7b95b46f552d"6666 resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.6.tgz#45877cfcd386afdd4f317def551fc369794c27c9"6378 integrity sha512-V/w/+VasowPESbmhXn5AsBGPfb35T7jZPGZybYTHxZdP7Gwaa+A0EXE6rx30DshHKA98lVCODbCO8KZpEW3hiQ==6667 integrity sha512-BhvHLRVfKibYyqqEFkybsznKwhrsu7AWx2F3y9G9L95VSIN3/ZZ9vBpm/XCS2bS+BWz3sSeNGLzI3TVQ0uL85Q==6379 dependencies:6668 dependencies:6380 "@jest/console" "^27.0.2"6669 "@jest/console" "^27.0.6"6381 "@jest/environment" "^27.0.5"6670 "@jest/environment" "^27.0.6"6382 "@jest/fake-timers" "^27.0.5"6671 "@jest/fake-timers" "^27.0.6"6383 "@jest/globals" "^27.0.5"6672 "@jest/globals" "^27.0.6"6384 "@jest/source-map" "^27.0.1"6673 "@jest/source-map" "^27.0.6"6385 "@jest/test-result" "^27.0.2"6674 "@jest/test-result" "^27.0.6"6386 "@jest/transform" "^27.0.5"6675 "@jest/transform" "^27.0.6"6387 "@jest/types" "^27.0.2"6676 "@jest/types" "^27.0.6"6388 "@types/yargs" "^16.0.0"6677 "@types/yargs" "^16.0.0"6389 chalk "^4.0.0"6678 chalk "^4.0.0"6390 cjs-module-lexer "^1.0.0"6679 cjs-module-lexer "^1.0.0"6391 collect-v8-coverage "^1.0.0"6680 collect-v8-coverage "^1.0.0"6392 exit "^0.1.2"6681 exit "^0.1.2"6393 glob "^7.1.3"6682 glob "^7.1.3"6394 graceful-fs "^4.2.4"6683 graceful-fs "^4.2.4"6395 jest-haste-map "^27.0.5"6684 jest-haste-map "^27.0.6"6396 jest-message-util "^27.0.2"6685 jest-message-util "^27.0.6"6397 jest-mock "^27.0.3"6686 jest-mock "^27.0.6"6398 jest-regex-util "^27.0.1"6687 jest-regex-util "^27.0.6"6399 jest-resolve "^27.0.5"6688 jest-resolve "^27.0.6"6400 jest-snapshot "^27.0.5"6689 jest-snapshot "^27.0.6"6401 jest-util "^27.0.2"6690 jest-util "^27.0.6"6402 jest-validate "^27.0.2"6691 jest-validate "^27.0.6"6403 slash "^3.0.0"6692 slash "^3.0.0"6404 strip-bom "^4.0.0"6693 strip-bom "^4.0.0"6405 yargs "^16.0.3"6694 yargs "^16.0.3"640666956407jest-serializer@^27.0.1:6696jest-serializer@^27.0.6:6408 version "27.0.1"6697 version "27.0.6"6409 resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.1.tgz#2464d04dcc33fb71dc80b7c82e3c5e8a08cb1020"6698 resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.6.tgz#93a6c74e0132b81a2d54623251c46c498bb5bec1"6410 integrity sha512-svy//5IH6bfQvAbkAEg1s7xhhgHTtXu0li0I2fdKHDsLP2P2MOiscPQIENQep8oU2g2B3jqLyxKKzotZOz4CwQ==6699 integrity sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA==6411 dependencies:6700 dependencies:6412 "@types/node" "*"6701 "@types/node" "*"6413 graceful-fs "^4.2.4"6702 graceful-fs "^4.2.4"641467036415jest-snapshot@^27.0.5:6704jest-snapshot@^27.0.6:6416 version "27.0.5"6705 version "27.0.6"6417 resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.5.tgz#6e3b9e8e193685372baff771ba34af631fe4d4d5"6706 resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.6.tgz#f4e6b208bd2e92e888344d78f0f650bcff05a4bf"6418 integrity sha512-H1yFYdgnL1vXvDqMrnDStH6yHFdMEuzYQYc71SnC/IJnuuhW6J16w8GWG1P+qGd3Ag3sQHjbRr0TcwEo/vGS+g==6707 integrity sha512-NTHaz8He+ATUagUgE7C/UtFcRoHqR2Gc+KDfhQIyx+VFgwbeEMjeP+ILpUTLosZn/ZtbNdCF5LkVnN/l+V751A==6419 dependencies:6708 dependencies:6420 "@babel/core" "^7.7.2"6709 "@babel/core" "^7.7.2"6421 "@babel/generator" "^7.7.2"6710 "@babel/generator" "^7.7.2"6422 "@babel/parser" "^7.7.2"6711 "@babel/parser" "^7.7.2"6423 "@babel/plugin-syntax-typescript" "^7.7.2"6712 "@babel/plugin-syntax-typescript" "^7.7.2"6424 "@babel/traverse" "^7.7.2"6713 "@babel/traverse" "^7.7.2"6425 "@babel/types" "^7.0.0"6714 "@babel/types" "^7.0.0"6426 "@jest/transform" "^27.0.5"6715 "@jest/transform" "^27.0.6"6427 "@jest/types" "^27.0.2"6716 "@jest/types" "^27.0.6"6428 "@types/babel__traverse" "^7.0.4"6717 "@types/babel__traverse" "^7.0.4"6429 "@types/prettier" "^2.1.5"6718 "@types/prettier" "^2.1.5"6430 babel-preset-current-node-syntax "^1.0.0"6719 babel-preset-current-node-syntax "^1.0.0"6431 chalk "^4.0.0"6720 chalk "^4.0.0"6432 expect "^27.0.2"6721 expect "^27.0.6"6433 graceful-fs "^4.2.4"6722 graceful-fs "^4.2.4"6434 jest-diff "^27.0.2"6723 jest-diff "^27.0.6"6435 jest-get-type "^27.0.1"6724 jest-get-type "^27.0.6"6436 jest-haste-map "^27.0.5"6725 jest-haste-map "^27.0.6"6437 jest-matcher-utils "^27.0.2"6726 jest-matcher-utils "^27.0.6"6438 jest-message-util "^27.0.2"6727 jest-message-util "^27.0.6"6439 jest-resolve "^27.0.5"6728 jest-resolve "^27.0.6"6440 jest-util "^27.0.2"6729 jest-util "^27.0.6"6441 natural-compare "^1.4.0"6730 natural-compare "^1.4.0"6442 pretty-format "^27.0.2"6731 pretty-format "^27.0.6"6443 semver "^7.3.2"6732 semver "^7.3.2"644467336445jest-util@^27.0.2:6734jest-util@^27.0.6:6446 version "27.0.2"6735 version "27.0.6"6447 resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.2.tgz#fc2c7ace3c75ae561cf1e5fdb643bf685a5be7c7"6736 resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.6.tgz#e8e04eec159de2f4d5f57f795df9cdc091e50297"6448 integrity sha512-1d9uH3a00OFGGWSibpNYr+jojZ6AckOMCXV2Z4K3YXDnzpkAaXQyIpY14FOJPiUmil7CD+A6Qs+lnnh6ctRbIA==6737 integrity sha512-1JjlaIh+C65H/F7D11GNkGDDZtDfMEM8EBXsvd+l/cxtgQ6QhxuloOaiayt89DxUvDarbVhqI98HhgrM1yliFQ==6449 dependencies:6738 dependencies:6450 "@jest/types" "^27.0.2"6739 "@jest/types" "^27.0.6"6451 "@types/node" "*"6740 "@types/node" "*"6452 chalk "^4.0.0"6741 chalk "^4.0.0"6453 graceful-fs "^4.2.4"6742 graceful-fs "^4.2.4"6454 is-ci "^3.0.0"6743 is-ci "^3.0.0"6455 picomatch "^2.2.3"6744 picomatch "^2.2.3"645667456457jest-validate@^27.0.2:6746jest-validate@^27.0.6:6458 version "27.0.2"6747 version "27.0.6"6459 resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.2.tgz#7fe2c100089449cd5cbb47a5b0b6cb7cda5beee5"6748 resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.6.tgz#930a527c7a951927df269f43b2dc23262457e2a6"6460 integrity sha512-UgBF6/oVu1ofd1XbaSotXKihi8nZhg0Prm8twQ9uCuAfo59vlxCXMPI/RKmrZEVgi3Nd9dS0I8A0wzWU48pOvg==6749 integrity sha512-yhZZOaMH3Zg6DC83n60pLmdU1DQE46DW+KLozPiPbSbPhlXXaiUTDlhHQhHFpaqIFRrInko1FHXjTRpjWRuWfA==6461 dependencies:6750 dependencies:6462 "@jest/types" "^27.0.2"6751 "@jest/types" "^27.0.6"6463 camelcase "^6.2.0"6752 camelcase "^6.2.0"6464 chalk "^4.0.0"6753 chalk "^4.0.0"6465 jest-get-type "^27.0.1"6754 jest-get-type "^27.0.6"6466 leven "^3.1.0"6755 leven "^3.1.0"6467 pretty-format "^27.0.2"6756 pretty-format "^27.0.6"646867576469jest-watcher@^27.0.2:6758jest-watcher@^27.0.6:6470 version "27.0.2"6759 version "27.0.6"6471 resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.2.tgz#dab5f9443e2d7f52597186480731a8c6335c5deb"6760 resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.6.tgz#89526f7f9edf1eac4e4be989bcb6dec6b8878d9c"6472 integrity sha512-8nuf0PGuTxWj/Ytfw5fyvNn/R80iXY8QhIT0ofyImUvdnoaBdT6kob0GmhXR+wO+ALYVnh8bQxN4Tjfez0JgkA==6761 integrity sha512-/jIoKBhAP00/iMGnTwUBLgvxkn7vsOweDrOTSPzc7X9uOyUtJIDthQBTI1EXz90bdkrxorUZVhJwiB69gcHtYQ==6473 dependencies:6762 dependencies:6474 "@jest/test-result" "^27.0.2"6763 "@jest/test-result" "^27.0.6"6475 "@jest/types" "^27.0.2"6764 "@jest/types" "^27.0.6"6476 "@types/node" "*"6765 "@types/node" "*"6477 ansi-escapes "^4.2.1"6766 ansi-escapes "^4.2.1"6478 chalk "^4.0.0"6767 chalk "^4.0.0"6479 jest-util "^27.0.2"6768 jest-util "^27.0.6"6480 string-length "^4.0.1"6769 string-length "^4.0.1"648167706482jest-worker@^27.0.2:6771jest-worker@^27.0.6:6483 version "27.0.2"6772 version "27.0.6"6484 resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.2.tgz#4ebeb56cef48b3e7514552f80d0d80c0129f0b05"6773 resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.6.tgz#a5fdb1e14ad34eb228cfe162d9f729cdbfa28aed"6485 integrity sha512-EoBdilOTTyOgmHXtw/cPc+ZrCA0KJMrkXzkrPGNwLmnvvlN1nj7MPrxpT7m+otSv2e1TLaVffzDnE/LB14zJMg==6774 integrity sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==6486 dependencies:6775 dependencies:6487 "@types/node" "*"6776 "@types/node" "*"6488 merge-stream "^2.0.0"6777 merge-stream "^2.0.0"6489 supports-color "^8.0.0"6778 supports-color "^8.0.0"649067796491jest@^27.0.5:6780jest@^27.0.6:6492 version "27.0.5"6781 version "27.0.6"6493 resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.5.tgz#141825e105514a834cc8d6e44670509e8d74c5f2"6782 resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.6.tgz#10517b2a628f0409087fbf473db44777d7a04505"6494 integrity sha512-4NlVMS29gE+JOZvgmSAsz3eOjkSsHqjTajlIsah/4MVSmKvf3zFP/TvgcLoWe2UVHiE9KF741sReqhF0p4mqbQ==6783 integrity sha512-EjV8aETrsD0wHl7CKMibKwQNQc3gIRBXlTikBmmHUeVMKaPFxdcUIBfoDqTSXDoGJIivAYGqCWVlzCSaVjPQsA==6495 dependencies:6784 dependencies:6496 "@jest/core" "^27.0.5"6785 "@jest/core" "^27.0.6"6497 import-local "^3.0.2"6786 import-local "^3.0.2"6498 jest-cli "^27.0.5"6787 jest-cli "^27.0.6"649967886500js-sha3@0.5.7, js-sha3@^0.5.7:6789js-sha3@0.5.7, js-sha3@^0.5.7:6501 version "0.5.7"6790 version "0.5.7"6931 typescript "^3.9.5"7220 typescript "^3.9.5"6932 walkdir "^0.4.1"7221 walkdir "^0.4.1"693372227223magic-string@^0.25.5, magic-string@^0.25.7:7224 version "0.25.7"7225 resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051"7226 integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==7227 dependencies:7228 sourcemap-codec "^1.4.4"72296934make-dir@^2.0.0, make-dir@^2.1.0:7230make-dir@^2.0.0, make-dir@^2.1.0:6935 version "2.1.0"7231 version "2.1.0"6936 resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"7232 resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"7366 resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20"7662 resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20"7367 integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==7663 integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==736876647665node-releases@^1.1.73:7666 version "1.1.74"7667 resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.74.tgz#e5866488080ebaa70a93b91144ccde06f3c3463e"7668 integrity sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw==76697369node-source-walk@^4.0.0, node-source-walk@^4.2.0:7670node-source-walk@^4.0.0, node-source-walk@^4.2.0:7370 version "4.2.0"7671 version "4.2.0"7371 resolved "https://registry.yarnpkg.com/node-source-walk/-/node-source-walk-4.2.0.tgz#c2efe731ea8ba9c03c562aa0a9d984e54f27bc2c"7672 resolved "https://registry.yarnpkg.com/node-source-walk/-/node-source-walk-4.2.0.tgz#c2efe731ea8ba9c03c562aa0a9d984e54f27bc2c"7812 resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"8113 resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"7813 integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=8114 integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=781481157815picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3:8116picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3:7816 version "2.3.0"8117 version "2.3.0"7817 resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"8118 resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"7818 integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==8119 integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==7994 resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"8295 resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"7995 integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==8296 integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==799682977997prettier@^2.3.1:8298prettier@^2.3.2:7998 version "2.3.1"8299 version "2.3.2"7999 resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6"8300 resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"8000 integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==8301 integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==800183028002pretty-format@^27.0.2:8303pretty-format@^27.0.6:8003 version "27.0.2"8304 version "27.0.6"8004 resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.2.tgz#9283ff8c4f581b186b2d4da461617143dca478a4"8305 resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f"8005 integrity sha512-mXKbbBPnYTG7Yra9qFBtqj+IXcsvxsvOBco3QHxtxTl+hHKq6QdzMZ+q0CtL4ORHZgwGImRr2XZUX2EWzORxig==8306 integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ==8006 dependencies:8307 dependencies:8007 "@jest/types" "^27.0.2"8308 "@jest/types" "^27.0.6"8008 ansi-regex "^5.0.0"8309 ansi-regex "^5.0.0"8009 ansi-styles "^5.0.0"8310 ansi-styles "^5.0.0"8010 react-is "^17.0.1"8311 react-is "^17.0.1"8454 resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"8755 resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"8455 integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=8756 integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=845687578457resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2:8758resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2:8458 version "1.20.0"8759 version "1.20.0"8459 resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"8760 resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"8460 integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==8761 integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==8524 dependencies:8825 dependencies:8525 bn.js "^4.11.1"8826 bn.js "^4.11.1"852688278828rollup@^2.56.2:8829 version "2.56.2"8830 resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.56.2.tgz#a045ff3f6af53ee009b5f5016ca3da0329e5470f"8831 integrity sha512-s8H00ZsRi29M2/lGdm1u8DJpJ9ML8SUOpVVBd33XNeEeL3NVaTiUcSBHzBdF3eAyR0l7VSpsuoVUGrRHq7aPwQ==8832 optionalDependencies:8833 fsevents "~2.3.2"88348527run-async@^2.4.0:8835run-async@^2.4.0:8528 version "2.4.1"8836 version "2.4.1"8529 resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"8837 resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"8543 dependencies:8851 dependencies:8544 tslib "^1.9.0"8852 tslib "^1.9.0"854588538546rxjs@^7.2.0:8854rxjs@^7.3.0:8547 version "7.2.0"8855 version "7.3.0"8548 resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.2.0.tgz#5cd12409639e9514a71c9f5f9192b2c4ae94de31"8856 resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6"8549 integrity sha512-aX8w9OpKrQmiPKfT1bqETtUr9JygIz6GZ+gql8v7CijClsP0laoFUdKzxFAoWuRdSlOdU2+crss+cMf+cqMTnw==8857 integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw==8550 dependencies:8858 dependencies:8551 tslib "~2.1.0"8859 tslib "~2.1.0"855288608894 resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"9202 resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"8895 integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==9203 integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==889692049205sourcemap-codec@^1.4.4:9206 version "1.4.8"9207 resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"9208 integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==92098897spdx-correct@^3.0.0:9210spdx-correct@^3.0.0:8898 version "3.1.1"9211 version "3.1.1"8899 resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9"9212 resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9"9453 dependencies:9766 dependencies:9454 safe-buffer "^5.0.1"9767 safe-buffer "^5.0.1"945597689769tweetnacl@1.x.x, tweetnacl@^1.0.3:9770 version "1.0.3"9771 resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596"9772 integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==97739456tweetnacl@^0.14.3, tweetnacl@~0.14.0:9774tweetnacl@^0.14.3, tweetnacl@~0.14.0:9457 version "0.14.5"9775 version "0.14.5"9458 resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"9776 resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"9459 integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=9777 integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=946097789461tweetnacl@^1.0.3:9462 version "1.0.3"9463 resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596"9464 integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==94659466type-check@^0.4.0, type-check@~0.4.0:9779type-check@^0.4.0, type-check@~0.4.0:9467 version "0.4.0"9780 version "0.4.0"9468 resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"9781 resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"9527 resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"9840 resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"9528 integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==9841 integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==952998429530typescript@^4.2.4, typescript@^4.3.4:9843typescript@^4.2.4:9531 version "4.3.4"9844 version "4.3.4"9532 resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz#3f85b986945bcf31071decdd96cf8bfa65f9dcbc"9845 resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz#3f85b986945bcf31071decdd96cf8bfa65f9dcbc"9533 integrity sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==9846 integrity sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==953498479848typescript@^4.3.5:9849 version "4.3.5"9850 resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"9851 integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==98529535uglify-js@^3.1.4:9853uglify-js@^3.1.4:9536 version "3.13.9"9854 version "3.13.9"9537 resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.9.tgz#4d8d21dcd497f29cfd8e9378b9df123ad025999b"9855 resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.9.tgz#4d8d21dcd497f29cfd8e9378b9df123ad025999b"10339 y18n "^5.0.5"10657 y18n "^5.0.5"10340 yargs-parser "^20.2.2"10658 yargs-parser "^20.2.2"103411065910342yargs@^17.0.0, yargs@^17.0.1:10660yargs@^17.0.0:10343 version "17.0.1"10661 version "17.0.1"10344 resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb"10662 resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb"10345 integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==10663 integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==10664 dependencies:10665 cliui "^7.0.2"10666 escalade "^3.1.1"10667 get-caller-file "^2.0.5"10668 require-directory "^2.1.1"10669 string-width "^4.2.0"10670 y18n "^5.0.5"10671 yargs-parser "^20.2.2"1067210673yargs@^17.1.0, yargs@^17.1.1:10674 version "17.1.1"10675 resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.1.1.tgz#c2a8091564bdb196f7c0a67c1d12e5b85b8067ba"10676 integrity sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==10346 dependencies:10677 dependencies:10347 cliui "^7.0.2"10678 cliui "^7.0.2"10348 escalade "^3.1.1"10679 escalade "^3.1.1"