difftreelog
Merge remote-tracking branch 'origin/develop' into develop
in: master
62 files changed
.gitignorediffbeforeafterboth11*store_key*.json11*store_key*.json121213/.idea/13/.idea/14/.cargo/141515tests/.vscode16tests/.vscode16cumulus-parachain/17cumulus-parachain/Cargo.lockdiffbeforeafterboth68source = "registry+https://github.com/rust-lang/crates.io-index"68source = "registry+https://github.com/rust-lang/crates.io-index"69checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"69checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"70dependencies = [70dependencies = [71 "getrandom 0.2.5",71 "getrandom 0.2.6",72 "once_cell",72 "once_cell",73 "version_check",73 "version_check",74]74]188188189[[package]]189[[package]]190name = "async-global-executor"190name = "async-global-executor"191version = "2.0.3"191version = "2.0.4"192source = "registry+https://github.com/rust-lang/crates.io-index"192source = "registry+https://github.com/rust-lang/crates.io-index"193checksum = "c026b7e44f1316b567ee750fea85103f87fcb80792b860e979f221259796ca0a"193checksum = "c290043c9a95b05d45e952fb6383c67bcb61471f60cfa21e890dba6654234f43"194dependencies = [194dependencies = [195 "async-channel",195 "async-channel",196 "async-executor",196 "async-executor",306306307[[package]]307[[package]]308name = "async-trait"308name = "async-trait"309version = "0.1.52"309version = "0.1.53"310source = "registry+https://github.com/rust-lang/crates.io-index"310source = "registry+https://github.com/rust-lang/crates.io-index"311checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3"311checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600"312dependencies = [312dependencies = [313 "proc-macro2",313 "proc-macro2",314 "quote",314 "quote",392checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"392checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"393dependencies = [393dependencies = [394 "futures-core",394 "futures-core",395 "getrandom 0.2.5",395 "getrandom 0.2.6",396 "instant",396 "instant",397 "pin-project-lite 0.2.8",397 "pin-project-lite 0.2.8",398 "rand 0.8.5",398 "rand 0.8.5",440440441[[package]]441[[package]]442name = "base64ct"442name = "base64ct"443version = "1.4.1"443version = "1.5.0"444source = "registry+https://github.com/rust-lang/crates.io-index"444source = "registry+https://github.com/rust-lang/crates.io-index"445checksum = "71acf5509fc522cce1b100ac0121c635129bfd4d91cdf036bcc9b9935f97ccf5"445checksum = "dea908e7347a8c64e378c17e30ef880ad73e3b4498346b055c2c00ea342f3179"446446447[[package]]447[[package]]448name = "beef"448name = "beef"990dependencies = [990dependencies = [991 "camino",991 "camino",992 "cargo-platform",992 "cargo-platform",993 "semver 1.0.6",993 "semver 1.0.7",994 "serde",994 "serde",995 "serde_json",995 "serde_json",996]996]111111111112[[package]]1112[[package]]1113name = "clap"1113name = "clap"1114version = "3.1.6"1114version = "3.1.8"1115source = "registry+https://github.com/rust-lang/crates.io-index"1115source = "registry+https://github.com/rust-lang/crates.io-index"1116checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123"1116checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c"1117dependencies = [1117dependencies = [1118 "atty",1118 "atty",1119 "bitflags",1119 "bitflags",112811281129[[package]]1129[[package]]1130name = "clap_derive"1130name = "clap_derive"1131version = "3.1.4"1131version = "3.1.7"1132source = "registry+https://github.com/rust-lang/crates.io-index"1132source = "registry+https://github.com/rust-lang/crates.io-index"1133checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16"1133checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1"1134dependencies = [1134dependencies = [1135 "heck 0.4.0",1135 "heck 0.4.0",1136 "proc-macro-error",1136 "proc-macro-error",191319131914[[package]]1914[[package]]1915name = "darling"1915name = "darling"1916version = "0.13.1"1916version = "0.13.4"1917source = "registry+https://github.com/rust-lang/crates.io-index"1917source = "registry+https://github.com/rust-lang/crates.io-index"1918checksum = "d0d720b8683f8dd83c65155f0530560cba68cd2bf395f6513a483caee57ff7f4"1918checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"1919dependencies = [1919dependencies = [1920 "darling_core",1920 "darling_core",1921 "darling_macro",1921 "darling_macro",1922]1922]192319231924[[package]]1924[[package]]1925name = "darling_core"1925name = "darling_core"1926version = "0.13.1"1926version = "0.13.4"1927source = "registry+https://github.com/rust-lang/crates.io-index"1927source = "registry+https://github.com/rust-lang/crates.io-index"1928checksum = "7a340f241d2ceed1deb47ae36c4144b2707ec7dd0b649f894cb39bb595986324"1928checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"1929dependencies = [1929dependencies = [1930 "fnv",1930 "fnv",1931 "ident_case",1931 "ident_case",193719371938[[package]]1938[[package]]1939name = "darling_macro"1939name = "darling_macro"1940version = "0.13.1"1940version = "0.13.4"1941source = "registry+https://github.com/rust-lang/crates.io-index"1941source = "registry+https://github.com/rust-lang/crates.io-index"1942checksum = "72c41b3b7352feb3211a0d743dc5700a4e3b60f51bd2b368892d1e0f9a95f44b"1942checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"1943dependencies = [1943dependencies = [1944 "darling_core",1944 "darling_core",1945 "quote",1945 "quote",2484[[package]]2484[[package]]2485name = "fc-consensus"2485name = "fc-consensus"2486version = "2.0.0-dev"2486version = "2.0.0-dev"2487source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2487source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2488dependencies = [2488dependencies = [2489 "async-trait",2489 "async-trait",2490 "derive_more",2490 "derive_more",2511[[package]]2511[[package]]2512name = "fc-db"2512name = "fc-db"2513version = "2.0.0-dev"2513version = "2.0.0-dev"2514source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2514source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2515dependencies = [2515dependencies = [2516 "fp-storage",2516 "fp-storage",2517 "kvdb",2517 "kvdb",2527[[package]]2527[[package]]2528name = "fc-mapping-sync"2528name = "fc-mapping-sync"2529version = "2.0.0-dev"2529version = "2.0.0-dev"2530source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2530source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2531dependencies = [2531dependencies = [2532 "fc-consensus",2532 "fc-consensus",2533 "fc-db",2533 "fc-db",2545[[package]]2545[[package]]2546name = "fc-rpc"2546name = "fc-rpc"2547version = "2.0.0-dev"2547version = "2.0.0-dev"2548source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2548source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2549dependencies = [2549dependencies = [2550 "ethereum",2550 "ethereum",2551 "ethereum-types",2551 "ethereum-types",2591[[package]]2591[[package]]2592name = "fc-rpc-core"2592name = "fc-rpc-core"2593version = "1.1.0-dev"2593version = "1.1.0-dev"2594source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2594source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2595dependencies = [2595dependencies = [2596 "ethereum",2596 "ethereum",2597 "ethereum-types",2597 "ethereum-types",2725[[package]]2725[[package]]2726name = "fp-consensus"2726name = "fp-consensus"2727version = "2.0.0-dev"2727version = "2.0.0-dev"2728source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2728source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2729dependencies = [2729dependencies = [2730 "ethereum",2730 "ethereum",2731 "parity-scale-codec",2731 "parity-scale-codec",2739[[package]]2739[[package]]2740name = "fp-evm"2740name = "fp-evm"2741version = "3.0.0-dev"2741version = "3.0.0-dev"2742source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2742source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2743dependencies = [2743dependencies = [2744 "evm",2744 "evm",2745 "impl-trait-for-tuples",2745 "impl-trait-for-tuples",2750 "sp-std",2750 "sp-std",2751]2751]27522753[[package]]2754name = "fp-evm-mapping"2755version = "0.1.0"2756source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2757dependencies = [2758 "frame-support",2759 "sp-core",2760]275227612753[[package]]2762[[package]]2754name = "fp-rpc"2763name = "fp-rpc"2755version = "3.0.0-dev"2764version = "3.0.0-dev"2756source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2765source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2757dependencies = [2766dependencies = [2758 "ethereum",2767 "ethereum",2759 "ethereum-types",2768 "ethereum-types",2770[[package]]2779[[package]]2771name = "fp-self-contained"2780name = "fp-self-contained"2772version = "1.0.0-dev"2781version = "1.0.0-dev"2773source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2782source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"2774dependencies = [2783dependencies = [2775 "ethereum",2784 "ethereum",2776 "frame-support",2785 "frame-support",2787[[package]]2796[[package]]2788name = "fp-storage"2797name = "fp-storage"2789version = "2.0.0"2798version = "2.0.0"2790source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"2799source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"279128002792[[package]]2801[[package]]2793name = "frame-benchmarking"2802name = "frame-benchmarking"323432433235[[package]]3244[[package]]3236name = "getrandom"3245name = "getrandom"3237version = "0.2.5"3246version = "0.2.6"3238source = "registry+https://github.com/rust-lang/crates.io-index"3247source = "registry+https://github.com/rust-lang/crates.io-index"3239checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77"3248checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"3240dependencies = [3249dependencies = [3241 "cfg-if 1.0.0",3250 "cfg-if 1.0.0",3242 "libc",3251 "libc",330833173309[[package]]3318[[package]]3310name = "h2"3319name = "h2"3311version = "0.3.12"3320version = "0.3.13"3312source = "registry+https://github.com/rust-lang/crates.io-index"3321source = "registry+https://github.com/rust-lang/crates.io-index"3313checksum = "62eeb471aa3e3c9197aa4bfeabfe02982f6dc96f750486c0bb0009ac58b26d2b"3322checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"3314dependencies = [3323dependencies = [3315 "bytes 1.1.0",3324 "bytes 1.1.0",3316 "fnv",3325 "fnv",3321 "indexmap",3330 "indexmap",3322 "slab",3331 "slab",3323 "tokio 1.17.0",3332 "tokio 1.17.0",3324 "tokio-util",3333 "tokio-util 0.7.1",3325 "tracing",3334 "tracing",3326]3335]33273336367936883680[[package]]3689[[package]]3681name = "indexmap"3690name = "indexmap"3682version = "1.8.0"3691version = "1.8.1"3683source = "registry+https://github.com/rust-lang/crates.io-index"3692source = "registry+https://github.com/rust-lang/crates.io-index"3684checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"3693checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"3685dependencies = [3694dependencies = [3686 "autocfg",3695 "autocfg",3687 "hashbrown 0.11.2",3696 "hashbrown 0.11.2",3906 "log",3915 "log",3907 "tokio 1.17.0",3916 "tokio 1.17.0",3908 "tokio-stream",3917 "tokio-stream",3909 "tokio-util",3918 "tokio-util 0.6.9",3910 "unicase",3919 "unicase",3911]3920]391239213976 "thiserror",3985 "thiserror",3977 "tokio 1.17.0",3986 "tokio 1.17.0",3978 "tokio-rustls 0.23.3",3987 "tokio-rustls 0.23.3",3979 "tokio-util",3988 "tokio-util 0.6.9",3980 "tracing",3989 "tracing",3981 "webpki-roots 0.22.2",3990 "webpki-roots 0.22.2",3982]3991]3997 "thiserror",4006 "thiserror",3998 "tokio 1.17.0",4007 "tokio 1.17.0",3999 "tokio-rustls 0.23.3",4008 "tokio-rustls 0.23.3",4000 "tokio-util",4009 "tokio-util 0.6.9",4001 "tracing",4010 "tracing",4002 "webpki-roots 0.22.2",4011 "webpki-roots 0.22.2",4003]4012]4158 "thiserror",4167 "thiserror",4159 "tokio 1.17.0",4168 "tokio 1.17.0",4160 "tokio-rustls 0.22.0",4169 "tokio-rustls 0.22.0",4161 "tokio-util",4170 "tokio-util 0.6.9",4162]4171]416341724164[[package]]4173[[package]]4769 "libp2p-core",4778 "libp2p-core",4770 "libp2p-swarm",4779 "libp2p-swarm",4771 "log",4780 "log",4772 "lru 0.7.3",4781 "lru 0.7.5",4773 "rand 0.7.3",4782 "rand 0.7.3",4774 "smallvec",4783 "smallvec",4775 "unsigned-varint 0.7.1",4784 "unsigned-varint 0.7.1",499950085000[[package]]5009[[package]]5001name = "lock_api"5010name = "lock_api"5002version = "0.4.6"5011version = "0.4.7"5003source = "registry+https://github.com/rust-lang/crates.io-index"5012source = "registry+https://github.com/rust-lang/crates.io-index"5004checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"5013checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"5005dependencies = [5014dependencies = [5015 "autocfg",5006 "scopeguard",5016 "scopeguard",5007]5017]50085018502750375028[[package]]5038[[package]]5029name = "lru"5039name = "lru"5030version = "0.7.3"5040version = "0.7.5"5031source = "registry+https://github.com/rust-lang/crates.io-index"5041source = "registry+https://github.com/rust-lang/crates.io-index"5032checksum = "fcb87f3080f6d1d69e8c564c0fcfde1d7aa8cc451ce40cae89479111f03bc0eb"5042checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889"5033dependencies = [5043dependencies = [5034 "hashbrown 0.11.2",5044 "hashbrown 0.11.2",5035]5045]5576 "cumulus-primitives-timestamp",5586 "cumulus-primitives-timestamp",5577 "cumulus-primitives-utility",5587 "cumulus-primitives-utility",5578 "derivative",5588 "derivative",5589 "fp-evm-mapping",5579 "fp-rpc",5590 "fp-rpc",5580 "fp-self-contained",5591 "fp-self-contained",5581 "frame-benchmarking",5592 "frame-benchmarking",5632 "substrate-wasm-builder",5643 "substrate-wasm-builder",5633 "unique-runtime-common",5644 "unique-runtime-common",5634 "up-data-structs",5645 "up-data-structs",5635 "up-evm-mapping",5636 "up-rpc",5646 "up-rpc",5637 "xcm",5647 "xcm",5638 "xcm-builder",5648 "xcm-builder",5831[[package]]5841[[package]]5832name = "pallet-base-fee"5842name = "pallet-base-fee"5833version = "1.0.0"5843version = "1.0.0"5834source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"5844source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"5835dependencies = [5845dependencies = [5836 "frame-support",5846 "frame-support",5837 "frame-system",5847 "frame-system",5984version = "0.1.0"5994version = "0.1.0"5985dependencies = [5995dependencies = [5986 "evm-coder",5996 "evm-coder",5997 "fp-evm-mapping",5987 "frame-support",5998 "frame-support",5988 "frame-system",5999 "frame-system",5989 "pallet-evm",6000 "pallet-evm",5995 "sp-runtime",6006 "sp-runtime",5996 "sp-std",6007 "sp-std",5997 "up-data-structs",6008 "up-data-structs",5998 "up-evm-mapping",5999]6009]600060106001[[package]]6011[[package]]6058[[package]]6068[[package]]6059name = "pallet-ethereum"6069name = "pallet-ethereum"6060version = "4.0.0-dev"6070version = "4.0.0-dev"6061source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"6071source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"6062dependencies = [6072dependencies = [6063 "ethereum",6073 "ethereum",6064 "ethereum-types",6074 "ethereum-types",6065 "evm",6075 "evm",6066 "fp-consensus",6076 "fp-consensus",6067 "fp-evm",6077 "fp-evm",6078 "fp-evm-mapping",6068 "fp-rpc",6079 "fp-rpc",6069 "fp-self-contained",6080 "fp-self-contained",6070 "fp-storage",6081 "fp-storage",6088[[package]]6099[[package]]6089name = "pallet-evm"6100name = "pallet-evm"6090version = "6.0.0-dev"6101version = "6.0.0-dev"6091source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"6102source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"6092dependencies = [6103dependencies = [6093 "evm",6104 "evm",6094 "evm-gasometer",6105 "evm-gasometer",6095 "evm-runtime",6106 "evm-runtime",6096 "fp-evm",6107 "fp-evm",6108 "fp-evm-mapping",6097 "frame-benchmarking",6109 "frame-benchmarking",6098 "frame-support",6110 "frame-support",6099 "frame-system",6111 "frame-system",6136version = "0.1.0"6148version = "0.1.0"6137dependencies = [6149dependencies = [6138 "evm-coder",6150 "evm-coder",6151 "fp-evm-mapping",6139 "frame-support",6152 "frame-support",6140 "frame-system",6153 "frame-system",6141 "log",6154 "log",6171version = "0.1.0"6184version = "0.1.0"6172dependencies = [6185dependencies = [6173 "fp-evm",6186 "fp-evm",6187 "fp-evm-mapping",6174 "frame-support",6188 "frame-support",6175 "frame-system",6189 "frame-system",6176 "pallet-ethereum",6190 "pallet-ethereum",6181 "sp-io",6195 "sp-io",6182 "sp-runtime",6196 "sp-runtime",6183 "sp-std",6197 "sp-std",6184 "up-evm-mapping",6185 "up-sponsorship",6198 "up-sponsorship",6186]6199]618762006195 "frame-support",6208 "frame-support",6196 "frame-system",6209 "frame-system",6197 "pallet-common",6210 "pallet-common",6211 "pallet-evm",6198 "pallet-evm-coder-substrate",6212 "pallet-evm-coder-substrate",6199 "parity-scale-codec",6213 "parity-scale-codec",6200 "scale-info",6214 "scale-info",6421 "frame-support",6435 "frame-support",6422 "frame-system",6436 "frame-system",6423 "pallet-common",6437 "pallet-common",6438 "pallet-evm",6424 "pallet-evm-coder-substrate",6439 "pallet-evm-coder-substrate",6425 "parity-scale-codec",6440 "parity-scale-codec",6426 "scale-info",6441 "scale-info",6537 "frame-support",6552 "frame-support",6538 "frame-system",6553 "frame-system",6539 "pallet-common",6554 "pallet-common",6555 "pallet-evm",6540 "parity-scale-codec",6556 "parity-scale-codec",6541 "scale-info",6557 "scale-info",6542 "sp-core",6558 "sp-core",6672[[package]]6688[[package]]6673name = "pallet-template-transaction-payment"6689name = "pallet-template-transaction-payment"6674version = "3.0.0"6690version = "3.0.0"6675source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.18#e914a799e5ff1c18383a614ea99e87dd7f3f446e"6691source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.18#7bc842b35a53f762ee6ee89e5f5bef84a284c9f4"6676dependencies = [6692dependencies = [6677 "frame-benchmarking",6693 "frame-benchmarking",6678 "frame-support",6694 "frame-support",6795 "ethereum",6811 "ethereum",6796 "evm-coder",6812 "evm-coder",6797 "fp-evm",6813 "fp-evm",6814 "fp-evm-mapping",6798 "frame-benchmarking",6815 "frame-benchmarking",6799 "frame-support",6816 "frame-support",6800 "frame-system",6817 "frame-system",6821 "sp-runtime",6838 "sp-runtime",6822 "sp-std",6839 "sp-std",6823 "up-data-structs",6840 "up-data-structs",6824 "up-evm-mapping",6825 "up-sponsorship",6841 "up-sponsorship",6826]6842]68276843692569416926[[package]]6942[[package]]6927name = "parity-db"6943name = "parity-db"6928version = "0.3.9"6944version = "0.3.11"6929source = "registry+https://github.com/rust-lang/crates.io-index"6945source = "registry+https://github.com/rust-lang/crates.io-index"6930checksum = "3d121a9af17a43efd0a38c6afa508b927ba07785bd4709efb2ac03bf77efef8d"6946checksum = "b3e7f385d61562f5834282b90aa50b41f38a35cf64d5209b8b05487b50553dbe"6931dependencies = [6947dependencies = [6932 "blake2-rfc",6948 "blake2-rfc",6933 "crc32fast",6949 "crc32fast",6998 "ethereum-types",7014 "ethereum-types",6999 "hashbrown 0.12.0",7015 "hashbrown 0.12.0",7000 "impl-trait-for-tuples",7016 "impl-trait-for-tuples",7001 "lru 0.7.3",7017 "lru 0.7.5",7002 "parity-util-mem-derive",7018 "parity-util-mem-derive",7003 "parking_lot 0.12.0",7019 "parking_lot 0.12.0",7004 "primitive-types",7020 "primitive-types",7074checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"7090checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"7075dependencies = [7091dependencies = [7076 "lock_api",7092 "lock_api",7077 "parking_lot_core 0.9.1",7093 "parking_lot_core 0.9.2",7078]7094]707970957080[[package]]7096[[package]]709371097094[[package]]7110[[package]]7095name = "parking_lot_core"7111name = "parking_lot_core"7096version = "0.9.1"7112version = "0.9.2"7097source = "registry+https://github.com/rust-lang/crates.io-index"7113source = "registry+https://github.com/rust-lang/crates.io-index"7098checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954"7114checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37"7099dependencies = [7115dependencies = [7100 "cfg-if 1.0.0",7116 "cfg-if 1.0.0",7101 "libc",7117 "libc",710671227107[[package]]7123[[package]]7108name = "paste"7124name = "paste"7109version = "1.0.6"7125version = "1.0.7"7110source = "registry+https://github.com/rust-lang/crates.io-index"7126source = "registry+https://github.com/rust-lang/crates.io-index"7111checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5"7127checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc"711271287113[[package]]7129[[package]]7114name = "pbkdf2"7130name = "pbkdf2"727072867271[[package]]7287[[package]]7272name = "pkg-config"7288name = "pkg-config"7273version = "0.3.24"7289version = "0.3.25"7274source = "registry+https://github.com/rust-lang/crates.io-index"7290source = "registry+https://github.com/rust-lang/crates.io-index"7275checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"7291checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"727672927277[[package]]7293[[package]]7278name = "platforms"7294name = "platforms"7315 "derive_more",7331 "derive_more",7316 "fatality",7332 "fatality",7317 "futures 0.3.21",7333 "futures 0.3.21",7318 "lru 0.7.3",7334 "lru 0.7.5",7319 "parity-scale-codec",7335 "parity-scale-codec",7320 "polkadot-erasure-coding",7336 "polkadot-erasure-coding",7321 "polkadot-node-network-protocol",7337 "polkadot-node-network-protocol",7337dependencies = [7353dependencies = [7338 "fatality",7354 "fatality",7339 "futures 0.3.21",7355 "futures 0.3.21",7340 "lru 0.7.3",7356 "lru 0.7.5",7341 "parity-scale-codec",7357 "parity-scale-codec",7342 "polkadot-erasure-coding",7358 "polkadot-erasure-coding",7343 "polkadot-node-network-protocol",7359 "polkadot-node-network-protocol",7446 "derive_more",7462 "derive_more",7447 "fatality",7463 "fatality",7448 "futures 0.3.21",7464 "futures 0.3.21",7449 "lru 0.7.3",7465 "lru 0.7.5",7450 "parity-scale-codec",7466 "parity-scale-codec",7451 "polkadot-erasure-coding",7467 "polkadot-erasure-coding",7452 "polkadot-node-network-protocol",7468 "polkadot-node-network-protocol",7542 "futures 0.3.21",7558 "futures 0.3.21",7543 "futures-timer",7559 "futures-timer",7544 "kvdb",7560 "kvdb",7545 "lru 0.7.3",7561 "lru 0.7.5",7546 "merlin",7562 "merlin",7547 "parity-scale-codec",7563 "parity-scale-codec",7548 "polkadot-node-jaeger",7564 "polkadot-node-jaeger",7671 "fatality",7687 "fatality",7672 "futures 0.3.21",7688 "futures 0.3.21",7673 "kvdb",7689 "kvdb",7674 "lru 0.7.3",7690 "lru 0.7.5",7675 "parity-scale-codec",7691 "parity-scale-codec",7676 "polkadot-node-primitives",7692 "polkadot-node-primitives",7677 "polkadot-node-subsystem",7693 "polkadot-node-subsystem",7897 "futures 0.3.21",7913 "futures 0.3.21",7898 "itertools",7914 "itertools",7899 "kvdb",7915 "kvdb",7900 "lru 0.7.3",7916 "lru 0.7.5",7901 "metered-channel",7917 "metered-channel",7902 "parity-db",7918 "parity-db",7903 "parity-scale-codec",7919 "parity-scale-codec",7926dependencies = [7942dependencies = [7927 "futures 0.3.21",7943 "futures 0.3.21",7928 "futures-timer",7944 "futures-timer",7929 "lru 0.7.3",7945 "lru 0.7.5",7930 "parity-util-mem",7946 "parity-util-mem",7931 "parking_lot 0.12.0",7947 "parking_lot 0.12.0",7932 "polkadot-node-metrics",7948 "polkadot-node-metrics",8273 "kusama-runtime",8289 "kusama-runtime",8274 "kvdb",8290 "kvdb",8275 "kvdb-rocksdb",8291 "kvdb-rocksdb",8276 "lru 0.7.3",8292 "lru 0.7.5",8277 "pallet-babe",8293 "pallet-babe",8278 "pallet-im-online",8294 "pallet-im-online",8279 "pallet-mmr-primitives",8295 "pallet-mmr-primitives",860886248609[[package]]8625[[package]]8610name = "proc-macro2"8626name = "proc-macro2"8611version = "1.0.36"8627version = "1.0.37"8612source = "registry+https://github.com/rust-lang/crates.io-index"8628source = "registry+https://github.com/rust-lang/crates.io-index"8613checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"8629checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"8614dependencies = [8630dependencies = [8615 "unicode-xid",8631 "unicode-xid",8616]8632]868487008685[[package]]8701[[package]]8686name = "psm"8702name = "psm"8687version = "0.1.17"8703version = "0.1.18"8688source = "registry+https://github.com/rust-lang/crates.io-index"8704source = "registry+https://github.com/rust-lang/crates.io-index"8689checksum = "6eca0fa5dd7c4c96e184cec588f0b1db1ee3165e678db21c09793105acb17e6f"8705checksum = "871372391786ccec00d3c5d3d6608905b3d4db263639cfe075d3b60a736d115a"8690dependencies = [8706dependencies = [8691 "cc",8707 "cc",8692]8708]8704 "cumulus-primitives-timestamp",8720 "cumulus-primitives-timestamp",8705 "cumulus-primitives-utility",8721 "cumulus-primitives-utility",8706 "derivative",8722 "derivative",8723 "fp-evm-mapping",8707 "fp-rpc",8724 "fp-rpc",8708 "fp-self-contained",8725 "fp-self-contained",8709 "frame-executive",8726 "frame-executive",8757 "substrate-wasm-builder",8774 "substrate-wasm-builder",8758 "unique-runtime-common",8775 "unique-runtime-common",8759 "up-data-structs",8776 "up-data-structs",8760 "up-evm-mapping",8761 "up-rpc",8777 "up-rpc",8762 "xcm",8778 "xcm",8763 "xcm-builder",8779 "xcm-builder",878988058790[[package]]8806[[package]]8791name = "quote"8807name = "quote"8792version = "1.0.16"8808version = "1.0.17"8793source = "registry+https://github.com/rust-lang/crates.io-index"8809source = "registry+https://github.com/rust-lang/crates.io-index"8794checksum = "b4af2ec4714533fcdf07e886f17025ace8b997b9ce51204ee69b6da831c3da57"8810checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58"8795dependencies = [8811dependencies = [8796 "proc-macro2",8812 "proc-macro2",8797]8813]8862source = "registry+https://github.com/rust-lang/crates.io-index"8878source = "registry+https://github.com/rust-lang/crates.io-index"8863checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"8879checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"8864dependencies = [8880dependencies = [8865 "getrandom 0.2.5",8881 "getrandom 0.2.6",8866]8882]886788838868[[package]]8884[[package]]892689428927[[package]]8943[[package]]8928name = "redox_syscall"8944name = "redox_syscall"8929version = "0.2.11"8945version = "0.2.13"8930source = "registry+https://github.com/rust-lang/crates.io-index"8946source = "registry+https://github.com/rust-lang/crates.io-index"8931checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c"8947checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"8932dependencies = [8948dependencies = [8933 "bitflags",8949 "bitflags",8934]8950]893589518936[[package]]8952[[package]]8937name = "redox_users"8953name = "redox_users"8938version = "0.4.2"8954version = "0.4.3"8939source = "registry+https://github.com/rust-lang/crates.io-index"8955source = "registry+https://github.com/rust-lang/crates.io-index"8940checksum = "7776223e2696f1aa4c6b0170e83212f47296a00424305117d013dfe86fb0fe55"8956checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"8941dependencies = [8957dependencies = [8942 "getrandom 0.2.5",8958 "getrandom 0.2.6",8943 "redox_syscall",8959 "redox_syscall",8944 "thiserror",8960 "thiserror",8945]8961]9253source = "registry+https://github.com/rust-lang/crates.io-index"9269source = "registry+https://github.com/rust-lang/crates.io-index"9254checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"9270checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"9255dependencies = [9271dependencies = [9256 "semver 1.0.6",9272 "semver 1.0.7",9257]9273]925892749259[[package]]9275[[package]]9974 "linked-hash-map",9990 "linked-hash-map",9975 "linked_hash_set",9991 "linked_hash_set",9976 "log",9992 "log",9977 "lru 0.7.3",9993 "lru 0.7.5",9978 "parity-scale-codec",9994 "parity-scale-codec",9979 "parking_lot 0.12.0",9995 "parking_lot 0.12.0",9980 "pin-project 1.0.10",9996 "pin-project 1.0.10",10012 "futures-timer",10028 "futures-timer",10013 "libp2p",10029 "libp2p",10014 "log",10030 "log",10015 "lru 0.7.3",10031 "lru 0.7.5",10016 "sc-network",10032 "sc-network",10017 "sp-runtime",10033 "sp-runtime",10018 "substrate-prometheus-endpoint",10034 "substrate-prometheus-endpoint",105321054810533[[package]]10549[[package]]10534name = "semver"10550name = "semver"10535version = "1.0.6"10551version = "1.0.7"10536source = "registry+https://github.com/rust-lang/crates.io-index"10552source = "registry+https://github.com/rust-lang/crates.io-index"10537checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d"10553checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4"10538dependencies = [10554dependencies = [10539 "serde",10555 "serde",10540]10556]107471076310748[[package]]10764[[package]]10749name = "slab"10765name = "slab"10750version = "0.4.5"10766version = "0.4.6"10751source = "registry+https://github.com/rust-lang/crates.io-index"10767source = "registry+https://github.com/rust-lang/crates.io-index"10752checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"10768checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"107531076910754[[package]]10770[[package]]10755name = "slot-range-helper"10771name = "slot-range-helper"10940dependencies = [10956dependencies = [10941 "futures 0.3.21",10957 "futures 0.3.21",10942 "log",10958 "log",10943 "lru 0.7.3",10959 "lru 0.7.5",10944 "parity-scale-codec",10960 "parity-scale-codec",10945 "parking_lot 0.12.0",10961 "parking_lot 0.12.0",10946 "sp-api",10962 "sp-api",118011181711802[[package]]11818[[package]]11803name = "syn"11819name = "syn"11804version = "1.0.89"11820version = "1.0.91"11805source = "registry+https://github.com/rust-lang/crates.io-index"11821source = "registry+https://github.com/rust-lang/crates.io-index"11806checksum = "ea297be220d52398dcc07ce15a209fce436d361735ac1db700cab3b6cdfb9f54"11822checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d"11807dependencies = [11823dependencies = [11808 "proc-macro2",11824 "proc-macro2",11809 "quote",11825 "quote",12093 "tokio 1.17.0",12109 "tokio 1.17.0",12094]12110]1211112112[[package]]12113name = "tokio-util"12114version = "0.7.1"12115source = "registry+https://github.com/rust-lang/crates.io-index"12116checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"12117dependencies = [12118 "bytes 1.1.0",12119 "futures-core",12120 "futures-sink",12121 "pin-project-lite 0.2.8",12122 "tokio 1.17.0",12123 "tracing",12124]120951212512096[[package]]12126[[package]]12097name = "toml"12127name = "toml"121331216312134[[package]]12164[[package]]12135name = "tracing-core"12165name = "tracing-core"12136version = "0.1.23"12166version = "0.1.24"12137source = "registry+https://github.com/rust-lang/crates.io-index"12167source = "registry+https://github.com/rust-lang/crates.io-index"12138checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c"12168checksum = "90442985ee2f57c9e1b548ee72ae842f4a9a20e3f417cc38dbc5dc684d9bb4ee"12139dependencies = [12169dependencies = [12140 "lazy_static",12170 "lazy_static",12141 "valuable",12171 "valuable",12333 "jsonrpc-core-client",12363 "jsonrpc-core-client",12334 "jsonrpc-derive",12364 "jsonrpc-derive",12335 "pallet-common",12365 "pallet-common",12366 "pallet-evm",12336 "parity-scale-codec",12367 "parity-scale-codec",12337 "sp-api",12368 "sp-api",12338 "sp-blockchain",12369 "sp-blockchain",12475 "substrate-build-script-utils",12506 "substrate-build-script-utils",12476 "substrate-frame-rpc-system",12507 "substrate-frame-rpc-system",12477 "substrate-prometheus-endpoint",12508 "substrate-prometheus-endpoint",12509 "tokio 1.17.0",12478 "unique-rpc",12510 "unique-rpc",12479 "unique-runtime",12511 "unique-runtime",12480 "unique-runtime-common",12512 "unique-runtime-common",12542 "cumulus-primitives-timestamp",12574 "cumulus-primitives-timestamp",12543 "cumulus-primitives-utility",12575 "cumulus-primitives-utility",12544 "derivative",12576 "derivative",12577 "fp-evm-mapping",12545 "fp-rpc",12578 "fp-rpc",12546 "fp-self-contained",12579 "fp-self-contained",12547 "frame-benchmarking",12580 "frame-benchmarking",12598 "substrate-wasm-builder",12631 "substrate-wasm-builder",12599 "unique-runtime-common",12632 "unique-runtime-common",12600 "up-data-structs",12633 "up-data-structs",12601 "up-evm-mapping",12602 "up-rpc",12634 "up-rpc",12603 "xcm",12635 "xcm",12604 "xcm-builder",12636 "xcm-builder",12613 "frame-support",12645 "frame-support",12614 "frame-system",12646 "frame-system",12615 "pallet-common",12647 "pallet-common",12648 "pallet-evm",12616 "parity-scale-codec",12649 "parity-scale-codec",12617 "scale-info",12650 "scale-info",12618 "sp-consensus-aura",12651 "sp-consensus-aura",12681 "sp-std",12714 "sp-std",12682]12715]1268312684[[package]]12685name = "up-evm-mapping"12686version = "0.1.0"12687dependencies = [12688 "frame-support",12689 "sp-core",12690]126911271612692[[package]]12717[[package]]12693name = "up-rpc"12718name = "up-rpc"12694version = "0.1.0"12719version = "0.1.0"12695dependencies = [12720dependencies = [12696 "pallet-common",12721 "pallet-common",12722 "pallet-evm",12697 "parity-scale-codec",12723 "parity-scale-codec",12698 "sp-api",12724 "sp-api",12699 "sp-core",12725 "sp-core",12705[[package]]12731[[package]]12706name = "up-sponsorship"12732name = "up-sponsorship"12707version = "0.1.0"12733version = "0.1.0"12708source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.18#e914a799e5ff1c18383a614ea99e87dd7f3f446e"12734source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.18#7bc842b35a53f762ee6ee89e5f5bef84a284c9f4"12709dependencies = [12735dependencies = [12710 "impl-trait-for-tuples",12736 "impl-trait-for-tuples",12711]12737]133131333913314[[package]]13340[[package]]13315name = "windows-sys"13341name = "windows-sys"13316version = "0.32.0"13342version = "0.34.0"13317source = "registry+https://github.com/rust-lang/crates.io-index"13343source = "registry+https://github.com/rust-lang/crates.io-index"13318checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6"13344checksum = "5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825"13319dependencies = [13345dependencies = [13320 "windows_aarch64_msvc",13346 "windows_aarch64_msvc",13321 "windows_i686_gnu",13347 "windows_i686_gnu",133261335213327[[package]]13353[[package]]13328name = "windows_aarch64_msvc"13354name = "windows_aarch64_msvc"13329version = "0.32.0"13355version = "0.34.0"13330source = "registry+https://github.com/rust-lang/crates.io-index"13356source = "registry+https://github.com/rust-lang/crates.io-index"13331checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"13357checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d"133321335813333[[package]]13359[[package]]13334name = "windows_i686_gnu"13360name = "windows_i686_gnu"13335version = "0.32.0"13361version = "0.34.0"13336source = "registry+https://github.com/rust-lang/crates.io-index"13362source = "registry+https://github.com/rust-lang/crates.io-index"13337checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"13363checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed"133381336413339[[package]]13365[[package]]13340name = "windows_i686_msvc"13366name = "windows_i686_msvc"13341version = "0.32.0"13367version = "0.34.0"13342source = "registry+https://github.com/rust-lang/crates.io-index"13368source = "registry+https://github.com/rust-lang/crates.io-index"13343checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"13369checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956"133441337013345[[package]]13371[[package]]13346name = "windows_x86_64_gnu"13372name = "windows_x86_64_gnu"13347version = "0.32.0"13373version = "0.34.0"13348source = "registry+https://github.com/rust-lang/crates.io-index"13374source = "registry+https://github.com/rust-lang/crates.io-index"13349checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"13375checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4"133501337613351[[package]]13377[[package]]13352name = "windows_x86_64_msvc"13378name = "windows_x86_64_msvc"13353version = "0.32.0"13379version = "0.34.0"13354source = "registry+https://github.com/rust-lang/crates.io-index"13380source = "registry+https://github.com/rust-lang/crates.io-index"13355checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"13381checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9"133561338213357[[package]]13383[[package]]13358name = "winreg"13384name = "winreg"client/rpc/Cargo.tomldiffbeforeafterboth18sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }18sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }19sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }19sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }20sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }20sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }21pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }2122client/rpc/src/lib.rsdiffbeforeafterboth19use codec::Decode;19use codec::Decode;20use jsonrpc_core::{Error as RpcError, ErrorCode, Result};20use jsonrpc_core::{Error as RpcError, ErrorCode, Result};21use jsonrpc_derive::rpc;21use jsonrpc_derive::rpc;22use up_data_structs::{Collection, CollectionId, CollectionStats, TokenId};22use up_data_structs::{Collection, CollectionId, CollectionStats, CollectionLimits, TokenId};23use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};23use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};24use sp_blockchain::HeaderBackend;24use sp_blockchain::HeaderBackend;25use up_rpc::UniqueApi as UniqueRuntimeApi;25use up_rpc::UniqueApi as UniqueRuntimeApi;128 token: TokenId,128 token: TokenId,129 at: Option<BlockHash>,129 at: Option<BlockHash>,130 ) -> Result<Option<u64>>;130 ) -> Result<Option<u64>>;131 #[rpc(name = "unique_effectiveCollectionLimits")]132 fn effective_collection_limits(133 &self,134 collection_id: CollectionId,135 at: Option<BlockHash>,136 ) -> Result<Option<CollectionLimits>>;131}137}132138133pub struct Unique<C, P> {139pub struct Unique<C, P> {210 AccountId: Decode,216 AccountId: Decode,211 C: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,217 C: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,212 C::Api: UniqueRuntimeApi<Block, CrossAccountId, AccountId>,218 C::Api: UniqueRuntimeApi<Block, CrossAccountId, AccountId>,213 CrossAccountId: pallet_common::account::CrossAccountId<AccountId>,219 CrossAccountId: pallet_evm::account::CrossAccountId<AccountId>,214{220{215 pass_method!(account_tokens(collection: CollectionId, account: CrossAccountId) -> Vec<TokenId>);221 pass_method!(account_tokens(collection: CollectionId, account: CrossAccountId) -> Vec<TokenId>);216 pass_method!(token_exists(collection: CollectionId, token: TokenId) -> bool);222 pass_method!(token_exists(collection: CollectionId, token: TokenId) -> bool);232 pass_method!(collection_by_id(collection: CollectionId) -> Option<Collection<AccountId>>);238 pass_method!(collection_by_id(collection: CollectionId) -> Option<Collection<AccountId>>);233 pass_method!(collection_stats() -> CollectionStats);239 pass_method!(collection_stats() -> CollectionStats);234 pass_method!(next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Option<u64>);240 pass_method!(next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Option<u64>);241 pass_method!(effective_collection_limits(collection_id: CollectionId) -> Option<CollectionLimits>);235}242}236243node/cli/Cargo.tomldiffbeforeafterboth302jsonrpc-pubsub = "18.0.0"302jsonrpc-pubsub = "18.0.0"303tokio = { version = "1.17.0", features = ["time"] }303tokio = { version = "1.17.0", features = ["time"] }304304305fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }305fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }306fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }306fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }307fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }307fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }308fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }308fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }309fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }309fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }310fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }310fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }311pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }311pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }312312313unique-rpc = { default-features = false, path = "../rpc" }313unique-rpc = { default-features = false, path = "../rpc" }314314node/cli/src/chain_spec.rsdiffbeforeafterboth212 vec![212 vec![213 get_account_id_from_seed::<sr25519::Public>("Alice"),213 get_account_id_from_seed::<sr25519::Public>("Alice"),214 get_account_id_from_seed::<sr25519::Public>("Bob"),214 get_account_id_from_seed::<sr25519::Public>("Bob"),215 get_account_id_from_seed::<sr25519::Public>("Charlie"),216 get_account_id_from_seed::<sr25519::Public>("Dave"),217 get_account_id_from_seed::<sr25519::Public>("Eve"),218 get_account_id_from_seed::<sr25519::Public>("Ferdie"),219 get_account_id_from_seed::<sr25519::Public>("Alice//stash"),220 get_account_id_from_seed::<sr25519::Public>("Bob//stash"),221 get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),222 get_account_id_from_seed::<sr25519::Public>("Dave//stash"),223 get_account_id_from_seed::<sr25519::Public>("Eve//stash"),224 get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),215 ],225 ],216 1000226 1000217 )227 )node/rpc/Cargo.tomldiffbeforeafterboth41substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }41substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }42tokio = { version = "0.2.25", features = ["macros", "sync"] }42tokio = { version = "0.2.25", features = ["macros", "sync"] }434344pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }44pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }45fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }45fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }46fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }46fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }47fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }47fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }48fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }48fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }49fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }49fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }505051pallet-common = { default-features = false, path = "../../pallets/common" }51pallet-common = { default-features = false, path = "../../pallets/common" }52unique-runtime-common = { default-features = false, path = "../../runtime/common" }52unique-runtime-common = { default-features = false, path = "../../runtime/common" }pallets/common/Cargo.tomldiffbeforeafterboth16sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }19up-evm-mapping = { default-features = false, path = '../../primitives/evm-mapping' }19fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }20up-data-structs = { default-features = false, path = '../../primitives/data-structs' }20up-data-structs = { default-features = false, path = '../../primitives/data-structs' }21pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }21pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }22evm-coder = { default-features = false, path = '../../crates/evm-coder' }22evm-coder = { default-features = false, path = '../../crates/evm-coder' }23pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }23pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }24serde = { version = "1.0.130", default-features = false }24serde = { version = "1.0.130", default-features = false }25scale-info = { version = "2.0.1", default-features = false, features = [25scale-info = { version = "2.0.1", default-features = false, features = [26 "derive",26 "derive",33 "frame-system/std",33 "frame-system/std",34 "sp-runtime/std",34 "sp-runtime/std",35 "sp-std/std",35 "sp-std/std",36 "up-evm-mapping/std",36 "fp-evm-mapping/std",37 "up-data-structs/std",37 "up-data-structs/std",38 "pallet-evm/std",38 "pallet-evm/std",39]39]pallets/common/src/account.rsdiffbeforeafterbothno changes
pallets/common/src/lib.rsdiffbeforeafterboth19use core::ops::{Deref, DerefMut};19use core::ops::{Deref, DerefMut};20use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};20use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};21use sp_std::vec::Vec;21use sp_std::vec::Vec;22use account::CrossAccountId;22use pallet_evm::account::CrossAccountId;23use frame_support::{23use frame_support::{24 dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo},24 dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo},25 ensure, fail,25 ensure, fail,33 TokenId, Weight, WithdrawReasons, CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode,33 TokenId, Weight, WithdrawReasons, CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode,34 NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,34 NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,35 REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits,35 REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits,36 CustomDataLimit, CreateCollectionData, SponsorshipState, CreateItemExData,36 CustomDataLimit, CreateCollectionData, SponsorshipState, CreateItemExData, SponsoringRateLimit,37};37};38pub use pallet::*;38pub use pallet::*;39use sp_core::H160;39use sp_core::H160;40use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};40use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};41pub mod account;42#[cfg(feature = "runtime-benchmarks")]41#[cfg(feature = "runtime-benchmarks")]43pub mod benchmarking;42pub mod benchmarking;44pub mod erc;43pub mod erc;163pub mod pallet {162pub mod pallet {164 use super::*;163 use super::*;165 use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key};164 use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key};166 use account::CrossAccountId;165 use pallet_evm::account;167 use frame_support::traits::Currency;166 use frame_support::traits::Currency;168 use up_data_structs::TokenId;167 use up_data_structs::TokenId;169 use scale_info::TypeInfo;168 use scale_info::TypeInfo;170169171 #[pallet::config]170 #[pallet::config]172 pub trait Config: frame_system::Config + pallet_evm_coder_substrate::Config + TypeInfo {171 pub trait Config:172 frame_system::Config + pallet_evm_coder_substrate::Config + TypeInfo + account::Config173 {173 type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;174 type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;174175 type CrossAccountId: CrossAccountId<Self::AccountId>;176177 type EvmAddressMapping: pallet_evm::AddressMapping<Self::AccountId>;178 type EvmBackwardsAddressMapping: up_evm_mapping::EvmBackwardsAddressMapping<Self::AccountId>;179175180 type Currency: Currency<Self::AccountId>;176 type Currency: Currency<Self::AccountId>;181177422 }418 }423 }419 }420421 pub fn effective_collection_limits(collection: CollectionId) -> Option<CollectionLimits> {422 let collection = <CollectionById<T>>::get(collection);423 if collection.is_none() {424 return None;425 }426427 let collection = collection.unwrap();428 let limits = collection.limits;429 let effective_limits = CollectionLimits {430 account_token_ownership_limit: Some(limits.account_token_ownership_limit()),431 sponsored_data_size: Some(limits.sponsored_data_size()),432 sponsored_data_rate_limit: Some(433 limits434 .sponsored_data_rate_limit435 .unwrap_or(SponsoringRateLimit::SponsoringDisabled),436 ),437 token_limit: Some(limits.token_limit()),438 sponsor_transfer_timeout: Some(limits.sponsor_transfer_timeout(439 match collection.mode {440 CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,441 CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,442 CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,443 },444 )),445 sponsor_approve_timeout: Some(limits.sponsor_approve_timeout()),446 owner_can_transfer: Some(limits.owner_can_transfer()),447 owner_can_destroy: Some(limits.owner_can_destroy()),448 transfers_enabled: Some(limits.transfers_enabled()),449 };450451 Some(effective_limits)452 }424}453}425454426impl<T: Config> Pallet<T> {455impl<T: Config> Pallet<T> {pallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth12sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }12sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }13ethereum = { version = "0.12.0", default-features = false }13ethereum = { version = "0.12.0", default-features = false }14evm-coder = { default-features = false, path = "../../crates/evm-coder" }14evm-coder = { default-features = false, path = "../../crates/evm-coder" }15pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }15pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }16pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }16pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }17frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }19frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }19frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }pallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth15sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }15sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16evm-coder = { default-features = false, path = '../../crates/evm-coder' }16evm-coder = { default-features = false, path = '../../crates/evm-coder' }17pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }17pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }18pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }18pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }19fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }19up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }20up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }20log = "0.4.14"21log = "0.4.14"2122pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth18use evm_coder::{abi::AbiWriter, execution::Result, generate_stubgen, solidity_interface, types::*};18use evm_coder::{abi::AbiWriter, execution::Result, generate_stubgen, solidity_interface, types::*};19use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};19use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};20use pallet_evm::{ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure};20use pallet_evm::{21 ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure,22 account::CrossAccountId,23};21use sp_core::H160;24use sp_core::H160;22use crate::{25use crate::{23 AllowlistEnabled, Config, Owner, Pallet, SponsorBasket, SponsoringRateLimit, SponsoringModeT,26 AllowlistEnabled, Config, Owner, Pallet, SponsorBasket, SponsoringRateLimit, SponsoringModeT,24};27};25use frame_support::traits::Get;28use frame_support::traits::Get;26use up_sponsorship::SponsorshipHandler;29use up_sponsorship::SponsorshipHandler;27use sp_std::{convert::TryInto, vec::Vec};30use sp_std::vec::Vec;283129struct ContractHelpers<T: Config>(SubstrateRecorder<T>);32struct ContractHelpers<T: Config>(SubstrateRecorder<T>);30impl<T: Config> WithRecorder<T> for ContractHelpers<T> {33impl<T: Config> WithRecorder<T> for ContractHelpers<T> {177}180}178181179pub struct HelpersContractSponsoring<T: Config>(PhantomData<*const T>);182pub struct HelpersContractSponsoring<T: Config>(PhantomData<*const T>);180impl<T: Config> SponsorshipHandler<H160, (H160, Vec<u8>)> for HelpersContractSponsoring<T> {183impl<T: Config> SponsorshipHandler<T::CrossAccountId, (H160, Vec<u8>)>184 for HelpersContractSponsoring<T>185{181 fn get_sponsor(who: &H160, call: &(H160, Vec<u8>)) -> Option<H160> {186 fn get_sponsor(who: &T::CrossAccountId, call: &(H160, Vec<u8>)) -> Option<T::CrossAccountId> {182 let mode = <Pallet<T>>::sponsoring_mode(call.0);187 let mode = <Pallet<T>>::sponsoring_mode(call.0);183 if mode == SponsoringModeT::Disabled {188 if mode == SponsoringModeT::Disabled {184 return None;189 return None;185 }190 }191186 if mode == SponsoringModeT::Allowlisted && !<Pallet<T>>::allowed(call.0, *who) {192 if mode == SponsoringModeT::Allowlisted && !<Pallet<T>>::allowed(call.0, *who.as_eth()) {187 return None;193 return None;188 }194 }189 let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;195 let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;190196191 if let Some(last_tx_block) = <SponsorBasket<T>>::get(&call.0, who) {197 if let Some(last_tx_block) = <SponsorBasket<T>>::get(&call.0, who.as_eth()) {192 let limit = <SponsoringRateLimit<T>>::get(&call.0);198 let limit = <SponsoringRateLimit<T>>::get(&call.0);193199194 let timeout = last_tx_block + limit;200 let timeout = last_tx_block + limit;197 }203 }198 }204 }199205200 <SponsorBasket<T>>::insert(&call.0, who, block_number);206 <SponsorBasket<T>>::insert(&call.0, who.as_eth(), block_number);201207202 Some(call.0)208 let sponsor = T::CrossAccountId::from_eth(call.0);209 Some(sponsor)203 }210 }204}211}205212pallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth313132 #[pallet::config]32 #[pallet::config]33 pub trait Config: frame_system::Config + pallet_evm_coder_substrate::Config {33 pub trait Config:34 frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::account::Config35 {34 type ContractAddress: Get<H160>;36 type ContractAddress: Get<H160>;35 type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;37 type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;pallets/evm-migration/Cargo.tomldiffbeforeafterboth15sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }15sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }18pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }19fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }19fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }202021[dependencies.codec]21[dependencies.codec]22default-features = false22default-features = falsepallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth14sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }14sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }15sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }15sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }17pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }18fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }18fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }19pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }19pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }20up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }20up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }21up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }21fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }222223[dependencies.codec]23[dependencies.codec]24default-features = false24default-features = false39 "pallet-ethereum/std",39 "pallet-ethereum/std",40 "fp-evm/std",40 "fp-evm/std",41 "up-sponsorship/std",41 "up-sponsorship/std",42 "up-evm-mapping/std",42 "fp-evm-mapping/std",43]43]4444pallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth20use fp_evm::WithdrawReason;20use fp_evm::WithdrawReason;21use frame_support::traits::{Currency, IsSubType};21use frame_support::traits::{Currency, IsSubType};22pub use pallet::*;22pub use pallet::*;23use pallet_evm::{EVMCurrencyAdapter, EnsureAddressOrigin};23use pallet_evm::{EVMCurrencyAdapter, EnsureAddressOrigin, account::CrossAccountId};24use sp_core::{H160, U256};24use sp_core::{H160, U256};25use sp_runtime::TransactionOutcome;25use sp_runtime::TransactionOutcome;26use up_sponsorship::SponsorshipHandler;26use up_sponsorship::SponsorshipHandler;27use up_evm_mapping::EvmBackwardsAddressMapping;28use pallet_evm::AddressMapping;292730#[frame_support::pallet]28#[frame_support::pallet]31pub mod pallet {29pub mod pallet {35 use sp_std::vec::Vec;33 use sp_std::vec::Vec;363437 #[pallet::config]35 #[pallet::config]38 pub trait Config: frame_system::Config {36 pub trait Config: frame_system::Config + pallet_evm::account::Config {39 type EvmSponsorshipHandler: SponsorshipHandler<H160, (H160, Vec<u8>)>;37 type EvmSponsorshipHandler: SponsorshipHandler<Self::CrossAccountId, (H160, Vec<u8>)>;40 type Currency: Currency<Self::AccountId>;38 type Currency: Currency<Self::AccountId>;41 type EvmBackwardsAddressMapping: EvmBackwardsAddressMapping<Self::AccountId>;42 type EvmAddressMapping: AddressMapping<Self::AccountId>;43 }39 }444045 #[pallet::pallet]41 #[pallet::pallet]60}56}615762pub struct TransactionValidityHack<T: Config>(PhantomData<*const T>);58pub struct TransactionValidityHack<T: Config>(PhantomData<*const T>);63impl<T: Config> fp_evm::TransactionValidityHack for TransactionValidityHack<T> {59impl<T: Config> fp_evm::TransactionValidityHack<T::CrossAccountId> for TransactionValidityHack<T> {64 fn who_pays_fee(origin: H160, reason: &WithdrawReason) -> Option<H160> {60 fn who_pays_fee(origin: H160, reason: &WithdrawReason) -> Option<T::CrossAccountId> {65 match reason {61 match reason {66 WithdrawReason::Call { target, input } => {62 WithdrawReason::Call { target, input } => {67 // This method is only used for checking, we shouldn't touch storage in it63 // This method is only used for checking, we shouldn't touch storage in it68 frame_support::storage::with_transaction(|| {64 frame_support::storage::with_transaction(|| {65 let origin_sub = T::CrossAccountId::from_eth(origin);69 TransactionOutcome::Rollback(T::EvmSponsorshipHandler::get_sponsor(66 TransactionOutcome::Rollback(T::EvmSponsorshipHandler::get_sponsor(70 &origin,67 &origin_sub,71 &(*target, input.clone()),68 &(*target, input.clone()),72 ))69 ))73 })70 })85 type LiquidityInfo = Option<ChargeEvmLiquidityInfo<T>>;82 type LiquidityInfo = Option<ChargeEvmLiquidityInfo<T>>;868387 fn withdraw_fee(84 fn withdraw_fee(88 who: &H160,85 who: &T::CrossAccountId,89 reason: WithdrawReason,86 reason: WithdrawReason,90 fee: U256,87 fee: U256,91 ) -> core::result::Result<Self::LiquidityInfo, pallet_evm::Error<T>> {88 ) -> core::result::Result<Self::LiquidityInfo, pallet_evm::Error<T>> {92 let mut who_pays_fee = *who;93 if let WithdrawReason::Call { target, input } = &reason {89 let who_pays_fee = if let WithdrawReason::Call { target, input } = &reason {94 who_pays_fee = T::EvmSponsorshipHandler::get_sponsor(who, &(*target, input.clone()))90 T::EvmSponsorshipHandler::get_sponsor(who, &(*target, input.clone()))95 .unwrap_or(who_pays_fee);91 .unwrap_or(who.clone())96 }92 } else {93 who.clone()94 };9597 let negative_imbalance = EVMCurrencyAdapter::<<T as Config>::Currency, ()>::withdraw_fee(96 let negative_imbalance = EVMCurrencyAdapter::<<T as Config>::Currency, ()>::withdraw_fee(98 &who_pays_fee,97 &who_pays_fee,99 reason,98 reason,100 fee,99 fee,101 )?;100 )?;101102 Ok(negative_imbalance.map(|i| ChargeEvmLiquidityInfo {102 Ok(negative_imbalance.map(|i| ChargeEvmLiquidityInfo {103 who: who_pays_fee,103 who: who_pays_fee.as_eth().clone(),104 negative_imbalance: i,104 negative_imbalance: i,105 }))105 }))106 }106 }107107108 fn correct_and_deposit_fee(108 fn correct_and_deposit_fee(109 who: &H160,109 who: &T::CrossAccountId,110 corrected_fee: U256,110 corrected_fee: U256,111 already_withdrawn: Self::LiquidityInfo,111 already_withdrawn: Self::LiquidityInfo,112 ) {112 ) {113 <EVMCurrencyAdapter<<T as Config>::Currency, ()> as pallet_evm::OnChargeEVMTransaction<T>>::correct_and_deposit_fee(113 <EVMCurrencyAdapter<<T as Config>::Currency, ()> as pallet_evm::OnChargeEVMTransaction<T>>::correct_and_deposit_fee(114 &already_withdrawn.as_ref().map(|e| e.who).unwrap_or(*who),114 &already_withdrawn.as_ref().map(|e| T::CrossAccountId::from_eth(e.who)).unwrap_or(who.clone()),115 corrected_fee,115 corrected_fee,116 already_withdrawn.map(|e| e.negative_imbalance),116 already_withdrawn.map(|e| e.negative_imbalance),117 )117 )142 <frame_system::RawOrigin<T::AccountId>>::Signed(who.clone()).into(),142 <frame_system::RawOrigin<T::AccountId>>::Signed(who.clone()).into(),143 )143 )144 .ok()?;144 .ok()?;145 let who = T::EvmBackwardsAddressMapping::from_account_id(who.clone());145 let who = T::CrossAccountId::from_sub(who.clone());146 // Effects from EvmSponsorshipHandler are applied in OnChargeEvmTransaction by pallet_evm::runner146 // Effects from EvmSponsorshipHandler are applied in OnChargeEvmTransaction by pallet_evm::runner147 // TODO: Should we implement simulation mode (test, but do not apply effects) in `up-sponsorship`?147 // TODO: Should we implement simulation mode (test, but do not apply effects) in `up-sponsorship`?148 let sponsor = frame_support::storage::with_transaction(|| {148 let sponsor = frame_support::storage::with_transaction(|| {151 &(*target, input.clone()),151 &(*target, input.clone()),152 ))152 ))153 })?;153 })?;154 let sponsor = T::EvmAddressMapping::into_account_id(sponsor);154 Some(sponsor.as_sub().clone())155 Some(sponsor)156 }155 }157 _ => None,156 _ => None,158 }157 }pallets/fungible/Cargo.tomldiffbeforeafterboth22pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }22pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }23ethereum = { version = "0.12.0", default-features = false }23ethereum = { version = "0.12.0", default-features = false }24frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }24frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }25pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }25scale-info = { version = "2.0.1", default-features = false, features = [26scale-info = { version = "2.0.1", default-features = false, features = [26 "derive",27 "derive",27] }28] }39 "ethereum/std",40 "ethereum/std",40 "pallet-evm-coder-substrate/std",41 "pallet-evm-coder-substrate/std",41 'frame-benchmarking/std',42 'frame-benchmarking/std',43 "pallet-evm/std"42]44]43runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']45runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']4446pallets/fungible/src/erc.rsdiffbeforeafterboth21use pallet_common::erc::{CommonEvmHandler, PrecompileResult};21use pallet_common::erc::{CommonEvmHandler, PrecompileResult};22use sp_core::{H160, U256};22use sp_core::{H160, U256};23use sp_std::vec::Vec;23use sp_std::vec::Vec;24use pallet_common::account::CrossAccountId;24use pallet_evm::account::CrossAccountId;25use pallet_evm_coder_substrate::{call, dispatch_to_evm};25use pallet_evm_coder_substrate::{call, dispatch_to_evm};262627use crate::{27use crate::{pallets/fungible/src/lib.rsdiffbeforeafterboth20use frame_support::{ensure};20use frame_support::{ensure};21use up_data_structs::{AccessMode, CollectionId, TokenId, CreateCollectionData};21use up_data_structs::{AccessMode, CollectionId, TokenId, CreateCollectionData};22use pallet_common::{22use pallet_common::{Error as CommonError, Event as CommonEvent, Pallet as PalletCommon};23 Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,23use pallet_evm::account::CrossAccountId;24};25use pallet_evm_coder_substrate::WithRecorder;24use pallet_evm_coder_substrate::WithRecorder;26use sp_core::H160;25use sp_core::H160;36pub mod erc;35pub mod erc;37pub mod weights;36pub mod weights;383739pub type CreateItemData<T> = (<T as pallet_common::Config>::CrossAccountId, u128);38pub type CreateItemData<T> = (<T as pallet_evm::account::Config>::CrossAccountId, u128);40pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;39pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;414042#[frame_support::pallet]41#[frame_support::pallet]pallets/nonfungible/Cargo.tomldiffbeforeafterboth16sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }19pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }19pallet-common = { default-features = false, path = '../common' }20pallet-common = { default-features = false, path = '../common' }20up-data-structs = { default-features = false, path = '../../primitives/data-structs' }21up-data-structs = { default-features = false, path = '../../primitives/data-structs' }21evm-coder = { default-features = false, path = '../../crates/evm-coder' }22evm-coder = { default-features = false, path = '../../crates/evm-coder' }39 "ethereum/std",40 "ethereum/std",40 "pallet-evm-coder-substrate/std",41 "pallet-evm-coder-substrate/std",41 'frame-benchmarking/std',42 'frame-benchmarking/std',43 "pallet-evm/std"42]44]43runtime-benchmarks = [45runtime-benchmarks = [44 'frame-benchmarking',46 'frame-benchmarking',pallets/nonfungible/src/erc.rsdiffbeforeafterboth25use sp_core::{H160, U256};25use sp_core::{H160, U256};26use sp_std::{vec::Vec, vec};26use sp_std::{vec::Vec, vec};27use pallet_common::{27use pallet_common::{28 account::CrossAccountId,29 erc::{CommonEvmHandler, PrecompileResult},28 erc::{CommonEvmHandler, PrecompileResult},30};29};30use pallet_evm::account::CrossAccountId;31use pallet_evm_coder_substrate::call;31use pallet_evm_coder_substrate::call;323233use crate::{33use crate::{pallets/nonfungible/src/lib.rsdiffbeforeafterboth22 AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,22 AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,23};23};24use pallet_common::{24use pallet_common::{Error as CommonError, Pallet as PalletCommon, Event as CommonEvent};25 Error as CommonError, Pallet as PalletCommon, Event as CommonEvent, account::CrossAccountId,25use pallet_evm::account::CrossAccountId;26};27use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};26use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};28use sp_core::H160;27use sp_core::H160;40pub mod erc;39pub mod erc;41pub mod weights;40pub mod weights;424143pub type CreateItemData<T> = CreateNftExData<<T as pallet_common::Config>::CrossAccountId>;42pub type CreateItemData<T> = CreateNftExData<<T as pallet_evm::account::Config>::CrossAccountId>;44pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;43pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;454446#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]45#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]pallets/refungible/Cargo.tomldiffbeforeafterboth16sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }18sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }19pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }19pallet-common = { default-features = false, path = '../common' }20pallet-common = { default-features = false, path = '../common' }20up-data-structs = { default-features = false, path = '../../primitives/data-structs' }21up-data-structs = { default-features = false, path = '../../primitives/data-structs' }21frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }22frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }33 "up-data-structs/std",34 "up-data-structs/std",34 "pallet-common/std",35 "pallet-common/std",35 'frame-benchmarking/std',36 'frame-benchmarking/std',37 "pallet-evm/std",36]38]37runtime-benchmarks = [39runtime-benchmarks = [38 'frame-benchmarking',40 'frame-benchmarking',pallets/refungible/src/lib.rsdiffbeforeafterboth22 CreateCollectionData, CreateRefungibleExData,22 CreateCollectionData, CreateRefungibleExData,23};23};24use pallet_common::{24use pallet_common::{Error as CommonError, Event as CommonEvent, Pallet as PalletCommon};25 Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,25use pallet_evm::account::CrossAccountId;26};27use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};26use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};28use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap};27use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap};pallets/unique/Cargo.tomldiffbeforeafterboth34 'fp-evm/std',34 'fp-evm/std',35 'up-data-structs/std',35 'up-data-structs/std',36 'up-sponsorship/std',36 'up-sponsorship/std',37 'up-evm-mapping/std',37 'fp-evm-mapping/std',38 'sp-std/std',38 'sp-std/std',39 'sp-api/std',39 'sp-api/std',40 'sp-runtime/std',40 'sp-runtime/std',132sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }132sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }133133134up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }134up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }135up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }135fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }136evm-coder = { default-features = false, path = "../../crates/evm-coder" }136evm-coder = { default-features = false, path = "../../crates/evm-coder" }137pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }137pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }138primitive-types = { version = "0.11.1", default-features = false, features = [138primitive-types = { version = "0.11.1", default-features = false, features = [139 "serde_no_std",139 "serde_no_std",140] }140] }141141142pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }142pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }143pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }143pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }144fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }144fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }145hex-literal = "0.3.3"145hex-literal = "0.3.3"146146147pallet-common = { default-features = false, path = "../common" }147pallet-common = { default-features = false, path = "../common" }pallets/unique/src/eth/sponsoring.rsdiffbeforeafterboth24use up_sponsorship::SponsorshipHandler;24use up_sponsorship::SponsorshipHandler;25use core::marker::PhantomData;25use core::marker::PhantomData;26use core::convert::TryInto;26use core::convert::TryInto;27use up_data_structs::{TokenId, CreateItemData, CreateNftData};28use up_evm_mapping::EvmBackwardsAddressMapping;29use pallet_common::account::CrossAccountId;27use pallet_evm::account::CrossAccountId;302831use pallet_nonfungible::erc::{29use pallet_nonfungible::erc::{32 UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721MintableCall, ERC721Call,30 UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721MintableCall, ERC721Call,33};31};34use pallet_fungible::erc::{UniqueFungibleCall, ERC20Call};32use pallet_fungible::erc::{UniqueFungibleCall, ERC20Call};33use up_data_structs::{TokenId, CreateItemData, CreateNftData};353436pub struct UniqueEthSponsorshipHandler<T: Config>(PhantomData<*const T>);35pub struct UniqueEthSponsorshipHandler<T: Config>(PhantomData<*const T>);37impl<T: Config> SponsorshipHandler<H160, (H160, Vec<u8>)> for UniqueEthSponsorshipHandler<T> {36impl<T: Config> SponsorshipHandler<T::CrossAccountId, (H160, Vec<u8>)>37 for UniqueEthSponsorshipHandler<T>38{38 fn get_sponsor(who: &H160, call: &(H160, Vec<u8>)) -> Option<H160> {39 fn get_sponsor(who: &T::CrossAccountId, call: &(H160, Vec<u8>)) -> Option<T::CrossAccountId> {39 let collection_id = map_eth_to_id(&call.0)?;40 let collection_id = map_eth_to_id(&call.0)?;40 let collection = <CollectionHandle<T>>::new(collection_id)?;41 let collection = <CollectionHandle<T>>::new(collection_id)?;41 let sponsor = collection.sponsorship.sponsor()?.clone();42 let sponsor = collection.sponsorship.sponsor()?.clone();42 let sponsor =43 <T as pallet_common::Config>::EvmBackwardsAddressMapping::from_account_id(sponsor);44 let who = T::CrossAccountId::from_eth(*who);45 let (method_id, mut reader) = AbiReader::new_call(&call.1).ok()?;43 let (method_id, mut reader) = AbiReader::new_call(&call.1).ok()?;46 match &collection.mode {44 Some(T::CrossAccountId::from_sub(match &collection.mode {47 crate::CollectionMode::NFT => {45 crate::CollectionMode::NFT => {48 let call = <UniqueNFTCall<T>>::parse(method_id, &mut reader).ok()??;46 let call = <UniqueNFTCall<T>>::parse(method_id, &mut reader).ok()??;49 match call {47 match call {83 #[allow(clippy::single_match)]81 #[allow(clippy::single_match)]84 match call {82 match call {85 UniqueFungibleCall::ERC20(ERC20Call::Transfer { .. }) => {83 UniqueFungibleCall::ERC20(ERC20Call::Transfer { .. }) => {86 withdraw_transfer::<T>(&collection, &who, &TokenId::default())84 withdraw_transfer::<T>(&collection, who, &TokenId::default())87 .map(|()| sponsor)85 .map(|()| sponsor)88 }86 }89 UniqueFungibleCall::ERC20(ERC20Call::TransferFrom { from, .. }) => {87 UniqueFungibleCall::ERC20(ERC20Call::TransferFrom { from, .. }) => {99 }97 }100 }98 }101 _ => None,99 _ => None,102 }100 }?))103 }101 }104}102}105103pallets/unique/src/lib.rsdiffbeforeafterboth54 CreateCollectionData, CustomDataLimit, CreateItemExData,54 CreateCollectionData, CustomDataLimit, CreateItemExData,55};55};56use pallet_common::{56use pallet_common::{CollectionHandle, Pallet as PalletCommon, Error as CommonError, CommonWeightInfo};57 account::CrossAccountId, CollectionHandle, Pallet as PalletCommon, Error as CommonError,57use pallet_evm::account::CrossAccountId;58 CommonWeightInfo,59};60use pallet_refungible::{Pallet as PalletRefungible, RefungibleHandle};58use pallet_refungible::{Pallet as PalletRefungible, RefungibleHandle};61use pallet_fungible::{Pallet as PalletFungible, FungibleHandle};59use pallet_fungible::{Pallet as PalletFungible, FungibleHandle};122 pub enum Event<T>120 pub enum Event<T>123 where121 where124 <T as frame_system::Config>::AccountId,122 <T as frame_system::Config>::AccountId,125 <T as pallet_common::Config>::CrossAccountId,123 <T as pallet_evm::account::Config>::CrossAccountId,126 {124 {127 /// Collection sponsor was removed125 /// Collection sponsor was removed128 ///126 ///pallets/unique/src/mock.rsdiffbeforeafterboth25};25};26use pallet_transaction_payment::{CurrencyAdapter};26use pallet_transaction_payment::{CurrencyAdapter};27use frame_system as system;27use frame_system as system;28use pallet_evm::{AddressMapping, runner::stack::MaybeMirroredLog};28use pallet_evm::{AddressMapping, runner::stack::MaybeMirroredLog, account::CrossAccountId};29use pallet_common::account::{EvmBackwardsAddressMapping, CrossAccountId};29use fp_evm_mapping::EvmBackwardsAddressMapping;30use codec::{Encode, Decode, MaxEncodedLen};30use codec::{Encode, Decode, MaxEncodedLen};31use scale_info::TypeInfo;31use scale_info::TypeInfo;32use up_data_structs::ConstU32;32use up_data_structs::ConstU32;191191192impl pallet_common::Config for Test {192impl pallet_common::Config for Test {193 type Event = ();193 type Event = ();194 type EvmBackwardsAddressMapping = TestEvmBackwardsAddressMapping;195 type EvmAddressMapping = TestEvmAddressMapping;196 type CrossAccountId = TestCrossAccountId;197198 type Currency = Balances;194 type Currency = Balances;199 type CollectionCreationPrice = CollectionCreationPrice;195 type CollectionCreationPrice = CollectionCreationPrice;200 type TreasuryAccountId = TreasuryAccountId;196 type TreasuryAccountId = TreasuryAccountId;201}197}198199impl pallet_evm::account::Config for Test {200 type CrossAccountId = TestCrossAccountId;201 type EvmAddressMapping = TestEvmAddressMapping;202 type EvmBackwardsAddressMapping = TestEvmBackwardsAddressMapping;203}202204203impl pallet_fungible::Config for Test {205impl pallet_fungible::Config for Test {204 type WeightInfo = ();206 type WeightInfo = ();pallets/unique/src/sponsorship.rsdiffbeforeafterboth30 NFT_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, TokenId,30 NFT_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, TokenId,31};31};32use pallet_common::{CollectionHandle};32use pallet_common::{CollectionHandle};33use pallet_common::account::CrossAccountId;33use pallet_evm::account::CrossAccountId;343435pub fn withdraw_transfer<T: Config>(35pub fn withdraw_transfer<T: Config>(36 collection: &CollectionHandle<T>,36 collection: &CollectionHandle<T>,pallets/unique/src/tests.rsdiffbeforeafterboth18use super::*;18use super::*;19use crate::mock::*;19use crate::mock::*;20use crate::{AccessMode, CollectionMode};20use crate::{AccessMode, CollectionMode};21use sp_runtime::AccountId32;21use up_data_structs::{22use up_data_structs::{22 COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,23 COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,23 CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,24 CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,2855 });2856 });2856}2857}28582859#[test]2860fn collection_sponsoring() {2861 new_test_ext().execute_with(|| {2862 // default_limits();2863 let user1 = 1_u64;2864 let user2 = 777_u64;2865 let origin1 = Origin::signed(user1);2866 let origin2 = Origin::signed(user2);2867 let account2 = account(user2);28682869 let collection_id =2870 create_test_collection_for_owner(&CollectionMode::NFT, user1, CollectionId(1));2871 assert_ok!(TemplateModule::set_collection_sponsor(2872 origin1.clone(),2873 collection_id,2874 user12875 ));2876 assert_ok!(TemplateModule::confirm_sponsorship(2877 origin1.clone(),2878 collection_id2879 ));28802881 // Expect error while have no permissions2882 assert!(TemplateModule::create_item(2883 origin2.clone(),2884 collection_id,2885 account2.clone(),2886 default_nft_data().into()2887 )2888 .is_err());28892890 assert_ok!(TemplateModule::set_public_access_mode(2891 origin1.clone(),2892 collection_id,2893 AccessMode::AllowList2894 ));2895 assert_ok!(TemplateModule::add_to_allow_list(2896 origin1.clone(),2897 collection_id,2898 account2.clone()2899 ));2900 assert_ok!(TemplateModule::set_mint_permission(2901 origin1.clone(),2902 collection_id,2903 true2904 ));29052906 assert_ok!(TemplateModule::create_item(2907 origin2,2908 collection_id,2909 account2,2910 default_nft_data().into()2911 ));2912 });2913}28572914primitives/evm-mapping/Cargo.tomldiffbeforeafterbothno changes
primitives/evm-mapping/src/lib.rsdiffbeforeafterbothno changes
primitives/rpc/Cargo.tomldiffbeforeafterboth14sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }14sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }15sp-api = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }15sp-api = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }16sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }17pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }171818[features]19[features]19default = ["std"]20default = ["std"]primitives/rpc/src/lib.rsdiffbeforeafterboth161617#![cfg_attr(not(feature = "std"), no_std)]17#![cfg_attr(not(feature = "std"), no_std)]181819use up_data_structs::{CollectionId, TokenId, Collection, CollectionStats};19use up_data_structs::{CollectionId, TokenId, Collection, CollectionStats, CollectionLimits};20use sp_std::vec::Vec;20use sp_std::vec::Vec;21use sp_core::H160;21use sp_core::H160;22use codec::Decode;22use codec::Decode;28 #[api_version(2)]28 #[api_version(2)]29 pub trait UniqueApi<CrossAccountId, AccountId> where29 pub trait UniqueApi<CrossAccountId, AccountId> where30 AccountId: Decode,30 AccountId: Decode,31 CrossAccountId: pallet_common::account::CrossAccountId<AccountId>,31 CrossAccountId: pallet_evm::account::CrossAccountId<AccountId>,32 {32 {33 #[changed_in(2)]33 #[changed_in(2)]34 fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId>;34 fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId>;60 fn collection_by_id(collection: CollectionId) -> Result<Option<Collection<AccountId>>>;60 fn collection_by_id(collection: CollectionId) -> Result<Option<Collection<AccountId>>>;61 fn collection_stats() -> Result<CollectionStats>;61 fn collection_stats() -> Result<CollectionStats>;62 fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>>;62 fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>>;63 fn effective_collection_limits(collection_id: CollectionId) -> Result<Option<CollectionLimits>>;63 }64 }64}65}6566runtime/common/Cargo.tomldiffbeforeafterboth69[dependencies.fp-rpc]69[dependencies.fp-rpc]70default-features = false70default-features = false71git = "https://github.com/uniquenetwork/frontier.git"71git = "https://github.com/uniquenetwork/frontier.git"72branch = "unique-polkadot-v0.9.18"72branch = "unique-polkadot-v0.9.18-2"737374[dependencies]75pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }runtime/common/src/runtime_apis.rsdiffbeforeafterboth1#[macro_export]1#[macro_export]2macro_rules! impl_common_runtime_apis {2macro_rules! impl_common_runtime_apis {3 (3 (4 $(4 $(5 #![custom_apis]5 #![custom_apis]10 impl_runtime_apis! {10 impl_runtime_apis! {11 $($($custom_apis)+)?11 $($($custom_apis)+)?121213 impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId> for Runtime {13 impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId> for Runtime {14 fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {14 fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {15 dispatch_unique_runtime!(collection.account_tokens(account))15 dispatch_unique_runtime!(collection.account_tokens(account))16 }16 }69 fn collection_stats() -> Result<CollectionStats, DispatchError> {69 fn collection_stats() -> Result<CollectionStats, DispatchError> {70 Ok(<pallet_common::Pallet<Runtime>>::collection_stats())70 Ok(<pallet_common::Pallet<Runtime>>::collection_stats())71 }71 }72 fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>, DispatchError> {72 fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>, DispatchError> {73 Ok(<pallet_unique::UniqueSponsorshipPredict<Runtime> as73 Ok(<pallet_unique::UniqueSponsorshipPredict<Runtime> as74 pallet_unique::SponsorshipPredict<Runtime>>::predict(74 pallet_unique::SponsorshipPredict<Runtime>>::predict(75 collection,75 collection,76 account,76 account,77 token))77 token))78 }7879 }79 fn effective_collection_limits(collection: CollectionId) -> Result<Option<CollectionLimits>, DispatchError> {80 Ok(<pallet_common::Pallet<Runtime>>::effective_collection_limits(collection))81 }82 }808381 impl sp_api::Core<Block> for Runtime {84 impl sp_api::Core<Block> for Runtime {82 fn version() -> RuntimeVersion {85 fn version() -> RuntimeVersion {188 };191 };189192190 <Runtime as pallet_evm::Config>::Runner::call(193 <Runtime as pallet_evm::Config>::Runner::call(191 from,194 CrossAccountId::from_eth(from),192 to,195 to,193 data,196 data,194 value,197 value,222 };225 };223226224 <Runtime as pallet_evm::Config>::Runner::create(227 <Runtime as pallet_evm::Config>::Runner::create(225 from,228 CrossAccountId::from_eth(from),226 data,229 data,227 value,230 value,228 gas_limit.low_u64(),231 gas_limit.low_u64(),411 Ok(batches)414 Ok(batches)412 }415 }413 }416 }417 }414 }418 }415 }419}416}417420runtime/common/src/types.rsdiffbeforeafterboth42pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;42pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;434344pub trait RuntimeInstance {44pub trait RuntimeInstance {45 type CrossAccountId: pallet_common::account::CrossAccountId<sp_runtime::AccountId32>45 type CrossAccountId: pallet_evm::account::CrossAccountId<sp_runtime::AccountId32>46 + Send46 + Send47 + Sync47 + Sync48 + 'static;48 + 'static;runtime/opal/Cargo.tomldiffbeforeafterboth72 'pallet-base-fee/std',72 'pallet-base-fee/std',73 'fp-rpc/std',73 'fp-rpc/std',74 'up-rpc/std',74 'up-rpc/std',75 'up-evm-mapping/std',75 'fp-evm-mapping/std',76 'fp-self-contained/std',76 'fp-self-contained/std',77 'parachain-info/std',77 'parachain-info/std',78 'serde',78 'serde',382derivative = "2.2.0"382derivative = "2.2.0"383pallet-unique = { path = '../../pallets/unique', default-features = false }383pallet-unique = { path = '../../pallets/unique', default-features = false }384up-rpc = { path = "../../primitives/rpc", default-features = false }384up-rpc = { path = "../../primitives/rpc", default-features = false }385up-evm-mapping = { path = "../../primitives/evm-mapping", default-features = false }385fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }386pallet-inflation = { path = '../../pallets/inflation', default-features = false }386pallet-inflation = { path = '../../pallets/inflation', default-features = false }387up-data-structs = { path = '../../primitives/data-structs', default-features = false }387up-data-structs = { path = '../../primitives/data-structs', default-features = false }388pallet-common = { default-features = false, path = "../../pallets/common" }388pallet-common = { default-features = false, path = "../../pallets/common" }396pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }396pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }397pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }397pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }398pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }398pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }399pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }399pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }400pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }400pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }401pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }401pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }402fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }402fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }403fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }403fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }404404405################################################################################405################################################################################406# Build Dependencies406# Build Dependenciesruntime/opal/src/lib.rsdiffbeforeafterboth49// A few exports that help ease life for downstream crates.49// A few exports that help ease life for downstream crates.50pub use pallet_balances::Call as BalancesCall;50pub use pallet_balances::Call as BalancesCall;51pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};51pub use pallet_evm::{52 EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _,53};52pub use frame_support::{54pub use frame_support::{53 construct_runtime, match_type,55 construct_runtime, match_type,117pub const RUNTIME_NAME: &str = "opal";119pub const RUNTIME_NAME: &str = "opal";118pub const TOKEN_SYMBOL: &str = "OPL";120pub const TOKEN_SYMBOL: &str = "OPL";119121120type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;122type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;121123122impl RuntimeInstance for Runtime {124impl RuntimeInstance for Runtime {123 type CrossAccountId = self::CrossAccountId;125 type CrossAccountId = self::CrossAccountId;129 }130 }130}131}132133/// The type for looking up accounts. We don't expect more than 4 billion of them, but you134/// never know...135pub type AccountIndex = u32;136137/// Balance of an account.138pub type Balance = u128;139140/// Index of a transaction in the chain.141pub type Index = u32;142143/// A hash of some data used by the chain.144pub type Hash = sp_core::H256;145146/// Digest item type.147pub type DigestItem = generic::DigestItem;131148132/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know149/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know133/// the specifics of the runtime. They can then be made to be agnostic over specific formats150/// the specifics of the runtime. They can then be made to be agnostic over specific formats152 spec_name: create_runtime_str!(RUNTIME_NAME),169 spec_name: create_runtime_str!(RUNTIME_NAME),153 impl_name: create_runtime_str!(RUNTIME_NAME),170 impl_name: create_runtime_str!(RUNTIME_NAME),154 authoring_version: 1,171 authoring_version: 1,155 spec_version: 918001,172 spec_version: 918010,156 impl_version: 0,173 impl_version: 0,157 apis: RUNTIME_API_VERSIONS,174 apis: RUNTIME_API_VERSIONS,158 transaction_version: 1,175 transaction_version: 1,258 }275 }259}276}277278impl pallet_evm::account::Config for Runtime {279 type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;280 type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;281 type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;282}260283261impl pallet_evm::Config for Runtime {284impl pallet_evm::Config for Runtime {262 type BlockGasLimit = BlockGasLimit;285 type BlockGasLimit = BlockGasLimit;845868846impl pallet_common::Config for Runtime {869impl pallet_common::Config for Runtime {847 type Event = Event;870 type Event = Event;848 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;849 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;850 type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;851852 type Currency = Balances;871 type Currency = Balances;853 type CollectionCreationPrice = CollectionCreationPrice;872 type CollectionCreationPrice = CollectionCreationPrice;912impl pallet_evm_transaction_payment::Config for Runtime {931impl pallet_evm_transaction_payment::Config for Runtime {913 type EvmSponsorshipHandler = EvmSponsorshipHandler;932 type EvmSponsorshipHandler = EvmSponsorshipHandler;914 type Currency = Balances;933 type Currency = Balances;915 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;916 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;917}934}918935919impl pallet_charge_transaction::Config for Runtime {936impl pallet_charge_transaction::Config for Runtime {runtime/quartz/Cargo.tomldiffbeforeafterboth72 'pallet-base-fee/std',72 'pallet-base-fee/std',73 'fp-rpc/std',73 'fp-rpc/std',74 'up-rpc/std',74 'up-rpc/std',75 'up-evm-mapping/std',75 'fp-evm-mapping/std',76 'fp-self-contained/std',76 'fp-self-contained/std',77 'parachain-info/std',77 'parachain-info/std',78 'serde',78 'serde',382derivative = "2.2.0"382derivative = "2.2.0"383pallet-unique = { path = '../../pallets/unique', default-features = false }383pallet-unique = { path = '../../pallets/unique', default-features = false }384up-rpc = { path = "../../primitives/rpc", default-features = false }384up-rpc = { path = "../../primitives/rpc", default-features = false }385up-evm-mapping = { path = "../../primitives/evm-mapping", default-features = false }385fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }386pallet-inflation = { path = '../../pallets/inflation', default-features = false }386pallet-inflation = { path = '../../pallets/inflation', default-features = false }387up-data-structs = { path = '../../primitives/data-structs', default-features = false }387up-data-structs = { path = '../../primitives/data-structs', default-features = false }388pallet-common = { default-features = false, path = "../../pallets/common" }388pallet-common = { default-features = false, path = "../../pallets/common" }396pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }396pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }397pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }397pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }398pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }398pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }399pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }399pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }400pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }400pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }401pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }401pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }402fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }402fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }403fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }403fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }404404405################################################################################405################################################################################406# Build Dependencies406# Build Dependenciesruntime/quartz/src/lib.rsdiffbeforeafterboth49// A few exports that help ease life for downstream crates.49// A few exports that help ease life for downstream crates.50pub use pallet_balances::Call as BalancesCall;50pub use pallet_balances::Call as BalancesCall;51pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};51pub use pallet_evm::{52 EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _,53};52pub use frame_support::{54pub use frame_support::{53 construct_runtime, match_type,55 construct_runtime, match_type,117pub const RUNTIME_NAME: &str = "quartz";119pub const RUNTIME_NAME: &str = "quartz";118pub const TOKEN_SYMBOL: &str = "QTZ";120pub const TOKEN_SYMBOL: &str = "QTZ";119121120type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;122type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;121123122impl RuntimeInstance for Runtime {124impl RuntimeInstance for Runtime {123 type CrossAccountId = self::CrossAccountId;125 type CrossAccountId = self::CrossAccountId;152 spec_name: create_runtime_str!(RUNTIME_NAME),154 spec_name: create_runtime_str!(RUNTIME_NAME),153 impl_name: create_runtime_str!(RUNTIME_NAME),155 impl_name: create_runtime_str!(RUNTIME_NAME),154 authoring_version: 1,156 authoring_version: 1,155 spec_version: 918001,157 spec_version: 918010,156 impl_version: 0,158 impl_version: 0,157 apis: RUNTIME_API_VERSIONS,159 apis: RUNTIME_API_VERSIONS,158 transaction_version: 1,160 transaction_version: 1,845847846impl pallet_common::Config for Runtime {848impl pallet_common::Config for Runtime {847 type Event = Event;849 type Event = Event;848 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;849 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;850 type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;851850852 type Currency = Balances;851 type Currency = Balances;853 type CollectionCreationPrice = CollectionCreationPrice;852 type CollectionCreationPrice = CollectionCreationPrice;854 type TreasuryAccountId = TreasuryAccountId;853 type TreasuryAccountId = TreasuryAccountId;855}854}855856impl pallet_evm::account::Config for Runtime {857 type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;858 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;859 type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;860}856861857impl pallet_fungible::Config for Runtime {862impl pallet_fungible::Config for Runtime {858 type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;863 type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;912impl pallet_evm_transaction_payment::Config for Runtime {917impl pallet_evm_transaction_payment::Config for Runtime {913 type EvmSponsorshipHandler = EvmSponsorshipHandler;918 type EvmSponsorshipHandler = EvmSponsorshipHandler;914 type Currency = Balances;919 type Currency = Balances;915 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;916 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;917}920}918921919impl pallet_charge_transaction::Config for Runtime {922impl pallet_charge_transaction::Config for Runtime {runtime/unique/Cargo.tomldiffbeforeafterboth72 'pallet-base-fee/std',72 'pallet-base-fee/std',73 'fp-rpc/std',73 'fp-rpc/std',74 'up-rpc/std',74 'up-rpc/std',75 'up-evm-mapping/std',75 'fp-evm-mapping/std',76 'fp-self-contained/std',76 'fp-self-contained/std',77 'parachain-info/std',77 'parachain-info/std',78 'serde',78 'serde',382derivative = "2.2.0"382derivative = "2.2.0"383pallet-unique = { path = '../../pallets/unique', default-features = false }383pallet-unique = { path = '../../pallets/unique', default-features = false }384up-rpc = { path = "../../primitives/rpc", default-features = false }384up-rpc = { path = "../../primitives/rpc", default-features = false }385up-evm-mapping = { path = "../../primitives/evm-mapping", default-features = false }386pallet-inflation = { path = '../../pallets/inflation', default-features = false }385pallet-inflation = { path = '../../pallets/inflation', default-features = false }387up-data-structs = { path = '../../primitives/data-structs', default-features = false }386up-data-structs = { path = '../../primitives/data-structs', default-features = false }388pallet-common = { default-features = false, path = "../../pallets/common" }387pallet-common = { default-features = false, path = "../../pallets/common" }396pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }395pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }397pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }396pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }398pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }397pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }399pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }398pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }400pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }399pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }401pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }400pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }402fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }401fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }403fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }402fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }403fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }404404405################################################################################405################################################################################406# Build Dependencies406# Build Dependenciesruntime/unique/src/lib.rsdiffbeforeafterboth49// A few exports that help ease life for downstream crates.49// A few exports that help ease life for downstream crates.50pub use pallet_balances::Call as BalancesCall;50pub use pallet_balances::Call as BalancesCall;51pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};51pub use pallet_evm::{52 EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _,53};52pub use frame_support::{54pub use frame_support::{53 construct_runtime, match_type,55 construct_runtime, match_type,116pub const RUNTIME_NAME: &str = "unique";118pub const RUNTIME_NAME: &str = "unique";117pub const TOKEN_SYMBOL: &str = "UNQ";119pub const TOKEN_SYMBOL: &str = "UNQ";118120119type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;121type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;120122121impl RuntimeInstance for Runtime {123impl RuntimeInstance for Runtime {122 type CrossAccountId = self::CrossAccountId;124 type CrossAccountId = self::CrossAccountId;151 spec_name: create_runtime_str!(RUNTIME_NAME),153 spec_name: create_runtime_str!(RUNTIME_NAME),152 impl_name: create_runtime_str!(RUNTIME_NAME),154 impl_name: create_runtime_str!(RUNTIME_NAME),153 authoring_version: 1,155 authoring_version: 1,154 spec_version: 918001,156 spec_version: 918010,155 impl_version: 0,157 impl_version: 0,156 apis: RUNTIME_API_VERSIONS,158 apis: RUNTIME_API_VERSIONS,157 transaction_version: 1,159 transaction_version: 1,844846845impl pallet_common::Config for Runtime {847impl pallet_common::Config for Runtime {846 type Event = Event;848 type Event = Event;847 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;848 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;849 type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;850851 type Currency = Balances;849 type Currency = Balances;852 type CollectionCreationPrice = CollectionCreationPrice;850 type CollectionCreationPrice = CollectionCreationPrice;853 type TreasuryAccountId = TreasuryAccountId;851 type TreasuryAccountId = TreasuryAccountId;854}852}853854impl pallet_evm::account::Config for Runtime {855 type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;856 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;857 type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;858}855859856impl pallet_fungible::Config for Runtime {860impl pallet_fungible::Config for Runtime {857 type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;861 type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;911impl pallet_evm_transaction_payment::Config for Runtime {915impl pallet_evm_transaction_payment::Config for Runtime {912 type EvmSponsorshipHandler = EvmSponsorshipHandler;916 type EvmSponsorshipHandler = EvmSponsorshipHandler;913 type Currency = Balances;917 type Currency = Balances;914 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;915 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;916}918}917919918impl pallet_charge_transaction::Config for Runtime {920impl pallet_charge_transaction::Config for Runtime {tests/README.mddiffbeforeafterboth20git clone https://github.com/paritytech/polkadot-launch && cd polkadot-launch20git clone https://github.com/paritytech/polkadot-launch && cd polkadot-launch21```21```2222235. Run launch-test-env.sh from the root of this project235. Run launch-testnet.sh from the root of this project2424252526## How to run tests26## How to run teststests/package.jsondiffbeforeafterboth67 "testPalletPresence": "mocha --timeout 9999999 -r ts-node/register ./**/pallet-presence.test.ts",67 "testPalletPresence": "mocha --timeout 9999999 -r ts-node/register ./**/pallet-presence.test.ts",68 "testBlockProduction": "mocha --timeout 9999999 -r ts-node/register ./**/block-production.test.ts",68 "testBlockProduction": "mocha --timeout 9999999 -r ts-node/register ./**/block-production.test.ts",69 "testEnableDisableTransfers": "mocha --timeout 9999999 -r ts-node/register ./**/enableDisableTransfer.test.ts",69 "testEnableDisableTransfers": "mocha --timeout 9999999 -r ts-node/register ./**/enableDisableTransfer.test.ts",70 "testLimits": "mocha --timeout 9999999 -r ts-node/register ./**/limits.test.ts",70 "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",71 "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",71 "polkadot-types-from-defs": "echo 'export default {}' > src/interfaces/lookup.ts && ts-node ./node_modules/.bin/polkadot-types-from-defs --endpoint src/interfaces/metadata.json --input src/interfaces/ --package .",72 "polkadot-types-from-defs": "echo 'export default {}' > src/interfaces/lookup.ts && ts-node ./node_modules/.bin/polkadot-types-from-defs --endpoint src/interfaces/metadata.json --input src/interfaces/ --package .",72 "polkadot-types-from-chain": "ts-node ./node_modules/.bin/polkadot-types-from-chain --endpoint src/interfaces/metadata.json --output src/interfaces/ --package .",73 "polkadot-types-from-chain": "ts-node ./node_modules/.bin/polkadot-types-from-chain --endpoint src/interfaces/metadata.json --output src/interfaces/ --package .",tests/src/eth/base.test.tsdiffbeforeafterboth34 const userB = createEthAccount(web3);34 const userB = createEthAccount(web3);353536 const cost = await recordEthFee(api, userA, () => web3.eth.sendTransaction({from: userA, to: userB, value: '1000000', ...GAS_ARGS}));36 const cost = await recordEthFee(api, userA, () => web3.eth.sendTransaction({from: userA, to: userB, value: '1000000', ...GAS_ARGS}));37 const balanceB = await ethBalanceViaSub(api, userB);37 expect(cost - await ethBalanceViaSub(api, userB) < BigInt(0.2 * Number(UNIQUE))).to.be.true;38 expect(cost - balanceB < BigInt(0.2 * Number(UNIQUE))).to.be.true;38 });39 });394040 itWeb3('NFT transfer is close to 0.15 UNQ', async ({web3, api}) => {41 itWeb3('NFT transfer is close to 0.15 UNQ', async ({web3, api}) => {tests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth24 itWeb3,24 itWeb3,25 SponsoringMode,25 SponsoringMode,26 createEthAccount,26 createEthAccount,27 collectionIdToAddress,28 GAS_ARGS,29 normalizeEvents,30 subToEth,31 executeEthTxOnSub,27} from './util/helpers';32} from './util/helpers';33import {34 addCollectionAdminExpectSuccess,35 createCollectionExpectSuccess,36 getCreateCollectionResult,37 transferBalanceTo,38} from '../util/helpers';39import nonFungibleAbi from './nonFungibleAbi.json';40import {41 submitTransactionAsync,42} from '../substrate/substrate-api';43import getBalance from '../substrate/get-balance';44import {alicesPublicKey} from '../accounts';284529describe('Sponsoring EVM contracts', () => {46describe('Sponsoring EVM contracts', () => {30 itWeb3('Sponsoring can be set by the address that has deployed the contract', async ({api, web3}) => {47 itWeb3('Sponsoring can be set by the address that has deployed the contract', async ({api, web3}) => {200 expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');217 expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');201 });218 });219220 itWeb3('Sponsoring evm address from substrate collection', async ({api, web3}) => {221 const owner = privateKey('//Alice');222 const userEth = createEthAccount(web3);223 const collectionId = await createCollectionExpectSuccess();224225 {226 const tx = api.tx.unique.setCollectionSponsor(collectionId, owner.address);227 const events = await submitTransactionAsync(owner, tx);228 const result = getCreateCollectionResult(events);229 expect(result.success).to.be.true;230 }231 {232 const tx = api.tx.unique.confirmSponsorship(collectionId);233 const events = await submitTransactionAsync(owner, tx);234 const result = getCreateCollectionResult(events);235 expect(result.success).to.be.true;236 }237238 const address = collectionIdToAddress(collectionId);239 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: userEth, ...GAS_ARGS});240241 { // This part should fail, because user not in access list and user have no money242 const nextTokenId = await contract.methods.nextTokenId().call();243 expect(nextTokenId).to.be.equal('1');244 await expect(contract.methods.mintWithTokenURI(245 userEth,246 nextTokenId,247 'Test URI',248 ).call({from: userEth})).to.be.rejectedWith(/PublicMintingNotAllowed/);249 }250251 {252 const tx = api.tx.unique.setPublicAccessMode(collectionId, 'AllowList');253 const events = await submitTransactionAsync(owner, tx);254 const result = getCreateCollectionResult(events);255 expect(result.success).to.be.true;256 }257 {258 const tx = api.tx.unique.addToAllowList(collectionId, {Ethereum: userEth});259 const events = await submitTransactionAsync(owner, tx);260 const result = getCreateCollectionResult(events);261 expect(result.success).to.be.true;262 }263 {264 const tx = api.tx.unique.setMintPermission(collectionId, true);265 const events = await submitTransactionAsync(owner, tx);266 const result = getCreateCollectionResult(events);267 expect(result.success).to.be.true;268 }269270 const [alicesBalanceBefore] = await getBalance(api, [alicesPublicKey]);271272 {273 const nextTokenId = await contract.methods.nextTokenId().call();274 expect(nextTokenId).to.be.equal('1');275 const result = await contract.methods.mintWithTokenURI(276 userEth,277 nextTokenId,278 'Test URI',279 ).send({from: userEth});280 const events = normalizeEvents(result.events);281282 expect(events).to.be.deep.equal([283 {284 address,285 event: 'Transfer',286 args: {287 from: '0x0000000000000000000000000000000000000000',288 to: userEth,289 tokenId: nextTokenId,290 },291 },292 ]);293294 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');295 }296297 const [alicesBalanceAfter] = await getBalance(api, [alicesPublicKey]);298 expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true;299 });300301302 itWeb3('Check that transaction via EVM spend money from substrate address', async ({api, web3}) => {303 const owner = privateKey('//Alice');304 const user = privateKey(`//User/${Date.now()}`);305 const userEth = subToEth(user.address);306 const collectionId = await createCollectionExpectSuccess();307 await addCollectionAdminExpectSuccess(owner, collectionId, {Ethereum: userEth});308 await transferBalanceTo(api, owner, user.address);309310 const address = collectionIdToAddress(collectionId);311 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: userEth, ...GAS_ARGS});312313 const [userBalanceBefore] = await getBalance(api, [user.address]);314315 {316 const nextTokenId = await contract.methods.nextTokenId().call();317 expect(nextTokenId).to.be.equal('1');318 await executeEthTxOnSub(web3, api, user, contract, m => m.mintWithTokenURI(319 userEth,320 nextTokenId,321 'Test URI',322 ));323324 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');325 }326327 const [userBalanceAfter] = await getBalance(api, [user.address]);328 expect(userBalanceAfter < userBalanceBefore).to.be.true;329 });202});330});203331tests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {readFile} from 'fs/promises';17import {readFile} from 'fs/promises';18import {getBalanceSingle, transferBalanceExpectSuccess} from '../../substrate/get-balance';18import {getBalanceSingle} from '../../substrate/get-balance';19import privateKey from '../../substrate/privateKey';19import privateKey from '../../substrate/privateKey';20import {addToAllowListExpectSuccess, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, createItemExpectSuccess, getTokenOwner, setCollectionLimitsExpectSuccess, setCollectionSponsorExpectSuccess, transferExpectSuccess, transferFromExpectSuccess} from '../../util/helpers';20import {21 addToAllowListExpectSuccess, 22 confirmSponsorshipExpectSuccess, 23 createCollectionExpectSuccess, 24 createItemExpectSuccess, 25 getTokenOwner,26 setCollectionLimitsExpectSuccess, 27 setCollectionSponsorExpectSuccess, 28 transferExpectSuccess, 29 transferFromExpectSuccess,30 transferBalanceTo,31} from '../../util/helpers';21import {collectionIdToAddress, contractHelpers, createEthAccountWithBalance, executeEthTxOnSub, GAS_ARGS, itWeb3, SponsoringMode, subToEth, subToEthLowercase, transferBalanceToEth} from '../util/helpers';32import {collectionIdToAddress, contractHelpers, createEthAccountWithBalance, executeEthTxOnSub, GAS_ARGS, itWeb3, SponsoringMode, subToEth, subToEthLowercase, transferBalanceToEth} from '../util/helpers';22import {evmToAddress} from '@polkadot/util-crypto';33import {evmToAddress} from '@polkadot/util-crypto';23import nonFungibleAbi from '../nonFungibleAbi.json';34import nonFungibleAbi from '../nonFungibleAbi.json';24import fungibleAbi from '../fungibleAbi.json';3525import {expect} from 'chai';36import {expect} from 'chai';263727const PRICE = 2000n;38const PRICE = 2000n;87 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Substrate: alice.address});98 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Substrate: alice.address});88 });99 });8910090 // selling for custom tokens excluded from release91 itWeb3.skip('With custom ERC20', async ({api, web3}) => {92 const alice = privateKey('//Alice');93 const matcherOwner = await createEthAccountWithBalance(api, web3);94 const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {95 from: matcherOwner,96 ...GAS_ARGS,97 });98 const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner});99100 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});101 const evmCollection = new web3.eth.Contract(nonFungibleAbi as any, collectionIdToAddress(collectionId), {from: matcherOwner});102103 const fungibleId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});104 const evmFungible = new web3.eth.Contract(fungibleAbi as any, collectionIdToAddress(fungibleId), {from: matcherOwner, ...GAS_ARGS});105 await createFungibleItemExpectSuccess(alice, fungibleId, {Value: PRICE}, {Ethereum: subToEth(alice.address)});106107 const seller = privateKey('//Bob');108109 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);110111 // To transfer item to matcher it first needs to be transfered to EVM account of bob112 await transferExpectSuccess(collectionId, tokenId, seller, {Ethereum: subToEth(seller.address)});113 // Fees will be paid from EVM account, so we should have some balance here114 await transferBalanceExpectSuccess(api, seller, evmToAddress(subToEth(seller.address)), 10n ** 18n);115 await transferBalanceExpectSuccess(api, alice, evmToAddress(subToEth(alice.address)), 10n ** 18n);116117 // Token is owned by seller initially118 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: subToEthLowercase(seller.address)});119120 // Ask121 {122 await executeEthTxOnSub(web3, api, seller, evmCollection, m => m.approve(matcher.options.address, tokenId));123 await executeEthTxOnSub(web3, api, seller, matcher, m => m.addAsk(PRICE, evmFungible.options.address, evmCollection.options.address, tokenId, 1));124 }125126 // Token is transferred to matcher127 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: matcher.options.address.toLowerCase()});128129 // Buy130 {131 const sellerBalanceBeforePurchase = BigInt(await evmFungible.methods.balanceOf(subToEth(seller.address)).call());132 const buyerBalanceBeforePurchase = BigInt(await evmFungible.methods.balanceOf(subToEth(alice.address)).call());133134 await executeEthTxOnSub(web3, api, alice, evmFungible, m => m.approve(matcher.options.address, PRICE));135 // There is two functions named 'buy', so we should provide full signature136 await executeEthTxOnSub(web3, api, alice, matcher, m =>137 m['buy(address,uint256,address,uint256)'](evmCollection.options.address, tokenId, evmFungible.options.address, PRICE));138139 // Approved price is removed from buyer balance, and added to seller140 expect(BigInt(await evmFungible.methods.balanceOf(subToEth(seller.address)).call()) - sellerBalanceBeforePurchase === PRICE);141 expect(buyerBalanceBeforePurchase - BigInt(await evmFungible.methods.balanceOf(subToEth(alice.address)).call()) === PRICE);142 }143144 // Token is transferred to evm account of alice145 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: subToEthLowercase(alice.address)});146147148 // Transfer token to substrate side of alice149 await transferFromExpectSuccess(collectionId, tokenId, alice, {Ethereum: subToEth(alice.address)}, {Substrate: alice.address});150151 // Token is transferred to substrate account of alice152 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Substrate: alice.address});153 });154101155 itWeb3('With escrow', async ({api, web3}) => {102 itWeb3('With escrow', async ({api, web3}) => {156 const alice = privateKey('//Alice');103 const alice = privateKey('//Alice');223 });170 });171172173 itWeb3('Sell tokens from substrate user via EVM contract', async ({api, web3}) => {174 const alice = privateKey('//Alice');175 const matcherOwner = await createEthAccountWithBalance(api, web3);176 const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {177 from: matcherOwner,178 ...GAS_ARGS,179 });180 const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments:[matcherOwner]}).send({from: matcherOwner});181 await transferBalanceToEth(api, alice, matcher.options.address);182183 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});184 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorApproveTimeout: 1});185 const evmCollection = new web3.eth.Contract(nonFungibleAbi as any, collectionIdToAddress(collectionId), {from: matcherOwner});186187 const seller = privateKey(`//Seller/${Date.now()}`);188 await transferBalanceTo(api, alice, seller.address);189 190 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);191192 // To transfer item to matcher it first needs to be transfered to EVM account of bob193 await transferExpectSuccess(collectionId, tokenId, seller, {Ethereum: subToEth(seller.address)});194195 // Token is owned by seller initially196 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: subToEthLowercase(seller.address)});197198 // Ask199 {200 await executeEthTxOnSub(web3, api, seller, evmCollection, m => m.approve(matcher.options.address, tokenId));201 await executeEthTxOnSub(web3, api, seller, matcher, m => m.addAsk(PRICE, '0x0000000000000000000000000000000000000001', evmCollection.options.address, tokenId));202 }203204 // Token is transferred to matcher205 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: matcher.options.address.toLowerCase()});206207 // Buy208 {209 const sellerBalanceBeforePurchase = await getBalanceSingle(api, seller.address);210 await executeEthTxOnSub(web3, api, alice, matcher, m => m.buy(evmCollection.options.address, tokenId), {value: PRICE});211 expect(await getBalanceSingle(api, seller.address) - sellerBalanceBeforePurchase === PRICE);212 }213214 // Token is transferred to evm account of alice215 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: subToEthLowercase(alice.address)});216217 // Transfer token to substrate side of alice218 await transferFromExpectSuccess(collectionId, tokenId, alice, {Ethereum: subToEth(alice.address)}, {Substrate: alice.address});219220 // Token is transferred to substrate account of alice, seller received funds221 expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Substrate: alice.address});222 });224});223});225224tests/src/eth/util/helpers.tsdiffbeforeafterboth29import privateKey from '../../substrate/privateKey';29import privateKey from '../../substrate/privateKey';30import contractHelpersAbi from './contractHelpersAbi.json';30import contractHelpersAbi from './contractHelpersAbi.json';31import getBalance from '../../substrate/get-balance';31import getBalance from '../../substrate/get-balance';32import waitNewBlocks from '../../substrate/wait-new-blocks';323333export const GAS_ARGS = {gas: 2500000};34export const GAS_ARGS = {gas: 2500000};3435241 return collector;242 return collector;242}243}243244245/** 246 * pallet evm_contract_helpers247 * @param web3 248 * @param caller - eth address249 * @returns 250 */244export function contractHelpers(web3: Web3, caller: string) {251export function contractHelpers(web3: Web3, caller: string) {245 return new web3.eth.Contract(contractHelpersAbi as any, '0x842899ECF380553E8a4de75bF534cdf6fBF64049', {from: caller, ...GAS_ARGS});252 return new web3.eth.Contract(contractHelpersAbi as any, '0x842899ECF380553E8a4de75bF534cdf6fBF64049', {from: caller, ...GAS_ARGS});246}253}287294288 await call();295 await call();289296297 // In dev mode, the transaction might not finish processing in time298 await waitNewBlocks(api, 1);290 const after = await ethBalanceViaSub(api, user);299 const after = await ethBalanceViaSub(api, user);291300292 // Can't use .to.be.less, because chai doesn't supports bigint301 // Can't use .to.be.less, because chai doesn't supports biginttests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth104 * No permission to perform action104 * No permission to perform action105 **/105 **/106 NoPermission: AugmentedError<ApiType>;106 NoPermission: AugmentedError<ApiType>;107 /**108 * Not sufficient founds to perform action109 **/110 NotSufficientFounds: AugmentedError<ApiType>;107 /**111 /**108 * Tried to enable permissions which are only permitted to be disabled112 * Tried to enable permissions which are only permitted to be disabled109 **/113 **/tests/src/interfaces/augment-api-events.tsdiffbeforeafterboth4import type { ApiTypes } from '@polkadot/api-base/types';4import type { ApiTypes } from '@polkadot/api-base/types';5import type { Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types-codec';5import type { Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types-codec';6import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';6import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';7import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, OrmlVestingVestingSchedule, PalletCommonAccountBasicCrossAccountIdRepr, SpRuntimeDispatchError, UpDataStructsAccessMode, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';7import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, SpRuntimeDispatchError, UpDataStructsAccessMode, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';889declare module '@polkadot/api-base/types/events' {9declare module '@polkadot/api-base/types/events' {10 export interface AugmentedEvents<ApiType extends ApiTypes> {10 export interface AugmentedEvents<ApiType extends ApiTypes> {68 * 68 * 69 * * amount69 * * amount70 **/70 **/71 Approved: AugmentedEvent<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;71 Approved: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;72 /**72 /**73 * New collection was created73 * New collection was created74 * 74 * 102 * 102 * 103 * * amount: Always 1 for NFT103 * * amount: Always 1 for NFT104 **/104 **/105 ItemCreated: AugmentedEvent<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;105 ItemCreated: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;106 /**106 /**107 * Collection item was burned.107 * Collection item was burned.108 * 108 * 116 * 116 * 117 * * amount: Always 1 for NFT117 * * amount: Always 1 for NFT118 **/118 **/119 ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;119 ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;120 /**120 /**121 * Item was transferred121 * Item was transferred122 * 122 * 130 * 130 * 131 * * amount: Always 1 for NFT131 * * amount: Always 1 for NFT132 **/132 **/133 Transfer: AugmentedEvent<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;133 Transfer: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;134 /**134 /**135 * Generic event135 * Generic event136 **/136 **/483 * 483 * 484 * * user: Address.484 * * user: Address.485 **/485 **/486 AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;486 AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;487 /**487 /**488 * Address was remove from allow list488 * Address was remove from allow list489 * 489 * 493 * 493 * 494 * * user: Address.494 * * user: Address.495 **/495 **/496 AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;496 AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;497 /**497 /**498 * Collection admin was added498 * Collection admin was added499 * 499 * 503 * 503 * 504 * * admin: Admin address.504 * * admin: Admin address.505 **/505 **/506 CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;506 CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;507 /**507 /**508 * Collection admin was removed508 * Collection admin was removed509 * 509 * 513 * 513 * 514 * * admin: Admin address.514 * * admin: Admin address.515 **/515 **/516 CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;516 CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;517 /**517 /**518 * Collection limits was set518 * Collection limits was set519 * 519 * tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth5import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';5import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';6import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';6import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';7import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';7import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';8import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeDigest, UpDataStructsCollection, UpDataStructsCollectionStats } from '@polkadot/types/lookup';8import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeDigest, UpDataStructsCollection, UpDataStructsCollectionStats } from '@polkadot/types/lookup';9import type { Observable } from '@polkadot/types/types';9import type { Observable } from '@polkadot/types/types';101011declare module '@polkadot/api-base/types/storage' {11declare module '@polkadot/api-base/types/storage' {73 /**73 /**74 * Allowlisted collection users74 * Allowlisted collection users75 **/75 **/76 allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;76 allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;77 /**77 /**78 * Collection info78 * Collection info79 **/79 **/87 /**87 /**88 * List of collection admins88 * List of collection admins89 **/89 **/90 isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;90 isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;91 /**91 /**92 * Generic query92 * Generic query93 **/93 **/173 [key: string]: QueryableStorageEntry<ApiType>;173 [key: string]: QueryableStorageEntry<ApiType>;174 };174 };175 fungible: {175 fungible: {176 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]>;176 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;177 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;177 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;178 totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;178 totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;179 /**179 /**180 * Generic query180 * Generic query208 [key: string]: QueryableStorageEntry<ApiType>;208 [key: string]: QueryableStorageEntry<ApiType>;209 };209 };210 nonfungible: {210 nonfungible: {211 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;211 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;212 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletCommonAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;212 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;213 /**213 /**214 * Used to enumerate tokens owned by account214 * Used to enumerate tokens owned by account215 **/215 **/216 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]>;216 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;217 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;217 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;218 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;218 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;219 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;219 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;371 [key: string]: QueryableStorageEntry<ApiType>;371 [key: string]: QueryableStorageEntry<ApiType>;372 };372 };373 refungible: {373 refungible: {374 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;374 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;375 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]>;375 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;376 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]>;376 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]>;377 /**377 /**378 * Used to enumerate tokens owned by account378 * Used to enumerate tokens owned by account379 **/379 **/380 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]>;380 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;381 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;381 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;382 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;382 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;383 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;383 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */2/* eslint-disable */334import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique';4import type { PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsCollectionLimits } from './unique';5import type { AugmentedRpc } from '@polkadot/rpc-core/types';5import type { AugmentedRpc } from '@polkadot/rpc-core/types';6import type { Metadata, StorageKey } from '@polkadot/types';6import type { Metadata, StorageKey } from '@polkadot/types';7import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';7import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';562 /**562 /**563 * Get amount of different user tokens563 * Get amount of different user tokens564 **/564 **/565 accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;565 accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;566 /**566 /**567 * Get tokens owned by account567 * Get tokens owned by account568 **/568 **/569 accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;569 accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;570 /**570 /**571 * Get admin list571 * Get admin list572 **/572 **/573 adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;573 adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;574 /**574 /**575 * Get allowed amount575 * Get allowed amount576 **/576 **/577 allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;577 allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;578 /**578 /**579 * Check if user is allowed to use collection579 * Check if user is allowed to use collection580 **/580 **/581 allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;581 allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;582 /**582 /**583 * Get allowlist583 * Get allowlist584 **/584 **/585 allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;585 allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;586 /**586 /**587 * Get amount of specific account token587 * Get amount of specific account token588 **/588 **/589 balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;589 balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;590 /**590 /**591 * Get collection by specified id591 * Get collection by specified id592 **/592 **/603 * Get token constant metadata603 * Get token constant metadata604 **/604 **/605 constMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;605 constMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;606 /**607 * Get effective collection limits608 **/609 effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;606 /**610 /**607 * Get last token id611 * Get last token id608 **/612 **/614 /**618 /**615 * Get token owner619 * Get token owner616 **/620 **/617 tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<PalletCommonAccountBasicCrossAccountIdRepr>>;621 tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<PalletEvmAccountBasicCrossAccountIdRepr>>;618 /**622 /**619 * Get token variable metadata623 * Get token variable metadata620 **/624 **/tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth5import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';5import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';6import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';6import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';7import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';7import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';8import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';8import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';9910declare module '@polkadot/api-base/types/submittable' {10declare module '@polkadot/api-base/types/submittable' {11 export interface AugmentedSubmittables<ApiType extends ApiTypes> {11 export interface AugmentedSubmittables<ApiType extends ApiTypes> {551 * 551 * 552 * * new_admin_id: Address of new admin to add.552 * * new_admin_id: Address of new admin to add.553 **/553 **/554 addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;554 addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;555 /**555 /**556 * Add an address to allow list.556 * Add an address to allow list.557 * 557 * 566 * 566 * 567 * * address.567 * * address.568 **/568 **/569 addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;569 addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;570 /**570 /**571 * Set, change, or remove approved address to transfer the ownership of the NFT.571 * Set, change, or remove approved address to transfer the ownership of the NFT.572 * 572 * 584 * 584 * 585 * * item_id: ID of the item.585 * * item_id: ID of the item.586 **/586 **/587 approve: AugmentedSubmittable<(spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;587 approve: AugmentedSubmittable<(spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;588 /**588 /**589 * Destroys a concrete instance of NFT on behalf of the owner589 * Destroys a concrete instance of NFT on behalf of the owner590 * See also: [`approve`]590 * See also: [`approve`]603 * 603 * 604 * * from: owner of item604 * * from: owner of item605 **/605 **/606 burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32, u128]>;606 burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32, u128]>;607 /**607 /**608 * Destroys a concrete instance of NFT.608 * Destroys a concrete instance of NFT.609 * 609 * 688 * 688 * 689 * * data: Token data to store on chain.689 * * data: Token data to store on chain.690 **/690 **/691 createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>;691 createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>;692 /**692 /**693 * This method creates multiple items in a collection created with CreateCollection method.693 * This method creates multiple items in a collection created with CreateCollection method.694 * 694 * 709 * 709 * 710 * * owner: Address, initial owner of the NFT.710 * * owner: Address, initial owner of the NFT.711 **/711 **/712 createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec<UpDataStructsCreateItemData> | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, Vec<UpDataStructsCreateItemData>]>;712 createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec<UpDataStructsCreateItemData> | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, Vec<UpDataStructsCreateItemData>]>;713 createMultipleItemsEx: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, data: UpDataStructsCreateItemExData | { NFT: any } | { Fungible: any } | { RefungibleMultipleItems: any } | { RefungibleMultipleOwners: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCreateItemExData]>;713 createMultipleItemsEx: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, data: UpDataStructsCreateItemExData | { NFT: any } | { Fungible: any } | { RefungibleMultipleItems: any } | { RefungibleMultipleOwners: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCreateItemExData]>;714 /**714 /**715 * **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.715 * **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.737 * 737 * 738 * * account_id: Address of admin to remove.738 * * account_id: Address of admin to remove.739 **/739 **/740 removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;740 removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;741 /**741 /**742 * Switch back to pay-per-own-transaction model.742 * Switch back to pay-per-own-transaction model.743 * 743 * 764 * 764 * 765 * * address.765 * * address.766 **/766 **/767 removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;767 removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;768 setCollectionLimits: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: UpDataStructsCollectionLimits | { accountTokenOwnershipLimit?: any; sponsoredDataSize?: any; sponsoredDataRateLimit?: any; tokenLimit?: any; sponsorTransferTimeout?: any; sponsorApproveTimeout?: any; ownerCanTransfer?: any; ownerCanDestroy?: any; transfersEnabled?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCollectionLimits]>;768 setCollectionLimits: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: UpDataStructsCollectionLimits | { accountTokenOwnershipLimit?: any; sponsoredDataSize?: any; sponsoredDataRateLimit?: any; tokenLimit?: any; sponsorTransferTimeout?: any; sponsorApproveTimeout?: any; ownerCanTransfer?: any; ownerCanDestroy?: any; transfersEnabled?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCollectionLimits]>;769 /**769 /**770 * # Permissions770 * # Permissions938 * * Fungible Mode: Must specify transferred amount938 * * Fungible Mode: Must specify transferred amount939 * * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)939 * * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)940 **/940 **/941 transfer: AugmentedSubmittable<(recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;941 transfer: AugmentedSubmittable<(recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;942 /**942 /**943 * Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.943 * Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.944 * 944 * 960 * 960 * 961 * * value: Amount to transfer.961 * * value: Amount to transfer.962 **/962 **/963 transferFrom: AugmentedSubmittable<(from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;963 transferFrom: AugmentedSubmittable<(from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;964 /**964 /**965 * Generic tx965 * Generic tx966 **/966 **/tests/src/interfaces/augment-types.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */2/* eslint-disable */334import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1AbridgedHrmpChannel, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpTrieStorageProof, SpVersionRuntimeVersion, UniqueRuntimeRuntime, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique';4import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1AbridgedHrmpChannel, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique';5import type { Data, StorageKey } from '@polkadot/types';5import type { Data, StorageKey } from '@polkadot/types';6import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';6import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';7import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';7import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';18import type { StatementKind } from '@polkadot/types/interfaces/claims';18import type { StatementKind } from '@polkadot/types/interfaces/claims';19import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';19import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';20import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';20import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';21import type { AliveContractInfo, CodeHash, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';21import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';22import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';22import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';23import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';23import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';24import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';24import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';198 ClassMetadata: ClassMetadata;198 ClassMetadata: ClassMetadata;199 CodecHash: CodecHash;199 CodecHash: CodecHash;200 CodeHash: CodeHash;200 CodeHash: CodeHash;201 CodeSource: CodeSource;201 CodeUploadRequest: CodeUploadRequest;202 CodeUploadRequest: CodeUploadRequest;202 CodeUploadResult: CodeUploadResult;203 CodeUploadResult: CodeUploadResult;203 CodeUploadResultValue: CodeUploadResultValue;204 CodeUploadResultValue: CodeUploadResultValue;250 ContractInfo: ContractInfo;251 ContractInfo: ContractInfo;251 ContractInstantiateResult: ContractInstantiateResult;252 ContractInstantiateResult: ContractInstantiateResult;252 ContractInstantiateResultTo267: ContractInstantiateResultTo267;253 ContractInstantiateResultTo267: ContractInstantiateResultTo267;254 ContractInstantiateResultTo299: ContractInstantiateResultTo299;253 ContractLayoutArray: ContractLayoutArray;255 ContractLayoutArray: ContractLayoutArray;254 ContractLayoutCell: ContractLayoutCell;256 ContractLayoutCell: ContractLayoutCell;255 ContractLayoutEnum: ContractLayoutEnum;257 ContractLayoutEnum: ContractLayoutEnum;591 InstanceId: InstanceId;593 InstanceId: InstanceId;592 InstanceMetadata: InstanceMetadata;594 InstanceMetadata: InstanceMetadata;593 InstantiateRequest: InstantiateRequest;595 InstantiateRequest: InstantiateRequest;596 InstantiateRequestV1: InstantiateRequestV1;597 InstantiateRequestV2: InstantiateRequestV2;594 InstantiateReturnValue: InstantiateReturnValue;598 InstantiateReturnValue: InstantiateReturnValue;599 InstantiateReturnValueOk: InstantiateReturnValueOk;595 InstantiateReturnValueTo267: InstantiateReturnValueTo267;600 InstantiateReturnValueTo267: InstantiateReturnValueTo267;596 InstructionV2: InstructionV2;601 InstructionV2: InstructionV2;597 InstructionWeights: InstructionWeights;602 InstructionWeights: InstructionWeights;707 OffchainAccuracyCompact: OffchainAccuracyCompact;712 OffchainAccuracyCompact: OffchainAccuracyCompact;708 OffenceDetails: OffenceDetails;713 OffenceDetails: OffenceDetails;709 Offender: Offender;714 Offender: Offender;715 OpalRuntimeRuntime: OpalRuntimeRuntime;710 OpaqueCall: OpaqueCall;716 OpaqueCall: OpaqueCall;711 OpaqueMultiaddr: OpaqueMultiaddr;717 OpaqueMultiaddr: OpaqueMultiaddr;712 OpaqueNetworkState: OpaqueNetworkState;718 OpaqueNetworkState: OpaqueNetworkState;746 PalletBalancesReserveData: PalletBalancesReserveData;752 PalletBalancesReserveData: PalletBalancesReserveData;747 PalletCallMetadataLatest: PalletCallMetadataLatest;753 PalletCallMetadataLatest: PalletCallMetadataLatest;748 PalletCallMetadataV14: PalletCallMetadataV14;754 PalletCallMetadataV14: PalletCallMetadataV14;749 PalletCommonAccountBasicCrossAccountIdRepr: PalletCommonAccountBasicCrossAccountIdRepr;750 PalletCommonError: PalletCommonError;755 PalletCommonError: PalletCommonError;751 PalletCommonEvent: PalletCommonEvent;756 PalletCommonEvent: PalletCommonEvent;752 PalletConstantMetadataLatest: PalletConstantMetadataLatest;757 PalletConstantMetadataLatest: PalletConstantMetadataLatest;758 PalletEthereumEvent: PalletEthereumEvent;763 PalletEthereumEvent: PalletEthereumEvent;759 PalletEventMetadataLatest: PalletEventMetadataLatest;764 PalletEventMetadataLatest: PalletEventMetadataLatest;760 PalletEventMetadataV14: PalletEventMetadataV14;765 PalletEventMetadataV14: PalletEventMetadataV14;766 PalletEvmAccountBasicCrossAccountIdRepr: PalletEvmAccountBasicCrossAccountIdRepr;761 PalletEvmCall: PalletEvmCall;767 PalletEvmCall: PalletEvmCall;762 PalletEvmCoderSubstrateError: PalletEvmCoderSubstrateError;768 PalletEvmCoderSubstrateError: PalletEvmCoderSubstrateError;763 PalletEvmContractHelpersError: PalletEvmContractHelpersError;769 PalletEvmContractHelpersError: PalletEvmContractHelpersError;1146 UnappliedSlash: UnappliedSlash;1152 UnappliedSlash: UnappliedSlash;1147 UnappliedSlashOther: UnappliedSlashOther;1153 UnappliedSlashOther: UnappliedSlashOther;1148 UncleEntryItem: UncleEntryItem;1154 UncleEntryItem: UncleEntryItem;1149 UniqueRuntimeRuntime: UniqueRuntimeRuntime;1150 UnknownTransaction: UnknownTransaction;1155 UnknownTransaction: UnknownTransaction;1151 UnlockChunk: UnlockChunk;1156 UnlockChunk: UnlockChunk;1152 UnrewardedRelayer: UnrewardedRelayer;1157 UnrewardedRelayer: UnrewardedRelayer;tests/src/interfaces/lookup.tsdiffbeforeafterboth1254 },1254 },1255 add_to_allow_list: {1255 add_to_allow_list: {1256 collectionId: 'u32',1256 collectionId: 'u32',1257 address: 'PalletCommonAccountBasicCrossAccountIdRepr',1257 address: 'PalletEvmAccountBasicCrossAccountIdRepr',1258 },1258 },1259 remove_from_allow_list: {1259 remove_from_allow_list: {1260 collectionId: 'u32',1260 collectionId: 'u32',1261 address: 'PalletCommonAccountBasicCrossAccountIdRepr',1261 address: 'PalletEvmAccountBasicCrossAccountIdRepr',1262 },1262 },1263 set_public_access_mode: {1263 set_public_access_mode: {1264 collectionId: 'u32',1264 collectionId: 'u32',1274 },1274 },1275 add_collection_admin: {1275 add_collection_admin: {1276 collectionId: 'u32',1276 collectionId: 'u32',1277 newAdminId: 'PalletCommonAccountBasicCrossAccountIdRepr',1277 newAdminId: 'PalletEvmAccountBasicCrossAccountIdRepr',1278 },1278 },1279 remove_collection_admin: {1279 remove_collection_admin: {1280 collectionId: 'u32',1280 collectionId: 'u32',1281 accountId: 'PalletCommonAccountBasicCrossAccountIdRepr',1281 accountId: 'PalletEvmAccountBasicCrossAccountIdRepr',1282 },1282 },1283 set_collection_sponsor: {1283 set_collection_sponsor: {1284 collectionId: 'u32',1284 collectionId: 'u32',1292 },1292 },1293 create_item: {1293 create_item: {1294 collectionId: 'u32',1294 collectionId: 'u32',1295 owner: 'PalletCommonAccountBasicCrossAccountIdRepr',1295 owner: 'PalletEvmAccountBasicCrossAccountIdRepr',1296 data: 'UpDataStructsCreateItemData',1296 data: 'UpDataStructsCreateItemData',1297 },1297 },1298 create_multiple_items: {1298 create_multiple_items: {1299 collectionId: 'u32',1299 collectionId: 'u32',1300 owner: 'PalletCommonAccountBasicCrossAccountIdRepr',1300 owner: 'PalletEvmAccountBasicCrossAccountIdRepr',1301 itemsData: 'Vec<UpDataStructsCreateItemData>',1301 itemsData: 'Vec<UpDataStructsCreateItemData>',1302 },1302 },1303 create_multiple_items_ex: {1303 create_multiple_items_ex: {1315 },1315 },1316 burn_from: {1316 burn_from: {1317 collectionId: 'u32',1317 collectionId: 'u32',1318 from: 'PalletCommonAccountBasicCrossAccountIdRepr',1318 from: 'PalletEvmAccountBasicCrossAccountIdRepr',1319 itemId: 'u32',1319 itemId: 'u32',1320 value: 'u128',1320 value: 'u128',1321 },1321 },1322 transfer: {1322 transfer: {1323 recipient: 'PalletCommonAccountBasicCrossAccountIdRepr',1323 recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',1324 collectionId: 'u32',1324 collectionId: 'u32',1325 itemId: 'u32',1325 itemId: 'u32',1326 value: 'u128',1326 value: 'u128',1327 },1327 },1328 approve: {1328 approve: {1329 spender: 'PalletCommonAccountBasicCrossAccountIdRepr',1329 spender: 'PalletEvmAccountBasicCrossAccountIdRepr',1330 collectionId: 'u32',1330 collectionId: 'u32',1331 itemId: 'u32',1331 itemId: 'u32',1332 amount: 'u128',1332 amount: 'u128',1333 },1333 },1334 transfer_from: {1334 transfer_from: {1335 from: 'PalletCommonAccountBasicCrossAccountIdRepr',1335 from: 'PalletEvmAccountBasicCrossAccountIdRepr',1336 recipient: 'PalletCommonAccountBasicCrossAccountIdRepr',1336 recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',1337 collectionId: 'u32',1337 collectionId: 'u32',1338 itemId: 'u32',1338 itemId: 'u32',1339 value: 'u128',1339 value: 'u128',1437 UpDataStructsMetaUpdatePermission: {1437 UpDataStructsMetaUpdatePermission: {1438 _enum: ['ItemOwner', 'Admin', 'None']1438 _enum: ['ItemOwner', 'Admin', 'None']1439 },1439 },1440 /**1440 /**1441 * Lookup172: pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>1441 * Lookup172: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>1442 **/1442 **/1443 PalletCommonAccountBasicCrossAccountIdRepr: {1443 PalletEvmAccountBasicCrossAccountIdRepr: {1444 _enum: {1444 _enum: {1445 Substrate: 'AccountId32',1445 Substrate: 'AccountId32',1446 Ethereum: 'H160'1446 Ethereum: 'H160'1477 variableData: 'Bytes',1477 variableData: 'Bytes',1478 pieces: 'u128'1478 pieces: 'u128'1479 },1479 },1480 /**1480 /**1481 * Lookup180: up_data_structs::CreateItemExData<pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1481 * Lookup180: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1482 **/1482 **/1483 UpDataStructsCreateItemExData: {1483 UpDataStructsCreateItemExData: {1484 _enum: {1484 _enum: {1485 NFT: 'Vec<UpDataStructsCreateNftExData>',1485 NFT: 'Vec<UpDataStructsCreateNftExData>',1486 Fungible: 'BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>',1486 Fungible: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',1487 RefungibleMultipleItems: 'Vec<UpDataStructsCreateRefungibleExData>',1487 RefungibleMultipleItems: 'Vec<UpDataStructsCreateRefungibleExData>',1488 RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExData'1488 RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExData'1489 }1489 }1490 },1490 },1491 /**1491 /**1492 * Lookup182: up_data_structs::CreateNftExData<pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1492 * Lookup182: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1493 **/1493 **/1494 UpDataStructsCreateNftExData: {1494 UpDataStructsCreateNftExData: {1495 constData: 'Bytes',1495 constData: 'Bytes',1496 variableData: 'Bytes',1496 variableData: 'Bytes',1497 owner: 'PalletCommonAccountBasicCrossAccountIdRepr'1497 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'1498 },1498 },1499 /**1499 /**1500 * Lookup189: up_data_structs::CreateRefungibleExData<pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1500 * Lookup189: up_data_structs::CreateRefungibleExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1501 **/1501 **/1502 UpDataStructsCreateRefungibleExData: {1502 UpDataStructsCreateRefungibleExData: {1503 constData: 'Bytes',1503 constData: 'Bytes',1504 variableData: 'Bytes',1504 variableData: 'Bytes',1505 users: 'BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>'1505 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>'1506 },1506 },1507 /**1507 /**1508 * Lookup192: pallet_template_transaction_payment::Call<T>1508 * Lookup192: pallet_template_transaction_payment::Call<T>1755 RuntimeEnvironmentUpdated: 'Null'1755 RuntimeEnvironmentUpdated: 'Null'1756 }1756 }1757 },1757 },1758 /**1758 /**1759 * Lookup225: frame_system::EventRecord<unique_runtime::Event, primitive_types::H256>1759 * Lookup225: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>1760 **/1760 **/1761 FrameSystemEventRecord: {1761 FrameSystemEventRecord: {1762 phase: 'FrameSystemPhase',1762 phase: 'FrameSystemPhase',1763 event: 'Event',1763 event: 'Event',1901 OverweightServiced: '(u64,u64)'1901 OverweightServiced: '(u64,u64)'1902 }1902 }1903 },1903 },1904 /**1904 /**1905 * Lookup238: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1905 * Lookup238: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1906 **/1906 **/1907 PalletUniqueRawEvent: {1907 PalletUniqueRawEvent: {1908 _enum: {1908 _enum: {1909 CollectionSponsorRemoved: 'u32',1909 CollectionSponsorRemoved: 'u32',1910 CollectionAdminAdded: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)',1910 CollectionAdminAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1911 CollectionOwnedChanged: '(u32,AccountId32)',1911 CollectionOwnedChanged: '(u32,AccountId32)',1912 CollectionSponsorSet: '(u32,AccountId32)',1912 CollectionSponsorSet: '(u32,AccountId32)',1913 ConstOnChainSchemaSet: 'u32',1913 ConstOnChainSchemaSet: 'u32',1914 SponsorshipConfirmed: '(u32,AccountId32)',1914 SponsorshipConfirmed: '(u32,AccountId32)',1915 CollectionAdminRemoved: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)',1915 CollectionAdminRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1916 AllowListAddressRemoved: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)',1916 AllowListAddressRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1917 AllowListAddressAdded: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)',1917 AllowListAddressAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1918 CollectionLimitSet: 'u32',1918 CollectionLimitSet: 'u32',1919 MintPermissionSet: 'u32',1919 MintPermissionSet: 'u32',1920 OffchainSchemaSet: 'u32',1920 OffchainSchemaSet: 'u32',1930 _enum: {1930 _enum: {1931 CollectionCreated: '(u32,u8,AccountId32)',1931 CollectionCreated: '(u32,u8,AccountId32)',1932 CollectionDestroyed: 'u32',1932 CollectionDestroyed: 'u32',1933 ItemCreated: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,u128)',1933 ItemCreated: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1934 ItemDestroyed: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,u128)',1934 ItemDestroyed: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1935 Transfer: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,PalletCommonAccountBasicCrossAccountIdRepr,u128)',1935 Transfer: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1936 Approved: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,PalletCommonAccountBasicCrossAccountIdRepr,u128)'1936 Approved: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)'1937 }1937 }1938 },1938 },1939 /**1939 /**2240 * Lookup297: pallet_common::pallet::Error<T>2240 * Lookup297: pallet_common::pallet::Error<T>2241 **/2241 **/2242 PalletCommonError: {2242 PalletCommonError: {2243 _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'TokenVariableDataLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation']2243 _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'TokenVariableDataLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds']2244 },2244 },2245 /**2245 /**2246 * Lookup299: pallet_fungible::pallet::Error<T>2246 * Lookup299: pallet_fungible::pallet::Error<T>2261 PalletRefungibleError: {2261 PalletRefungibleError: {2262 _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces']2262 _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces']2263 },2263 },2264 /**2264 /**2265 * Lookup305: pallet_nonfungible::ItemData<pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2265 * Lookup305: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2266 **/2266 **/2267 PalletNonfungibleItemData: {2267 PalletNonfungibleItemData: {2268 constData: 'Bytes',2268 constData: 'Bytes',2269 variableData: 'Bytes',2269 variableData: 'Bytes',2270 owner: 'PalletCommonAccountBasicCrossAccountIdRepr'2270 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'2271 },2271 },2272 /**2272 /**2273 * Lookup306: pallet_nonfungible::pallet::Error<T>2273 * Lookup306: pallet_nonfungible::pallet::Error<T>2416 * Lookup344: frame_system::extensions::check_weight::CheckWeight<T>2416 * Lookup344: frame_system::extensions::check_weight::CheckWeight<T>2417 **/2417 **/2418 FrameSystemExtensionsCheckWeight: 'Null',2418 FrameSystemExtensionsCheckWeight: 'Null',2419 /**2419 /**2420 * Lookup345: pallet_template_transaction_payment::ChargeTransactionPayment<unique_runtime::Runtime>2420 * Lookup345: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>2421 **/2421 **/2422 PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',2422 PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',2423 /**2423 /**2424 * Lookup346: unique_runtime::Runtime2424 * Lookup346: opal_runtime::Runtime2425 **/2425 **/2426 UniqueRuntimeRuntime: 'Null'2426 OpalRuntimeRuntime: 'Null'2427};2427};24282428tests/src/interfaces/types-lookup.tsdiffbeforeafterboth1364 readonly isAddToAllowList: boolean;1364 readonly isAddToAllowList: boolean;1365 readonly asAddToAllowList: {1365 readonly asAddToAllowList: {1366 readonly collectionId: u32;1366 readonly collectionId: u32;1367 readonly address: PalletCommonAccountBasicCrossAccountIdRepr;1367 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;1368 } & Struct;1368 } & Struct;1369 readonly isRemoveFromAllowList: boolean;1369 readonly isRemoveFromAllowList: boolean;1370 readonly asRemoveFromAllowList: {1370 readonly asRemoveFromAllowList: {1371 readonly collectionId: u32;1371 readonly collectionId: u32;1372 readonly address: PalletCommonAccountBasicCrossAccountIdRepr;1372 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;1373 } & Struct;1373 } & Struct;1374 readonly isSetPublicAccessMode: boolean;1374 readonly isSetPublicAccessMode: boolean;1375 readonly asSetPublicAccessMode: {1375 readonly asSetPublicAccessMode: {1389 readonly isAddCollectionAdmin: boolean;1389 readonly isAddCollectionAdmin: boolean;1390 readonly asAddCollectionAdmin: {1390 readonly asAddCollectionAdmin: {1391 readonly collectionId: u32;1391 readonly collectionId: u32;1392 readonly newAdminId: PalletCommonAccountBasicCrossAccountIdRepr;1392 readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;1393 } & Struct;1393 } & Struct;1394 readonly isRemoveCollectionAdmin: boolean;1394 readonly isRemoveCollectionAdmin: boolean;1395 readonly asRemoveCollectionAdmin: {1395 readonly asRemoveCollectionAdmin: {1396 readonly collectionId: u32;1396 readonly collectionId: u32;1397 readonly accountId: PalletCommonAccountBasicCrossAccountIdRepr;1397 readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr;1398 } & Struct;1398 } & Struct;1399 readonly isSetCollectionSponsor: boolean;1399 readonly isSetCollectionSponsor: boolean;1400 readonly asSetCollectionSponsor: {1400 readonly asSetCollectionSponsor: {1412 readonly isCreateItem: boolean;1412 readonly isCreateItem: boolean;1413 readonly asCreateItem: {1413 readonly asCreateItem: {1414 readonly collectionId: u32;1414 readonly collectionId: u32;1415 readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;1415 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;1416 readonly data: UpDataStructsCreateItemData;1416 readonly data: UpDataStructsCreateItemData;1417 } & Struct;1417 } & Struct;1418 readonly isCreateMultipleItems: boolean;1418 readonly isCreateMultipleItems: boolean;1419 readonly asCreateMultipleItems: {1419 readonly asCreateMultipleItems: {1420 readonly collectionId: u32;1420 readonly collectionId: u32;1421 readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;1421 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;1422 readonly itemsData: Vec<UpDataStructsCreateItemData>;1422 readonly itemsData: Vec<UpDataStructsCreateItemData>;1423 } & Struct;1423 } & Struct;1424 readonly isCreateMultipleItemsEx: boolean;1424 readonly isCreateMultipleItemsEx: boolean;1440 readonly isBurnFrom: boolean;1440 readonly isBurnFrom: boolean;1441 readonly asBurnFrom: {1441 readonly asBurnFrom: {1442 readonly collectionId: u32;1442 readonly collectionId: u32;1443 readonly from: PalletCommonAccountBasicCrossAccountIdRepr;1443 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;1444 readonly itemId: u32;1444 readonly itemId: u32;1445 readonly value: u128;1445 readonly value: u128;1446 } & Struct;1446 } & Struct;1447 readonly isTransfer: boolean;1447 readonly isTransfer: boolean;1448 readonly asTransfer: {1448 readonly asTransfer: {1449 readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr;1449 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;1450 readonly collectionId: u32;1450 readonly collectionId: u32;1451 readonly itemId: u32;1451 readonly itemId: u32;1452 readonly value: u128;1452 readonly value: u128;1453 } & Struct;1453 } & Struct;1454 readonly isApprove: boolean;1454 readonly isApprove: boolean;1455 readonly asApprove: {1455 readonly asApprove: {1456 readonly spender: PalletCommonAccountBasicCrossAccountIdRepr;1456 readonly spender: PalletEvmAccountBasicCrossAccountIdRepr;1457 readonly collectionId: u32;1457 readonly collectionId: u32;1458 readonly itemId: u32;1458 readonly itemId: u32;1459 readonly amount: u128;1459 readonly amount: u128;1460 } & Struct;1460 } & Struct;1461 readonly isTransferFrom: boolean;1461 readonly isTransferFrom: boolean;1462 readonly asTransferFrom: {1462 readonly asTransferFrom: {1463 readonly from: PalletCommonAccountBasicCrossAccountIdRepr;1463 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;1464 readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr;1464 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;1465 readonly collectionId: u32;1465 readonly collectionId: u32;1466 readonly itemId: u32;1466 readonly itemId: u32;1467 readonly value: u128;1467 readonly value: u128;1573 readonly type: 'ItemOwner' | 'Admin' | 'None';1573 readonly type: 'ItemOwner' | 'Admin' | 'None';1574 }1574 }157515751576 /** @name PalletCommonAccountBasicCrossAccountIdRepr (172) */1576 /** @name PalletEvmAccountBasicCrossAccountIdRepr (172) */1577 export interface PalletCommonAccountBasicCrossAccountIdRepr extends Enum {1577 export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {1578 readonly isSubstrate: boolean;1578 readonly isSubstrate: boolean;1579 readonly asSubstrate: AccountId32;1579 readonly asSubstrate: AccountId32;1580 readonly isEthereum: boolean;1580 readonly isEthereum: boolean;1616 readonly isNft: boolean;1616 readonly isNft: boolean;1617 readonly asNft: Vec<UpDataStructsCreateNftExData>;1617 readonly asNft: Vec<UpDataStructsCreateNftExData>;1618 readonly isFungible: boolean;1618 readonly isFungible: boolean;1619 readonly asFungible: BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>;1619 readonly asFungible: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;1620 readonly isRefungibleMultipleItems: boolean;1620 readonly isRefungibleMultipleItems: boolean;1621 readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExData>;1621 readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExData>;1622 readonly isRefungibleMultipleOwners: boolean;1622 readonly isRefungibleMultipleOwners: boolean;1628 export interface UpDataStructsCreateNftExData extends Struct {1628 export interface UpDataStructsCreateNftExData extends Struct {1629 readonly constData: Bytes;1629 readonly constData: Bytes;1630 readonly variableData: Bytes;1630 readonly variableData: Bytes;1631 readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;1631 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;1632 }1632 }163316331634 /** @name UpDataStructsCreateRefungibleExData (189) */1634 /** @name UpDataStructsCreateRefungibleExData (189) */1635 export interface UpDataStructsCreateRefungibleExData extends Struct {1635 export interface UpDataStructsCreateRefungibleExData extends Struct {1636 readonly constData: Bytes;1636 readonly constData: Bytes;1637 readonly variableData: Bytes;1637 readonly variableData: Bytes;1638 readonly users: BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>;1638 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;1639 }1639 }164016401641 /** @name PalletTemplateTransactionPaymentCall (192) */1641 /** @name PalletTemplateTransactionPaymentCall (192) */2068 readonly isCollectionSponsorRemoved: boolean;2068 readonly isCollectionSponsorRemoved: boolean;2069 readonly asCollectionSponsorRemoved: u32;2069 readonly asCollectionSponsorRemoved: u32;2070 readonly isCollectionAdminAdded: boolean;2070 readonly isCollectionAdminAdded: boolean;2071 readonly asCollectionAdminAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;2071 readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;2072 readonly isCollectionOwnedChanged: boolean;2072 readonly isCollectionOwnedChanged: boolean;2073 readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>;2073 readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>;2074 readonly isCollectionSponsorSet: boolean;2074 readonly isCollectionSponsorSet: boolean;2078 readonly isSponsorshipConfirmed: boolean;2078 readonly isSponsorshipConfirmed: boolean;2079 readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;2079 readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;2080 readonly isCollectionAdminRemoved: boolean;2080 readonly isCollectionAdminRemoved: boolean;2081 readonly asCollectionAdminRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;2081 readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;2082 readonly isAllowListAddressRemoved: boolean;2082 readonly isAllowListAddressRemoved: boolean;2083 readonly asAllowListAddressRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;2083 readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;2084 readonly isAllowListAddressAdded: boolean;2084 readonly isAllowListAddressAdded: boolean;2085 readonly asAllowListAddressAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;2085 readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;2086 readonly isCollectionLimitSet: boolean;2086 readonly isCollectionLimitSet: boolean;2087 readonly asCollectionLimitSet: u32;2087 readonly asCollectionLimitSet: u32;2088 readonly isMintPermissionSet: boolean;2088 readonly isMintPermissionSet: boolean;2105 readonly isCollectionDestroyed: boolean;2105 readonly isCollectionDestroyed: boolean;2106 readonly asCollectionDestroyed: u32;2106 readonly asCollectionDestroyed: u32;2107 readonly isItemCreated: boolean;2107 readonly isItemCreated: boolean;2108 readonly asItemCreated: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;2108 readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;2109 readonly isItemDestroyed: boolean;2109 readonly isItemDestroyed: boolean;2110 readonly asItemDestroyed: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;2110 readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;2111 readonly isTransfer: boolean;2111 readonly isTransfer: boolean;2112 readonly asTransfer: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;2112 readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;2113 readonly isApproved: boolean;2113 readonly isApproved: boolean;2114 readonly asApproved: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;2114 readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;2115 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved';2115 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved';2116 }2116 }211721172462 readonly isCantApproveMoreThanOwned: boolean;2462 readonly isCantApproveMoreThanOwned: boolean;2463 readonly isAddressIsZero: boolean;2463 readonly isAddressIsZero: boolean;2464 readonly isUnsupportedOperation: boolean;2464 readonly isUnsupportedOperation: boolean;2465 readonly isNotSufficientFounds: boolean;2465 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation';2466 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds';2466 }2467 }246724682468 /** @name PalletFungibleError (299) */2469 /** @name PalletFungibleError (299) */2490 export interface PalletNonfungibleItemData extends Struct {2491 export interface PalletNonfungibleItemData extends Struct {2491 readonly constData: Bytes;2492 readonly constData: Bytes;2492 readonly variableData: Bytes;2493 readonly variableData: Bytes;2493 readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;2494 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2494 }2495 }249524962496 /** @name PalletNonfungibleError (306) */2497 /** @name PalletNonfungibleError (306) */2643 /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (345) */2644 /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (345) */2644 export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}2645 export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}264526462646 /** @name UniqueRuntimeRuntime (346) */2647 /** @name OpalRuntimeRuntime (346) */2647 export type UniqueRuntimeRuntime = Null;2648 export type OpalRuntimeRuntime = Null;264826492649} // declare module2650} // declare module26502651tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth22 isOptional?: true;22 isOptional?: true;23};23};242425const CROSS_ACCOUNT_ID_TYPE = 'PalletCommonAccountBasicCrossAccountIdRepr';25const CROSS_ACCOUNT_ID_TYPE = 'PalletEvmAccountBasicCrossAccountIdRepr';262627const collectionParam = {name: 'collection', type: 'u32'};27const collectionParam = {name: 'collection', type: 'u32'};28const tokenParam = {name: 'tokenId', type: 'u32'};28const tokenParam = {name: 'tokenId', type: 'u32'};38export default {38export default {39 types,39 types,40 rpc: {40 rpc: {41 adminlist: fun('Get admin list', [collectionParam], 'Vec<PalletCommonAccountBasicCrossAccountIdRepr>'),41 adminlist: fun('Get admin list', [collectionParam], 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>'),42 allowlist: fun('Get allowlist', [collectionParam], 'Vec<PalletCommonAccountBasicCrossAccountIdRepr>'),42 allowlist: fun('Get allowlist', [collectionParam], 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>'),434344 accountTokens: fun('Get tokens owned by account', [collectionParam, crossAccountParam()], 'Vec<u32>'),44 accountTokens: fun('Get tokens owned by account', [collectionParam, crossAccountParam()], 'Vec<u32>'),45 collectionTokens: fun('Get tokens contained in collection', [collectionParam], 'Vec<u32>'),45 collectionTokens: fun('Get tokens contained in collection', [collectionParam], 'Vec<u32>'),56 collectionStats: fun('Get collection stats', [], 'UpDataStructsCollectionStats'),56 collectionStats: fun('Get collection stats', [], 'UpDataStructsCollectionStats'),57 allowed: fun('Check if user is allowed to use collection', [collectionParam, crossAccountParam()], 'bool'),57 allowed: fun('Check if user is allowed to use collection', [collectionParam, crossAccountParam()], 'bool'),58 nextSponsored: fun('Check if user is allowed to use collection', [collectionParam, crossAccountParam(), tokenParam], 'Option<u64>'),58 nextSponsored: fun('Check if user is allowed to use collection', [collectionParam, crossAccountParam(), tokenParam], 'Option<u64>'),59 effectiveCollectionLimits: fun('Get effective collection limits', [collectionParam], 'Option<UpDataStructsCollectionLimits>'),59 },60 },60};61};6162tests/src/interfaces/unique/types.tsdiffbeforeafterboth654 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';654 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';655}655}656657/** @name OpalRuntimeRuntime */658export interface OpalRuntimeRuntime extends Null {}656659657/** @name OrmlVestingModuleCall */660/** @name OrmlVestingModuleCall */658export interface OrmlVestingModuleCall extends Enum {661export interface OrmlVestingModuleCall extends Enum {858 readonly amount: u128;861 readonly amount: u128;859}862}860861/** @name PalletCommonAccountBasicCrossAccountIdRepr */862export interface PalletCommonAccountBasicCrossAccountIdRepr extends Enum {863 readonly isSubstrate: boolean;864 readonly asSubstrate: AccountId32;865 readonly isEthereum: boolean;866 readonly asEthereum: H160;867 readonly type: 'Substrate' | 'Ethereum';868}869863870/** @name PalletCommonError */864/** @name PalletCommonError */871export interface PalletCommonError extends Enum {865export interface PalletCommonError extends Enum {892 readonly isCantApproveMoreThanOwned: boolean;886 readonly isCantApproveMoreThanOwned: boolean;893 readonly isAddressIsZero: boolean;887 readonly isAddressIsZero: boolean;894 readonly isUnsupportedOperation: boolean;888 readonly isUnsupportedOperation: boolean;889 readonly isNotSufficientFounds: boolean;895 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation';890 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds';896}891}897892898/** @name PalletCommonEvent */893/** @name PalletCommonEvent */902 readonly isCollectionDestroyed: boolean;897 readonly isCollectionDestroyed: boolean;903 readonly asCollectionDestroyed: u32;898 readonly asCollectionDestroyed: u32;904 readonly isItemCreated: boolean;899 readonly isItemCreated: boolean;905 readonly asItemCreated: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;900 readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;906 readonly isItemDestroyed: boolean;901 readonly isItemDestroyed: boolean;907 readonly asItemDestroyed: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;902 readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;908 readonly isTransfer: boolean;903 readonly isTransfer: boolean;909 readonly asTransfer: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;904 readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;910 readonly isApproved: boolean;905 readonly isApproved: boolean;911 readonly asApproved: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;906 readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;912 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved';907 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved';913}908}914909935 readonly type: 'Executed';930 readonly type: 'Executed';936}931}932933/** @name PalletEvmAccountBasicCrossAccountIdRepr */934export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {935 readonly isSubstrate: boolean;936 readonly asSubstrate: AccountId32;937 readonly isEthereum: boolean;938 readonly asEthereum: H160;939 readonly type: 'Substrate' | 'Ethereum';940}937941938/** @name PalletEvmCall */942/** @name PalletEvmCall */939export interface PalletEvmCall extends Enum {943export interface PalletEvmCall extends Enum {1085export interface PalletNonfungibleItemData extends Struct {1089export interface PalletNonfungibleItemData extends Struct {1086 readonly constData: Bytes;1090 readonly constData: Bytes;1087 readonly variableData: Bytes;1091 readonly variableData: Bytes;1088 readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;1092 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;1089}1093}109010941091/** @name PalletRefungibleError */1095/** @name PalletRefungibleError */1259 readonly isAddToAllowList: boolean;1263 readonly isAddToAllowList: boolean;1260 readonly asAddToAllowList: {1264 readonly asAddToAllowList: {1261 readonly collectionId: u32;1265 readonly collectionId: u32;1262 readonly address: PalletCommonAccountBasicCrossAccountIdRepr;1266 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;1263 } & Struct;1267 } & Struct;1264 readonly isRemoveFromAllowList: boolean;1268 readonly isRemoveFromAllowList: boolean;1265 readonly asRemoveFromAllowList: {1269 readonly asRemoveFromAllowList: {1266 readonly collectionId: u32;1270 readonly collectionId: u32;1267 readonly address: PalletCommonAccountBasicCrossAccountIdRepr;1271 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;1268 } & Struct;1272 } & Struct;1269 readonly isSetPublicAccessMode: boolean;1273 readonly isSetPublicAccessMode: boolean;1270 readonly asSetPublicAccessMode: {1274 readonly asSetPublicAccessMode: {1284 readonly isAddCollectionAdmin: boolean;1288 readonly isAddCollectionAdmin: boolean;1285 readonly asAddCollectionAdmin: {1289 readonly asAddCollectionAdmin: {1286 readonly collectionId: u32;1290 readonly collectionId: u32;1287 readonly newAdminId: PalletCommonAccountBasicCrossAccountIdRepr;1291 readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;1288 } & Struct;1292 } & Struct;1289 readonly isRemoveCollectionAdmin: boolean;1293 readonly isRemoveCollectionAdmin: boolean;1290 readonly asRemoveCollectionAdmin: {1294 readonly asRemoveCollectionAdmin: {1291 readonly collectionId: u32;1295 readonly collectionId: u32;1292 readonly accountId: PalletCommonAccountBasicCrossAccountIdRepr;1296 readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr;1293 } & Struct;1297 } & Struct;1294 readonly isSetCollectionSponsor: boolean;1298 readonly isSetCollectionSponsor: boolean;1295 readonly asSetCollectionSponsor: {1299 readonly asSetCollectionSponsor: {1307 readonly isCreateItem: boolean;1311 readonly isCreateItem: boolean;1308 readonly asCreateItem: {1312 readonly asCreateItem: {1309 readonly collectionId: u32;1313 readonly collectionId: u32;1310 readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;1314 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;1311 readonly data: UpDataStructsCreateItemData;1315 readonly data: UpDataStructsCreateItemData;1312 } & Struct;1316 } & Struct;1313 readonly isCreateMultipleItems: boolean;1317 readonly isCreateMultipleItems: boolean;1314 readonly asCreateMultipleItems: {1318 readonly asCreateMultipleItems: {1315 readonly collectionId: u32;1319 readonly collectionId: u32;1316 readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;1320 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;1317 readonly itemsData: Vec<UpDataStructsCreateItemData>;1321 readonly itemsData: Vec<UpDataStructsCreateItemData>;1318 } & Struct;1322 } & Struct;1319 readonly isCreateMultipleItemsEx: boolean;1323 readonly isCreateMultipleItemsEx: boolean;1335 readonly isBurnFrom: boolean;1339 readonly isBurnFrom: boolean;1336 readonly asBurnFrom: {1340 readonly asBurnFrom: {1337 readonly collectionId: u32;1341 readonly collectionId: u32;1338 readonly from: PalletCommonAccountBasicCrossAccountIdRepr;1342 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;1339 readonly itemId: u32;1343 readonly itemId: u32;1340 readonly value: u128;1344 readonly value: u128;1341 } & Struct;1345 } & Struct;1342 readonly isTransfer: boolean;1346 readonly isTransfer: boolean;1343 readonly asTransfer: {1347 readonly asTransfer: {1344 readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr;1348 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;1345 readonly collectionId: u32;1349 readonly collectionId: u32;1346 readonly itemId: u32;1350 readonly itemId: u32;1347 readonly value: u128;1351 readonly value: u128;1348 } & Struct;1352 } & Struct;1349 readonly isApprove: boolean;1353 readonly isApprove: boolean;1350 readonly asApprove: {1354 readonly asApprove: {1351 readonly spender: PalletCommonAccountBasicCrossAccountIdRepr;1355 readonly spender: PalletEvmAccountBasicCrossAccountIdRepr;1352 readonly collectionId: u32;1356 readonly collectionId: u32;1353 readonly itemId: u32;1357 readonly itemId: u32;1354 readonly amount: u128;1358 readonly amount: u128;1355 } & Struct;1359 } & Struct;1356 readonly isTransferFrom: boolean;1360 readonly isTransferFrom: boolean;1357 readonly asTransferFrom: {1361 readonly asTransferFrom: {1358 readonly from: PalletCommonAccountBasicCrossAccountIdRepr;1362 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;1359 readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr;1363 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;1360 readonly collectionId: u32;1364 readonly collectionId: u32;1361 readonly itemId: u32;1365 readonly itemId: u32;1362 readonly value: u128;1366 readonly value: u128;1413 readonly isCollectionSponsorRemoved: boolean;1417 readonly isCollectionSponsorRemoved: boolean;1414 readonly asCollectionSponsorRemoved: u32;1418 readonly asCollectionSponsorRemoved: u32;1415 readonly isCollectionAdminAdded: boolean;1419 readonly isCollectionAdminAdded: boolean;1416 readonly asCollectionAdminAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;1420 readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1417 readonly isCollectionOwnedChanged: boolean;1421 readonly isCollectionOwnedChanged: boolean;1418 readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>;1422 readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>;1419 readonly isCollectionSponsorSet: boolean;1423 readonly isCollectionSponsorSet: boolean;1423 readonly isSponsorshipConfirmed: boolean;1427 readonly isSponsorshipConfirmed: boolean;1424 readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;1428 readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;1425 readonly isCollectionAdminRemoved: boolean;1429 readonly isCollectionAdminRemoved: boolean;1426 readonly asCollectionAdminRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;1430 readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1427 readonly isAllowListAddressRemoved: boolean;1431 readonly isAllowListAddressRemoved: boolean;1428 readonly asAllowListAddressRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;1432 readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1429 readonly isAllowListAddressAdded: boolean;1433 readonly isAllowListAddressAdded: boolean;1430 readonly asAllowListAddressAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;1434 readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1431 readonly isCollectionLimitSet: boolean;1435 readonly isCollectionLimitSet: boolean;1432 readonly asCollectionLimitSet: u32;1436 readonly asCollectionLimitSet: u32;1433 readonly isMintPermissionSet: boolean;1437 readonly isMintPermissionSet: boolean;1722 readonly stateVersion: u8;1726 readonly stateVersion: u8;1723}1727}17241725/** @name UniqueRuntimeRuntime */1726export interface UniqueRuntimeRuntime extends Null {}172717281728/** @name UpDataStructsAccessMode */1729/** @name UpDataStructsAccessMode */1729export interface UpDataStructsAccessMode extends Enum {1730export interface UpDataStructsAccessMode extends Enum {1816 readonly isNft: boolean;1817 readonly isNft: boolean;1817 readonly asNft: Vec<UpDataStructsCreateNftExData>;1818 readonly asNft: Vec<UpDataStructsCreateNftExData>;1818 readonly isFungible: boolean;1819 readonly isFungible: boolean;1819 readonly asFungible: BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr,u128>;1820 readonly asFungible: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr,u128>;1820 readonly isRefungibleMultipleItems: boolean;1821 readonly isRefungibleMultipleItems: boolean;1821 readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExData>;1822 readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExData>;1822 readonly isRefungibleMultipleOwners: boolean;1823 readonly isRefungibleMultipleOwners: boolean;1834export interface UpDataStructsCreateNftExData extends Struct {1835export interface UpDataStructsCreateNftExData extends Struct {1835 readonly constData: Bytes;1836 readonly constData: Bytes;1836 readonly variableData: Bytes;1837 readonly variableData: Bytes;1837 readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;1838 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;1838}1839}183918401840/** @name UpDataStructsCreateReFungibleData */1841/** @name UpDataStructsCreateReFungibleData */1848export interface UpDataStructsCreateRefungibleExData extends Struct {1849export interface UpDataStructsCreateRefungibleExData extends Struct {1849 readonly constData: Bytes;1850 readonly constData: Bytes;1850 readonly variableData: Bytes;1851 readonly variableData: Bytes;1851 readonly users: BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>;1852 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;1852}1853}185318541854/** @name UpDataStructsMetaUpdatePermission */1855/** @name UpDataStructsMetaUpdatePermission */tests/src/limits.test.tsdiffbeforeafterboth396 //expect(aliceBalanceAfterSponsoredTransaction1).to.be.lessThan(aliceBalanceBefore);396 //expect(aliceBalanceAfterSponsoredTransaction1).to.be.lessThan(aliceBalanceBefore);397 });397 });398 399 it('Effective collection limits', async () => {400 await usingApi(async (api) => {401 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});402 403 { // Check that limits is undefined404 const collection = await api.rpc.unique.collectionById(collectionId);405 expect(collection.isSome).to.be.true;406 const limits = collection.unwrap().limits;407 expect(limits).to.be.any;408 409 expect(limits.accountTokenOwnershipLimit.toHuman()).to.be.null;410 expect(limits.sponsoredDataSize.toHuman()).to.be.null;411 expect(limits.sponsoredDataRateLimit.toHuman()).to.be.null;412 expect(limits.tokenLimit.toHuman()).to.be.null;413 expect(limits.sponsorTransferTimeout.toHuman()).to.be.null;414 expect(limits.sponsorApproveTimeout.toHuman()).to.be.null;415 expect(limits.ownerCanTransfer.toHuman()).to.be.null;416 expect(limits.ownerCanDestroy.toHuman()).to.be.null;417 expect(limits.transfersEnabled.toHuman()).to.be.null;418 }419 420 { // Check that limits is undefined for non-existent collection421 const limits = await api.rpc.unique.effectiveCollectionLimits(11111);422 expect(limits.toHuman()).to.be.null;423 }424 425 { // Check that default values defined for collection limits426 const limitsOpt = await api.rpc.unique.effectiveCollectionLimits(collectionId);427 expect(limitsOpt.isNone).to.be.false;428 const limits = limitsOpt.unwrap();429 430 expect(limits.accountTokenOwnershipLimit.toHuman()).to.be.eq('100,000');431 expect(limits.sponsoredDataSize.toHuman()).to.be.eq('2,048');432 expect(limits.sponsoredDataRateLimit.toHuman()).to.be.eq('SponsoringDisabled');433 expect(limits.tokenLimit.toHuman()).to.be.eq('4,294,967,295');434 expect(limits.sponsorTransferTimeout.toHuman()).to.be.eq('5');435 expect(limits.sponsorApproveTimeout.toHuman()).to.be.eq('5');436 expect(limits.ownerCanTransfer.toHuman()).to.be.true;437 expect(limits.ownerCanDestroy.toHuman()).to.be.true;438 expect(limits.transfersEnabled.toHuman()).to.be.true;439 }440441 { //Check the values for collection limits442 await setCollectionLimitsExpectSuccess(alice, collectionId, {443 accountTokenOwnershipLimit: 99_999,444 sponsoredDataSize: 1024,445 tokenLimit: 123,446 transfersEnabled: false,447 });448449 const limitsOpt = await api.rpc.unique.effectiveCollectionLimits(collectionId);450 expect(limitsOpt.isNone).to.be.false;451 const limits = limitsOpt.unwrap();452 453 expect(limits.accountTokenOwnershipLimit.toHuman()).to.be.eq('99,999');454 expect(limits.sponsoredDataSize.toHuman()).to.be.eq('1,024');455 expect(limits.sponsoredDataRateLimit.toHuman()).to.be.eq('SponsoringDisabled');456 expect(limits.tokenLimit.toHuman()).to.be.eq('123');457 expect(limits.sponsorTransferTimeout.toHuman()).to.be.eq('5');458 expect(limits.sponsorApproveTimeout.toHuman()).to.be.eq('5');459 expect(limits.ownerCanTransfer.toHuman()).to.be.true;460 expect(limits.ownerCanDestroy.toHuman()).to.be.true;461 expect(limits.transfersEnabled.toHuman()).to.be.false;462 }463 });464 });398});465});399466467tests/src/util/helpers.tsdiffbeforeafterboth344 // Run the CreateCollection transaction344 // Run the CreateCollection transaction345 const alicePrivateKey = privateKey('//Alice');345 const alicePrivateKey = privateKey('//Alice');346 const tx = api.tx.unique.createCollectionEx({name: strToUTF16(name), description: strToUTF16(description), tokenPrefix: strToUTF16(tokenPrefix), mode: modeprm as any});346 const tx = api.tx.unique.createCollectionEx({name: strToUTF16(name), description: strToUTF16(description), tokenPrefix: strToUTF16(tokenPrefix), mode: modeprm as any});347 const events = await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;347 await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;348 const result = getCreateCollectionResult(events);349348350 // Get number of collections after the transaction349 // Get number of collections after the transaction351 const collectionCountAfter = await getCreatedCollectionCount(api);350 const collectionCountAfter = await getCreatedCollectionCount(api);352351353 // What to expect352 // What to expect354 // tslint:disable-next-line:no-unused-expression355 expect(result.success).to.be.false;356 expect(collectionCountAfter).to.be.equal(collectionCountBefore, 'Error: Collection with incorrect data created.');353 expect(collectionCountAfter).to.be.equal(collectionCountBefore, 'Error: Collection with incorrect data created.');357 });354 });358}355}839 return balance;836 return balance;840}837}838839export async function transferBalanceTo(api: ApiPromise, source: IKeyringPair, target: string, amount = 1000n * UNIQUE) {840 const tx = api.tx.balances.transfer(target, amount);841 const events = await submitTransactionAsync(source, tx);842 const result = getGenericResult(events);843 expect(result.success).to.be.true;844}841845842export async function846export async function843scheduleTransferExpectSuccess(847scheduleTransferExpectSuccess(