git.delta.rocks / unique-network / refs/commits / 0af65269dd33

difftreelog

Merge branch 'develop' into feature/CORE-164

str-mv2021-09-01parents: #add6044 #7f0dbc2.patch.diff
in: master

94 files changed

added.maintain/frame-weight-template.hbsdiffbeforeafterboth

no changes

added.maintain/scripts/compile_stub.shdiffbeforeafterboth

no changes

added.maintain/scripts/generate_api.shdiffbeforeafterboth

no changes

modifiedCargo.lockdiffbeforeafterboth
703 "once_cell",703 "once_cell",
704]704]
705
706[[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]
720
721[[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]
735
736[[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]
752
753[[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]
769
770[[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]
786
787[[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]
801
802[[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]
705816
706[[package]]817[[package]]
707name = "bs58"818name = "bs58"
3778 "winapi-build",3889 "winapi-build",
3779]3890]
3891
3892[[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]
37803976
3781[[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]
49455144
4946[[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]
5529
5530[[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]
53265550
5327[[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]
5766
5767[[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]
55385782
5539[[package]]5783[[package]]
5540name = "pallet-evm-transaction-payment"5784name = "pallet-evm-transaction-payment"
5553 "up-sponsorship",5797 "up-sponsorship",
5554]5798]
5799
5800[[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]
55555813
5556[[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]
6079
6080[[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]
58186101
5819[[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]
6130
6131[[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]
6144
6145[[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]
58466159
5847[[package]]6160[[package]]
5848name = "pallet-scheduler"6161name = "pallet-scheduler"
5862 "up-sponsorship",6175 "up-sponsorship",
5863]6176]
5864
5865[[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]
58796177
5880[[package]]6178[[package]]
5881name = "pallet-session"6179name = "pallet-session"
5897 "sp-trie",6195 "sp-trie",
5898]6196]
6197
6198[[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]
6213
6214[[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]
58996226
5900[[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]
6261
6262[[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]
59326270
5933[[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]
73797734
7380[[package]]7735[[package]]
8138 "librocksdb-sys",8493 "librocksdb-sys",
8139]8494]
8495
8496[[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]
81408562
8141[[package]]8563[[package]]
8142name = "rpassword"8564name = "rpassword"
10687 "syn",11109 "syn",
10688]11110]
11111
11112[[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]
1068911127
10690[[package]]11128[[package]]
10691name = "substrate-wasm-builder"11129name = "substrate-wasm-builder"
10703 "wasm-gc-api",11141 "wasm-gc-api",
10704]11142]
10705
10706[[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]
1072111143
10722[[package]]11144[[package]]
10723name = "subtle"11145name = "subtle"
12038 "cc",12460 "cc",
12039]12461]
12462
12463[[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]
1204012545
12041[[package]]12546[[package]]
12042name = "which"12547name = "which"
addedMakefilediffbeforeafterboth

no changes

modifiedcrates/evm-coder-macros/src/solidity_interface.rsdiffbeforeafterboth
74 }74 }
75 }75 }
76
77 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(out_set, is_impl);
81 }
82 }
83
84 fn expand_event_generator(&self) -> proc_macro2::TokenStream {
85 let name = &self.name;
86 quote! {
87 #name::generate_solidity_interface(out_set, is_impl);
88 }
89 }
76}90}
7791
78#[derive(Default)]92#[derive(Default)]
109123
110struct MethodArg {124struct MethodArg {
111 name: Ident,125 name: Ident,
126 camel_name: String,
112 ty: Ident,127 ty: Ident,
113}128}
114impl MethodArg {129impl MethodArg {
115 fn try_from(value: &PatType) -> syn::Result<Self> {130 fn try_from(value: &PatType) -> syn::Result<Self> {
116 Ok(Self {
117 name: parse_ident_from_pat(&value.pat)?.clone(),131 let name = parse_ident_from_pat(&value.pat)?.clone();
132 Ok(Self {
133 camel_name: cases::camelcase::to_camel_case(&name.to_string()),
134 name,
118 ty: parse_ident_from_type(&value.ty, false)?.clone(),135 ty: parse_ident_from_type(&value.ty, false)?.clone(),
119 })136 })
120 }137 }
121 fn is_value(&self) -> bool {138 fn is_value(&self) -> bool {
122 self.ty == "value"139 self.ty == "value"
168 }185 }
169186
170 fn expand_solidity_argument(&self) -> proc_macro2::TokenStream {187 fn expand_solidity_argument(&self) -> proc_macro2::TokenStream {
171 let name = &self.name.to_string();188 let camel_name = &self.camel_name.to_string();
172 let ty = &self.ty;189 let ty = &self.ty;
173 quote! {190 quote! {
174 <NamedArgument<#ty>>::new(#name)191 <NamedArgument<#ty>>::new(#camel_name)
175 }192 }
176 }193 }
177}194}
400 let args = self.args.iter().map(MethodArg::expand_solidity_argument);417 let args = self
418 .args
419 .iter()
420 .filter(|a| !a.is_special())
421 .map(MethodArg::expand_solidity_argument);
401422
402 quote! {423 quote! {
475 let call_variants_this = self.methods.iter().map(Method::expand_variant_call);496 let call_variants_this = self.methods.iter().map(Method::expand_variant_call);
476 let solidity_functions = self.methods.iter().map(Method::expand_solidity_function);497 let solidity_functions = self.methods.iter().map(Method::expand_solidity_function);
498
499 // TODO: Inline inline_is
500 let solidity_is = self
501 .info
502 .is
503 .0
504 .iter()
505 .chain(self.info.inline_is.0.iter())
506 .map(|is| is.name.to_string());
507 let solidity_events_is = self.info.events.0.iter().map(|is| is.name.to_string());
508 let solidity_generators = self
509 .info
510 .is
511 .0
512 .iter()
513 .chain(self.info.inline_is.0.iter())
514 .map(Is::expand_generator);
515 let solidity_event_generators = self.info.events.0.iter().map(Is::expand_event_generator);
477516
478 // let methods = self.methods.iter().map(Method::solidity_def);517 // let methods = self.methods.iter().map(Method::solidity_def);
479518
505 )*544 )*
506 )545 )
507 }546 }
508 pub fn generate_solidity_interface() -> string {547 pub fn generate_solidity_interface(out_set: &mut sp_std::collections::btree_set::BTreeSet<string>, is_impl: bool) {
509 use evm_coder::solidity::*;548 use evm_coder::solidity::*;
510 use core::fmt::Write;549 use core::fmt::Write;
511 let interface = SolidityInterface {550 let interface = SolidityInterface {
512 name: #solidity_name,551 name: #solidity_name,
552 is: &["Dummy", #(
553 #solidity_is,
554 )* #(
555 #solidity_events_is,
556 )* ],
513 functions: (#(557 functions: (#(
514 #solidity_functions,558 #solidity_functions,
515 )*),559 )*),
516 };560 };
561 if is_impl {
562 out_set.insert("// Common stubs holder\ncontract Dummy {\n\tuint8 dummy;\n\tstring stub_error = \"this contract is implemented in native\";\n}\n".into());
563 } else {
564 out_set.insert("// Common stubs holder\ninterface Dummy {\n}\n".into());
565 }
566 #(
567 #solidity_generators
568 )*
569 #(
570 #solidity_event_generators
571 )*
572
517 let mut out = string::new();573 let mut out = string::new();
574 // In solidity interface usage (is) should be preceeded by interface definition
575 // This comment helps to sort it in a set
576 if #solidity_name.starts_with("Inline") {
577 out.push_str("// Inline\n");
578 }
518 let _ = interface.format(&mut out);579 let _ = interface.format(is_impl, &mut out);
519 out580 out_set.insert(out);
520 }581 }
521 }582 }
522 impl ::evm_coder::Call for #call_name {583 impl ::evm_coder::Call for #call_name {
modifiedcrates/evm-coder-macros/src/to_log.rsdiffbeforeafterboth
1use 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;
67
7struct 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}
3243
33struct Event {44struct Event {
117 }128 }
118 }129 }
130
131 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}
120146
121pub struct Events {147pub struct Events {
144170
145 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);
147175
148 quote! {176 quote! {
149 impl #name {177 impl #name {
150 #(178 #(
151 #consts179 #consts
152 )*180 )*
181
182 pub fn generate_solidity_interface(out_set: &mut sp_std::collections::btree_set::BTreeSet<string>, 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);
195 out_set.insert(out);
196 }
153 }197 }
154198
155 #[automatically_derived]199 #[automatically_derived]
modifiedcrates/evm-coder/src/abi.rsdiffbeforeafterboth
19#[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 }
3749
38 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 }
8297
83 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()?))
103118
104 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 }
111130
196 for (static_offset, part) in self.dynamic_part {215 for (static_offset, part) in self.dynamic_part {
197 let part_offset = self.static_part.len();216 let part_offset = self.static_part.len();
198217
199 let encoded_dynamic_offset = usize::to_be_bytes(part_offset - static_offset);218 let encoded_dynamic_offset = usize::to_be_bytes(part_offset);
200 self.static_part[static_offset + ABI_ALIGNMENT - encoded_dynamic_offset.len()219 self.static_part[static_offset + ABI_ALIGNMENT - encoded_dynamic_offset.len()
201 ..static_offset + ABI_ALIGNMENT]220 ..static_offset + ABI_ALIGNMENT]
202 .copy_from_slice(&encoded_dynamic_offset);221 .copy_from_slice(&encoded_dynamic_offset);
226impl_abi_readable!(H160, address);245impl_abi_readable!(H160, address);
227impl_abi_readable!(Vec<u8>, bytes);246impl_abi_readable!(Vec<u8>, bytes);
228impl_abi_readable!(bool, bool);247impl_abi_readable!(bool, bool);
248impl_abi_readable!(string, string);
229249
230pub trait AbiWrite {250pub trait AbiWrite {
231 fn abi_write(&self, writer: &mut AbiWriter);251 fn abi_write(&self, writer: &mut AbiWriter);
286 }}306 }}
287}307}
308
309#[cfg(test)]
310pub mod test {
311 use super::{AbiReader, AbiWriter};
312 use hex_literal::hex;
313
314 #[test]
315 fn dynamic_after_static() {
316 let mut encoder = AbiWriter::new();
317 encoder.bool(&true);
318 encoder.string("test");
319 let encoded = encoder.finish();
320
321 let mut encoder = AbiWriter::new();
322 encoder.bool(&true);
323 // Offset to subresult
324 encoder.uint32(&(32 * 2));
325 // Len of "test"
326 encoder.uint32(&4);
327 encoder.write_padright(&[b't', b'e', b's', b't']);
328 let alternative_encoded = encoder.finish();
329
330 assert_eq!(encoded, alternative_encoded);
331
332 let mut decoder = AbiReader::new(&encoded);
333 assert_eq!(decoder.bool().unwrap(), true);
334 assert_eq!(decoder.string().unwrap(), "test");
335 }
336
337 #[test]
338 fn mint_sample() {
339 let (call, mut decoder) = AbiReader::new_call(&hex!(
340 "
341 50bb4e7f
342 000000000000000000000000ad2c0954693c2b5404b7e50967d3481bea432374
343 0000000000000000000000000000000000000000000000000000000000000001
344 0000000000000000000000000000000000000000000000000000000000000060
345 0000000000000000000000000000000000000000000000000000000000000008
346 5465737420555249000000000000000000000000000000000000000000000000
347 "
348 ))
349 .unwrap();
350 assert_eq!(call, 0x50bb4e7f);
351 assert_eq!(
352 format!("{:?}", decoder.address().unwrap()),
353 "0xad2c0954693c2b5404b7e50967d3481bea432374"
354 );
355 assert_eq!(decoder.uint32().unwrap(), 1);
356 assert_eq!(decoder.string().unwrap(), "Test URI");
357 }
358}
288359
modifiedcrates/evm-coder/src/lib.rsdiffbeforeafterboth
61 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}
63
64#[macro_export]
65macro_rules! generate_stubgen {
66 ($name:ident, $decl:ident, $is_impl:literal) => {
67 #[test]
68 #[ignore]
69 fn $name() {
70 use sp_std::collections::btree_set::BTreeSet;
71 let mut out = BTreeSet::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 {
80 println!("{}", b);
81 }
82 println!("=== SNIP END ===");
83 }
84 };
85}
6386
64#[cfg(test)]87#[cfg(test)]
65mod tests {88mod tests {
modifiedcrates/evm-coder/src/solidity.rsdiffbeforeafterboth
66
7pub trait SolidityTypeName: 'static {7pub trait SolidityTypeName: 'static {
8 fn solidity_name(writer: &mut impl fmt::Write) -> fmt::Result;8 fn solidity_name(writer: &mut impl fmt::Write) -> fmt::Result;
9 fn solidity_default(writer: &mut impl fmt::Write) -> fmt::Result;
9 fn is_void() -> bool {10 fn is_void() -> bool {
10 false11 false
11 }12 }
12}13}
1314
14macro_rules! solidity_type_name {15macro_rules! solidity_type_name {
15 ($($ty:ident => $name:expr),* $(,)?) => {16 ($($ty:ident => $name:literal = $default:literal),* $(,)?) => {
16 $(17 $(
17 impl SolidityTypeName for $ty {18 impl SolidityTypeName for $ty {
18 fn solidity_name(writer: &mut impl core::fmt::Write) -> core::fmt::Result {19 fn solidity_name(writer: &mut impl core::fmt::Write) -> core::fmt::Result {
19 write!(writer, $name)20 write!(writer, $name)
20 }21 }
22 fn solidity_default(writer: &mut impl core::fmt::Write) -> core::fmt::Result {
23 write!(writer, $default)
24 }
21 }25 }
22 )*26 )*
23 };27 };
24}28}
2529
26solidity_type_name! {30solidity_type_name! {
27 uint8 => "uint8",31 uint8 => "uint8" = "0",
28 uint32 => "uint32",32 uint32 => "uint32" = "0",
29 uint128 => "uint128",33 uint128 => "uint128" = "0",
30 uint256 => "uint256",34 uint256 => "uint256" = "0",
31 address => "address",35 address => "address" = "0x0000000000000000000000000000000000000000",
32 string => "memory string",36 string => "string memory" = "\"\"",
33 bytes => "memory bytes",37 bytes => "bytes memory" = "hex\"\"",
34 bool => "bool",38 bool => "bool" = "false",
35}39}
36impl SolidityTypeName for void {40impl SolidityTypeName for void {
37 fn solidity_name(_writer: &mut impl fmt::Write) -> fmt::Result {41 fn solidity_name(_writer: &mut impl fmt::Write) -> fmt::Result {
38 Ok(())42 Ok(())
39 }43 }
44 fn solidity_default(_writer: &mut impl fmt::Write) -> fmt::Result {
45 Ok(())
46 }
40 fn is_void() -> bool {47 fn is_void() -> bool {
41 true48 true
42 }49 }
43}50}
4451
45pub trait SolidityArguments {52pub trait SolidityArguments {
46 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result;53 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result;
54 fn solidity_get(&self, writer: &mut impl fmt::Write) -> fmt::Result;
55 fn solidity_default(&self, writer: &mut impl fmt::Write) -> fmt::Result;
47 fn is_empty(&self) -> bool {56 fn is_empty(&self) -> bool {
48 self.len() == 057 self.len() == 0
49 }58 }
61 Ok(())70 Ok(())
62 }71 }
63 }72 }
73 fn solidity_get(&self, _writer: &mut impl fmt::Write) -> fmt::Result {
74 Ok(())
75 }
76 fn solidity_default(&self, writer: &mut impl fmt::Write) -> fmt::Result {
77 T::solidity_default(writer)
78 }
64 fn len(&self) -> usize {79 fn len(&self) -> usize {
65 if T::is_void() {80 if T::is_void() {
66 081 0
87 Ok(())102 Ok(())
88 }103 }
89 }104 }
105 fn solidity_get(&self, writer: &mut impl fmt::Write) -> fmt::Result {
106 writeln!(writer, "\t\t{};", self.0)
107 }
108 fn solidity_default(&self, writer: &mut impl fmt::Write) -> fmt::Result {
109 T::solidity_default(writer)
110 }
90 fn len(&self) -> usize {111 fn len(&self) -> usize {
91 if T::is_void() {112 if T::is_void() {
92 0113 0
96 }117 }
97}118}
119
120pub struct SolidityEventArgument<T>(pub bool, &'static str, PhantomData<*const T>);
121
122impl<T> SolidityEventArgument<T> {
123 pub fn new(indexed: bool, name: &'static str) -> Self {
124 Self(indexed, name, Default::default())
125 }
126}
127
128impl<T: SolidityTypeName> SolidityArguments for SolidityEventArgument<T> {
129 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result {
130 if !T::is_void() {
131 T::solidity_name(writer)?;
132 if self.0 {
133 write!(writer, " indexed")?;
134 }
135 write!(writer, " {}", self.1)
136 } else {
137 Ok(())
138 }
139 }
140 fn solidity_get(&self, writer: &mut impl fmt::Write) -> fmt::Result {
141 writeln!(writer, "\t\t{};", self.1)
142 }
143 fn solidity_default(&self, writer: &mut impl fmt::Write) -> fmt::Result {
144 T::solidity_default(writer)
145 }
146 fn len(&self) -> usize {
147 if T::is_void() {
148 0
149 } else {
150 1
151 }
152 }
153}
98154
99impl SolidityArguments for () {155impl SolidityArguments for () {
100 fn solidity_name(&self, _writer: &mut impl fmt::Write) -> fmt::Result {156 fn solidity_name(&self, _writer: &mut impl fmt::Write) -> fmt::Result {
101 Ok(())157 Ok(())
102 }158 }
159 fn solidity_get(&self, _writer: &mut impl fmt::Write) -> fmt::Result {
160 Ok(())
161 }
162 fn solidity_default(&self, _writer: &mut impl fmt::Write) -> fmt::Result {
163 Ok(())
164 }
103 fn len(&self) -> usize {165 fn len(&self) -> usize {
104 0166 0
105 }167 }
122 )* );184 )* );
123 Ok(())185 Ok(())
124 }186 }
187 fn solidity_get(&self, writer: &mut impl fmt::Write) -> fmt::Result {
188 for_tuples!( #(
189 Tuple.solidity_get(writer)?;
190 )* );
191 Ok(())
192 }
193 fn solidity_default(&self, writer: &mut impl fmt::Write) -> fmt::Result {
194 if self.is_empty() {
195 Ok(())
196 } else if self.len() == 1 {
197 for_tuples!( #(
198 Tuple.solidity_default(writer)?;
199 )* );
200 Ok(())
201 } else {
202 write!(writer, "(")?;
203 let mut first = true;
204 for_tuples!( #(
205 if !Tuple.is_empty() {
206 if !first {
207 write!(writer, ", ")?;
208 }
209 first = false;
210 Tuple.solidity_name(writer)?;
211 }
212 )* );
213 write!(writer, ")")?;
214 Ok(())
215 }
216 }
125 fn len(&self) -> usize {217 fn len(&self) -> usize {
126 for_tuples!( #( Tuple.len() )+* )218 for_tuples!( #( Tuple.len() )+* )
127 }219 }
128}220}
129221
130pub trait SolidityFunctions {222pub trait SolidityFunctions {
131 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result;223 fn solidity_name(&self, is_impl: bool, writer: &mut impl fmt::Write) -> fmt::Result;
132}224}
133225
134pub enum SolidityMutability {226pub enum SolidityMutability {
143 pub mutability: SolidityMutability,235 pub mutability: SolidityMutability,
144}236}
145impl<A: SolidityArguments, R: SolidityArguments> SolidityFunctions for SolidityFunction<A, R> {237impl<A: SolidityArguments, R: SolidityArguments> SolidityFunctions for SolidityFunction<A, R> {
146 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result {238 fn solidity_name(&self, is_impl: bool, writer: &mut impl fmt::Write) -> fmt::Result {
147 write!(writer, "function {}(", self.name)?;239 write!(writer, "\tfunction {}(", self.name)?;
148 self.args.solidity_name(writer)?;240 self.args.solidity_name(writer)?;
149 write!(writer, ") external")?;241 write!(writer, ")")?;
242 if is_impl {
243 write!(writer, " public")?;
244 } else {
245 write!(writer, " external")?;
246 }
150 match &self.mutability {247 match &self.mutability {
151 SolidityMutability::Pure => write!(writer, " pure")?,248 SolidityMutability::Pure => write!(writer, " pure")?,
152 SolidityMutability::View => write!(writer, " view")?,249 SolidityMutability::View => write!(writer, " view")?,
157 self.result.solidity_name(writer)?;254 self.result.solidity_name(writer)?;
158 write!(writer, ")")?;255 write!(writer, ")")?;
159 }256 }
257 if is_impl {
258 writeln!(writer, " {{")?;
259 writeln!(writer, "\t\trequire(false, stub_error);")?;
260 self.args.solidity_get(writer)?;
261 match &self.mutability {
262 SolidityMutability::Pure => {}
263 SolidityMutability::View => writeln!(writer, "\t\tdummy;")?,
264 SolidityMutability::Mutable => writeln!(writer, "\t\tdummy = 0;")?,
265 }
266 if !self.result.is_empty() {
267 write!(writer, "\t\treturn ")?;
268 self.result.solidity_default(writer)?;
269 writeln!(writer, ";")?;
270 }
271 writeln!(writer, "\t}}")?;
272 } else {
160 writeln!(writer, ";")273 writeln!(writer, ";")?;
274 }
275 Ok(())
161 }276 }
162}277}
163278
164#[impl_for_tuples(0, 12)]279#[impl_for_tuples(0, 12)]
165impl SolidityFunctions for Tuple {280impl SolidityFunctions for Tuple {
166 for_tuples!( where #( Tuple: SolidityFunctions ),* );281 for_tuples!( where #( Tuple: SolidityFunctions ),* );
167282
168 fn solidity_name(&self, writer: &mut impl fmt::Write) -> fmt::Result {283 fn solidity_name(&self, is_impl: bool, writer: &mut impl fmt::Write) -> fmt::Result {
169 let mut first = false;284 let mut first = false;
170 for_tuples!( #(285 for_tuples!( #(
171 Tuple.solidity_name(writer)?;286 Tuple.solidity_name(is_impl, writer)?;
172 )* );287 )* );
173 Ok(())288 Ok(())
174 }289 }
175}290}
176291
177pub struct SolidityInterface<F: SolidityFunctions> {292pub struct SolidityInterface<F: SolidityFunctions> {
178 pub name: &'static str,293 pub name: &'static str,
294 pub is: &'static [&'static str],
179 pub functions: F,295 pub functions: F,
180}296}
181297
182impl<F: SolidityFunctions> SolidityInterface<F> {298impl<F: SolidityFunctions> SolidityInterface<F> {
183 pub fn format(&self, out: &mut impl fmt::Write) -> fmt::Result {299 pub fn format(&self, is_impl: bool, out: &mut impl fmt::Write) -> fmt::Result {
300 if is_impl {
301 write!(out, "contract ")?;
302 } else {
303 write!(out, "interface ")?;
304 }
184 writeln!(out, "interface {} {{", self.name)?;305 write!(out, "{}", self.name)?;
306 if !self.is.is_empty() {
307 write!(out, " is")?;
308 for (i, n) in self.is.iter().enumerate() {
309 if i != 0 {
310 write!(out, ",")?;
311 }
312 write!(out, " {}", n)?;
313 }
314 }
315 writeln!(out, " {{")?;
185 self.functions.solidity_name(out)?;316 self.functions.solidity_name(is_impl, out)?;
186 writeln!(out, "}}")?;317 writeln!(out, "}}")?;
187 Ok(())318 Ok(())
188 }319 }
189}320}
321
322pub struct SolidityEvent<A> {
323 pub name: &'static str,
324 pub args: A,
325}
326
327impl<A: SolidityArguments> SolidityFunctions for SolidityEvent<A> {
328 fn solidity_name(&self, _is_impl: bool, writer: &mut impl fmt::Write) -> fmt::Result {
329 write!(writer, "\tevent {}(", self.name)?;
330 self.args.solidity_name(writer)?;
331 writeln!(writer, ");")
332 }
333}
190334
modifiedcrates/evm-coder/tests/a.rsdiffbeforeafterboth
22
3use 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;
56
6struct Impls;7struct Impls;
78
modifiednode/cli/Cargo.tomldiffbeforeafterboth
318[features]318[features]
319default = []319default = []
320runtime-benchmarks = ['nft-runtime/runtime-benchmarks']320runtime-benchmarks = [
321 'nft-runtime/runtime-benchmarks',
322 'polkadot-service/runtime-benchmarks',
323]
321324
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
202 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 {
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
1use 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;
1414
15#[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 }
2121
22 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 }
2626
27 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 }
3939
40 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 }
5252
53 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 }
5757
58 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 }
6262
63 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 }
7575
76 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}
130130
131 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}
136136
163 }163 }
164}164}
165
166generate_stubgen!(contract_helpers_impl, ContractHelpersCall, true);
167generate_stubgen!(contract_helpers_iface, ContractHelpersCall, false);
165168
deletedpallets/evm-contract-helpers/src/stubs/ContractHelpers.bindiffbeforeafterboth

binary blob — no preview

addedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
1// SPDX-License-Identifier: OTHER
2// This code is automatically generated
3
4pragma solidity >=0.8.0 <0.9.0;
5
6// Common stubs holder
7contract Dummy {
8 uint8 dummy;
9 string stub_error = "this contract is implemented in native";
10}
11
1contract ContractHelpers {12contract ContractHelpers is Dummy {
2 uint8 _dummmy = 0;
3 address _dummy_addr = 0x0000000000000000000000000000000000000000;
4 string stub_error = "this contract does not exists, contract helpers are implemented on substrate chain side";
5
6 function contractOwner(address contract_address) public view returns (address) {13 function contractOwner(address contractAddress)
14 public
15 view
16 returns (address)
17 {
7 require(false, stub_error);18 require(false, stub_error);
8 contract_address;19 contractAddress;
20 dummy;
9 return _dummy_addr;21 return 0x0000000000000000000000000000000000000000;
10 }22 }
11 23
12 function sponsoringEnabled(address contract_address) public view returns (bool) {24 function sponsoringEnabled(address contractAddress)
25 public
26 view
27 returns (bool)
28 {
13 require(false, stub_error);29 require(false, stub_error);
14 contract_address;30 contractAddress;
15 _dummmy;31 dummy;
16 return false;32 return false;
17 }33 }
18 34
19 function toggleSponsoring(address contract_address, bool enabled) public {35 function toggleSponsoring(address contractAddress, bool enabled) public {
20 require(false, stub_error);36 require(false, stub_error);
21 contract_address;37 contractAddress;
22 enabled;38 enabled;
23 _dummmy = 0;39 dummy = 0;
24 }40 }
25 41
42 function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
43 public
44 {
45 require(false, stub_error);
46 contractAddress;
47 rateLimit;
48 dummy = 0;
49 }
50
51 function allowed(address contractAddress, address user)
52 public
53 view
54 returns (bool)
55 {
56 require(false, stub_error);
57 contractAddress;
58 user;
59 dummy;
60 return false;
61 }
62
63 function allowlistEnabled(address contractAddress)
64 public
65 view
66 returns (bool)
67 {
68 require(false, stub_error);
69 contractAddress;
70 dummy;
71 return false;
72 }
73
26 function toggleAllowlist(address contract_address, bool enabled) public {74 function toggleAllowlist(address contractAddress, bool enabled) public {
27 require(false, stub_error);75 require(false, stub_error);
28 contract_address;76 contractAddress;
29 enabled;77 enabled;
30 _dummmy = 0;78 dummy = 0;
31 }79 }
32 80
33 function toggleAllowed(address contract_address, address user, bool allowed) public {81 function toggleAllowed(
82 address contractAddress,
83 address user,
84 bool allowed
85 ) public {
34 require(false, stub_error);86 require(false, stub_error);
35 contract_address;87 contractAddress;
36 user;88 user;
37 allowed;89 allowed;
38 _dummmy = 0;90 dummy = 0;
39 }91 }
40}92}
93
addedpallets/evm-migration/Cargo.tomldiffbeforeafterboth

no changes

addedpallets/evm-migration/src/benchmarking.rsdiffbeforeafterboth

no changes

addedpallets/evm-migration/src/lib.rsdiffbeforeafterboth

no changes

addedpallets/evm-migration/src/weights.rsdiffbeforeafterboth

no changes

deletedpallets/nft-transaction-payment/src/benchmarking.rsdiffbeforeafterboth

no changes

modifiedpallets/nft-transaction-payment/src/lib.rsdiffbeforeafterboth
11#[cfg(feature = "std")]11#[cfg(feature = "std")]
12pub use serde::*;12pub use serde::*;
13
14#[cfg(feature = "runtime-benchmarks")]
15mod benchmarking;
1613
17use frame_support::{decl_module, decl_storage};14use frame_support::{decl_module, decl_storage};
18use sp_std::prelude::*;15use sp_std::prelude::*;
modifiedpallets/nft/Cargo.tomldiffbeforeafterboth
41 '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"]
4445
45################################################################################46################################################################################
46# Substrate Dependencies47# Substrate Dependencies
modifiedpallets/nft/src/benchmarking.rsdiffbeforeafterboth
1#![cfg(feature = "runtime-benchmarks")]1#![cfg(feature = "runtime-benchmarks")]
22
3use super::*;3use super::*;
4use crate::Module as Nft;4use crate::Pallet;
5
6use 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;
910
10const SEED: u32 = 1;11const SEED: u32 = 1;
11/*12
12fn 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}19
1920fn 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}
26
27fn default_fungible_data() -> CreateItemData {
28 CreateItemData::Fungible(CreateFungibleData { value: 1000 })
29}
30
31fn 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}
38
39fn 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}
2473
25benchmarks! {74benchmarks! {
2675
27 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 }
87
88 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)
92
93 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))
98
99 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))
105
106 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)
110
111 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)
115
116 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)
121
122 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))
127
128 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))
134
135 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())
139
140 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)
145
146 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)
152
153 // nft item
154 create_item_nft {
155 let b in 0..(CUSTOM_DATA_LIMIT * 2);
156
157 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)
164
165 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_LIMIT
168 let b in 1..1000;
169
170 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)
174
175 // fungible item
176 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)
183
184 create_multiple_items_fungible {
185 let b in 1..1000;
186
187 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)
191
192 // refungible item
193 create_item_refungible {
194 let b in 0..(CUSTOM_DATA_LIMIT * 2);
195
196 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)
204
205 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_LIMIT
208 let b in 1..1000;
209
210 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)
214
215 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)
221
222 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)
229
230 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)
237
238 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)
245
246 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/*250
35 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;258
43 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());259 // Nft
44 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());268
53 let whitelist_account: T::AccountId = account("admin", 0, SEED);269 // Fungible
54 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());278
63 let whitelist_account: T::AccountId = account("admin", 0, SEED);279 // ReFungible
64 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;288
73 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)291
76292 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();296
81 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())?;299
84 }: 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>>();304
89 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());307
92 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 {312
97 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();315
100 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 {322
107 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());327
112 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)331
116332 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)
135
136 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)
146
147 // nft item
148 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();
156
157 }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
158
159 #[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())?;
176
177 }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
178
179 // fungible item
180 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();
188
189 }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
190
191 // refungible item
192 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();
200
201 }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
202
203 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)?;
212
213 }: burn_item(RawOrigin::Signed(caller.clone()), 2, 1)
214
215 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)?;
225
226 }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
227
228 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)?;
238
239 }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
240
241 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)?;
251
252 }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
253
254 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)?;
264
265 }: approve(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1)
266
267 // Nft
268 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)?;
279
280 }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
281
282 // Fungible
283 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)?;
294
295 }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
296
297 // ReFungible
298 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)?;
309
310 }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
311
312 enable_contract_sponsoring {
313 let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
314
315 }: enable_contract_sponsoring(RawOrigin::Signed(caller.clone()), caller.clone(), true)
316
317 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())?;
324
325 }: set_offchain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())
326
327 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())
335
336 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())
344
345 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)?;
354
355 }: set_variable_meta_data(RawOrigin::Signed(caller.clone()), 2, 1, [1, 2, 3].to_vec())
356
357 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)
365
366 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: 0
376 };
377 }: set_chain_limits(RawOrigin::Signed(caller.clone()), limits)
378
379 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)
388
389 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())?;
396
397 let cl = CollectionLimits {
398 account_token_ownership_limit: 0,
399 sponsored_data_size: 0,
400 token_limit: 0,
401 sponsor_transfer_timeout: 0
402 };
403
404 }: set_collection_limits(RawOrigin::Signed(caller.clone()), 2, cl)
405
406 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())
409
410 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())
414
415 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}
420343
deletedpallets/nft/src/default_weights.rsdiffbeforeafterboth

no changes

modifiedpallets/nft/src/eth/erc.rsdiffbeforeafterboth
1use 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;
8use super::account::CrossAccountId;11use super::account::CrossAccountId;
9use sp_std::vec::Vec;12use sp_std::{vec, vec::Vec};
1013
11#[solidity_interface(name = "ERC165")]14#[solidity_interface(name = "ERC165")]
12impl<T: Config> CollectionHandle<T> {15impl<T: Config> CollectionHandle<T> {
4245
43#[solidity_interface(name = "ERC721Metadata", inline_is(InlineNameSymbol))]46#[solidity_interface(name = "ERC721Metadata", inline_is(InlineNameSymbol))]
44impl<T: Config> CollectionHandle<T> {47impl<T: Config> CollectionHandle<T> {
48 #[solidity(rename_selector = "tokenURI")]
45 fn token_uri(&self, token_id: uint256) -> Result<string> {49 fn token_uri(&self, token_id: uint256) -> Result<string> {
46 // TODO: We should standartize url prefix, maybe via offchain schema?50 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
47 Ok(format!("unique.network/{}/{}", self.id, token_id))51 Ok(string::from_utf8_lossy(
52 &<NftItemList<T>>::get(self.id, token_id)
53 .ok_or("token not found")?
54 .const_data,
55 )
56 .into())
48 }57 }
49}58}
5059
178 }187 }
179}188}
189
190#[solidity_interface(name = "ERC721Burnable")]
191impl<T: Config> CollectionHandle<T> {
192 fn burn(&mut self, caller: caller, token_id: uint256) -> Result<void> {
193 let caller = T::CrossAccountId::from_eth(caller);
194 let token_id = token_id.try_into().map_err(|_| "amount overflow")?;
195
196 <Module<T>>::burn_item_internal(&caller, &self, token_id, 1).map_err(|_| "burn error")?;
197 Ok(())
198 }
199}
200
201#[derive(ToLog)]
202pub enum ERC721MintableEvents {
203 #[allow(dead_code)]
204 MintingFinished {},
205}
206
207#[solidity_interface(name = "ERC721Mintable", events(ERC721MintableEvents))]
208impl<T: Config> CollectionHandle<T> {
209 fn minting_finished(&self) -> Result<bool> {
210 Ok(false)
211 }
212
213 fn mint(&mut self, caller: caller, to: address, token_id: uint256) -> Result<bool> {
214 let caller = T::CrossAccountId::from_eth(caller);
215 let to = T::CrossAccountId::from_eth(to);
216 let token_id: u32 = token_id.try_into().map_err(|_| "amount overflow")?;
217 if <ItemListIndex>::get(self.id)
218 .checked_add(1)
219 .ok_or("item id overflow")?
220 != token_id
221 {
222 return Err("item id should be next".into());
223 }
224
225 <Module<T>>::create_item_internal(
226 &caller,
227 &self,
228 &to,
229 CreateItemData::NFT(CreateNftData {
230 const_data: vec![].try_into().unwrap(),
231 variable_data: vec![].try_into().unwrap(),
232 }),
233 )
234 .map_err(|_| "mint error")?;
235 Ok(true)
236 }
237
238 #[solidity(rename_selector = "mintWithTokenURI")]
239 fn mint_with_token_uri(
240 &mut self,
241 caller: caller,
242 to: address,
243 token_id: uint256,
244 token_uri: string,
245 ) -> Result<bool> {
246 let caller = T::CrossAccountId::from_eth(caller);
247 let to = T::CrossAccountId::from_eth(to);
248 let token_id: u32 = token_id.try_into().map_err(|_| "amount overflow")?;
249 if <ItemListIndex>::get(self.id)
250 .checked_add(1)
251 .ok_or("item id overflow")?
252 != token_id
253 {
254 return Err("item id should be next".into());
255 }
256
257 <Module<T>>::create_item_internal(
258 &caller,
259 &self,
260 &to,
261 CreateItemData::NFT(CreateNftData {
262 const_data: Vec::<u8>::from(token_uri)
263 .try_into()
264 .map_err(|_| "token uri is too long")?,
265 variable_data: vec![].try_into().unwrap(),
266 }),
267 )
268 .map_err(|_| "mint error")?;
269 Ok(true)
270 }
271
272 fn finish_minting(&mut self, _caller: caller) -> Result<bool> {
273 Err("not implementable".into())
274 }
275}
180276
181#[solidity_interface(name = "ERC721UniqueExtensions")]277#[solidity_interface(name = "ERC721UniqueExtensions")]
182impl<T: Config> CollectionHandle<T> {278impl<T: Config> CollectionHandle<T> {
197 Ok(())293 Ok(())
198 }294 }
295
296 fn next_token_id(&self) -> Result<uint256> {
297 Ok(ItemListIndex::get(self.id)
298 .checked_add(1)
299 .ok_or("item id overflow")?
300 .into())
301 }
199}302}
200303
201#[solidity_interface(304#[solidity_interface(
205 ERC721,308 ERC721,
206 ERC721Metadata,309 ERC721Metadata,
207 ERC721Enumerable,310 ERC721Enumerable,
208 ERC721UniqueExtensions311 ERC721UniqueExtensions,
312 ERC721Mintable,
313 ERC721Burnable,
209 )314 )
210)]315)]
211impl<T: Config> CollectionHandle<T> {}316impl<T: Config> CollectionHandle<T> {}
298#[solidity_interface(name = "UniqueFungible", is(ERC165, ERC20))]403#[solidity_interface(name = "UniqueFungible", is(ERC165, ERC20))]
299impl<T: Config> CollectionHandle<T> {}404impl<T: Config> CollectionHandle<T> {}
405
406// Not a tests, but code generators
407generate_stubgen!(nft_impl, UniqueNFTCall, true);
408generate_stubgen!(nft_iface, UniqueNFTCall, false);
409
410generate_stubgen!(fungible_impl, UniqueFungibleCall, true);
411generate_stubgen!(fungible_iface, UniqueFungibleCall, false);
300412
modifiedpallets/nft/src/eth/mod.rsdiffbeforeafterboth
96 .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 })
modifiedpallets/nft/src/eth/sponsoring.rsdiffbeforeafterboth
1//! Implements EVM sponsoring logic via OnChargeEVMTransaction1//! Implements EVM sponsoring logic via OnChargeEVMTransaction
22
3use 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};
2021
21struct AnyError;22struct AnyError;
2223
43 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_timeout
45 } else {46 } else {
46 ChainLimit::get().nft_sponsor_transfer_timeout47 NFT_SPONSOR_TRANSFER_TIMEOUT
47 };48 };
4849
49 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_timeout
76 } else {77 } else {
77 ChainLimit::get().fungible_sponsor_transfer_timeout78 FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT
78 };79 };
7980
80 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;
deletedpallets/nft/src/eth/stubs/ERC1633.bindiffbeforeafterboth

no changes

deletedpallets/nft/src/eth/stubs/ERC20.bindiffbeforeafterboth

binary blob — no preview

deletedpallets/nft/src/eth/stubs/ERC20.soldiffbeforeafterboth

no changes

deletedpallets/nft/src/eth/stubs/ERC721.bindiffbeforeafterboth

no changes

deletedpallets/nft/src/eth/stubs/ERC721.soldiffbeforeafterboth

no changes

deletedpallets/nft/src/eth/stubs/Invalid.bindiffbeforeafterboth

no changes

addedpallets/nft/src/eth/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

addedpallets/nft/src/eth/stubs/UniqueFungible.soldiffbeforeafterboth

no changes

addedpallets/nft/src/eth/stubs/UniqueInvalid.rawdiffbeforeafterboth

no changes

addedpallets/nft/src/eth/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

addedpallets/nft/src/eth/stubs/UniqueNFT.soldiffbeforeafterboth

no changes

addedpallets/nft/src/eth/stubs/UniqueRefungible.rawdiffbeforeafterboth

no changes

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
31 StorageValue, transactional,31 StorageValue, transactional,
32};32};
3333
34use 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;
5154
52mod 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;
64
65pub 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}
9768
98decl_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 transferring
178 TransferNotAllowed,149 TransferNotAllowed,
150 /// Can't transfer tokens to ethereum zero address
151 AddressIsZero,
179 }152 }
180}153}
181154
202 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}
227
228type SelfWeightOf<T> = <T as Config>::WeightInfo;
229
230trait 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, fungible
243 Self::approve_nft()
244 }
245 fn set_variable_meta_data(data: u32) -> Weight {
246 // TODO: refungible
247 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 burn_item() -> Weight {
255 // TODO: refungible, fungible
256 Self::burn_item_nft()
257 }
258}
259impl<T: WeightInfo> WeightInfoHelpers for T {}
247260
248// # Used definitions261// # Used definitions
249//262//
280 ItemListIndex: map hasher(blake2_128_concat) CollectionId => TokenId;293 ItemListIndex: map hasher(blake2_128_concat) CollectionId => TokenId;
281 //#endregion294 //#endregion
282
283 //#region Chain limits struct
284 pub ChainLimit get(fn chain_limit) config(): ChainLimits;
285 //#endregion
286295
287 //#region Bound counters296 //#region Bound counters
288 /// Amount of collections destroyed, used for total amount tracking with297 /// Amount of collections destroyed, used for total amount tracking with
435 origin: T::Origin444 origin: T::Origin
436 {445 {
437 fn deposit_event() = default;446 fn deposit_event() = default;
447 const CollectionAdminsLimit: u64 = COLLECTION_ADMINS_LIMIT;
438 type Error = Error<T>;448 type Error = Error<T>;
439449
440 fn on_initialize(_now: T::BlockNumber) -> Weight {450 fn on_initialize(_now: T::BlockNumber) -> Weight {
457 ///467 ///
458 /// * mode: [CollectionMode] collection type and type dependent data.468 /// * mode: [CollectionMode] collection type and type dependent data.
459 // returns collection ID469 // returns collection ID
460 #[weight = <T as Config>::WeightInfo::create_collection()]470 #[weight = <SelfWeightOf<T>>::create_collection()]
461 #[transactional]471 #[transactional]
462 pub fn create_collection(origin,472 pub fn create_collection(origin,
463 collection_name: Vec<u16>,473 collection_name: Vec<u16>,
486 _ => 0496 _ => 0
487 };497 };
488
489 let chain_limit = ChainLimit::get();
490498
491 let created_count = CreatedCollectionCount::get();499 let created_count = CreatedCollectionCount::get();
492 let destroyed_count = DestroyedCollectionCount::get();500 let destroyed_count = DestroyedCollectionCount::get();
493501
494 // bound Total number of collections502 // bound Total number of collections
495 ensure!(created_count - destroyed_count < chain_limit.collection_numbers_limit, Error::<T>::TotalCollectionsLimitExceeded);503 ensure!(created_count - destroyed_count < COLLECTION_NUMBER_LIMIT, Error::<T>::TotalCollectionsLimitExceeded);
496504
497 // check params505 // check params
498 ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);506 ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);
499 ensure!(collection_name.len() <= 64, Error::<T>::CollectionNameLimitExceeded);507 ensure!(collection_name.len() <= MAX_COLLECTION_NAME_LENGTH, Error::<T>::CollectionNameLimitExceeded);
500 ensure!(collection_description.len() <= 256, Error::<T>::CollectionDescriptionLimitExceeded);508 ensure!(collection_description.len() <= MAX_COLLECTION_DESCRIPTION_LENGTH, Error::<T>::CollectionDescriptionLimitExceeded);
501 ensure!(token_prefix.len() <= 16, Error::<T>::CollectionTokenPrefixLimitExceeded);509 ensure!(token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH, Error::<T>::CollectionTokenPrefixLimitExceeded);
502510
503 // Generate next collection ID511 // Generate next collection ID
504 let next_id = created_count512 let next_id = created_count
508 CreatedCollectionCount::put(next_id);516 CreatedCollectionCount::put(next_id);
509517
510 let limits = CollectionLimits {518 let limits = CollectionLimits {
511 sponsored_data_size: chain_limit.custom_data_limit,519 sponsored_data_size: CUSTOM_DATA_LIMIT,
512 ..Default::default()520 ..Default::default()
513 };521 };
514522
549 /// # Arguments557 /// # Arguments
550 ///558 ///
551 /// * collection_id: collection to destroy.559 /// * collection_id: collection to destroy.
552 #[weight = <T as Config>::WeightInfo::destroy_collection()]560 #[weight = <SelfWeightOf<T>>::destroy_collection()]
553 #[transactional]561 #[transactional]
554 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {562 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {
555563
597 /// * collection_id.605 /// * collection_id.
598 ///606 ///
599 /// * address.607 /// * address.
600 #[weight = <T as Config>::WeightInfo::add_to_white_list()]608 #[weight = <SelfWeightOf<T>>::add_to_white_list()]
601 #[transactional]609 #[transactional]
602 pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{610 pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
603611
626 /// * collection_id.634 /// * collection_id.
627 ///635 ///
628 /// * address.636 /// * address.
629 #[weight = <T as Config>::WeightInfo::remove_from_white_list()]637 #[weight = <SelfWeightOf<T>>::remove_from_white_list()]
630 #[transactional]638 #[transactional]
631 pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{639 pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
632640
654 /// * collection_id.662 /// * collection_id.
655 ///663 ///
656 /// * mode: [AccessMode]664 /// * mode: [AccessMode]
657 #[weight = <T as Config>::WeightInfo::set_public_access_mode()]665 #[weight = <SelfWeightOf<T>>::set_public_access_mode()]
658 #[transactional]666 #[transactional]
659 pub fn set_public_access_mode(origin, collection_id: CollectionId, mode: AccessMode) -> DispatchResult667 pub fn set_public_access_mode(origin, collection_id: CollectionId, mode: AccessMode) -> DispatchResult
660 {668 {
679 /// * collection_id.687 /// * collection_id.
680 ///688 ///
681 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.689 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.
682 #[weight = <T as Config>::WeightInfo::set_mint_permission()]690 #[weight = <SelfWeightOf<T>>::set_mint_permission()]
683 #[transactional]691 #[transactional]
684 pub fn set_mint_permission(origin, collection_id: CollectionId, mint_permission: bool) -> DispatchResult692 pub fn set_mint_permission(origin, collection_id: CollectionId, mint_permission: bool) -> DispatchResult
685 {693 {
702 /// * collection_id.710 /// * collection_id.
703 ///711 ///
704 /// * new_owner.712 /// * new_owner.
705 #[weight = <T as Config>::WeightInfo::change_collection_owner()]713 #[weight = <SelfWeightOf<T>>::change_collection_owner()]
706 #[transactional]714 #[transactional]
707 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {715 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {
708716
726 /// * collection_id: ID of the Collection to add admin for.734 /// * collection_id: ID of the Collection to add admin for.
727 ///735 ///
728 /// * new_admin_id: Address of new admin to add.736 /// * new_admin_id: Address of new admin to add.
729 #[weight = <T as Config>::WeightInfo::add_collection_admin()]737 #[weight = <SelfWeightOf<T>>::add_collection_admin()]
730 #[transactional]738 #[transactional]
731 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::CrossAccountId) -> DispatchResult {739 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)?);740 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
737 match admin_arr.binary_search(&new_admin_id) {745 match admin_arr.binary_search(&new_admin_id) {
738 Ok(_) => {},746 Ok(_) => {},
739 Err(idx) => {747 Err(idx) => {
740 let limits = ChainLimit::get();
741 ensure!(admin_arr.len() < limits.collections_admins_limit as usize, Error::<T>::CollectionAdminsLimitExceeded);748 ensure!(admin_arr.len() < COLLECTION_ADMINS_LIMIT as usize, Error::<T>::CollectionAdminsLimitExceeded);
742 admin_arr.insert(idx, new_admin_id);749 admin_arr.insert(idx, new_admin_id);
743 <AdminList<T>>::insert(collection_id, admin_arr);750 <AdminList<T>>::insert(collection_id, admin_arr);
744 }751 }
758 /// * collection_id: ID of the Collection to remove admin for.765 /// * collection_id: ID of the Collection to remove admin for.
759 ///766 ///
760 /// * account_id: Address of admin to remove.767 /// * account_id: Address of admin to remove.
761 #[weight = <T as Config>::WeightInfo::remove_collection_admin()]768 #[weight = <SelfWeightOf<T>>::remove_collection_admin()]
762 #[transactional]769 #[transactional]
763 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {770 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {
764 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);771 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
782 /// * collection_id.789 /// * collection_id.
783 ///790 ///
784 /// * new_sponsor.791 /// * new_sponsor.
785 #[weight = <T as Config>::WeightInfo::set_collection_sponsor()]792 #[weight = <SelfWeightOf<T>>::set_collection_sponsor()]
786 #[transactional]793 #[transactional]
787 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {794 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {
788 let sender = ensure_signed(origin)?;795 let sender = ensure_signed(origin)?;
800 /// # Arguments807 /// # Arguments
801 ///808 ///
802 /// * collection_id.809 /// * collection_id.
803 #[weight = <T as Config>::WeightInfo::confirm_sponsorship()]810 #[weight = <SelfWeightOf<T>>::confirm_sponsorship()]
804 #[transactional]811 #[transactional]
805 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {812 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {
806 let sender = ensure_signed(origin)?;813 let sender = ensure_signed(origin)?;
824 /// # Arguments831 /// # Arguments
825 ///832 ///
826 /// * collection_id.833 /// * collection_id.
827 #[weight = <T as Config>::WeightInfo::remove_collection_sponsor()]834 #[weight = <SelfWeightOf<T>>::remove_collection_sponsor()]
828 #[transactional]835 #[transactional]
829 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {836 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {
830 let sender = ensure_signed(origin)?;837 let sender = ensure_signed(origin)?;
860 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))867 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))
861 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]868 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]
862869
863 #[weight = <T as Config>::WeightInfo::create_item(data.data_size())]870 #[weight = <SelfWeightOf<T>>::create_item(data.data_size() as u32)]
864 #[transactional]871 #[transactional]
865 pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResult {872 pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResult {
866 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);873 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].896 /// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].
890 ///897 ///
891 /// * owner: Address, initial owner of the NFT.898 /// * owner: Address, initial owner of the NFT.
892 #[weight = <T as Config>::WeightInfo::create_item(items_data.iter()899 #[weight = <SelfWeightOf<T>>::create_item(items_data.iter()
893 .map(|data| { data.data_size() })900 .map(|data| { data.data_size() as u32 })
894 .sum())]901 .sum())]
895 #[transactional]902 #[transactional]
896 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResult {903 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResult {
917 /// * collection_id: ID of the collection.924 /// * collection_id: ID of the collection.
918 ///925 ///
919 /// * value: New flag value.926 /// * value: New flag value.
920 #[weight = <T as Config>::WeightInfo::burn_item()]927 #[weight = <SelfWeightOf<T>>::burn_item()]
921 #[transactional]928 #[transactional]
922 pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {929 pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {
923930
943 /// * collection_id: ID of the collection.950 /// * collection_id: ID of the collection.
944 ///951 ///
945 /// * item_id: ID of NFT to burn.952 /// * item_id: ID of NFT to burn.
946 #[weight = <T as Config>::WeightInfo::burn_item()]953 #[weight = <SelfWeightOf<T>>::burn_item()]
947 #[transactional]954 #[transactional]
948 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {955 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {
949956
978 /// * Non-Fungible Mode: Ignored985 /// * Non-Fungible Mode: Ignored
979 /// * Fungible Mode: Must specify transferred amount986 /// * Fungible Mode: Must specify transferred amount
980 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)987 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)
981 #[weight = <T as Config>::WeightInfo::transfer()]988 #[weight = <SelfWeightOf<T>>::transfer()]
982 #[transactional]989 #[transactional]
983 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {990 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)?);991 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
1004 /// * collection_id.1011 /// * collection_id.
1005 ///1012 ///
1006 /// * item_id: ID of the item.1013 /// * item_id: ID of the item.
1007 #[weight = <T as Config>::WeightInfo::approve()]1014 #[weight = <SelfWeightOf<T>>::approve()]
1008 #[transactional]1015 #[transactional]
1009 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResult {1016 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)?);1017 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
1034 /// * item_id: ID of the item.1041 /// * item_id: ID of the item.
1035 ///1042 ///
1036 /// * value: Amount to transfer.1043 /// * value: Amount to transfer.
1037 #[weight = <T as Config>::WeightInfo::transfer_from()]1044 #[weight = <SelfWeightOf<T>>::transfer_from()]
1038 #[transactional]1045 #[transactional]
1039 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResult {1046 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)?);1047 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
1069 /// * collection_id.1076 /// * collection_id.
1070 ///1077 ///
1071 /// * schema: String representing the offchain data schema.1078 /// * schema: String representing the offchain data schema.
1072 #[weight = <T as Config>::WeightInfo::set_variable_meta_data()]1079 #[weight = <SelfWeightOf<T>>::set_variable_meta_data(data.len() as u32)]
1073 #[transactional]1080 #[transactional]
1074 pub fn set_variable_meta_data (1081 pub fn set_variable_meta_data (
1075 origin,1082 origin,
1100 /// * collection_id.1107 /// * collection_id.
1101 ///1108 ///
1102 /// * schema: SchemaVersion: enum1109 /// * schema: SchemaVersion: enum
1103 #[weight = <T as Config>::WeightInfo::set_schema_version()]1110 #[weight = <SelfWeightOf<T>>::set_schema_version()]
1104 #[transactional]1111 #[transactional]
1105 pub fn set_schema_version(1112 pub fn set_schema_version(
1106 origin,1113 origin,
1126 /// * collection_id.1133 /// * collection_id.
1127 ///1134 ///
1128 /// * schema: String representing the offchain data schema.1135 /// * schema: String representing the offchain data schema.
1129 #[weight = <T as Config>::WeightInfo::set_offchain_schema()]1136 #[weight = <SelfWeightOf<T>>::set_offchain_schema(schema.len() as u32)]
1130 #[transactional]1137 #[transactional]
1131 pub fn set_offchain_schema(1138 pub fn set_offchain_schema(
1132 origin,1139 origin,
1138 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;1145 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;
11391146
1140 // check schema limit1147 // check schema limit
1141 ensure!(schema.len() as u32 <= ChainLimit::get().offchain_schema_limit, "");1148 ensure!(schema.len() as u32 <= OFFCHAIN_SCHEMA_LIMIT, "");
11421149
1143 target_collection.offchain_schema = schema;1150 target_collection.offchain_schema = schema;
1144 target_collection.save()1151 target_collection.save()
1156 /// * collection_id.1163 /// * collection_id.
1157 ///1164 ///
1158 /// * schema: String representing the const on-chain data schema.1165 /// * schema: String representing the const on-chain data schema.
1159 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1166 #[weight = <SelfWeightOf<T>>::set_const_on_chain_schema(schema.len() as u32)]
1160 #[transactional]1167 #[transactional]
1161 pub fn set_const_on_chain_schema (1168 pub fn set_const_on_chain_schema (
1162 origin,1169 origin,
1168 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;1175 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;
11691176
1170 // check schema limit1177 // check schema limit
1171 ensure!(schema.len() as u32 <= ChainLimit::get().const_on_chain_schema_limit, "");1178 ensure!(schema.len() as u32 <= CONST_ON_CHAIN_SCHEMA_LIMIT, "");
11721179
1173 target_collection.const_on_chain_schema = schema;1180 target_collection.const_on_chain_schema = schema;
1174 target_collection.save()1181 target_collection.save()
1186 /// * collection_id.1193 /// * collection_id.
1187 ///1194 ///
1188 /// * schema: String representing the variable on-chain data schema.1195 /// * schema: String representing the variable on-chain data schema.
1189 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1196 #[weight = <SelfWeightOf<T>>::set_const_on_chain_schema(schema.len() as u32)]
1190 #[transactional]1197 #[transactional]
1191 pub fn set_variable_on_chain_schema (1198 pub fn set_variable_on_chain_schema (
1192 origin,1199 origin,
1198 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;1205 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;
11991206
1200 // check schema limit1207 // check schema limit
1201 ensure!(schema.len() as u32 <= ChainLimit::get().variable_on_chain_schema_limit, "");1208 ensure!(schema.len() as u32 <= VARIABLE_ON_CHAIN_SCHEMA_LIMIT, "");
12021209
1203 target_collection.variable_on_chain_schema = schema;1210 target_collection.variable_on_chain_schema = schema;
1204 target_collection.save()1211 target_collection.save()
1205 }1212 }
12061213
1207 // Sudo permissions function
1208 #[weight = <T as Config>::WeightInfo::set_chain_limits()]1214 #[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)?;
1217
1218 <ChainLimit>::put(limits);
1219 Ok(())
1220 }
1221
1222 #[weight = <T as Config>::WeightInfo::set_collection_limits()]
1223 #[transactional]1215 #[transactional]
1224 pub fn set_collection_limits(1216 pub fn set_collection_limits(
1225 origin,1217 origin,
1230 let mut target_collection = Self::get_collection(collection_id)?;1222 let mut target_collection = Self::get_collection(collection_id)?;
1231 Self::check_owner_permissions(&target_collection, sender.as_sub())?;1223 Self::check_owner_permissions(&target_collection, sender.as_sub())?;
1232 let old_limits = &target_collection.limits;1224 let old_limits = &target_collection.limits;
1233 let chain_limits = ChainLimit::get();
12341225
1235 // collection bounds1226 // collection bounds
1236 ensure!(new_limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&1227 ensure!(new_limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&
1237 new_limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP &&1228 new_limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP &&
1238 new_limits.sponsored_data_size <= chain_limits.custom_data_limit,1229 new_limits.sponsored_data_size <= CUSTOM_DATA_LIMIT,
1239 Error::<T>::CollectionLimitBoundsExceeded);1230 Error::<T>::CollectionLimitBoundsExceeded);
12401231
1241 // token_limit check prev1232 // token_limit check prev
1262 owner: &T::CrossAccountId,1253 owner: &T::CrossAccountId,
1263 data: CreateItemData,1254 data: CreateItemData,
1264 ) -> DispatchResult {1255 ) -> DispatchResult {
1256 ensure!(
1257 owner != &T::CrossAccountId::from_eth(H160([0; 20])),
1258 Error::<T>::AddressIsZero
1259 );
1260
1265 Self::can_create_items_in_collection(collection, sender, owner, 1)?;1261 Self::can_create_items_in_collection(collection, sender, owner, 1)?;
1266 Self::validate_create_item_args(collection, &data)?;1262 Self::validate_create_item_args(collection, &data)?;
1277 value: u128,1273 value: u128,
1278 ) -> DispatchResult {1274 ) -> DispatchResult {
1275 ensure!(
1279 target_collection.consume_gas(2000000)?;1276 recipient != &T::CrossAccountId::from_eth(H160([0; 20])),
1277 Error::<T>::AddressIsZero
1278 );
1279
1280 // Limits check1280 // Limits check
1281 Self::is_correct_transfer(target_collection, recipient)?;1281 Self::is_correct_transfer(target_collection, recipient)?;
12821282
1283 // Transfer permissions check1283 // Transfer permissions check
1284 ensure!(1284 ensure!(
1285 Self::is_item_owner(sender, target_collection, item_id)1285 Self::is_item_owner(sender, target_collection, item_id)?
1286 || Self::is_owner_or_admin_permissions(target_collection, sender),1286 || Self::is_owner_or_admin_permissions(target_collection, sender)?,
1287 Error::<T>::NoPermission1287 Error::<T>::NoPermission
1288 );1288 );
12891289
1330 item_id: TokenId,1330 item_id: TokenId,
1331 amount: u128,1331 amount: u128,
1332 ) -> DispatchResult {1332 ) -> DispatchResult {
1333 collection.consume_gas(2000000)?;
1334 Self::token_exists(collection, item_id)?;1333 Self::token_exists(collection, item_id)?;
13351334
1336 // Transfer permissions check1335 // Transfer permissions check
1337 let bypasses_limits = collection.limits.owner_can_transfer1336 let bypasses_limits = collection.limits.owner_can_transfer
1338 && Self::is_owner_or_admin_permissions(collection, sender);1337 && Self::is_owner_or_admin_permissions(collection, sender)?;
13391338
1340 let allowance_limit = if bypasses_limits {1339 let allowance_limit = if bypasses_limits {
1341 None1340 None
1342 } else if let Some(amount) = Self::owned_amount(sender, collection, item_id) {1341 } else if let Some(amount) = Self::owned_amount(sender, collection, item_id)? {
1343 Some(amount)1342 Some(amount)
1344 } else {1343 } else {
1345 fail!(Error::<T>::NoPermission);1344 fail!(Error::<T>::NoPermission);
1350 Self::check_white_list(collection, spender)?;1349 Self::check_white_list(collection, spender)?;
1351 }1350 }
13521351
1352 collection.consume_sload()?;
1353 let allowance: u128 = amount1353 let allowance: u128 = amount
1354 .checked_add(<Allowances<T>>::get(1354 .checked_add(<Allowances<T>>::get(
1355 collection.id,1355 collection.id,
1359 if let Some(limit) = allowance_limit {1359 if let Some(limit) = allowance_limit {
1360 ensure!(limit >= allowance, Error::<T>::TokenValueTooLow);1360 ensure!(limit >= allowance, Error::<T>::TokenValueTooLow);
1361 }1361 }
1362 collection.consume_sstore()?;
1362 <Allowances<T>>::insert(1363 <Allowances<T>>::insert(
1363 collection.id,1364 collection.id,
1364 (item_id, sender.as_sub(), spender.as_sub()),1365 (item_id, sender.as_sub(), spender.as_sub()),
1401 item_id: TokenId,1402 item_id: TokenId,
1402 amount: u128,1403 amount: u128,
1403 ) -> DispatchResult {1404 ) -> DispatchResult {
1405 if sender == from {
1406 // Transfer by `from`, because it is either equal to sender, or derived from him
1407 return Self::transfer_internal(from, recipient, collection, item_id, amount);
1408 }
1409
1410 // Check approval
1404 collection.consume_gas(2000000)?;1411 collection.consume_sload()?;
1405 // Check approval
1406 let approval: u128 =1412 let approval: u128 =
1407 <Allowances<T>>::get(collection.id, (item_id, from.as_sub(), sender.as_sub()));1413 <Allowances<T>>::get(collection.id, (item_id, from.as_sub(), sender.as_sub()));
14081414
1413 ensure!(1419 ensure!(
1414 approval >= amount1420 approval >= amount
1415 || (collection.limits.owner_can_transfer1421 || (collection.limits.owner_can_transfer
1416 && Self::is_owner_or_admin_permissions(collection, sender)),1422 && Self::is_owner_or_admin_permissions(collection, sender)?),
1417 Error::<T>::NoPermission1423 Error::<T>::NoPermission
1418 );1424 );
14191425
14241430
1425 // Reduce approval by transferred amount or remove if remaining approval drops to 01431 // Reduce approval by transferred amount or remove if remaining approval drops to 0
1426 let allowance = approval.saturating_sub(amount);1432 let allowance = approval.saturating_sub(amount);
1433 collection.consume_sstore()?;
1427 if allowance > 0 {1434 if allowance > 0 {
1428 <Allowances<T>>::insert(1435 <Allowances<T>>::insert(
1429 collection.id,1436 collection.id,
1471 Self::token_exists(collection, item_id)?;1478 Self::token_exists(collection, item_id)?;
14721479
1473 ensure!(1480 ensure!(
1474 ChainLimit::get().custom_data_limit >= data.len() as u32,1481 CUSTOM_DATA_LIMIT >= data.len() as u32,
1475 Error::<T>::TokenVariableDataLimitExceeded1482 Error::<T>::TokenVariableDataLimitExceeded
1476 );1483 );
14771484
1478 // Modify permissions check1485 // Modify permissions check
1479 ensure!(1486 ensure!(
1480 Self::is_item_owner(sender, collection, item_id)1487 Self::is_item_owner(sender, collection, item_id)?
1481 || Self::is_owner_or_admin_permissions(collection, sender),1488 || Self::is_owner_or_admin_permissions(collection, sender)?,
1482 Error::<T>::NoPermission1489 Error::<T>::NoPermission
1483 );1490 );
14841491
1519 value: u128,1526 value: u128,
1520 ) -> DispatchResult {1527 ) -> DispatchResult {
1521 ensure!(1528 ensure!(
1522 Self::is_item_owner(sender, collection, item_id)1529 Self::is_item_owner(sender, collection, item_id)?
1523 || (collection.limits.owner_can_transfer1530 || (collection.limits.owner_can_transfer
1524 && Self::is_owner_or_admin_permissions(collection, sender)),1531 && Self::is_owner_or_admin_permissions(collection, sender)?),
1525 Error::<T>::NoPermission1532 Error::<T>::NoPermission
1526 );1533 );
15271534
1563 let collection_id = collection.id;1570 let collection_id = collection.id;
15641571
1565 // check token limit and account token limit1572 // check token limit and account token limit
1573 collection.consume_sload()?;
1566 let account_items: u32 =1574 let account_items: u32 =
1567 <AddressTokens<T>>::get(collection_id, recipient.as_sub()).len() as u32;1575 <AddressTokens<T>>::get(collection_id, recipient.as_sub()).len() as u32;
1568 ensure!(1576 ensure!(
1601 Error::<T>::AccountTokenLimitExceeded1609 Error::<T>::AccountTokenLimitExceeded
1602 );1610 );
16031611
1604 if !Self::is_owner_or_admin_permissions(collection, sender) {1612 if !Self::is_owner_or_admin_permissions(collection, sender)? {
1605 ensure!(collection.mint_mode, Error::<T>::PublicMintingNotAllowed);1613 ensure!(collection.mint_mode, Error::<T>::PublicMintingNotAllowed);
1606 Self::check_white_list(collection, owner)?;1614 Self::check_white_list(collection, owner)?;
1607 Self::check_white_list(collection, sender)?;1615 Self::check_white_list(collection, sender)?;
1616 ) -> DispatchResult {1624 ) -> DispatchResult {
1617 match target_collection.mode {1625 match target_collection.mode {
1618 CollectionMode::NFT => {1626 CollectionMode::NFT => {
1619 if let CreateItemData::NFT(data) = data {1627 if !matches!(data, CreateItemData::NFT(_)) {
1620 // check sizes
1621 ensure!(
1622 ChainLimit::get().custom_data_limit >= data.const_data.len() as u32,
1623 Error::<T>::TokenConstDataLimitExceeded
1624 );
1625 ensure!(
1626 ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32,
1627 Error::<T>::TokenVariableDataLimitExceeded
1628 );
1629 } else {
1630 fail!(Error::<T>::NotNftDataUsedToMintNftCollectionToken);1628 fail!(Error::<T>::NotNftDataUsedToMintNftCollectionToken);
1631 }1629 }
1632 }1630 }
1633 CollectionMode::Fungible(_) => {1631 CollectionMode::Fungible(_) => {
1634 if let CreateItemData::Fungible(_) = data {1632 if !matches!(data, CreateItemData::Fungible(_)) {
1635 } else {
1636 fail!(Error::<T>::NotFungibleDataUsedToMintFungibleCollectionToken);1633 fail!(Error::<T>::NotFungibleDataUsedToMintFungibleCollectionToken);
1637 }1634 }
1638 }1635 }
1639 CollectionMode::ReFungible => {1636 CollectionMode::ReFungible => {
1640 if let CreateItemData::ReFungible(data) = data {1637 if let CreateItemData::ReFungible(data) = data {
1641 // check sizes
1642 ensure!(
1643 ChainLimit::get().custom_data_limit >= data.const_data.len() as u32,
1644 Error::<T>::TokenConstDataLimitExceeded
1645 );
1646 ensure!(
1647 ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32,
1648 Error::<T>::TokenVariableDataLimitExceeded
1649 );
1650
1651 // Check refungibility limits1638 // Check refungibility limits
1652 ensure!(1639 ensure!(
1675 CreateItemData::NFT(data) => {1662 CreateItemData::NFT(data) => {
1676 let item = NftItemType {1663 let item = NftItemType {
1677 owner: owner.clone(),1664 owner: owner.clone(),
1678 const_data: data.const_data,1665 const_data: data.const_data.into_inner(),
1679 variable_data: data.variable_data,1666 variable_data: data.variable_data.into_inner(),
1680 };1667 };
16811668
1682 Self::add_nft_item(collection, item)?;1669 Self::add_nft_item(collection, item)?;
16921679
1693 let item = ReFungibleItemType {1680 let item = ReFungibleItemType {
1694 owner: owner_list,1681 owner: owner_list,
1695 const_data: data.const_data,1682 const_data: data.const_data.into_inner(),
1696 variable_data: data.variable_data,1683 variable_data: data.variable_data.into_inner(),
1697 };1684 };
16981685
1699 Self::add_refungible_item(collection, item)?;1686 Self::add_refungible_item(collection, item)?;
1711 let collection_id = collection.id;1698 let collection_id = collection.id;
17121699
1713 // Does new owner already have an account?1700 // Does new owner already have an account?
1701 collection.consume_sload()?;
1714 let balance: u128 = <FungibleItemList<T>>::get(collection_id, owner.as_sub()).value;1702 let balance: u128 = <FungibleItemList<T>>::get(collection_id, owner.as_sub()).value;
17151703
1716 // Mint1704 // Mint
1717 let item = FungibleItemType {1705 let item = FungibleItemType {
1718 value: balance.checked_add(value).ok_or(Error::<T>::NumOverflow)?,1706 value: balance.checked_add(value).ok_or(Error::<T>::NumOverflow)?,
1719 };1707 };
1708 collection.consume_sstore()?;
1720 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), item);1709 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), item);
17211710
1722 // Update balance1711 // Update balance
1712 collection.consume_sload()?;
1723 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1713 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())
1724 .checked_add(value)1714 .checked_add(value)
1725 .ok_or(Error::<T>::NumOverflow)?;1715 .ok_or(Error::<T>::NumOverflow)?;
1716 collection.consume_sstore()?;
1726 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);1717 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);
17271718
1719 collection.log(ERC20Events::Transfer {
1720 from: H160::default(),
1721 to: *owner.as_eth(),
1722 value: value.into(),
1723 })?;
1728 Self::deposit_event(RawEvent::ItemCreated(collection_id, 0, owner.clone()));1724 Self::deposit_event(RawEvent::ItemCreated(collection_id, 0, owner.clone()));
1729 Ok(())1725 Ok(())
1730 }1726 }
1746 let value = item_owner.fraction;1742 let value = item_owner.fraction;
1747 let owner = item_owner.owner.clone();1743 let owner = item_owner.owner.clone();
17481744
1749 Self::add_token_index(collection_id, current_index, &owner)?;1745 Self::add_token_index(collection, current_index, &owner)?;
17501746
1751 <ItemListIndex>::insert(collection_id, current_index);1747 <ItemListIndex>::insert(collection_id, current_index);
1752 <ReFungibleItemList<T>>::insert(collection_id, current_index, itemcopy);1748 <ReFungibleItemList<T>>::insert(collection_id, current_index, itemcopy);
1772 .ok_or(Error::<T>::NumOverflow)?;1768 .ok_or(Error::<T>::NumOverflow)?;
17731769
1774 let item_owner = item.owner.clone();1770 let item_owner = item.owner.clone();
1775 Self::add_token_index(collection_id, current_index, &item.owner)?;1771 Self::add_token_index(collection, current_index, &item.owner)?;
17761772
1777 <ItemListIndex>::insert(collection_id, current_index);1773 <ItemListIndex>::insert(collection_id, current_index);
1778 <NftItemList<T>>::insert(collection_id, current_index, item);1774 <NftItemList<T>>::insert(collection_id, current_index, item);
1810 .iter()1806 .iter()
1811 .find(|&i| i.owner == *owner)1807 .find(|&i| i.owner == *owner)
1812 .ok_or(Error::<T>::TokenNotFound)?;1808 .ok_or(Error::<T>::TokenNotFound)?;
1813 Self::remove_token_index(collection_id, item_id, owner)?;1809 Self::remove_token_index(collection, item_id, owner)?;
18141810
1815 // update balance1811 // update balance
1816 let new_balance = <Balance<T>>::get(collection_id, rft_balance.owner.as_sub())1812 let new_balance = <Balance<T>>::get(collection_id, rft_balance.owner.as_sub())
18431839
1844 let item =1840 let item =
1845 <NftItemList<T>>::get(collection_id, item_id).ok_or(Error::<T>::TokenNotFound)?;1841 <NftItemList<T>>::get(collection_id, item_id).ok_or(Error::<T>::TokenNotFound)?;
1846 Self::remove_token_index(collection_id, item_id, &item.owner)?;1842 Self::remove_token_index(collection, item_id, &item.owner)?;
18471843
1848 // update balance1844 // update balance
1849 let new_balance = <Balance<T>>::get(collection_id, item.owner.as_sub())1845 let new_balance = <Balance<T>>::get(collection_id, item.owner.as_sub())
1853 <NftItemList<T>>::remove(collection_id, item_id);1849 <NftItemList<T>>::remove(collection_id, item_id);
1854 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);1850 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);
18551851
1852 collection.log(ERC721Events::Transfer {
1853 from: *item.owner.as_eth(),
1854 to: H160::default(),
1855 token_id: item_id.into(),
1856 })?;
1856 Self::deposit_event(RawEvent::ItemDestroyed(collection.id, item_id));1857 Self::deposit_event(RawEvent::ItemDestroyed(collection.id, item_id));
1857 Ok(())1858 Ok(())
1858 }1859 }
1909 fn is_owner_or_admin_permissions(1910 fn is_owner_or_admin_permissions(
1910 collection: &CollectionHandle<T>,1911 collection: &CollectionHandle<T>,
1911 subject: &T::CrossAccountId,1912 subject: &T::CrossAccountId,
1912 ) -> bool {1913 ) -> Result<bool, DispatchError> {
1914 collection.consume_sload()?;
1913 *subject.as_sub() == collection.owner1915 Ok(*subject.as_sub() == collection.owner
1914 || <AdminList<T>>::get(collection.id).contains(subject)1916 || <AdminList<T>>::get(collection.id).contains(subject))
1915 }1917 }
19161918
1917 fn check_owner_or_admin_permissions(1919 fn check_owner_or_admin_permissions(
1918 collection: &CollectionHandle<T>,1920 collection: &CollectionHandle<T>,
1919 subject: &T::CrossAccountId,1921 subject: &T::CrossAccountId,
1920 ) -> DispatchResult {1922 ) -> DispatchResult {
1921 ensure!(1923 ensure!(
1922 Self::is_owner_or_admin_permissions(collection, subject),1924 Self::is_owner_or_admin_permissions(collection, subject)?,
1923 Error::<T>::NoPermission1925 Error::<T>::NoPermission
1924 );1926 );
19251927
1926 Ok(())1928 Ok(())
1927 }1929 }
19281930
1929 fn owned_amount(1931 fn owned_amount(
1932 subject: &T::CrossAccountId,
1933 collection: &CollectionHandle<T>,
1934 item_id: TokenId,
1935 ) -> Result<Option<u128>, DispatchError> {
1936 collection.consume_sload()?;
1937 Ok(Self::owned_amount_unchecked(subject, collection, item_id))
1938 }
1939
1940 fn owned_amount_unchecked(
1930 subject: &T::CrossAccountId,1941 subject: &T::CrossAccountId,
1931 target_collection: &CollectionHandle<T>,1942 target_collection: &CollectionHandle<T>,
1932 item_id: TokenId,1943 item_id: TokenId,
1953 subject: &T::CrossAccountId,1964 subject: &T::CrossAccountId,
1954 target_collection: &CollectionHandle<T>,1965 target_collection: &CollectionHandle<T>,
1955 item_id: TokenId,1966 item_id: TokenId,
1956 ) -> bool {1967 ) -> Result<bool, DispatchError> {
1957 match target_collection.mode {1968 Ok(match target_collection.mode {
1958 CollectionMode::Fungible(_) => true,1969 CollectionMode::Fungible(_) => true,
1959 _ => Self::owned_amount(subject, target_collection, item_id).is_some(),1970 _ => Self::owned_amount(subject, target_collection, item_id)?.is_some(),
1960 }1971 })
1961 }1972 }
19621973
1963 fn check_white_list(1974 fn check_white_list(
1964 collection: &CollectionHandle<T>,1975 collection: &CollectionHandle<T>,
1965 address: &T::CrossAccountId,1976 address: &T::CrossAccountId,
1966 ) -> DispatchResult {1977 ) -> DispatchResult {
1967 let collection_id = collection.id;1978 collection.consume_sload()?;
1968
1969 let mes = Error::<T>::AddresNotInWhiteList;
1970 ensure!(1979 ensure!(
1971 <WhiteList<T>>::contains_key(collection_id, address.as_sub()),1980 <WhiteList<T>>::contains_key(collection.id, address.as_sub()),
1972 mes1981 Error::<T>::AddresNotInWhiteList,
1973 );1982 );
1974
1975 Ok(())1983 Ok(())
2000 ) -> DispatchResult {2008 ) -> DispatchResult {
2001 let collection_id = collection.id;2009 let collection_id = collection.id;
20022010
2011 collection.consume_sload()?;
2012 collection.consume_sload()?;
2013 let mut recipient_balance = <FungibleItemList<T>>::get(collection_id, recipient.as_sub());
2003 let mut balance = <FungibleItemList<T>>::get(collection_id, owner.as_sub());2014 let mut balance = <FungibleItemList<T>>::get(collection_id, owner.as_sub());
2015
2016 recipient_balance.value = recipient_balance
2017 .value
2018 .checked_add(value)
2019 .ok_or(Error::<T>::NumOverflow)?;
2004 ensure!(balance.value >= value, Error::<T>::TokenValueTooLow);2020 balance.value = balance
20052021 .value
2006 // Send balance to recipient (updates balanceOf of recipient)2022 .checked_sub(value)
2023 .ok_or(Error::<T>::TokenValueTooLow)?;
2024
2025 // update balanceOf
2007 Self::add_fungible_item(collection, recipient, value)?;2026 collection.consume_sstore()?;
20082027 collection.consume_sstore()?;
2009 // update balanceOf of sender2028 if balance.value != 0 {
2010 <Balance<T>>::insert(collection_id, owner.as_sub(), balance.value - value);2029 <Balance<T>>::insert(collection_id, owner.as_sub(), balance.value);
2030 } else {
2031 <Balance<T>>::remove(collection_id, owner.as_sub());
2032 }
2033 <Balance<T>>::insert(collection_id, recipient.as_sub(), recipient_balance.value);
20112034
2012 // Reduce or remove sender2035 // Reduce or remove sender
2036 collection.consume_sstore()?;
2037 collection.consume_sstore()?;
2013 if balance.value == value {2038 if balance.value != 0 {
2014 <FungibleItemList<T>>::remove(collection_id, owner.as_sub());2039 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), balance);
2015 } else {2040 } else {
2016 balance.value -= value;
2017 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), balance);2041 <FungibleItemList<T>>::remove(collection_id, owner.as_sub());
2018 }2042 }
2043 <FungibleItemList<T>>::insert(collection_id, recipient.as_sub(), recipient_balance);
20192044
2020 collection.log(ERC20Events::Transfer {2045 collection.log(ERC20Events::Transfer {
2021 from: *owner.as_eth(),2046 from: *owner.as_eth(),
2041 new_owner: T::CrossAccountId,2066 new_owner: T::CrossAccountId,
2042 ) -> DispatchResult {2067 ) -> DispatchResult {
2043 let collection_id = collection.id;2068 let collection_id = collection.id;
2069 collection.consume_sload()?;
2044 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id)2070 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id)
2045 .ok_or(Error::<T>::TokenNotFound)?;2071 .ok_or(Error::<T>::TokenNotFound)?;
20462072
20532079
2054 ensure!(amount >= value, Error::<T>::TokenValueTooLow);2080 ensure!(amount >= value, Error::<T>::TokenValueTooLow);
20552081
2082 collection.consume_sload()?;
2056 // update balance2083 // update balance
2057 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2084 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())
2058 .checked_sub(value)2085 .checked_sub(value)
2059 .ok_or(Error::<T>::NumOverflow)?;2086 .ok_or(Error::<T>::NumOverflow)?;
2087 collection.consume_sstore()?;
2060 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);2088 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);
20612089
2090 collection.consume_sload()?;
2062 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2091 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())
2063 .checked_add(value)2092 .checked_add(value)
2064 .ok_or(Error::<T>::NumOverflow)?;2093 .ok_or(Error::<T>::NumOverflow)?;
2094 collection.consume_sstore()?;
2065 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);2095 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);
20662096
2067 let old_owner = item.owner.clone();2097 let old_owner = item.owner.clone();
2078 .find(|i| i.owner == owner)2108 .find(|i| i.owner == owner)
2079 .expect("old owner does present in refungible")2109 .expect("old owner does present in refungible")
2080 .owner = new_owner.clone();2110 .owner = new_owner.clone();
2111 collection.consume_sstore()?;
2081 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2112 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);
20822113
2083 // update index collection2114 // update index collection
2084 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;2115 Self::move_token_index(collection, item_id, &old_owner, &new_owner)?;
2085 } else {2116 } else {
2086 new_full_item2117 new_full_item
2087 .owner2118 .owner
2105 owner: new_owner.clone(),2136 owner: new_owner.clone(),
2106 fraction: value,2137 fraction: value,
2107 });2138 });
2108 Self::add_token_index(collection_id, item_id, &new_owner)?;2139 Self::add_token_index(collection, item_id, &new_owner)?;
2109 }2140 }
21102141
2142 collection.consume_sstore()?;
2111 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2143 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);
2112 }2144 }
21132145
2129 new_owner: T::CrossAccountId,2161 new_owner: T::CrossAccountId,
2130 ) -> DispatchResult {2162 ) -> DispatchResult {
2131 let collection_id = collection.id;2163 let collection_id = collection.id;
2164 collection.consume_sload()?;
2132 let mut item =2165 let mut item =
2133 <NftItemList<T>>::get(collection_id, item_id).ok_or(Error::<T>::TokenNotFound)?;2166 <NftItemList<T>>::get(collection_id, item_id).ok_or(Error::<T>::TokenNotFound)?;
21342167
2135 ensure!(sender == item.owner, Error::<T>::MustBeTokenOwner);2168 ensure!(sender == item.owner, Error::<T>::MustBeTokenOwner);
21362169
2170 collection.consume_sload()?;
2137 // update balance2171 // update balance
2138 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2172 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())
2139 .checked_sub(1)2173 .checked_sub(1)
2140 .ok_or(Error::<T>::NumOverflow)?;2174 .ok_or(Error::<T>::NumOverflow)?;
2175 collection.consume_sstore()?;
2141 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);2176 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);
21422177
2178 collection.consume_sload()?;
2143 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2179 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())
2144 .checked_add(1)2180 .checked_add(1)
2145 .ok_or(Error::<T>::NumOverflow)?;2181 .ok_or(Error::<T>::NumOverflow)?;
2182 collection.consume_sstore()?;
2146 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);2183 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);
21472184
2148 // change owner2185 // change owner
2149 let old_owner = item.owner.clone();2186 let old_owner = item.owner.clone();
2150 item.owner = new_owner.clone();2187 item.owner = new_owner.clone();
2188 collection.consume_sstore()?;
2151 <NftItemList<T>>::insert(collection_id, item_id, item);2189 <NftItemList<T>>::insert(collection_id, item_id, item);
21522190
2153 // update index collection2191 // update index collection
2154 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;2192 Self::move_token_index(collection, item_id, &old_owner, &new_owner)?;
21552193
2156 collection.log(ERC721Events::Transfer {2194 collection.log(ERC721Events::Transfer {
2157 from: *sender.as_eth(),2195 from: *sender.as_eth(),
2232 let current_index = <ItemListIndex>::get(collection_id).checked_add(1).unwrap();2270 let current_index = <ItemListIndex>::get(collection_id).checked_add(1).unwrap();
22332271
2234 Self::add_token_index(collection_id, current_index, &item.owner).unwrap();2272 Self::add_token_index(
2273 &CollectionHandle::get(collection_id).unwrap(),
2274 current_index,
2275 &item.owner,
2276 )
2277 .unwrap();
22352278
2251 let current_index = <ItemListIndex>::get(collection_id).checked_add(1).unwrap();2294 let current_index = <ItemListIndex>::get(collection_id).checked_add(1).unwrap();
22522295
2253 Self::add_token_index(collection_id, current_index, owner).unwrap();2296 Self::add_token_index(
2297 &CollectionHandle::get(collection_id).unwrap(),
2298 current_index,
2299 owner,
2300 )
2301 .unwrap();
22542302
2272 let owner = item.owner.first().unwrap().owner.clone();2320 let owner = item.owner.first().unwrap().owner.clone();
22732321
2274 Self::add_token_index(collection_id, current_index, &owner).unwrap();2322 Self::add_token_index(
2323 &CollectionHandle::get(collection_id).unwrap(),
2324 current_index,
2325 &owner,
2326 )
2327 .unwrap();
22752328
2283 }2336 }
22842337
2285 fn add_token_index(2338 fn add_token_index(
2286 collection_id: CollectionId,2339 collection: &CollectionHandle<T>,
2287 item_index: TokenId,2340 item_index: TokenId,
2288 owner: &T::CrossAccountId,2341 owner: &T::CrossAccountId,
2289 ) -> DispatchResult {2342 ) -> DispatchResult {
2290 // add to account limit2343 // add to account limit
2344 collection.consume_sload()?;
2291 if <AccountItemCount<T>>::contains_key(owner.as_sub()) {2345 if <AccountItemCount<T>>::contains_key(owner.as_sub()) {
2292 // bound Owned tokens by a single address2346 // bound Owned tokens by a single address
2347 collection.consume_sload()?;
2293 let count = <AccountItemCount<T>>::get(owner.as_sub());2348 let count = <AccountItemCount<T>>::get(owner.as_sub());
2294 ensure!(2349 ensure!(
2295 count < ChainLimit::get().account_token_ownership_limit,2350 count < ACCOUNT_TOKEN_OWNERSHIP_LIMIT,
2296 Error::<T>::AddressOwnershipLimitExceeded2351 Error::<T>::AddressOwnershipLimitExceeded
2297 );2352 );
22982353
2354 collection.consume_sstore()?;
2299 <AccountItemCount<T>>::insert(2355 <AccountItemCount<T>>::insert(
2300 owner.as_sub(),2356 owner.as_sub(),
2301 count.checked_add(1).ok_or(Error::<T>::NumOverflow)?,2357 count.checked_add(1).ok_or(Error::<T>::NumOverflow)?,
2302 );2358 );
2303 } else {2359 } else {
2360 collection.consume_sstore()?;
2304 <AccountItemCount<T>>::insert(owner.as_sub(), 1);2361 <AccountItemCount<T>>::insert(owner.as_sub(), 1);
2305 }2362 }
23062363
2364 collection.consume_sload()?;
2307 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.as_sub());2365 let list_exists = <AddressTokens<T>>::contains_key(collection.id, owner.as_sub());
2308 if list_exists {2366 if list_exists {
2367 collection.consume_sload()?;
2309 let mut list = <AddressTokens<T>>::get(collection_id, owner.as_sub());2368 let mut list = <AddressTokens<T>>::get(collection.id, owner.as_sub());
2310 let item_contains = list.contains(&item_index.clone());2369 let item_contains = list.contains(&item_index.clone());
23112370
2312 if !item_contains {2371 if !item_contains {
2313 list.push(item_index);2372 list.push(item_index);
2314 }2373 }
23152374
2375 collection.consume_sstore()?;
2316 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), list);2376 <AddressTokens<T>>::insert(collection.id, owner.as_sub(), list);
2317 } else {2377 } else {
2318 let itm = vec![item_index];2378 let itm = vec![item_index];
2379 collection.consume_sstore()?;
2319 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), itm);2380 <AddressTokens<T>>::insert(collection.id, owner.as_sub(), itm);
2320 }2381 }
23212382
2322 Ok(())2383 Ok(())
2323 }2384 }
23242385
2325 fn remove_token_index(2386 fn remove_token_index(
2326 collection_id: CollectionId,2387 collection: &CollectionHandle<T>,
2327 item_index: TokenId,2388 item_index: TokenId,
2328 owner: &T::CrossAccountId,2389 owner: &T::CrossAccountId,
2329 ) -> DispatchResult {2390 ) -> DispatchResult {
2330 // update counter2391 // update counter
2392 collection.consume_sload()?;
2393 collection.consume_sstore()?;
2331 <AccountItemCount<T>>::insert(2394 <AccountItemCount<T>>::insert(
2332 owner.as_sub(),2395 owner.as_sub(),
2333 <AccountItemCount<T>>::get(owner.as_sub())2396 <AccountItemCount<T>>::get(owner.as_sub())
2334 .checked_sub(1)2397 .checked_sub(1)
2335 .ok_or(Error::<T>::NumOverflow)?,2398 .ok_or(Error::<T>::NumOverflow)?,
2336 );2399 );
23372400
2401 collection.consume_sload()?;
2338 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.as_sub());2402 let list_exists = <AddressTokens<T>>::contains_key(collection.id, owner.as_sub());
2339 if list_exists {2403 if list_exists {
2404 collection.consume_sload()?;
2340 let mut list = <AddressTokens<T>>::get(collection_id, owner.as_sub());2405 let mut list = <AddressTokens<T>>::get(collection.id, owner.as_sub());
2341 let item_contains = list.contains(&item_index.clone());2406 let item_contains = list.contains(&item_index.clone());
23422407
2343 if item_contains {2408 if item_contains {
2344 list.retain(|&item| item != item_index);2409 list.retain(|&item| item != item_index);
2410 collection.consume_sstore()?;
2345 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), list);2411 <AddressTokens<T>>::insert(collection.id, owner.as_sub(), list);
2346 }2412 }
2347 }2413 }
23482414
2349 Ok(())2415 Ok(())
2350 }2416 }
23512417
2352 fn move_token_index(2418 fn move_token_index(
2353 collection_id: CollectionId,2419 collection: &CollectionHandle<T>,
2354 item_index: TokenId,2420 item_index: TokenId,
2355 old_owner: &T::CrossAccountId,2421 old_owner: &T::CrossAccountId,
2356 new_owner: &T::CrossAccountId,2422 new_owner: &T::CrossAccountId,
2357 ) -> DispatchResult {2423 ) -> DispatchResult {
2358 Self::remove_token_index(collection_id, item_index, old_owner)?;2424 Self::remove_token_index(collection, item_index, old_owner)?;
2359 Self::add_token_index(collection_id, item_index, new_owner)?;2425 Self::add_token_index(collection, item_index, new_owner)?;
23602426
2361 Ok(())2427 Ok(())
2362 }2428 }
modifiedpallets/nft/src/mock.rsdiffbeforeafterboth
129 fn as_sub(&self) -> &u64 {129 fn as_sub(&self) -> &u64 {
130 &self.0130 &self.0
131 }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(&eth.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.1
modifiedpallets/nft/src/sponsorship.rsdiffbeforeafterboth
1use 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};
1316
14pub 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();
5153
52 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_timeout
64 } else {66 } else {
65 limits.nft_sponsor_transfer_timeout67 NFT_SPONSOR_TRANSFER_TIMEOUT
66 };68 };
6769
68 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_timeout
86 } else {88 } else {
87 limits.fungible_sponsor_transfer_timeout89 FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT
88 };90 };
8991
90 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_timeout
109 } else {111 } else {
110 limits.refungible_sponsor_transfer_timeout112 REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT
111 };113 };
112114
113 let mut sponsored = true;115 let mut sponsored = true;
modifiedpallets/nft/src/tests.rsdiffbeforeafterboth
1// Tests to be written here1// Tests to be written here
2use 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;
1111
12fn default_collection_numbers_limit() -> u32 {
13 10
14}
15
16fn 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}
33
34fn 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}
4018
4422
45fn 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);
11895
133#[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();
137
138 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);
161135
162 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}
169143
172#[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();
176
177 create_test_collection(&CollectionMode::NFT, 1);149 create_test_collection(&CollectionMode::NFT, 1);
178150
179 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}
200172
201#[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);
206177
207 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();
226
227 create_test_collection(&CollectionMode::ReFungible, 1);196 create_test_collection(&CollectionMode::ReFungible, 1);
228197
229 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();
266
267 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);234 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
268235
269 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();
306
307 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);272 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
308273
309 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();
348
349 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);312 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
350313
351 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();
445
446 let collection_id = create_test_collection(&CollectionMode::NFT, 1);407 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
447408
448 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();
468
469 let collection_id = create_test_collection(&CollectionMode::NFT, 1);428 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
470429
471 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();
507
508 let collection_id = create_test_collection(&CollectionMode::NFT, 1);465 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
509466
510 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());
515472
516 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();
577
578 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);533 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
579534
580 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();
640
641 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);594 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
642595
643 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();
714
715 let collection_id = create_test_collection(&CollectionMode::NFT, 1);666 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
716667
717 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();
734
735 let collection_id = create_test_collection(&CollectionMode::NFT, 1);684 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
736685
737 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();
746
747 let collection_id = create_test_collection(&CollectionMode::NFT, 1);694 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
748695
749 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();
777
778 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);723 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
779724
780 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();
808
809 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);
811754
851#[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();
855
856 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();
883
884 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();
920
921 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();
973
974 let collection_id = create_test_collection(&CollectionMode::NFT, 1);909 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
975910
976 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();
991
992 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();
1055
1056 let collection_id = create_test_collection(&CollectionMode::NFT, 1);987 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1057988
1058 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();
1072
1073 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();
1095
1096 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1023 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
10971024
1098 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();
1110
1111 let origin1 = Origin::signed(1);1036 let origin1 = Origin::signed(1);
11121037
1113 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();
1124
1125 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1048 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
11261049
1127 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();
1144
1145 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);
11471068
1162#[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();
1166
1167 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1086 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
11681087
1169 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();
1188
1189 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();
1217
1218 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);
12401154
1241 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();
1252
1253 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();
1276
1277 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);
12791189
1300#[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();
1304
1305 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1213 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
13061214
1307 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();
1334
1335 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);
13371243
1381#[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();
1385
1386 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1290 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
13871291
1388 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();
1415
1416 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1318 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
14171319
1418 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();
1467
1468 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1368 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
14691369
1470 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();
1492
1493 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1391 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
14941392
1495 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();
1520
1521 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1417 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
15221418
1523 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();
1552
1553 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1447 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
15541448
1555 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();
1602
1603 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);
16051497
1623#[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();
1627
1628 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1518 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
16291519
1630 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();
1664
1665 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1553 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
16661554
1667 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();
1698
1699 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1585 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
17001586
1701 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();
1727
1728 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1612 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
17291613
1730 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();
1753
1754 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1636 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
17551637
1756 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();
1790
1791 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1671 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
17921672
1793 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();
1819
1820 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1698 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
18211699
1822 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();
1855
1856 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();
1865
1866 let origin1 = Origin::signed(1);1740 let origin1 = Origin::signed(1);
18671741
1868 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 }
18711745
1891#[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();
1895
1896 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1768 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
18971769
1898 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 ));
1923
1924 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1780 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
19251781
1926 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());
19291783
1784 for _ in 0..ACCOUNT_TOKEN_OWNERSHIP_LIMIT {
1785 let data = default_nft_data();
1786 create_test_item(collection_id, &data.clone().into());
1787 }
1788
1789 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>::AddressOwnershipLimitExceeded
1938#[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 ));
1956
1957 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1801 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
19581802
1959 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 ));
1993
1994 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1822 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
19951823
1996 let origin1 = Origin::signed(1);1824 let origin1 = Origin::signed(1);
19971825
1998 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>::CollectionAdminsLimitExceeded
2006 );1840 );
2007 });1841 });
2008}1842}
2009
2010// 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 ));
2029
2030 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2031
2032 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 });
2037
2038 assert_noop!(
2039 TemplateModule::create_item(origin1, collection_id, account(1), too_big_const_data),
2040 Error::<Test>::TokenConstDataLimitExceeded
2041 );
2042 });
2043}
2044
2045// 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 ));
2064
2065 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2066
2067 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 });
2072
2073 assert_noop!(
2074 TemplateModule::create_item(origin1, collection_id, account(1), too_big_const_data),
2075 Error::<Test>::TokenVariableDataLimitExceeded
2076 );
2077 });
2078}
2079
2080// 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 ));
2099
2100 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2101
2102 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 });
2107
2108 assert_noop!(
2109 TemplateModule::create_item(origin1, collection_id, account(1), too_big_const_data),
2110 Error::<Test>::TokenConstDataLimitExceeded
2111 );
2112 });
2113}
2114
2115// 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 ));
2134
2135 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2136
2137 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 });
2142
2143 assert_noop!(
2144 TemplateModule::create_item(origin1, collection_id, account(1), too_big_const_data),
2145 Error::<Test>::TokenVariableDataLimitExceeded
2146 );
2147 });
2148}
2149// #endregion1843// #endregion
21501844
2151#[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();
2155
2156 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1848 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
21571849
2158 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();
2184
2185 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1875 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
21861876
2187 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();
2213
2214 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1902 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
22151903
2216 let origin1 = Origin::signed(1);1904 let origin1 = Origin::signed(1);
22171905
2218 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());
22201908
2221 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();
2242
2243 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);1929 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
22441930
2245 let origin1 = Origin::signed(1);1931 let origin1 = Origin::signed(1);
22461932
2247 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());
22491935
2250 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();
2271
2272 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);1956 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
22731957
2274 let origin1 = Origin::signed(1);1958 let origin1 = Origin::signed(1);
22751959
2276 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());
22781962
2279 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>::CantStoreMetadataInFungibleTokens
2287#[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 ));
2305
2306 let collection_id = create_test_collection(&CollectionMode::NFT, 1);1974 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
23071975
2308 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 ));
2339
2340 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);1992 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
23411993
2342 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();
2359
2360 let origin1 = Origin::signed(1);2010 let origin1 = Origin::signed(1);
23612011
2362 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();
2386
2387 let origin1 = Origin::signed(1);2035 let origin1 = Origin::signed(1);
23882036
2389 let collection_id = create_test_collection(&CollectionMode::NFT, 1);2037 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
addedpallets/nft/src/weights.rsdiffbeforeafterboth

no changes

modifiedprimitives/nft/Cargo.tomldiffbeforeafterboth
9version = '0.9.0'9version = '0.9.0'
1010
11[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"
1821
19[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 = []
modifiedprimitives/nft/src/lib.rsdiffbeforeafterboth
1#![cfg_attr(not(feature = "std"), no_std)]1#![cfg_attr(not(feature = "std"), no_std)]
22
3#[cfg(feature = "serde")]
3pub use serde::{Serialize, Deserialize};4pub use serde::{Serialize, Deserialize};
45
5use 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;
2225
23pub 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;
30
31pub const COLLECTION_NUMBER_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) {
32 100000
33} else {
34 10
35};
36pub const CUSTOM_DATA_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) {
37 2048
38} else {
39 10
40};
41pub const COLLECTION_ADMINS_LIMIT: u64 = 5;
42pub const ACCOUNT_TOKEN_OWNERSHIP_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) {
43 1000000
44} else {
45 10
46};
47
48// Timeouts for item types in passed blocks
49pub const NFT_SPONSOR_TRANSFER_TIMEOUT: u32 = 5;
50pub const FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT: u32 = 5;
51pub const REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT: u32 = 5;
52
53// Schema limits
54pub const OFFCHAIN_SCHEMA_LIMIT: u32 = 1024;
55pub const VARIABLE_ON_CHAIN_SCHEMA_LIMIT: u32 = 1024;
56pub const CONST_ON_CHAIN_SCHEMA_LIMIT: u32 = 1024;
57
58pub const MAX_COLLECTION_NAME_LENGTH: usize = 64;
59pub const MAX_COLLECTION_DESCRIPTION_LENGTH: usize = 256;
60pub const MAX_TOKEN_PREFIX_LENGTH: usize = 16;
61
62/// How much items can be created per single
63/// create_many call
64pub const MAX_ITEMS_PER_BATCH: u32 = 200;
65
66parameter_types! {
67 pub const CustomDataLimit: u32 = CUSTOM_DATA_LIMIT;
68}
2769
28pub type CollectionId = u32;70pub type CollectionId = u32;
29pub type TokenId = u32;71pub type TokenId = u32;
30pub type DecimalPoints = u8;72pub type DecimalPoints = u8;
3173
32#[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}
62104
63#[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}
74116
75#[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}
86128
87#[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}
93135
94#[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 sender
98 Disabled,140 Disabled,
128}170}
129171
130#[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}
149191
150#[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}
157199
158#[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}
163205
164#[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}
171213
172#[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}
202244
203#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]245/// BoundedVec doesn't supports serde
204#[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;
255
207 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 where
209 pub custom_data_limit: u32,258 D: ser::Serializer,
210
211 // Timeouts for item types in passed blocks
212 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 }
264
214 pub refungible_sponsor_transfer_timeout: u32,265 pub fn deserialize<'de, D, V, S>(deserializer: D) -> Result<BoundedVec<V, S>, D::Error>
215266 where
216 // Schema limits
217 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}
221277
222#[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}
228289
229#[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}
234295
235#[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}
242308
243#[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),
modifiedruntime/Cargo.tomldiffbeforeafterboth
23 '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]
8796
88################################################################################97################################################################################
89# Substrate Dependencies98# Substrate Dependencies
378# local dependencies387# local dependencies
379388
380[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" }
modifiedruntime/src/chain_extension.rsdiffbeforeafterboth
6//6//
77
8use codec::{Decode, Encode};8use codec::{Decode, Encode};
9use max_encoded_len::MaxEncodedLen;
10use derivative::Derivative;
911
10pub 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::*;
22
23use crate::Vec;
2424
25/// Create item parameters25/// Create item parameters
26#[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}
3232
33/// Transfer parameters33/// Transfer parameters
34#[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}
4141
42#[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}
4850
49#[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}
5658
57#[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}
6567
66#[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}
7276
73#[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}
7983
8286
83pub type NftWeightInfoOf<C> = <C as pallet_nft::Config>::WeightInfo;87pub type NftWeightInfoOf<C> = <C as pallet_nft::Config>::WeightInfo;
88
89pub type AccountIdOf<C> = <C as SysConfig>::AccountId;
8490
85impl<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())?;
98104
99 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 )?;
108114
109 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 Item
114 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()))?;
117123
118 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 )?;
126132
127 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 items
132 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 )?;
146152
147 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 // Approve
152 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())?;
155161
156 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 )?;
165171
166 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 from
171 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())?;
174180
175 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 )?;
185191
186 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 )?;
203209
204 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 whitelist
209 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())?;
212218
213 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 )?;
221227
222 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")),
modifiedruntime/src/lib.rsdiffbeforeafterboth
72use sp_runtime::{72use sp_runtime::{
73 traits::{Dispatchable},73 traits::{Dispatchable},
74};74};
75// use pallet_contracts::chain_extension::UncheckedFrom;
7675
77// 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>;
122
123mod nft_weights;
124121
125/// 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 know
126/// 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 formats
253 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}
264
265impl pallet_evm_migration::Config for Runtime {
266 type WeightInfo = pallet_evm_migration::weights::SubstrateWeight<Self>;
267}
266268
267pub 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 * CENTIUNIQUE
380}382}
381383
382/*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 Mb
397 // 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 fifth
401 // 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}
408410
409impl 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*/
431433
432parameter_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 transfer
691/// 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>;
695697
696 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);
825828
1181 let mut batches = Vec::<BenchmarkBatch>::new();1184 let mut batches = Vec::<BenchmarkBatch>::new();
1182 let params = (&config, &whitelist);1185 let params = (&config, &whitelist);
11831186
1187 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);
11861190
deletedruntime/src/nft_weights.rsdiffbeforeafterboth

no changes

modifiedtests/package.jsondiffbeforeafterboth
4 "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",
modifiedtests/src/addCollectionAdmin.test.tsdiffbeforeafterboth
117 ];117 ];
118 const collectionId = await createCollectionExpectSuccess();118 const collectionId = await createCollectionExpectSuccess();
119119
120 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);
123122
124 for (let i = 0; i < chainAdminLimit; i++) {123 for (let i = 0; i < chainAdminLimit; i++) {
modifiedtests/src/addToWhiteList.test.tsdiffbeforeafterboth
17 enableWhiteListExpectSuccess,17 enableWhiteListExpectSuccess,
18 normalizeAccountId,18 normalizeAccountId,
19 addCollectionAdminExpectSuccess,19 addCollectionAdminExpectSuccess,
20 addToWhiteListExpectFail,
20} from './util/helpers';21} from './util/helpers';
2122
22chai.use(chaiAsPromised);23chai.use(chaiAsPromised);
98 });99 });
99 });100 });
101
102 it('Negative. Add to the white list by regular user', async () => {
103 const collectionId = await createCollectionExpectSuccess();
104 await addToWhiteListExpectFail(Bob, collectionId, Charlie.address);
105 });
100106
101 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();
modifiedtests/src/change-collection-owner.test.tsdiffbeforeafterboth
8import privateKey from './substrate/privateKey';8import privateKey from './substrate/privateKey';
9import { default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync } from './substrate/substrate-api';9import { default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync } from './substrate/substrate-api';
10import { createCollectionExpectSuccess, addCollectionAdminExpectSuccess } from './util/helpers';10import { createCollectionExpectSuccess,
11 addCollectionAdminExpectSuccess,
12 setCollectionSponsorExpectSuccess,
13 confirmSponsorshipExpectSuccess,
14 removeCollectionSponsorExpectSuccess,
15 enableWhiteListExpectSuccess,
16 setMintPermissionExpectSuccess,
17 destroyCollectionExpectSuccess,
18 setCollectionSponsorExpectFailure,
19 confirmSponsorshipExpectFailure,
20 removeCollectionSponsorExpectFailure,
21 enableWhiteListExpectFail,
22 setMintPermissionExpectFailure,
23 destroyCollectionExpectFailure,
24 setPublicAccessModeExpectSuccess,
25} from './util/helpers';
1126
12chai.use(chaiAsPromised);27chai.use(chaiAsPromised);
31 });46 });
32});47});
48
49describe('Integration Test changeCollectionOwner(collection_id, new_owner) special checks for exOwner:', () => {
50 it('Changing the owner of the collection is not allowed for the former owner', async () => {
51 await usingApi(async api => {
52 const collectionId = await createCollectionExpectSuccess();
53 const alice = privateKey('//Alice');
54 const bob = privateKey('//Bob');
55
56 const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
57 expect(collection.Owner).to.be.deep.eq(alice.address);
58
59 const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, bob.address);
60 await submitTransactionAsync(alice, changeOwnerTx);
61
62 const badChangeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, alice.address);
63 await expect(submitTransactionExpectFailAsync(alice, badChangeOwnerTx)).to.be.rejected;
64
65 const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();
66 expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(bob.address);
67 });
68 });
69
70 it('New collectionOwner has access to sponsorship management operations in the collection', async () => {
71 await usingApi(async api => {
72 const collectionId = await createCollectionExpectSuccess();
73 const alice = privateKey('//Alice');
74 const bob = privateKey('//Bob');
75 const charlie = privateKey('//Charlie');
76
77 const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
78 expect(collection.Owner).to.be.deep.eq(alice.address);
79
80 const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, bob.address);
81 await submitTransactionAsync(alice, changeOwnerTx);
82
83 const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();
84 expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(bob.address);
85
86 // After changing the owner of the collection, all privileged methods are available to the new owner
87 // The new owner of the collection has access to sponsorship management operations in the collection
88 await setCollectionSponsorExpectSuccess(collectionId, charlie.address, '//Bob');
89 await confirmSponsorshipExpectSuccess(collectionId, '//Charlie');
90 await removeCollectionSponsorExpectSuccess(collectionId, '//Bob');
91
92 // The new owner of the collection has access to operations for managing the collection parameters
93 const collectionLimits = {
94 AccountTokenOwnershipLimit: 1,
95 SponsoredMintSize: 1,
96 TokenLimit: 1,
97 SponsorTimeout: 1,
98 OwnerCanTransfer: true,
99 OwnerCanDestroy: true,
100 };
101 const tx1 = api.tx.nft.setCollectionLimits(
102 collectionId,
103 collectionLimits,
104 );
105 await submitTransactionAsync(bob, tx1);
106
107 await setPublicAccessModeExpectSuccess(bob, collectionId, 'WhiteList');
108 await enableWhiteListExpectSuccess(bob, collectionId);
109 await setMintPermissionExpectSuccess(bob, collectionId, true);
110 await destroyCollectionExpectSuccess(collectionId, '//Bob');
111 });
112 });
113
114 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);
129
130 const changeOwnerTx2 = api.tx.nft.changeCollectionOwner(collectionId, charlie.address);
131 await submitTransactionAsync(bob, changeOwnerTx2);
132
133 // ownership lost
134 const collectionAfterOwnerChange2: any = (await api.query.nft.collectionById(collectionId)).toJSON();
135 expect(collectionAfterOwnerChange2.Owner).to.be.deep.eq(charlie.address);
136 });
137 });
138});
33139
34describe('Negative Integration Test changeCollectionOwner(collection_id, new_owner):', () => {140describe('Negative Integration Test changeCollectionOwner(collection_id, new_owner):', () => {
35 it('Not owner can\'t change owner.', async () => {141 it('Not owner can\'t change owner.', async () => {
82 });188 });
83 });189 });
190
191 it('Former collectionOwner not allowed to sponsorship management operations in the collection', async () => {
192 await usingApi(async api => {
193 const collectionId = await createCollectionExpectSuccess();
194 const alice = privateKey('//Alice');
195 const bob = privateKey('//Bob');
196 const charlie = privateKey('//Charlie');
197
198 const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
199 expect(collection.Owner).to.be.deep.eq(alice.address);
200
201 const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, bob.address);
202 await submitTransactionAsync(alice, changeOwnerTx);
203
204 const badChangeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, alice.address);
205 await expect(submitTransactionExpectFailAsync(alice, badChangeOwnerTx)).to.be.rejected;
206
207 const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();
208 expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(bob.address);
209
210 await setCollectionSponsorExpectFailure(collectionId, charlie.address, '//Alice');
211 await confirmSponsorshipExpectFailure(collectionId, '//Alice');
212 await removeCollectionSponsorExpectFailure(collectionId, '//Alice');
213
214 const collectionLimits = {
215 AccountTokenOwnershipLimit: 1,
216 SponsoredMintSize: 1,
217 TokenLimit: 1,
218 SponsorTimeout: 1,
219 OwnerCanTransfer: true,
220 OwnerCanDestroy: true,
221 };
222 const tx1 = api.tx.nft.setCollectionLimits(
223 collectionId,
224 collectionLimits,
225 );
226 await expect(submitTransactionExpectFailAsync(alice, tx1)).to.be.rejected;
227
228 await enableWhiteListExpectFail(alice, collectionId);
229 await setMintPermissionExpectFailure(alice, collectionId, true);
230 await destroyCollectionExpectFailure(collectionId, '//Alice');
231 });
232 });
84});233});
85234
modifiedtests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth
34 await usingApi(async (api) => {34 await usingApi(async (api) => {
35 const collectionId = await createCollectionExpectSuccess();35 const collectionId = await createCollectionExpectSuccess();
3636
37 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);
4039
41 const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, Eve.address);40 const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, Eve.address);
addedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth

no changes

addedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth

no changes

addedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth

no changes

addedtests/src/eth/base.test.tsdiffbeforeafterboth

no changes

addedtests/src/eth/crossTransfer.test.tsdiffbeforeafterboth

no changes

modifiedtests/src/eth/fungible.test.tsdiffbeforeafterboth
4//4//
55
6import 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';
1111
192 });192 });
193});193});
194
195describe('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');
201
202 const owner = await createEthAccountWithBalance(api, web3);
203 const spender = createEthAccount(web3);
204
205 await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });
206
207 const address = collectionIdToAddress(collection);
208 const contract = new web3.eth.Contract(fungibleAbi as any, address, { from: owner, ...GAS_ARGS });
209
210 const cost = await recordEthFee(api, owner, () => contract.methods.approve(spender, 100).send({ from: owner }));
211 expect(cost < BigInt(0.2 * Number(UNIQUE)));
212 });
213
214 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);
222
223 await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });
224
225 const address = collectionIdToAddress(collection);
226 const contract = new web3.eth.Contract(fungibleAbi as any, address, { from: owner, ...GAS_ARGS });
227
228 await contract.methods.approve(spender, 100).send({ from: owner });
229
230 const cost = await recordEthFee(api, spender, () => contract.methods.transferFrom(owner, spender, 100).send({ from: spender }));
231 expect(cost < BigInt(0.2 * Number(UNIQUE)));
232 });
233
234 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');
239
240 const owner = await createEthAccountWithBalance(api, web3);
241 const receiver = createEthAccount(web3);
242
243 await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });
244
245 const address = collectionIdToAddress(collection);
246 const contract = new web3.eth.Contract(fungibleAbi as any, address, { from: owner, ...GAS_ARGS });
247
248 const cost = await recordEthFee(api, owner, () => contract.methods.transfer(receiver, 100).send({ from: owner }));
249 expect(cost < BigInt(0.2 * Number(UNIQUE)));
250 });
251});
194252
195describe('Fungible: Substrate calls', () => {253describe('Fungible: Substrate calls', () => {
196 itWeb3('Events emitted for approve()', async ({ web3 }) => {254 itWeb3('Events emitted for approve()', async ({ web3 }) => {
modifiedtests/src/eth/helpersSmoke.test.tsdiffbeforeafterboth
1import { 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';
44
5itWeb3('Contract owner is recorded', async ({ api, web3 }) => {5describe('Helpers sanity check', () => {
6 await usingWeb3Http(async web3Http => {
7 const owner = await createEthAccountWithBalance(api, web3Http);
8
9 const flipper = await deployFlipper(web3Http, owner);
10 await waitNewBlocks(api, 1);
11
12 expect(await contractHelpers(web3, owner).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner);
13 });
14});
15
16itWeb3('Flipper is working', async({api}) => {6 itWeb3('Contract owner is recorded', async ({ api, web3 }) => {
7 const owner = await createEthAccountWithBalance(api, web3);
8
9 const flipper = await deployFlipper(web3, owner);
10 await waitNewBlocks(api, 1);
11
12 expect(await contractHelpers(web3, owner).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner);
13 });
14
17 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);
2119
22 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});
addedtests/src/eth/marketplace/MarketPlaceKSM.abidiffbeforeafterboth

no changes

addedtests/src/eth/marketplace/MarketPlaceKSM.bindiffbeforeafterboth

no changes

addedtests/src/eth/marketplace/MarketPlaceKSM.soldiffbeforeafterboth

no changes

addedtests/src/eth/marketplace/MarketPlaceUNQ.abidiffbeforeafterboth

no changes

addedtests/src/eth/marketplace/MarketPlaceUNQ.bindiffbeforeafterboth

no changes

addedtests/src/eth/marketplace/MarketPlaceUNQ.soldiffbeforeafterboth

no changes

addedtests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth

no changes

addedtests/src/eth/migration.test.tsdiffbeforeafterboth

no changes

modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
4//4//
55
6import privateKey from '../substrate/privateKey';6import privateKey from '../substrate/privateKey';
7import { approveExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess } from '../util/helpers';7import { approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, 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 { evmToAddress } from '@polkadot/util-crypto';
9import nonFungibleAbi from './nonFungibleAbi.json';10import nonFungibleAbi from './nonFungibleAbi.json';
10import { expect } from 'chai';11import { expect } from 'chai';
11import waitNewBlocks from '../substrate/wait-new-blocks';12import waitNewBlocks from '../substrate/wait-new-blocks';
13import { submitTransactionAsync } from '../substrate/substrate-api';
1214
13describe('NFT: Information getting', () => {15describe('NFT: Information getting', () => {
14 itWeb3('totalSupply', async ({ api, web3 }) => {16 itWeb3('totalSupply', async ({ api, web3 }) => {
64});66});
6567
66describe('NFT: Plain calls', () => {68describe('NFT: Plain calls', () => {
69 itWeb3('Can perform mint()', async ({ web3, api }) => {
70 const collection = await createCollectionExpectSuccess({
71 mode: { type: 'NFT' },
72 });
73 const alice = privateKey('//Alice');
74
75 const caller = await createEthAccountWithBalance(api, web3);
76 const changeAdminTx = api.tx.nft.addCollectionAdmin(collection, { ethereum: caller });
77 await submitTransactionAsync(alice, changeAdminTx);
78 const receiver = createEthAccount(web3);
79
80 const address = collectionIdToAddress(collection);
81 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
82
83 {
84 const nextTokenId = await contract.methods.nextTokenId().call();
85 expect(nextTokenId).to.be.equal('1');
86 const result = await contract.methods.mintWithTokenURI(
87 receiver,
88 nextTokenId,
89 'Test URI',
90 ).send({from: caller});
91 const events = normalizeEvents(result.events);
92
93 expect(events).to.be.deep.equal([
94 {
95 address,
96 event: 'Transfer',
97 args: {
98 from: '0x0000000000000000000000000000000000000000',
99 to: receiver,
100 tokenId: nextTokenId,
101 },
102 },
103 ]);
104
105 await waitNewBlocks(api, 1);
106 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
107 }
108 });
109
110 itWeb3('Can perform burn()', async ({ web3, api }) => {
111 const collection = await createCollectionExpectSuccess({
112 mode: {type: 'NFT'},
113 });
114 const alice = privateKey('//Alice');
115
116 const owner = await createEthAccountWithBalance(api, web3);
117
118 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });
119
120 const address = collectionIdToAddress(collection);
121 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});
122
123 {
124 const result = await contract.methods.burn(tokenId).send({ from: owner });
125 const events = normalizeEvents(result.events);
126
127 expect(events).to.be.deep.equal([
128 {
129 address,
130 event: 'Transfer',
131 args: {
132 from: owner,
133 to: '0x0000000000000000000000000000000000000000',
134 tokenId: tokenId.toString(),
135 },
136 },
137 ]);
138 }
139 });
140
67 itWeb3('Can perform approve()', async ({ web3, api }) => {141 itWeb3('Can perform approve()', async ({ web3, api }) => {
68 const collection = await createCollectionExpectSuccess({142 const collection = await createCollectionExpectSuccess({
192 });266 });
193});267});
268
269describe('NFT: Fees', () => {
270 itWeb3('approve() call fee is less than 0.2UNQ', async ({ web3, api }) => {
271 const collection = await createCollectionExpectSuccess({
272 mode: { type: 'NFT' },
273 });
274 const alice = privateKey('//Alice');
275
276 const owner = await createEthAccountWithBalance(api, web3);
277 const spender = createEthAccount(web3);
278
279 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });
280
281 const address = collectionIdToAddress(collection);
282 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, { from: owner, ...GAS_ARGS });
283
284 const cost = await recordEthFee(api, owner, () => contract.methods.approve(spender, tokenId).send({ from: owner }));
285 expect(cost < BigInt(0.2 * Number(UNIQUE)));
286 });
287
288 itWeb3('transferFrom() call fee is less than 0.2UNQ', async ({ web3, api }) => {
289 const collection = await createCollectionExpectSuccess({
290 mode: { type: 'NFT' },
291 });
292 const alice = privateKey('//Alice');
293
294 const owner = await createEthAccountWithBalance(api, web3);
295 const spender = await createEthAccountWithBalance(api, web3);
296
297 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });
298
299 const address = collectionIdToAddress(collection);
300 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, { from: owner, ...GAS_ARGS });
301
302 await contract.methods.approve(spender, tokenId).send({ from: owner });
303
304 const cost = await recordEthFee(api, spender, () => contract.methods.transferFrom(owner, spender, tokenId).send({ from: spender }));
305 expect(cost < BigInt(0.2 * Number(UNIQUE)));
306 });
307
308 itWeb3('transfer() call fee is less than 0.2UNQ', async ({ web3, api }) => {
309 const collection = await createCollectionExpectSuccess({
310 mode: { type: 'NFT' },
311 });
312 const alice = privateKey('//Alice');
313
314 const owner = await createEthAccountWithBalance(api, web3);
315 const receiver = createEthAccount(web3);
316
317 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });
318
319 const address = collectionIdToAddress(collection);
320 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, { from: owner, ...GAS_ARGS });
321
322 const cost = await recordEthFee(api, owner, () => contract.methods.transfer(receiver, tokenId).send({ from: owner }));
323 expect(cost < BigInt(0.2 * Number(UNIQUE)));
324 });
325});
194326
195describe('NFT: Substrate calls', () => {327describe('NFT: Substrate calls', () => {
328 itWeb3('Events emitted for mint()', async ({ web3 }) => {
329 const collection = await createCollectionExpectSuccess({
330 mode: { type: 'NFT' },
331 });
332 const alice = privateKey('//Alice');
333
334 const address = collectionIdToAddress(collection);
335 const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
336
337 let tokenId: number;
338 const events = await recordEvents(contract, async () => {
339 tokenId = await createItemExpectSuccess(alice, collection, 'NFT');
340 });
341
342 expect(events).to.be.deep.equal([
343 {
344 address,
345 event: 'Transfer',
346 args: {
347 from: '0x0000000000000000000000000000000000000000',
348 to: subToEth(alice.address),
349 tokenId: tokenId!.toString(),
350 },
351 },
352 ]);
353 });
354
355 itWeb3('Events emitted for burn()', async ({ web3 }) => {
356 const collection = await createCollectionExpectSuccess({
357 mode: { type: 'NFT' },
358 });
359 const alice = privateKey('//Alice');
360
361 const address = collectionIdToAddress(collection);
362 const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
363
364 const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');
365 const events = await recordEvents(contract, async () => {
366 await burnItemExpectSuccess(alice, collection, tokenId);
367 });
368
369 expect(events).to.be.deep.equal([
370 {
371 address,
372 event: 'Transfer',
373 args: {
374 from: subToEth(alice.address),
375 to: '0x0000000000000000000000000000000000000000',
376 tokenId: tokenId.toString(),
377 },
378 },
379 ]);
380 });
381
196 itWeb3('Events emitted for approve()', async ({ web3 }) => {382 itWeb3('Events emitted for approve()', async ({ web3 }) => {
197 const collection = await createCollectionExpectSuccess({383 const collection = await createCollectionExpectSuccess({
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
49 "name": "ApprovalForAll",49 "name": "ApprovalForAll",
50 "type": "event"50 "type": "event"
51 },51 },
52 {
53 "anonymous": true,
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 {
134 "inputs": [166 "inputs": [
135 {167 {
136 "internalType": "address",168 "internalType": "address",
144 }176 }
145 ],177 ],
146 "name": "isApprovedForAll",178 "name": "isApprovedForAll",
179 "outputs": [
180 {
181 "internalType": "address",
182 "name": "",
183 "type": "address"
184 }
185 ],
186 "stateMutability": "view",
187 "type": "function"
188 },
189 {
190 "inputs": [
191 {
192 "internalType": "address",
193 "name": "to",
194 "type": "address"
195 },
196 {
197 "internalType": "uint256",
198 "name": "tokenId",
199 "type": "uint256"
200 }
201 ],
202 "name": "mint",
147 "outputs": [203 "outputs": [
148 {204 {
149 "internalType": "bool",205 "internalType": "bool",
150 "name": "",206 "name": "",
151 "type": "bool"207 "type": "bool"
152 }208 }
153 ],209 ],
210 "stateMutability": "nonpayable",
211 "type": "function"
212 },
213 {
214 "inputs": [
215 {
216 "internalType": "address",
217 "name": "to",
218 "type": "address"
219 },
220 {
221 "internalType": "uint256",
222 "name": "tokenId",
223 "type": "uint256"
224 },
225 {
226 "internalType": "string",
227 "name": "tokenURI",
228 "type": "string"
229 }
230 ],
231 "name": "mintWithTokenURI",
232 "outputs": [
233 {
234 "internalType": "bool",
235 "name": "",
236 "type": "bool"
237 }
238 ],
239 "stateMutability": "nonpayable",
240 "type": "function"
241 },
242 {
243 "inputs": [],
244 "name": "mintingFinished",
245 "outputs": [
246 {
247 "internalType": "bool",
248 "name": "",
249 "type": "bool"
250 }
251 ],
154 "stateMutability": "view",252 "stateMutability": "view",
155 "type": "function"253 "type": "function"
156 },254 },
157 {255 {
158 "inputs": [],256 "inputs": [],
159 "name": "name",257 "name": "name",
160 "outputs": [258 "outputs": [
161 {259 {
162 "internalType": "string",260 "internalType": "string",
163 "name": "res_name",261 "name": "",
164 "type": "string"262 "type": "string"
165 }263 }
166 ],264 ],
167 "stateMutability": "view",265 "stateMutability": "view",
168 "type": "function"266 "type": "function"
169 },267 },
268 {
269 "inputs": [],
270 "name": "nextTokenId",
271 "outputs": [
272 {
273 "internalType": "uint256",
274 "name": "",
275 "type": "uint256"
276 }
277 ],
278 "stateMutability": "view",
279 "type": "function"
280 },
170 {281 {
171 "inputs": [282 "inputs": [
172 {283 {
206 ],317 ],
207 "name": "safeTransferFrom",318 "name": "safeTransferFrom",
208 "outputs": [],319 "outputs": [],
209 "stateMutability": "payable",320 "stateMutability": "nonpayable",
210 "type": "function"321 "type": "function"
211 },322 },
212 {323 {
232 "type": "bytes"343 "type": "bytes"
233 }344 }
234 ],345 ],
235 "name": "safeTransferFrom",346 "name": "safeTransferFromWithData",
236 "outputs": [],347 "outputs": [],
237 "stateMutability": "payable",348 "stateMutability": "nonpayable",
238 "type": "function"349 "type": "function"
239 },350 },
240 {351 {
258 {369 {
259 "inputs": [370 "inputs": [
260 {371 {
261 "internalType": "bytes4",372 "internalType": "uint32",
262 "name": "interfaceID",373 "name": "interfaceId",
263 "type": "bytes4"374 "type": "uint32"
264 }375 }
265 ],376 ],
266 "name": "supportsInterface",377 "name": "supportsInterface",
271 "type": "bool"382 "type": "bool"
272 }383 }
273 ],384 ],
274 "stateMutability": "pure",385 "stateMutability": "view",
275 "type": "function"386 "type": "function"
276 },387 },
277 {388 {
280 "outputs": [391 "outputs": [
281 {392 {
282 "internalType": "string",393 "internalType": "string",
283 "name": "res_symbol",394 "name": "",
284 "type": "string"395 "type": "string"
285 }396 }
286 ],397 ],
364 },475 },
365 {476 {
366 "inputs": [477 "inputs": [
367 {
368 "internalType": "address",
369 "name": "from",
370 "type": "address"
371 },
372 {478 {
373 "internalType": "address",479 "internalType": "address",
374 "name": "to",480 "name": "to",
380 "type": "uint256"486 "type": "uint256"
381 }487 }
382 ],488 ],
383 "name": "transferFrom",489 "name": "transfer",
384 "outputs": [],490 "outputs": [],
385 "stateMutability": "payable",491 "stateMutability": "nonpayable",
386 "type": "function"492 "type": "function"
387 },493 },
388 {494 {
389 "inputs": [495 "inputs": [
496 {
497 "internalType": "address",
498 "name": "from",
499 "type": "address"
500 },
390 {501 {
391 "internalType": "address",502 "internalType": "address",
392 "name": "to",503 "name": "to",
398 "type": "uint256"509 "type": "uint256"
399 }510 }
400 ],511 ],
401 "name": "transfer",512 "name": "transferFrom",
402 "outputs": [],513 "outputs": [],
403 "stateMutability": "payable",514 "stateMutability": "nonpayable",
404 "type": "function"515 "type": "function"
405 }516 }
406]517]
addedtests/src/eth/payable.test.tsdiffbeforeafterboth

no changes

addedtests/src/eth/proxy/UniqueFungibleProxy.abidiffbeforeafterboth

no changes

addedtests/src/eth/proxy/UniqueFungibleProxy.bindiffbeforeafterboth

no changes

addedtests/src/eth/proxy/UniqueFungibleProxy.soldiffbeforeafterboth

no changes

addedtests/src/eth/proxy/UniqueNFTProxy.abidiffbeforeafterboth

no changes

addedtests/src/eth/proxy/UniqueNFTProxy.bindiffbeforeafterboth

no changes

addedtests/src/eth/proxy/UniqueNFTProxy.soldiffbeforeafterboth

no changes

addedtests/src/eth/proxy/fungibleProxy.test.tsdiffbeforeafterboth

no changes

addedtests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth

no changes

modifiedtests/src/eth/util/helpers.tsdiffbeforeafterboth
17import 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';
2022
21export const GAS_ARGS = { gas: 0x1000000, gasPrice: '0x01' };23export const GAS_ARGS = { gas: 0x1000000, gasPrice: '0x01' };
2224
37 }39 }
38}40}
3941
40type Web3HttpMarker = {web3Http: true};42/**
4143 * @deprecated Web3 update solved issue with deployment over ws provider
44 */
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;
4648
47 return await cb(web3);49 return await cb(web3);
48}50}
141 return normalizeEvents(out);143 return normalizeEvents(out);
142}144}
143145
144export 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}
150
151export function subToEth(eth: string): string {
152 return Web3.utils.toChecksumAddress(subToEthLowercase(eth));
153}
149154
150export 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}
177
178// export async function deployFungibleContract(web3: Web3 & Web3HttpMarker, deployer: string) {
179
180// const sol = fs.readFileSync(__dirname + '/ERC721.sol').toString();
181
182// const compiled = compileContract('ERC721', sol);
183// const ERC721 = new web3.eth.Contract(compiled.abi, undefined, {
184// data: compiled.object,
185// from: deployer,
186// ...GAS_ARGS,
187// });
188// const fungible = await ERC721.deploy({ data: compiled.object }).send({from: deployer});
189
190// return fungible;
191// }
192182
193export async function deployFlipper(web3: Web3 & Web3HttpMarker, deployer: string) {183export async function deployFlipper(web3: Web3, deployer: string) {
194 const compiled = compileContract('Flipper', `184 const compiled = compileContract('Flipper', `
195 contract Flipper {185 contract Flipper {
196 bool value = false;186 bool value = false;
212 return flipper;202 return flipper;
213}203}
214204
215export async function deployCollector(web3: Web3 & Web3HttpMarker, deployer: string) {205export async function deployCollector(web3: Web3, deployer: string) {
216 const compiled = compileContract('Collector', `206 const compiled = compileContract('Collector', `
217 contract Collector {207 contract Collector {
218 uint256 collected;208 uint256 collected;
219 function giveMoney() public payable {209 fallback() external payable {
220 collected += msg.value;210 giveMoney();
221 }211 }
222 function getCollected() public view returns (uint256) {212 function giveMoney() public payable {
223 return collected;213 collected += msg.value;
224 }214 }
225 }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 }
221
222 function withdraw(address payable target) public {
223 target.transfer(collected);
224 collected = 0;
225 }
226 }
226 `);227 `);
227 const Collector = new web3.eth.Contract(compiled.abi, undefined, {228 const Collector = new web3.eth.Contract(compiled.abi, undefined, {
228 data: compiled.object,229 data: compiled.object,
229 from: deployer,230 from: deployer,
238 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});
239}240}
241
242export 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}
255
256export async function ethBalanceViaSub(api: ApiPromise, address: string): Promise<bigint> {
257 return (await getBalance(api, [evmToAddress(address)]))[0];
258}
259
260export async function recordEthFee(api: ApiPromise, user: string, call: () => Promise<any>): Promise<bigint> {
261 const before = await ethBalanceViaSub(api, user);
262
263 await call();
264 await waitNewBlocks(api, 1);
265
266 const after = await ethBalanceViaSub(api, user);
267
268 // Can't use .to.be.less, because chai doesn't supports bigint
269 expect(after < before).to.be.true;
270
271 return before - after;
272}
modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
25 'evm',25 'evm',
26 'evmcodersubstrate',26 'evmcodersubstrate',
27 'evmcontracthelpers',27 'evmcontracthelpers',
28 'evmmigration',
28 'evmtransactionpayment',29 'evmtransactionpayment',
29 'ethereum',30 'ethereum',
30 'xcmpqueue',31 'xcmpqueue',
modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth
37 });37 });
38 });38 });
39
40 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 Bob
49 const addAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
50 await submitTransactionAsync(Alice, addAdminTx);
51
52 const addAdminTx2 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Charlie.address));
53 await submitTransactionAsync(Alice, addAdminTx2);
54
55 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId)).toJSON();
56 expect(adminListAfterAddAdmin).to.be.deep.contains(normalizeAccountId(Bob.address));
57
58 // then remove bob from admins of collection
59 const removeAdminTx = api.tx.nft.removeCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
60 await submitTransactionAsync(Charlie, removeAdminTx);
61
62 const adminListAfterRemoveAdmin: any = (await api.query.nft.adminList(collectionId)).toJSON;
63 expect(adminListAfterRemoveAdmin).not.to.be.deep.contains(normalizeAccountId(Bob.address));
64 });
65 });
3966
40 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) => {
modifiedtests/src/removeCollectionSponsor.test.tsdiffbeforeafterboth
112 await removeCollectionSponsorExpectFailure(collectionId, '//Bob');112 await removeCollectionSponsorExpectFailure(collectionId, '//Bob');
113 });113 });
114
115 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 });
114120
115 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();
modifiedtests/src/removeFromWhiteList.test.tsdiffbeforeafterboth
125 });125 });
126 });126 });
127
128 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});
modifiedtests/src/setChainLimits.test.tsdiffbeforeafterboth
13 IChainLimits,13 IChainLimits,
14} from './util/helpers';14} from './util/helpers';
1515
16describe.only('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;
modifiedtests/src/setPublicAccessMode.test.tsdiffbeforeafterboth
101 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-bitwise
107 const collectionId = await createCollectionExpectSuccess();107 const collectionId = await createCollectionExpectSuccess();
modifiedtests/src/setSchemaVersion.test.tsdiffbeforeafterboth
2424
25let alice: IKeyringPair;25let alice: IKeyringPair;
26let bob: IKeyringPair;26let bob: IKeyringPair;
27let charlie: IKeyringPair;
27let collectionIdForTesting: number;28let collectionIdForTesting: number;
2829
29/*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});
155161
modifiedtests/src/substrate/get-balance.tsdiffbeforeafterboth
6import { 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';
913
10export 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}
1519
20export async function getBalanceSingle(api: ApiPromise, account: string): Promise<bigint> {
21 return (await getBalance(api, [account]))[0];
22}
23
24export 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}
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
5353
54export const U128_MAX = (1n << 128n) - 1n;54export const U128_MAX = (1n << 128n) - 1n;
55
56const MICROUNIQUE = 1_000_000_000n;
57const MILLIUNIQUE = 1_000n * MICROUNIQUE;
58const CENTIUNIQUE = 10n * MILLIUNIQUE;
59export const UNIQUE = 100n * CENTIUNIQUE;
5560
56type GenericResult = {61type GenericResult = {
57 success: boolean,62 success: boolean,
414 });419 });
415}420}
416421
417export async function setCollectionSponsorExpectSuccess(collectionId: number, sponsor: string) {422export async function setCollectionSponsorExpectSuccess(collectionId: number, sponsor: string, sender = '//Alice') {
418 await usingApi(async (api) => {423 await usingApi(async (api) => {
419424
420 // Run the transaction425 // Run the transaction
421 const alicePrivateKey = privateKey('//Alice');426 const senderPrivateKey = privateKey(sender);
422 const tx = api.tx.nft.setCollectionSponsor(collectionId, sponsor);427 const tx = api.tx.nft.setCollectionSponsor(collectionId, sponsor);
423 const events = await submitTransactionAsync(alicePrivateKey, tx);428 const events = await submitTransactionAsync(senderPrivateKey, tx);
424 const result = getGenericResult(events);429 const result = getGenericResult(events);
425430
426 // Get the collection431 // Get the collection
434 });439 });
435}440}
436441
437export async function removeCollectionSponsorExpectSuccess(collectionId: number) {442export async function removeCollectionSponsorExpectSuccess(collectionId: number, sender = '//Alice') {
438 await usingApi(async (api) => {443 await usingApi(async (api) => {
439444
440 // Run the transaction445 // Run the transaction
441 const alicePrivateKey = privateKey('//Alice');446 const alicePrivateKey = privateKey(sender);
442 const tx = api.tx.nft.removeCollectionSponsor(collectionId);447 const tx = api.tx.nft.removeCollectionSponsor(collectionId);
443 const events = await submitTransactionAsync(alicePrivateKey, tx);448 const events = await submitTransactionAsync(alicePrivateKey, tx);
444 const result = getGenericResult(events);449 const result = getGenericResult(events);
980 });985 });
981}986}
987
988export async function setPublicAccessModeExpectFail(
989 sender: IKeyringPair, collectionId: number,
990 accessMode: 'Normal' | 'WhiteList',
991) {
992 await usingApi(async (api) => {
993
994 // Run the transaction
995 const tx = api.tx.nft.setPublicAccessMode(collectionId, accessMode);
996 const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
997 const result = getGenericResult(events);
998
999 // What to expect
1000 // tslint:disable-next-line:no-unused-expression
1001 expect(result.success).to.be.false;
1002 });
1003}
9821004
983export async function enableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {1005export async function enableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {
984 await setPublicAccessModeExpectSuccess(sender, collectionId, 'WhiteList');1006 await setPublicAccessModeExpectSuccess(sender, collectionId, 'WhiteList');
985}1007}
1008
1009export async function enableWhiteListExpectFail(sender: IKeyringPair, collectionId: number) {
1010 await setPublicAccessModeExpectFail(sender, collectionId, 'WhiteList');
1011}
9861012
987export async function disableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {1013export async function disableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {
988 await setPublicAccessModeExpectSuccess(sender, collectionId, 'Normal');1014 await setPublicAccessModeExpectSuccess(sender, collectionId, 'Normal');
1051 });1077 });
1052}1078}
1079
1080export async function addToWhiteListExpectFail(sender: IKeyringPair, collectionId: number, address: string | AccountId) {
1081 await usingApi(async (api) => {
1082 // Run the transaction
1083 const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(address));
1084 const events = await expect(submitTransactionAsync(sender, tx)).to.be.rejected;
1085 const result = getGenericResult(events);
1086
1087 // What to expect
1088 // tslint:disable-next-line:no-unused-expression
1089 expect(result.success).to.be.false;
1090 });
1091}
10531092
1054export async function removeFromWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {1093export async function removeFromWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {
1055 await usingApi(async (api) => {1094 await usingApi(async (api) => {
1093 });1132 });
1094}1133}
10951134
1135export async function queryNftOwner(api: ApiPromise, collectionId: number, tokenId: number): Promise<CrossAccountId> {
1136 return normalizeAccountId((await api.query.nft.nftItemList(collectionId, tokenId) as any).toJSON().Owner);
1137}
modifiedtests/yarn.lockdiffbeforeafterboth
2# yarn lockfile v12# yarn lockfile v1
33
44
5"@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==
4444
45"@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==
49
50"@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"
6570
71"@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"
91
66"@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"
74100
101"@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"
109
75"@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"
99134
100"@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"
144
145"@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"
111156
157"@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"
168
112"@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"
170227
228"@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"
234
171"@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"
191255
256"@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"
269
192"@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"
222300
301"@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"
310
223"@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"
229317
318"@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"
324
230"@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==
248343
344"@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==
348
249"@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"
272372
373"@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"
381
273"@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==
286395
396"@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==
400
287"@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"
295409
296"@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"
579693
580"@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"
667781
668"@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"
677791
678"@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"
696810
697"@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"
703817
777 dependencies:891 dependencies:
778 "@babel/helper-plugin-utils" "^7.14.5"892 "@babel/helper-plugin-utils" "^7.14.5"
779893
780"@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"
827941
828"@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"
836950
849 "@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"
851965
852"@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"
9301044
931"@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"
9531067
954"@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"
9621076
963"@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"
9801094
1095"@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"
1101
981"@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"
10041125
1126"@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"
1140
1005"@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"
10121148
1149"@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"
1156
1013"@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==
10171161
1018"@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"
1032
1033"@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==
12531382
1254"@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"
12651394
1266"@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"
13001429
1301"@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"
13101439
1311"@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"
13221451
1323"@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"
13311460
1332"@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"
13611490
1362"@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"
13701499
1371"@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"
13801509
1381"@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"
13901519
1391"@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"
14111540
1412"@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"
15611690
1562"@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"
15721701
1573"@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"
15851714
1586"@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"
16021731
1603"@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"
16661802
1667"@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"
16751811
1676"@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"
16821818
1683"@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"
16931829
1694"@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"
17071843
1708"@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"
17141850
1715"@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"
17301867
1731"@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"
17401877
1741"@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"
17501885
1751"@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"
1895
1896"@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"
17721918
1773"@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"
18081954
1809"@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"
18181964
1819"@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"
18251971
1826"@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"
18331979
1834"@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"
18411987
1842"@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"
18491995
1850"@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"
18592005
2006"@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"
2012
2013"@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"
2025
2026"@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"
2034
2035"@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"
2041
2042"@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"
2053
2054"@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"
2062
1860"@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==
19472150
1948"@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" "*"
19552158
2159"@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==
2163
2164"@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==
2168
1956"@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==
20132226
2014"@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==
20482261
2262"@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" "*"
2268
2049"@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==
20602280
2061"@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" "*"
20672287
2077 dependencies:2297 dependencies:
2078 "@types/yargs-parser" "*"2298 "@types/yargs-parser" "*"
20792299
2080"@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"
21052325
2106"@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"
2117
2118"@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"
21292337
2130"@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"
2349
2350"@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"
21392359
2140"@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"
21492369
2150"@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"
2157
2158"@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"
21652377
2378"@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"
2385
2166"@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==
21702390
2171"@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==
2175
2176"@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==
21802395
2181"@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"
21932400
2194"@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"
22062413
2414"@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"
2426
2207"@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"
22272447
2228"@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"
2235
2236"@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"
22432455
2456"@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"
2463
2244"@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==
26082828
2609babel-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"
26402860
2641babel-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"
26902910
2691babel-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"
27232943
2724babel-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"
27312951
2732balanced-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"
29683188
3189browserslist@^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"
3199
2969bs58@^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=
30263257
3258builtin-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==
3262
3027bytes@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==
30873323
3324caniuse-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==
3328
3088caseless@~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"
31363377
3378chalk@^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"
3385
3137changelog-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"
34743723
3475core-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"
34823731
3483core-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"
34953744
3496coveralls@^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"
38854134
3886diff-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==
38904139
3891diff@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"
39724221
4222ed2curve@^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"
4228
3973ee-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==
39824238
4239electron-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==
4243
3983elliptic@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==
41534414
4154eslint-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"
41614422
4162eslint-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==
41824443
4183eslint-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==
4448
4449eslint-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==
42874553
4288eslint@^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"
43324599
4333eslint@^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==
44164683
4684estree-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==
4688
4689estree-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==
4693
4417esutils@^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"
45764853
4577expect@^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"
45884865
4589express@^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==
58596136
6137is-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=
6141
5860is-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==
59336215
6216is-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" "*"
6222
5934is-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"
60906379
6091jest-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"
60996388
6100jest-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"
61246413
6125jest-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"
61426431
6143jest-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"
61696458
6170jest-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"
61796468
6180jest-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"
61866475
6187jest-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"
61976486
6198jest-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"
62106499
6211jest-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"
62226511
6223jest-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==
62276516
6228jest-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"
62476536
6248jest-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"
62716560
6272jest-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"
62796568
6280jest-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"
62896578
6290jest-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"
63046593
6305jest-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" "*"
63126601
6313jest-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==
63176606
6318jest-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==
63226611
6323jest-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"
63316620
6332jest-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"
63466635
6347jest-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"
63746663
6375jest-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"
64066695
6407jest-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"
64146703
6415jest-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"
64446733
6445jest-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"
64566745
6457jest-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"
64686757
6469jest-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"
64816770
6482jest-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"
64906779
6491jest@^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"
64996788
6500js-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"
69337222
7223magic-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"
7229
6934make-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==
73687664
7665node-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==
7669
7369node-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=
78148115
7815picomatch@^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==
79968297
7997prettier@^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==
80018302
8002pretty-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=
84568757
8457resolve@^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"
85268827
8828rollup@^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"
8834
8527run-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"
85458853
8546rxjs@^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"
85528860
8894 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==
88969204
9205sourcemap-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==
9209
8897spdx-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"
94559768
9769tweetnacl@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==
9773
9456tweetnacl@^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=
94609778
9461tweetnacl@^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==
9465
9466type-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==
95299842
9530typescript@^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==
95349847
9848typescript@^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==
9852
9535uglify-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"
1034110659
10342yargs@^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"
10672
10673yargs@^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"