git.delta.rocks / unique-network / refs/commits / d11053909f47

difftreelog

refactor move evm-coder out of the repo

Yaroslav Bolyukin2023-02-05parent: #8dd063b.patch.diff
in: master

51 files changed

modifiedCargo.lockdiffbeforeafterboth
172172
173[[package]]173[[package]]
174name = "anyhow"174name = "anyhow"
175version = "1.0.68"175version = "1.0.69"
176source = "registry+https://github.com/rust-lang/crates.io-index"176source = "registry+https://github.com/rust-lang/crates.io-index"
177checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61"177checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
178178
179[[package]]179[[package]]
180name = "app-promotion-rpc"180name = "app-promotion-rpc"
343343
344[[package]]344[[package]]
345name = "async-trait"345name = "async-trait"
346version = "0.1.63"346version = "0.1.64"
347source = "registry+https://github.com/rust-lang/crates.io-index"347source = "registry+https://github.com/rust-lang/crates.io-index"
348checksum = "eff18d764974428cf3a9328e23fc5c986f5fbed46e6cd4cdf42544df5d297ec1"348checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2"
349dependencies = [349dependencies = [
350 "proc-macro2",350 "proc-macro2",
351 "quote",351 "quote",
704source = "registry+https://github.com/rust-lang/crates.io-index"704source = "registry+https://github.com/rust-lang/crates.io-index"
705checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"705checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
706
707[[package]]
708name = "bstr"
709version = "0.2.17"
710source = "registry+https://github.com/rust-lang/crates.io-index"
711checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
712dependencies = [
713 "lazy_static",
714 "memchr",
715 "regex-automata",
716]
717706
718[[package]]707[[package]]
719name = "bstr"708name = "bstr"
720version = "1.1.0"709version = "1.2.0"
721source = "registry+https://github.com/rust-lang/crates.io-index"710source = "registry+https://github.com/rust-lang/crates.io-index"
722checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b"711checksum = "b7f0778972c64420fdedc63f09919c8a88bda7b25135357fd25a5d9f3257e832"
723dependencies = [712dependencies = [
724 "memchr",713 "memchr",
725 "serde",714 "serde",
760749
761[[package]]750[[package]]
762name = "bytes"751name = "bytes"
763version = "1.3.0"752version = "1.4.0"
764source = "registry+https://github.com/rust-lang/crates.io-index"753source = "registry+https://github.com/rust-lang/crates.io-index"
765checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"754checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
766755
767[[package]]756[[package]]
768name = "bzip2-sys"757name = "bzip2-sys"
808797
809[[package]]798[[package]]
810name = "cc"799name = "cc"
811version = "1.0.78"800version = "1.0.79"
812source = "registry+https://github.com/rust-lang/crates.io-index"801source = "registry+https://github.com/rust-lang/crates.io-index"
813checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"802checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
814dependencies = [803dependencies = [
815 "jobserver",804 "jobserver",
816]805]
1026 "crossbeam-utils",1015 "crossbeam-utils",
1027]1016]
1028
1029[[package]]
1030name = "console"
1031version = "0.15.5"
1032source = "registry+https://github.com/rust-lang/crates.io-index"
1033checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60"
1034dependencies = [
1035 "encode_unicode",
1036 "lazy_static",
1037 "libc",
1038 "windows-sys 0.42.0",
1039]
10401017
1041[[package]]1018[[package]]
1042name = "const-oid"1019name = "const-oid"
12211198
1222[[package]]1199[[package]]
1223name = "crc"1200name = "crc"
1224version = "3.0.0"1201version = "3.0.1"
1225source = "registry+https://github.com/rust-lang/crates.io-index"1202source = "registry+https://github.com/rust-lang/crates.io-index"
1226checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3"1203checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
1227dependencies = [1204dependencies = [
1228 "crc-catalog",1205 "crc-catalog",
1229]1206]
18741851
1875[[package]]1852[[package]]
1876name = "curve25519-dalek"1853name = "curve25519-dalek"
1877version = "4.0.0-pre.5"1854version = "4.0.0-rc.0"
1878source = "registry+https://github.com/rust-lang/crates.io-index"1855source = "registry+https://github.com/rust-lang/crates.io-index"
1879checksum = "67bc65846be335cb20f4e52d49a437b773a2c1fdb42b19fc84e79e6f6771536f"1856checksum = "8da00a7a9a4eb92a0a0f8e75660926d48f0d0f3c537e455c457bcdaa1e16b1ac"
1880dependencies = [1857dependencies = [
1881 "cfg-if",1858 "cfg-if",
1882 "fiat-crypto",1859 "fiat-crypto",
18881865
1889[[package]]1866[[package]]
1890name = "cxx"1867name = "cxx"
1891version = "1.0.87"1868version = "1.0.89"
1892source = "registry+https://github.com/rust-lang/crates.io-index"1869source = "registry+https://github.com/rust-lang/crates.io-index"
1893checksum = "b61a7545f753a88bcbe0a70de1fcc0221e10bfc752f576754fa91e663db1622e"1870checksum = "bc831ee6a32dd495436e317595e639a587aa9907bef96fe6e6abc290ab6204e9"
1894dependencies = [1871dependencies = [
1895 "cc",1872 "cc",
1896 "cxxbridge-flags",1873 "cxxbridge-flags",
19001877
1901[[package]]1878[[package]]
1902name = "cxx-build"1879name = "cxx-build"
1903version = "1.0.87"1880version = "1.0.89"
1904source = "registry+https://github.com/rust-lang/crates.io-index"1881source = "registry+https://github.com/rust-lang/crates.io-index"
1905checksum = "f464457d494b5ed6905c63b0c4704842aba319084a0a3561cdc1359536b53200"1882checksum = "94331d54f1b1a8895cd81049f7eaaaef9d05a7dcb4d1fd08bf3ff0806246789d"
1906dependencies = [1883dependencies = [
1907 "cc",1884 "cc",
1908 "codespan-reporting",1885 "codespan-reporting",
19151892
1916[[package]]1893[[package]]
1917name = "cxxbridge-flags"1894name = "cxxbridge-flags"
1918version = "1.0.87"1895version = "1.0.89"
1919source = "registry+https://github.com/rust-lang/crates.io-index"1896source = "registry+https://github.com/rust-lang/crates.io-index"
1920checksum = "43c7119ce3a3701ed81aca8410b9acf6fc399d2629d057b87e2efa4e63a3aaea"1897checksum = "48dcd35ba14ca9b40d6e4b4b39961f23d835dbb8eed74565ded361d93e1feb8a"
19211898
1922[[package]]1899[[package]]
1923name = "cxxbridge-macro"1900name = "cxxbridge-macro"
1924version = "1.0.87"1901version = "1.0.89"
1925source = "registry+https://github.com/rust-lang/crates.io-index"1902source = "registry+https://github.com/rust-lang/crates.io-index"
1926checksum = "65e07508b90551e610910fa648a1878991d367064997a596135b86df30daf07e"1903checksum = "81bbeb29798b407ccd82a3324ade1a7286e0d29851475990b612670f6f5124d2"
1927dependencies = [1904dependencies = [
1928 "proc-macro2",1905 "proc-macro2",
1929 "quote",1906 "quote",
22682245
2269[[package]]2246[[package]]
2270name = "either"2247name = "either"
2271version = "1.8.0"2248version = "1.8.1"
2272source = "registry+https://github.com/rust-lang/crates.io-index"2249source = "registry+https://github.com/rust-lang/crates.io-index"
2273checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"2250checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
22742251
2275[[package]]2252[[package]]
2276name = "elliptic-curve"2253name = "elliptic-curve"
2294 "zeroize",2271 "zeroize",
2295]2272]
2296
2297[[package]]
2298name = "encode_unicode"
2299version = "0.3.6"
2300source = "registry+https://github.com/rust-lang/crates.io-index"
2301checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
23022273
2303[[package]]2274[[package]]
2304name = "enum-as-inner"2275name = "enum-as-inner"
24742445
2475[[package]]2446[[package]]
2476name = "evm-coder"2447name = "evm-coder"
2477version = "0.1.6"2448version = "0.3.0"
2449source = "git+https://github.com/uniquenetwork/evm-coder?tag=v0.3.0#c4bfdf39d84fbe74c6178417177f2a7f81d92bdd"
2478dependencies = [2450dependencies = [
2479 "ethereum",2451 "ethereum",
2480 "evm-coder-procedural",2452 "evm-coder-procedural",
2481 "evm-core",
2482 "frame-support",
2483 "hex",
2484 "hex-literal",
2485 "impl-trait-for-tuples",2453 "impl-trait-for-tuples",
2486 "primitive-types",2454 "primitive-types",
2487 "sha3-const",2455 "sha3-const",
2488 "similar-asserts",
2489 "trybuild",
2490]2456]
24912457
2492[[package]]2458[[package]]
2493name = "evm-coder-procedural"2459name = "evm-coder-procedural"
2494version = "0.2.3"2460version = "0.3.0"
2461source = "git+https://github.com/uniquenetwork/evm-coder?tag=v0.3.0#c4bfdf39d84fbe74c6178417177f2a7f81d92bdd"
2495dependencies = [2462dependencies = [
2496 "Inflector",2463 "Inflector",
2497 "hex",2464 "hex",
2501 "syn",2468 "syn",
2502]2469]
2470
2471[[package]]
2472name = "evm-coder-substrate-procedural"
2473version = "0.1.0"
2474dependencies = [
2475 "proc-macro2",
2476 "quote",
2477 "syn",
2478]
25032479
2504[[package]]2480[[package]]
2505name = "evm-core"2481name = "evm-core"
32273203
3228[[package]]3204[[package]]
3229name = "fs_extra"3205name = "fs_extra"
3230version = "1.2.0"3206version = "1.3.0"
3231source = "registry+https://github.com/rust-lang/crates.io-index"3207source = "registry+https://github.com/rust-lang/crates.io-index"
3232checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"3208checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
32333209
3234[[package]]3210[[package]]
3235name = "funty"3211name = "funty"
32393215
3240[[package]]3216[[package]]
3241name = "futures"3217name = "futures"
3242version = "0.3.25"3218version = "0.3.26"
3243source = "registry+https://github.com/rust-lang/crates.io-index"3219source = "registry+https://github.com/rust-lang/crates.io-index"
3244checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0"3220checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84"
3245dependencies = [3221dependencies = [
3246 "futures-channel",3222 "futures-channel",
3247 "futures-core",3223 "futures-core",
32543230
3255[[package]]3231[[package]]
3256name = "futures-channel"3232name = "futures-channel"
3257version = "0.3.25"3233version = "0.3.26"
3258source = "registry+https://github.com/rust-lang/crates.io-index"3234source = "registry+https://github.com/rust-lang/crates.io-index"
3259checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"3235checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5"
3260dependencies = [3236dependencies = [
3261 "futures-core",3237 "futures-core",
3262 "futures-sink",3238 "futures-sink",
3263]3239]
32643240
3265[[package]]3241[[package]]
3266name = "futures-core"3242name = "futures-core"
3267version = "0.3.25"3243version = "0.3.26"
3268source = "registry+https://github.com/rust-lang/crates.io-index"3244source = "registry+https://github.com/rust-lang/crates.io-index"
3269checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac"3245checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608"
32703246
3271[[package]]3247[[package]]
3272name = "futures-executor"3248name = "futures-executor"
3273version = "0.3.25"3249version = "0.3.26"
3274source = "registry+https://github.com/rust-lang/crates.io-index"3250source = "registry+https://github.com/rust-lang/crates.io-index"
3275checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2"3251checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e"
3276dependencies = [3252dependencies = [
3277 "futures-core",3253 "futures-core",
3278 "futures-task",3254 "futures-task",
32823258
3283[[package]]3259[[package]]
3284name = "futures-io"3260name = "futures-io"
3285version = "0.3.25"3261version = "0.3.26"
3286source = "registry+https://github.com/rust-lang/crates.io-index"3262source = "registry+https://github.com/rust-lang/crates.io-index"
3287checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"3263checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531"
32883264
3289[[package]]3265[[package]]
3290name = "futures-lite"3266name = "futures-lite"
33033279
3304[[package]]3280[[package]]
3305name = "futures-macro"3281name = "futures-macro"
3306version = "0.3.25"3282version = "0.3.26"
3307source = "registry+https://github.com/rust-lang/crates.io-index"3283source = "registry+https://github.com/rust-lang/crates.io-index"
3308checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"3284checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70"
3309dependencies = [3285dependencies = [
3310 "proc-macro2",3286 "proc-macro2",
3311 "quote",3287 "quote",
33253301
3326[[package]]3302[[package]]
3327name = "futures-sink"3303name = "futures-sink"
3328version = "0.3.25"3304version = "0.3.26"
3329source = "registry+https://github.com/rust-lang/crates.io-index"3305source = "registry+https://github.com/rust-lang/crates.io-index"
3330checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9"3306checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364"
33313307
3332[[package]]3308[[package]]
3333name = "futures-task"3309name = "futures-task"
3334version = "0.3.25"3310version = "0.3.26"
3335source = "registry+https://github.com/rust-lang/crates.io-index"3311source = "registry+https://github.com/rust-lang/crates.io-index"
3336checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea"3312checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366"
33373313
3338[[package]]3314[[package]]
3339name = "futures-timer"3315name = "futures-timer"
33433319
3344[[package]]3320[[package]]
3345name = "futures-util"3321name = "futures-util"
3346version = "0.3.25"3322version = "0.3.26"
3347source = "registry+https://github.com/rust-lang/crates.io-index"3323source = "registry+https://github.com/rust-lang/crates.io-index"
3348checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"3324checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1"
3349dependencies = [3325dependencies = [
3350 "futures-channel",3326 "futures-channel",
3351 "futures-core",3327 "futures-core",
3469checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc"3445checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc"
3470dependencies = [3446dependencies = [
3471 "aho-corasick",3447 "aho-corasick",
3472 "bstr 1.1.0",3448 "bstr",
3473 "fnv",3449 "fnv",
3474 "log",3450 "log",
3475 "regex",3451 "regex",
35453521
3546[[package]]3522[[package]]
3547name = "heck"3523name = "heck"
3548version = "0.4.0"3524version = "0.4.1"
3549source = "registry+https://github.com/rust-lang/crates.io-index"3525source = "registry+https://github.com/rust-lang/crates.io-index"
3550checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"3526checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
35513527
3552[[package]]3528[[package]]
3553name = "hermit-abi"3529name = "hermit-abi"
3567 "libc",3543 "libc",
3568]3544]
3545
3546[[package]]
3547name = "hermit-abi"
3548version = "0.3.0"
3549source = "registry+https://github.com/rust-lang/crates.io-index"
3550checksum = "856b5cb0902c2b6d65d5fd97dfa30f9b70c7538e770b98eab5ed52d8db923e01"
35693551
3570[[package]]3552[[package]]
3571name = "hex"3553name = "hex"
36973679
3698[[package]]3680[[package]]
3699name = "hyper"3681name = "hyper"
3700version = "0.14.23"3682version = "0.14.24"
3701source = "registry+https://github.com/rust-lang/crates.io-index"3683source = "registry+https://github.com/rust-lang/crates.io-index"
3702checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c"3684checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c"
3703dependencies = [3685dependencies = [
3704 "bytes",3686 "bytes",
3705 "futures-channel",3687 "futures-channel",
39143896
3915[[package]]3897[[package]]
3916name = "io-lifetimes"3898name = "io-lifetimes"
3917version = "1.0.4"3899version = "1.0.5"
3918source = "registry+https://github.com/rust-lang/crates.io-index"3900source = "registry+https://github.com/rust-lang/crates.io-index"
3919checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e"3901checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3"
3920dependencies = [3902dependencies = [
3921 "libc",3903 "libc",
3922 "windows-sys 0.42.0",3904 "windows-sys 0.45.0",
3923]3905]
39243906
3925[[package]]3907[[package]]
39483930
3949[[package]]3931[[package]]
3950name = "is-terminal"3932name = "is-terminal"
3951version = "0.4.2"3933version = "0.4.3"
3952source = "registry+https://github.com/rust-lang/crates.io-index"3934source = "registry+https://github.com/rust-lang/crates.io-index"
3953checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189"3935checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef"
3954dependencies = [3936dependencies = [
3955 "hermit-abi 0.2.6",3937 "hermit-abi 0.3.0",
3956 "io-lifetimes 1.0.4",3938 "io-lifetimes 1.0.5",
3957 "rustix 0.36.7",3939 "rustix 0.36.8",
3958 "windows-sys 0.42.0",3940 "windows-sys 0.45.0",
3959]3941]
39603942
3961[[package]]3943[[package]]
39843966
3985[[package]]3967[[package]]
3986name = "js-sys"3968name = "js-sys"
3987version = "0.3.60"3969version = "0.3.61"
3988source = "registry+https://github.com/rust-lang/crates.io-index"3970source = "registry+https://github.com/rust-lang/crates.io-index"
3989checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"3971checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
3990dependencies = [3972dependencies = [
3991 "wasm-bindgen",3973 "wasm-bindgen",
3992]3974]
4974source = "registry+https://github.com/rust-lang/crates.io-index"4956source = "registry+https://github.com/rust-lang/crates.io-index"
4975checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb"4957checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb"
4976dependencies = [4958dependencies = [
4977 "rustix 0.36.7",4959 "rustix 0.36.8",
4978]4960]
49794961
4980[[package]]4962[[package]]
52845266
5285[[package]]5267[[package]]
5286name = "netlink-packet-utils"5268name = "netlink-packet-utils"
5287version = "0.5.1"5269version = "0.5.2"
5288source = "registry+https://github.com/rust-lang/crates.io-index"5270source = "registry+https://github.com/rust-lang/crates.io-index"
5289checksum = "25af9cf0dc55498b7bd94a1508af7a78706aa0ab715a73c5169273e03c84845e"5271checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34"
5290dependencies = [5272dependencies = [
5291 "anyhow",5273 "anyhow",
5292 "byteorder",5274 "byteorder",
6248version = "0.1.3"6230version = "0.1.3"
6249dependencies = [6231dependencies = [
6250 "evm-coder",6232 "evm-coder",
6233 "evm-coder-substrate-procedural",
6234 "evm-core",
6251 "frame-benchmarking",6235 "frame-benchmarking",
6252 "frame-support",6236 "frame-support",
6253 "frame-system",6237 "frame-system",
6256 "scale-info",6240 "scale-info",
6257 "sp-core",6241 "sp-core",
6258 "sp-std",6242 "sp-std",
6243 "spez",
6259 "up-data-structs",6244 "up-data-structs",
6260]6245]
62616246
72727257
7273[[package]]7258[[package]]
7274name = "parity-scale-codec"7259name = "parity-scale-codec"
7275version = "3.2.2"7260version = "3.3.0"
7276source = "registry+https://github.com/rust-lang/crates.io-index"7261source = "registry+https://github.com/rust-lang/crates.io-index"
7277checksum = "e7ab01d0f889e957861bc65888d5ccbe82c158d0270136ba46820d43837cdf72"7262checksum = "c3840933452adf7b3b9145e27086a5a3376c619dca1a21b1e5a5af0d54979bed"
7278dependencies = [7263dependencies = [
7279 "arrayvec 0.7.2",7264 "arrayvec 0.7.2",
7280 "bitvec",7265 "bitvec",
7333checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"7318checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
7334dependencies = [7319dependencies = [
7335 "lock_api",7320 "lock_api",
7336 "parking_lot_core 0.9.6",7321 "parking_lot_core 0.9.7",
7337]7322]
73387323
7339[[package]]7324[[package]]
73527337
7353[[package]]7338[[package]]
7354name = "parking_lot_core"7339name = "parking_lot_core"
7355version = "0.9.6"7340version = "0.9.7"
7356source = "registry+https://github.com/rust-lang/crates.io-index"7341source = "registry+https://github.com/rust-lang/crates.io-index"
7357checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf"7342checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
7358dependencies = [7343dependencies = [
7359 "cfg-if",7344 "cfg-if",
7360 "libc",7345 "libc",
7361 "redox_syscall",7346 "redox_syscall",
7362 "smallvec",7347 "smallvec",
7363 "windows-sys 0.42.0",7348 "windows-sys 0.45.0",
7364]7349]
73657350
7366[[package]]7351[[package]]
8837 "version_check",8822 "version_check",
8838]8823]
8824
8825[[package]]
8826name = "proc-macro-hack"
8827version = "0.5.20+deprecated"
8828source = "registry+https://github.com/rust-lang/crates.io-index"
8829checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
88398830
8840[[package]]8831[[package]]
8841name = "proc-macro2"8832name = "proc-macro2"
8842version = "1.0.50"8833version = "1.0.51"
8843source = "registry+https://github.com/rust-lang/crates.io-index"8834source = "registry+https://github.com/rust-lang/crates.io-index"
8844checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2"8835checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6"
8845dependencies = [8836dependencies = [
8846 "unicode-ident",8837 "unicode-ident",
8847]8838]
96759666
9676[[package]]9667[[package]]
9677name = "rustix"9668name = "rustix"
9678version = "0.36.7"9669version = "0.36.8"
9679source = "registry+https://github.com/rust-lang/crates.io-index"9670source = "registry+https://github.com/rust-lang/crates.io-index"
9680checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03"9671checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644"
9681dependencies = [9672dependencies = [
9682 "bitflags",9673 "bitflags",
9683 "errno",9674 "errno",
9684 "io-lifetimes 1.0.4",9675 "io-lifetimes 1.0.5",
9685 "libc",9676 "libc",
9686 "linux-raw-sys 0.1.4",9677 "linux-raw-sys 0.1.4",
9687 "windows-sys 0.42.0",9678 "windows-sys 0.45.0",
9688]9679]
96899680
9690[[package]]9681[[package]]
1099610987
10997[[package]]10988[[package]]
10998name = "security-framework"10989name = "security-framework"
10999version = "2.8.1"10990version = "2.8.2"
11000source = "registry+https://github.com/rust-lang/crates.io-index"10991source = "registry+https://github.com/rust-lang/crates.io-index"
11001checksum = "7c4437699b6d34972de58652c68b98cb5b53a4199ab126db8e20ec8ded29a721"10992checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254"
11002dependencies = [10993dependencies = [
11003 "bitflags",10994 "bitflags",
11004 "core-foundation",10995 "core-foundation",
1107211063
11073[[package]]11064[[package]]
11074name = "serde_json"11065name = "serde_json"
11075version = "1.0.91"11066version = "1.0.92"
11076source = "registry+https://github.com/rust-lang/crates.io-index"11067source = "registry+https://github.com/rust-lang/crates.io-index"
11077checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"11068checksum = "7434af0dc1cbd59268aa98b4c22c131c0584d2232f6fb166efb993e2832e896a"
11078dependencies = [11069dependencies = [
11079 "itoa",11070 "itoa",
11080 "ryu",11071 "ryu",
11205 "paste",11196 "paste",
11206]11197]
11207
11208[[package]]
11209name = "similar"
11210version = "2.2.1"
11211source = "registry+https://github.com/rust-lang/crates.io-index"
11212checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf"
11213dependencies = [
11214 "bstr 0.2.17",
11215 "unicode-segmentation",
11216]
11217
11218[[package]]
11219name = "similar-asserts"
11220version = "1.4.2"
11221source = "registry+https://github.com/rust-lang/crates.io-index"
11222checksum = "bbf644ad016b75129f01a34a355dcb8d66a5bc803e417c7a77cc5d5ee9fa0f18"
11223dependencies = [
11224 "console",
11225 "similar",
11226]
1122711198
11228[[package]]11199[[package]]
11229name = "slab"11200name = "slab"
1127511246
11276[[package]]11247[[package]]
11277name = "snow"11248name = "snow"
11278version = "0.9.0"11249version = "0.9.1"
11279source = "registry+https://github.com/rust-lang/crates.io-index"11250source = "registry+https://github.com/rust-lang/crates.io-index"
11280checksum = "774d05a3edae07ce6d68ea6984f3c05e9bba8927e3dd591e3b479e5b03213d0d"11251checksum = "12ba5f4d4ff12bdb6a169ed51b7c48c0e0ac4b0b4b31012b2571e97d78d3201d"
11281dependencies = [11252dependencies = [
11282 "aes-gcm 0.9.4",11253 "aes-gcm 0.9.4",
11283 "blake2",11254 "blake2",
11284 "chacha20poly1305",11255 "chacha20poly1305",
11285 "curve25519-dalek 4.0.0-pre.5",11256 "curve25519-dalek 4.0.0-rc.0",
11286 "rand_core 0.6.4",11257 "rand_core 0.6.4",
11287 "ring",11258 "ring",
11288 "rustc_version 0.4.0",11259 "rustc_version 0.4.0",
12030 "sp-std",12001 "sp-std",
12031]12002]
12003
12004[[package]]
12005name = "spez"
12006version = "0.1.1"
12007source = "registry+https://github.com/rust-lang/crates.io-index"
12008checksum = "304d2fd6a79879f77b207ba8cd5079c22f872eaad65a3fb8d71799e5bacf368b"
12009dependencies = [
12010 "proc-macro-hack",
12011 "spez-macros",
12012]
12013
12014[[package]]
12015name = "spez-macros"
12016version = "0.1.0"
12017source = "registry+https://github.com/rust-lang/crates.io-index"
12018checksum = "c7fa06037d8ccb6cdadc151129062ebc9e4281c1ea44b2c704582245d017d1dc"
12019dependencies = [
12020 "proc-macro-hack",
12021 "proc-macro2",
12022 "quote",
12023 "syn",
12024]
1203212025
12033[[package]]12026[[package]]
12034name = "spin"12027name = "spin"
1261212605
12613[[package]]12606[[package]]
12614name = "tinyvec_macros"12607name = "tinyvec_macros"
12615version = "0.1.0"12608version = "0.1.1"
12616source = "registry+https://github.com/rust-lang/crates.io-index"12609source = "registry+https://github.com/rust-lang/crates.io-index"
12617checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"12610checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
1261812611
12619[[package]]12612[[package]]
12620name = "tokio"12613name = "tokio"
12621version = "1.24.2"12614version = "1.25.0"
12622source = "registry+https://github.com/rust-lang/crates.io-index"12615source = "registry+https://github.com/rust-lang/crates.io-index"
12623checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb"12616checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af"
12624dependencies = [12617dependencies = [
12625 "autocfg",12618 "autocfg",
12626 "bytes",12619 "bytes",
1270212695
12703[[package]]12696[[package]]
12704name = "toml_edit"12697name = "toml_edit"
12705version = "0.18.0"12698version = "0.18.1"
12706source = "registry+https://github.com/rust-lang/crates.io-index"12699source = "registry+https://github.com/rust-lang/crates.io-index"
12707checksum = "729bfd096e40da9c001f778f5cdecbd2957929a24e10e5883d9392220a751581"12700checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b"
12708dependencies = [12701dependencies = [
12709 "indexmap",12702 "indexmap",
12710 "nom8",12703 "nom8",
12978 "zstd",12971 "zstd",
12979]12972]
12980
12981[[package]]
12982name = "trybuild"
12983version = "1.0.76"
12984source = "registry+https://github.com/rust-lang/crates.io-index"
12985checksum = "6ed2c57956f91546d4d33614265a85d55c8e1ab91484853a10335894786d7db6"
12986dependencies = [
12987 "glob",
12988 "once_cell",
12989 "serde",
12990 "serde_derive",
12991 "serde_json",
12992 "termcolor",
12993 "toml",
12994]
1299512973
12996[[package]]12974[[package]]
12997name = "tt-call"12975name = "tt-call"
13109 "tinyvec",13087 "tinyvec",
13110]13088]
13111
13112[[package]]
13113name = "unicode-segmentation"
13114version = "1.10.0"
13115source = "registry+https://github.com/rust-lang/crates.io-index"
13116checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a"
1311713089
13118[[package]]13090[[package]]
13119name = "unicode-width"13091name = "unicode-width"
1344613418
13447[[package]]13419[[package]]
13448name = "uuid"13420name = "uuid"
13449version = "1.2.2"13421version = "1.3.0"
13450source = "registry+https://github.com/rust-lang/crates.io-index"13422source = "registry+https://github.com/rust-lang/crates.io-index"
13451checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c"13423checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79"
13452dependencies = [13424dependencies = [
13453 "getrandom 0.2.8",13425 "getrandom 0.2.8",
13454]13426]
1354313515
13544[[package]]13516[[package]]
13545name = "wasm-bindgen"13517name = "wasm-bindgen"
13546version = "0.2.83"13518version = "0.2.84"
13547source = "registry+https://github.com/rust-lang/crates.io-index"13519source = "registry+https://github.com/rust-lang/crates.io-index"
13548checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"13520checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
13549dependencies = [13521dependencies = [
13550 "cfg-if",13522 "cfg-if",
13551 "wasm-bindgen-macro",13523 "wasm-bindgen-macro",
13552]13524]
1355313525
13554[[package]]13526[[package]]
13555name = "wasm-bindgen-backend"13527name = "wasm-bindgen-backend"
13556version = "0.2.83"13528version = "0.2.84"
13557source = "registry+https://github.com/rust-lang/crates.io-index"13529source = "registry+https://github.com/rust-lang/crates.io-index"
13558checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"13530checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
13559dependencies = [13531dependencies = [
13560 "bumpalo",13532 "bumpalo",
13561 "log",13533 "log",
1356813540
13569[[package]]13541[[package]]
13570name = "wasm-bindgen-futures"13542name = "wasm-bindgen-futures"
13571version = "0.4.33"13543version = "0.4.34"
13572source = "registry+https://github.com/rust-lang/crates.io-index"13544source = "registry+https://github.com/rust-lang/crates.io-index"
13573checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d"13545checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454"
13574dependencies = [13546dependencies = [
13575 "cfg-if",13547 "cfg-if",
13576 "js-sys",13548 "js-sys",
1358013552
13581[[package]]13553[[package]]
13582name = "wasm-bindgen-macro"13554name = "wasm-bindgen-macro"
13583version = "0.2.83"13555version = "0.2.84"
13584source = "registry+https://github.com/rust-lang/crates.io-index"13556source = "registry+https://github.com/rust-lang/crates.io-index"
13585checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"13557checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
13586dependencies = [13558dependencies = [
13587 "quote",13559 "quote",
13588 "wasm-bindgen-macro-support",13560 "wasm-bindgen-macro-support",
13589]13561]
1359013562
13591[[package]]13563[[package]]
13592name = "wasm-bindgen-macro-support"13564name = "wasm-bindgen-macro-support"
13593version = "0.2.83"13565version = "0.2.84"
13594source = "registry+https://github.com/rust-lang/crates.io-index"13566source = "registry+https://github.com/rust-lang/crates.io-index"
13595checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"13567checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
13596dependencies = [13568dependencies = [
13597 "proc-macro2",13569 "proc-macro2",
13598 "quote",13570 "quote",
1360313575
13604[[package]]13576[[package]]
13605name = "wasm-bindgen-shared"13577name = "wasm-bindgen-shared"
13606version = "0.2.83"13578version = "0.2.84"
13607source = "registry+https://github.com/rust-lang/crates.io-index"13579source = "registry+https://github.com/rust-lang/crates.io-index"
13608checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"13580checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
1360913581
13610[[package]]13582[[package]]
13611name = "wasm-instrument"13583name = "wasm-instrument"
1388613858
13887[[package]]13859[[package]]
13888name = "web-sys"13860name = "web-sys"
13889version = "0.3.60"13861version = "0.3.61"
13890source = "registry+https://github.com/rust-lang/crates.io-index"13862source = "registry+https://github.com/rust-lang/crates.io-index"
13891checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"13863checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
13892dependencies = [13864dependencies = [
13893 "js-sys",13865 "js-sys",
13894 "wasm-bindgen",13866 "wasm-bindgen",
14337 "windows_x86_64_msvc 0.42.1",14309 "windows_x86_64_msvc 0.42.1",
14338]14310]
14311
14312[[package]]
14313name = "windows-sys"
14314version = "0.45.0"
14315source = "registry+https://github.com/rust-lang/crates.io-index"
14316checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
14317dependencies = [
14318 "windows-targets",
14319]
14320
14321[[package]]
14322name = "windows-targets"
14323version = "0.42.1"
14324source = "registry+https://github.com/rust-lang/crates.io-index"
14325checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
14326dependencies = [
14327 "windows_aarch64_gnullvm",
14328 "windows_aarch64_msvc 0.42.1",
14329 "windows_i686_gnu 0.42.1",
14330 "windows_i686_msvc 0.42.1",
14331 "windows_x86_64_gnu 0.42.1",
14332 "windows_x86_64_gnullvm",
14333 "windows_x86_64_msvc 0.42.1",
14334]
1433914335
14340[[package]]14336[[package]]
14341name = "windows_aarch64_gnullvm"14337name = "windows_aarch64_gnullvm"
1464414640
14645[[package]]14641[[package]]
14646name = "zstd-sys"14642name = "zstd-sys"
14647version = "2.0.5+zstd.1.5.2"14643version = "2.0.6+zstd.1.5.2"
14648source = "registry+https://github.com/rust-lang/crates.io-index"14644source = "registry+https://github.com/rust-lang/crates.io-index"
14649checksum = "edc50ffce891ad571e9f9afe5039c4837bede781ac4bb13052ed7ae695518596"14645checksum = "68a3f9792c0c3dc6c165840a75f47ae1f4da402c2d006881129579f6597e801b"
14650dependencies = [14646dependencies = [
14651 "cc",14647 "cc",
14652 "libc",14648 "libc",
modifiedCargo.tomldiffbeforeafterboth
1919
20[workspace.dependencies]20[workspace.dependencies]
21# Unique21# Unique
22evm-coder = { default-features = false, path = "crates/evm-coder" }22evm-coder = { git = "https://github.com/uniquenetwork/evm-coder", tag = "v0.3.0", default-features = false }
23struct-versioning = { path = "crates/struct-versioning" }23struct-versioning = { path = "crates/struct-versioning" }
24precompile-utils-macro = { path = "runtime/common/ethereum/precompiles/utils/macro" }24precompile-utils-macro = { path = "runtime/common/ethereum/precompiles/utils/macro" }
25up-common = { path = "primitives/common", default-features = false }25up-common = { path = "primitives/common", default-features = false }
deletedcrates/evm-coder/CHANGELOG.mddiffbeforeafterboth

no changes

deletedcrates/evm-coder/Cargo.tomldiffbeforeafterboth

no changes

deletedcrates/evm-coder/README.mddiffbeforeafterboth

no changes

deletedcrates/evm-coder/procedural/Cargo.tomldiffbeforeafterboth

no changes

deletedcrates/evm-coder/procedural/src/abi_derive/derive_enum.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/procedural/src/abi_derive/derive_struct.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/procedural/src/abi_derive/mod.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/procedural/src/lib.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/procedural/src/solidity_interface.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/procedural/src/to_log.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/abi/impls.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/abi/mod.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/abi/test.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/abi/traits.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/custom_signature.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/events.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/execution.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/lib.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/solidity/impls.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/solidity/mod.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/src/solidity/traits.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/abi_derive_generation.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/build_failed/abi_derive_enum_generation.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/build_failed/abi_derive_enum_generation.stderrdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/build_failed/abi_derive_struct_generation.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/build_failed/abi_derive_struct_generation.stderrdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/build_failed/custom_signature_over_max_size.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/build_failed/custom_signature_over_max_size.stderrdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/conditional_is.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/generics.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/log.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/random.rsdiffbeforeafterboth

no changes

deletedcrates/evm-coder/tests/solidity_generation.rsdiffbeforeafterboth

no changes

modifiedcrates/struct-versioning/src/lib.rsdiffbeforeafterboth
223 };223 };
224 let current_fields = fields224 let current_fields = fields
225 .iter()225 .iter()
226 .filter_map(|(ver, field)| ver.exists_on(version).then(|| field));226 .filter_map(|(ver, field)| ver.exists_on(version).then_some(field));
227227
228 let mut doc = Vec::new();228 let mut doc = Vec::new();
229 if version > attr.first_version {229 if version > attr.first_version {
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
17//! This module contains the implementation of pallet methods for evm.17//! This module contains the implementation of pallet methods for evm.
1818
19pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};19pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};
20use evm_coder::{20use pallet_evm_coder_substrate::{
21 abi::AbiType,21 abi::AbiType,
22 solidity_interface, solidity, ToLog,22 solidity_interface, ToLog,
23 types::*,23 types::*,
24 execution::{Result, Error},24 execution::{Result, Error, PreDispatch},
25 weight,25 frontier_contract,
26};26};
27use pallet_evm_coder_substrate::dispatch_to_evm;27use pallet_evm_coder_substrate::dispatch_to_evm;
28use sp_std::{vec, vec::Vec};28use sp_std::{vec, vec::Vec};
36 Pallet, CollectionHandle, Config, CollectionProperties, SelfWeightOf, eth, weights::WeightInfo,36 Pallet, CollectionHandle, Config, CollectionProperties, SelfWeightOf, eth, weights::WeightInfo,
37};37};
38
39frontier_contract! {
40 macro_rules! CollectionHandle_result {...}
41 impl<T: Config> Contract for CollectionHandle<T> {...}
42}
3843
39/// Events for ethereum collection helper.44/// Events for ethereum collection helper.
40#[derive(ToLog)]45#[derive(ToLog)]
83}88}
8489
85/// @title A contract that allows you to work with collections.90/// @title A contract that allows you to work with collections.
86#[solidity_interface(name = Collection)]91#[solidity_interface(name = Collection, enum(derive(PreDispatch)), enum_attr(weight))]
87impl<T: Config> CollectionHandle<T>92impl<T: Config> CollectionHandle<T>
88where93where
89 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,94 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,
272 None => return Ok(Default::default()),277 None => return Ok(Default::default()),
273 };278 };
274279
275 Ok(eth::CrossAddress::from_sub::<T>(&sponsor))280 Ok(eth::CrossAddress::from_sub::<T>(sponsor))
276 }281 }
277282
278 /// Get current collection limits.283 /// Get current collection limits.
281 fn collection_limits(&self) -> Result<Vec<eth::CollectionLimit>> {286 fn collection_limits(&self) -> Result<Vec<eth::CollectionLimit>> {
282 let limits = &self.collection.limits;287 let limits = &self.collection.limits;
283
284 let convert_value_from_bool = |ob: Option<bool>| match ob {
285 Some(b) => Some(b as u32),
286 None => None,
287 };
288288
289 Ok(vec![289 Ok(vec![
290 eth::CollectionLimit::new(290 eth::CollectionLimit::new(
307 None307 None
308 }308 }
309 })309 })
310 .unwrap_or(eth::CollectionLimit::new(310 .unwrap_or_else(|| {
311 eth::CollectionLimit::new(
311 eth::CollectionLimitField::SponsoredDataRateLimit,312 eth::CollectionLimitField::SponsoredDataRateLimit,
312 Default::default(),313 Default::default(),
313 )),314 )
315 }),
314 eth::CollectionLimit::new(eth::CollectionLimitField::TokenLimit, limits.token_limit),316 eth::CollectionLimit::new(eth::CollectionLimitField::TokenLimit, limits.token_limit),
315 eth::CollectionLimit::new(317 eth::CollectionLimit::new(
316 eth::CollectionLimitField::SponsorTransferTimeout,318 eth::CollectionLimitField::SponsorTransferTimeout,
322 ),324 ),
323 eth::CollectionLimit::new(325 eth::CollectionLimit::new(
324 eth::CollectionLimitField::OwnerCanTransfer,326 eth::CollectionLimitField::OwnerCanTransfer,
325 convert_value_from_bool(limits.owner_can_transfer),327 limits.owner_can_transfer.map(u32::from),
326 ),328 ),
327 eth::CollectionLimit::new(329 eth::CollectionLimit::new(
328 eth::CollectionLimitField::OwnerCanDestroy,330 eth::CollectionLimitField::OwnerCanDestroy,
329 convert_value_from_bool(limits.owner_can_destroy),331 limits.owner_can_destroy.map(u32::from),
330 ),332 ),
331 eth::CollectionLimit::new(333 eth::CollectionLimit::new(
332 eth::CollectionLimitField::TransferEnabled,334 eth::CollectionLimitField::TransferEnabled,
333 convert_value_from_bool(limits.transfers_enabled),335 limits.transfers_enabled.map(u32::from),
334 ),336 ),
335 ])337 ])
336 }338 }
680682
681/// Contains static property keys and values.683/// Contains static property keys and values.
682pub mod static_property {684pub mod static_property {
683 use evm_coder::{685 use pallet_evm_coder_substrate::{
684 execution::{Result, Error},686 execution::{Result, Error},
685 };687 };
686 use alloc::format;688 use alloc::format;
modifiedpallets/common/src/eth.rsdiffbeforeafterboth
105 }105 }
106 }106 }
107 /// Converts [`CrossAddress`] to `CrossAccountId`.107 /// Converts [`CrossAddress`] to `CrossAccountId`.
108 pub fn into_sub_cross_account<T>(&self) -> evm_coder::execution::Result<T::CrossAccountId>108 pub fn into_sub_cross_account<T>(
109 &self,
110 ) -> pallet_evm_coder_substrate::execution::Result<T::CrossAccountId>
109 where111 where
110 T: pallet_evm::Config,112 T: pallet_evm::Config,
111 T::AccountId: From<[u8; 32]>,113 T::AccountId: From<[u8; 32]>,
130}132}
131133
132impl TryFrom<up_data_structs::Property> for Property {134impl TryFrom<up_data_structs::Property> for Property {
133 type Error = evm_coder::execution::Error;135 type Error = pallet_evm_coder_substrate::execution::Error;
134136
135 fn try_from(from: up_data_structs::Property) -> Result<Self, Self::Error> {137 fn try_from(from: up_data_structs::Property) -> Result<Self, Self::Error> {
136 let key = evm_coder::types::String::from_utf8(from.key.into())138 let key = evm_coder::types::String::from_utf8(from.key.into())
141}143}
142144
143impl TryInto<up_data_structs::Property> for Property {145impl TryInto<up_data_structs::Property> for Property {
144 type Error = evm_coder::execution::Error;146 type Error = pallet_evm_coder_substrate::execution::Error;
145147
146 fn try_into(self) -> Result<up_data_structs::Property, Self::Error> {148 fn try_into(self) -> Result<up_data_structs::Property, Self::Error> {
147 let key = <Vec<u8>>::from(self.key)149 let key = <Vec<u8>>::from(self.key)
212}214}
213215
214impl TryInto<up_data_structs::CollectionLimits> for CollectionLimit {216impl TryInto<up_data_structs::CollectionLimits> for CollectionLimit {
215 type Error = evm_coder::execution::Error;217 type Error = pallet_evm_coder_substrate::execution::Error;
216218
217 fn try_into(self) -> Result<up_data_structs::CollectionLimits, Self::Error> {219 fn try_into(self) -> Result<up_data_structs::CollectionLimits, Self::Error> {
218 let value = self220 let value = self
378 /// Convert vector of [`TokenPropertyPermission`] into vector of [`up_data_structs::PropertyKeyPermission`].380 /// Convert vector of [`TokenPropertyPermission`] into vector of [`up_data_structs::PropertyKeyPermission`].
379 pub fn into_property_key_permissions(381 pub fn into_property_key_permissions(
380 permissions: Vec<TokenPropertyPermission>,382 permissions: Vec<TokenPropertyPermission>,
381 ) -> evm_coder::execution::Result<Vec<up_data_structs::PropertyKeyPermission>> {383 ) -> pallet_evm_coder_substrate::execution::Result<Vec<up_data_structs::PropertyKeyPermission>>
384 {
382 let mut perms = Vec::new();385 let mut perms = Vec::new();
383386
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
192 }192 }
193193
194 /// Consume gas for reading.194 /// Consume gas for reading.
195 pub fn consume_store_reads(&self, reads: u64) -> evm_coder::execution::Result<()> {195 pub fn consume_store_reads(
196 &self,
197 reads: u64,
198 ) -> pallet_evm_coder_substrate::execution::Result<()> {
196 self.recorder199 self.recorder
197 .consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(200 .consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(
198 <T as frame_system::Config>::DbWeight::get()201 <T as frame_system::Config>::DbWeight::get()
202 }205 }
203206
204 /// Consume gas for writing.207 /// Consume gas for writing.
205 pub fn consume_store_writes(&self, writes: u64) -> evm_coder::execution::Result<()> {208 pub fn consume_store_writes(
209 &self,
210 writes: u64,
211 ) -> pallet_evm_coder_substrate::execution::Result<()> {
206 self.recorder212 self.recorder
207 .consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(213 .consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(
208 <T as frame_system::Config>::DbWeight::get()214 <T as frame_system::Config>::DbWeight::get()
216 &self,222 &self,
217 reads: u64,223 reads: u64,
218 writes: u64,224 writes: u64,
219 ) -> evm_coder::execution::Result<()> {225 ) -> pallet_evm_coder_substrate::execution::Result<()> {
220 let weight = <T as frame_system::Config>::DbWeight::get();226 let weight = <T as frame_system::Config>::DbWeight::get();
221 let reads = weight.read.saturating_mul(reads);227 let reads = weight.read.saturating_mul(reads);
222 let writes = weight.read.saturating_mul(writes);228 let writes = weight.read.saturating_mul(writes);
modifiedpallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth
11scale-info = { workspace = true }10scale-info = { workspace = true }
1211
13evm-coder = { workspace = true }12evm-coder = { workspace = true }
13evm-core = { workspace = true }
14
14frame-benchmarking = { workspace = true, optional = true }15frame-benchmarking = { workspace = true, optional = true }
15frame-support = { workspace = true }16frame-support = { workspace = true }
19sp-std = { workspace = true }20sp-std = { workspace = true }
20up-data-structs = { workspace = true }21up-data-structs = { workspace = true }
22
23evm-coder-substrate-procedural = { path = "./procedural" }
24spez = "0.1.1"
2125
22[features]26[features]
23default = ["std"]27default = ["std"]
addedpallets/evm-coder-substrate/procedural/Cargo.tomldiffbeforeafterboth

no changes

addedpallets/evm-coder-substrate/procedural/src/lib.rsdiffbeforeafterboth

no changes

addedpallets/evm-coder-substrate/src/execution.rsdiffbeforeafterboth

no changes

modifiedpallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth
1616
17#![cfg_attr(not(feature = "std"), no_std)]17#![cfg_attr(not(feature = "std"), no_std)]
18
19extern crate self as pallet_evm_coder_substrate;
1820
19#[cfg(not(feature = "std"))]21#[cfg(not(feature = "std"))]
20extern crate alloc;22extern crate alloc;
21#[cfg(not(feature = "std"))]23#[cfg(not(feature = "std"))]
22use alloc::format;24use alloc::format;
25use execution::PreDispatch;
23use frame_support::dispatch::Weight;26use frame_support::dispatch::Weight;
2427
25use core::marker::PhantomData;28use core::marker::PhantomData;
37use sp_core::H160;40use sp_core::H160;
38// #[cfg(feature = "runtime-benchmarks")]41// #[cfg(feature = "runtime-benchmarks")]
39// pub mod benchmarking;42// pub mod benchmarking;
43pub mod execution;
44pub use evm_coder::*;
45
46#[doc(hidden)]
47pub use spez::spez;
4048
41use evm_coder::{49use evm_coder::{
42 abi::{AbiReader, AbiWrite, AbiWriter},50 abi::{AbiReader, AbiWrite, AbiWriter},
43 execution,
44 types::{Msg, Value},51 types::{Msg, Value},
45};52};
4653
175 handle: &mut impl PrecompileHandle,182 handle: &mut impl PrecompileHandle,
176 result: execution::Result<Option<AbiWriter>>,183 result: execution::Result<Option<AbiWriter>>,
177 ) -> Option<PrecompileResult> {184 ) -> Option<PrecompileResult> {
178 use evm_coder::execution::Error;185 use execution::Error;
179 // We ignore error here, as it should not occur, as we have our own bookkeeping of gas186 // We ignore error here, as it should not occur, as we have our own bookkeeping of gas
180 let _ = handle.record_cost(self.initial_gas - self.gas_left());187 let _ = handle.record_cost(self.initial_gas - self.gas_left());
181 Some(match result {188 Some(match result {
200}207}
201208
202pub fn dispatch_to_evm<T: Config>(err: DispatchError) -> execution::Error {209pub fn dispatch_to_evm<T: Config>(err: DispatchError) -> execution::Error {
203 use evm_coder::execution::Error as ExError;210 use execution::Error as ExError;
204 match err {211 match err {
205 DispatchError::Module(ModuleError { index, error, .. })212 DispatchError::Module(ModuleError { index, error, .. })
206 if index213 if index
231}238}
232239
233/// Helper to simplify implementing bridge between evm-coder definitions and pallet-evm240/// Helper to simplify implementing bridge between evm-coder definitions and pallet-evm
234pub fn call<241pub fn call<T, C, E, H>(handle: &mut H, mut e: E) -> Option<PrecompileResult>
242where
235 T: Config,243 T: Config,
236 C: evm_coder::Call + evm_coder::Weighted,244 C: evm_coder::Call + PreDispatch,
237 E: evm_coder::Callable<C> + WithRecorder<T>,245 E: evm_coder::Callable<C> + WithRecorder<T>,
238 H: PrecompileHandle,246 H: PrecompileHandle,
239>(
240 handle: &mut H,
241 mut e: E,247 execution::ResultWithPostInfo<AbiWriter>: From<ResultWithPostInfoOf<E, AbiWriter>>,
242) -> Option<PrecompileResult> {248{
243 let result = call_internal(249 let result = call_internal(
244 handle.context().caller,250 handle.context().caller,
245 &mut e,251 &mut e,
250}256}
251257
252fn call_internal<258fn call_internal<T, C, E>(
253 T: Config,
254 C: evm_coder::Call + evm_coder::Weighted,
255 E: evm_coder::Callable<C> + WithRecorder<T>,
256>(
257 caller: H160,259 caller: H160,
258 e: &mut E,260 e: &mut E,
259 value: Value,261 value: Value,
260 input: &[u8],262 input: &[u8],
261) -> execution::Result<Option<AbiWriter>> {263) -> execution::Result<Option<AbiWriter>>
264where
265 T: Config,
266 C: evm_coder::Call + PreDispatch,
267 E: Contract + evm_coder::Callable<C> + WithRecorder<T>,
268 execution::ResultWithPostInfo<AbiWriter>: From<ResultWithPostInfoOf<E, AbiWriter>>,
269{
262 let (selector, mut reader) = AbiReader::new_call(input)?;270 let (selector, mut reader) = AbiReader::new_call(input)?;
263 let call = C::parse(selector, &mut reader)?;271 let call = C::parse(selector, &mut reader)?;
267 }275 }
268 let call = call.unwrap();276 let call = call.unwrap();
269277
270 let dispatch_info = call.weight();278 let dispatch_info = call.dispatch_info();
271 e.recorder()279 e.recorder()
272 .consume_gas(T::GasWeightMapping::weight_to_gas(dispatch_info.weight))?;280 .consume_gas(T::GasWeightMapping::weight_to_gas(dispatch_info.weight))?;
273281
274 match e.call(Msg {282 match execution::ResultWithPostInfo::from(e.call(Msg {
275 call,283 call,
276 caller,284 caller,
277 value,285 value,
278 }) {286 })) {
279 Ok(v) => {287 Ok(v) => {
280 let unspent = v.post_info.calc_unspent(&dispatch_info);288 let unspent = v.post_info.calc_unspent(&dispatch_info);
281 e.recorder()289 e.recorder()
291 }299 }
292}300}
301
302#[cfg(test)]
303#[allow(dead_code)]
304mod tests {
305 use core::marker::PhantomData;
306
307 use evm_coder::ERC165Call;
308 use frame_support::weights::Weight;
309
310 use crate::execution::PreDispatch;
311
312 #[derive(PreDispatch)]
313 enum ExampleCall<T: super::Config> {
314 ERC165Call(ERC165Call, PhantomData<fn() -> T>),
315 OtherCall(ERC165Call),
316
317 #[weight(Weight::from_ref_time(a + b))]
318 Example {
319 a: u64,
320 b: u64,
321 },
322 }
323}
293324
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
20use core::marker::PhantomData;20use core::marker::PhantomData;
21use evm_coder::{21use evm_coder::{
22 abi::{AbiWriter, AbiType},22 abi::{AbiWriter, AbiType},
23 execution::Result,
24 generate_stubgen, solidity_interface,23 generate_stubgen, solidity_interface,
25 types::*,24 types::*,
26 ToLog,25 ToLog,
31 account::CrossAccountId,30 account::CrossAccountId,
32};31};
33use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder, dispatch_to_evm};32use pallet_evm_coder_substrate::{
33 SubstrateRecorder, WithRecorder, dispatch_to_evm,
34 execution::{Result, PreDispatch},
35 frontier_contract,
36};
34use pallet_evm_transaction_payment::CallContext;37use pallet_evm_transaction_payment::CallContext;
35use sp_core::{H160, U256};38use sp_core::{H160, U256};
42use up_sponsorship::SponsorshipHandler;45use up_sponsorship::SponsorshipHandler;
43use sp_std::vec::Vec;46use sp_std::vec::Vec;
47
48frontier_contract! {
49 macro_rules! ContractHelpers_result {...}
50 impl<T: Config> Contract for ContractHelpers<T> {...}
51}
4452
45/// Pallet events.53/// Pallet events.
46#[derive(ToLog)]54#[derive(ToLog)]
84}92}
8593
86/// @title Magic contract, which allows users to reconfigure other contracts94/// @title Magic contract, which allows users to reconfigure other contracts
87#[solidity_interface(name = ContractHelpers, events(ContractHelpersEvents))]95#[solidity_interface(name = ContractHelpers, events(ContractHelpersEvents), enum(derive(PreDispatch)))]
88impl<T: Config> ContractHelpers<T>96impl<T: Config> ContractHelpers<T>
89where97where
90 T::AccountId: AsRef<[u8; 32]>,98 T::AccountId: AsRef<[u8; 32]>,
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
21use core::convert::TryInto;21use core::convert::TryInto;
22use evm_coder::AbiCoder;22use evm_coder::AbiCoder;
23use evm_coder::{23use evm_coder::{abi::AbiType, ToLog, generate_stubgen, solidity_interface, types::*};
24 abi::AbiType, ToLog, execution::*, generate_stubgen, solidity, solidity_interface, types::*,
25 weight,
26};
27use up_data_structs::CollectionMode;24use up_data_structs::CollectionMode;
28use pallet_common::{25use pallet_common::{
33use sp_std::vec::Vec;30use sp_std::vec::Vec;
34use pallet_evm::{account::CrossAccountId, PrecompileHandle};31use pallet_evm::{account::CrossAccountId, PrecompileHandle};
35use pallet_evm_coder_substrate::{call, dispatch_to_evm};32use pallet_evm_coder_substrate::{
33 call, dispatch_to_evm,
34 execution::{PreDispatch, Result},
35 frontier_contract,
36};
36use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};37use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
37use sp_core::{U256, Get};38use sp_core::{U256, Get};
41 weights::WeightInfo,42 weights::WeightInfo,
42};43};
44
45frontier_contract! {
46 macro_rules! FungibleHandle_result {...}
47 impl<T: Config> Contract for FungibleHandle<T> {...}
48}
4349
44#[derive(ToLog)]50#[derive(ToLog)]
45pub enum ERC20Events {51pub enum ERC20Events {
65 amount: U256,71 amount: U256,
66}72}
6773
68#[solidity_interface(name = ERC20, events(ERC20Events), expect_selector = 0x942e8b22)]74#[solidity_interface(name = ERC20, events(ERC20Events), enum(derive(PreDispatch)), enum_attr(weight), expect_selector = 0x942e8b22)]
69impl<T: Config> FungibleHandle<T> {75impl<T: Config> FungibleHandle<T> {
70 fn name(&self) -> Result<String> {76 fn name(&self) -> Result<String> {
71 Ok(decode_utf16(self.name.iter().copied())77 Ok(decode_utf16(self.name.iter().copied())
145 }151 }
146}152}
147153
148#[solidity_interface(name = ERC20Mintable)]154#[solidity_interface(name = ERC20Mintable, enum(derive(PreDispatch)), enum_attr(weight))]
149impl<T: Config> FungibleHandle<T> {155impl<T: Config> FungibleHandle<T> {
150 /// Mint tokens for `to` account.156 /// Mint tokens for `to` account.
151 /// @param to account that will receive minted tokens157 /// @param to account that will receive minted tokens
158 let budget = self164 let budget = self
159 .recorder165 .recorder
160 .weight_calls_budget(<StructureWeight<T>>::find_parent());166 .weight_calls_budget(<StructureWeight<T>>::find_parent());
161 <Pallet<T>>::create_item(&self, &caller, (to, amount), &budget)167 <Pallet<T>>::create_item(self, &caller, (to, amount), &budget)
162 .map_err(dispatch_to_evm::<T>)?;168 .map_err(dispatch_to_evm::<T>)?;
163 Ok(true)169 Ok(true)
164 }170 }
165}171}
166172
167#[solidity_interface(name = ERC20UniqueExtensions)]173#[solidity_interface(name = ERC20UniqueExtensions, enum(derive(PreDispatch)), enum_attr(weight))]
168impl<T: Config> FungibleHandle<T>174impl<T: Config> FungibleHandle<T>
169where175where
170 T::AccountId: From<[u8; 32]>,176 T::AccountId: From<[u8; 32]>,
181 }187 }
182188
183 /// @notice A description for the collection.189 /// @notice A description for the collection.
184 fn description(&self) -> Result<String> {190 fn description(&self) -> String {
185 Ok(decode_utf16(self.description.iter().copied())191 decode_utf16(self.description.iter().copied())
186 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))192 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))
187 .collect::<String>())193 .collect::<String>()
188 }194 }
189195
190 #[weight(<SelfWeightOf<T>>::create_item())]196 #[weight(<SelfWeightOf<T>>::create_item())]
278 })284 })
279 .collect::<Result<_>>()?;285 .collect::<Result<_>>()?;
280286
281 <Pallet<T>>::create_multiple_items(&self, &caller, amounts, &budget)287 <Pallet<T>>::create_multiple_items(self, &caller, amounts, &budget)
282 .map_err(dispatch_to_evm::<T>)?;288 .map_err(dispatch_to_evm::<T>)?;
283 Ok(true)289 Ok(true)
284 }290 }
330 ERC20Mintable,336 ERC20Mintable,
331 ERC20UniqueExtensions,337 ERC20UniqueExtensions,
332 Collection(via(common_mut returns CollectionHandle<T>)),338 Collection(via(common_mut returns CollectionHandle<T>)),
333 )339 ),
340 enum(derive(PreDispatch))
334)]341)]
335impl<T: Config> FungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}342impl<T: Config> FungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}
336343
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
25 convert::TryInto,25 convert::TryInto,
26};26};
27use evm_coder::{27use evm_coder::{abi::AbiType, ToLog, generate_stubgen, solidity_interface, types::*};
28 abi::AbiType, ToLog, execution::*, generate_stubgen, solidity, solidity_interface, types::*,
29 weight,
30};
31use frame_support::BoundedVec;28use frame_support::BoundedVec;
32use up_data_structs::{29use up_data_structs::{
33 TokenId, PropertyPermission, PropertyKeyPermission, Property, CollectionId, PropertyKey,30 TokenId, PropertyPermission, PropertyKeyPermission, Property, CollectionId, PropertyKey,
34 CollectionPropertiesVec,31 CollectionPropertiesVec,
35};32};
36use pallet_evm_coder_substrate::dispatch_to_evm;33use pallet_evm_coder_substrate::{
34 dispatch_to_evm, frontier_contract,
35 execution::{Result, PreDispatch, Error},
36};
37use sp_std::{vec::Vec, vec};37use sp_std::{vec::Vec, vec};
38use pallet_common::{38use pallet_common::{
39 CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,39 CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,
50 SelfWeightOf, weights::WeightInfo, TokenProperties,50 SelfWeightOf, weights::WeightInfo, TokenProperties,
51};51};
52
53frontier_contract! {
54 macro_rules! NonfungibleHandle_result {...}
55 impl<T: Config> Contract for NonfungibleHandle<T> {...}
56}
5257
53/// @title A contract that allows to set and delete token properties and change token property permissions.58/// @title A contract that allows to set and delete token properties and change token property permissions.
54#[solidity_interface(name = TokenProperties)]59#[solidity_interface(name = TokenProperties, enum(derive(PreDispatch)), enum_attr(weight))]
55impl<T: Config> NonfungibleHandle<T> {60impl<T: Config> NonfungibleHandle<T> {
56 /// @notice Set permissions for token property.61 /// @notice Set permissions for token property.
57 /// @dev Throws error if `msg.sender` is not admin or owner of the collection.62 /// @dev Throws error if `msg.sender` is not admin or owner of the collection.
58 /// @param key Property key.63 /// @param key Property key.
59 /// @param isMutable Permission to mutate property.64 /// @param isMutable Permission to mutate property.
60 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.65 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.
61 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.66 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.
67 #[solidity(hide)]
62 #[weight(<SelfWeightOf<T>>::set_token_property_permissions(1))]68 #[weight(<SelfWeightOf<T>>::set_token_property_permissions(1))]
63 #[solidity(hide)]
64 fn set_token_property_permission(69 fn set_token_property_permission(
65 &mut self,70 &mut self,
66 caller: Caller,71 caller: Caller,
293298
294/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension299/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
295/// @dev See https://eips.ethereum.org/EIPS/eip-721300/// @dev See https://eips.ethereum.org/EIPS/eip-721
296#[solidity_interface(name = ERC721Metadata, expect_selector = 0x5b5e139f)]301#[solidity_interface(name = ERC721Metadata, expect_selector = 0x5b5e139f, enum(derive(PreDispatch)), enum_attr(weight))]
297impl<T: Config> NonfungibleHandle<T>302impl<T: Config> NonfungibleHandle<T>
298where303where
299 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,304 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,
300{305{
301 /// @notice A descriptive name for a collection of NFTs in this contract306 /// @notice A descriptive name for a collection of NFTs in this contract
302 /// @dev real implementation of this function lies in `ERC721UniqueExtensions`307 /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
303 #[solidity(hide, rename_selector = "name")]308 #[solidity(hide, rename_selector = "name")]
304 fn name_proxy(&self) -> Result<String> {309 fn name_proxy(&self) -> String {
305 self.name()310 self.name()
306 }311 }
307312
308 /// @notice An abbreviated name for NFTs in this contract313 /// @notice An abbreviated name for NFTs in this contract
309 /// @dev real implementation of this function lies in `ERC721UniqueExtensions`314 /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
310 #[solidity(hide, rename_selector = "symbol")]315 #[solidity(hide, rename_selector = "symbol")]
311 fn symbol_proxy(&self) -> Result<String> {316 fn symbol_proxy(&self) -> String {
312 self.symbol()317 self.symbol()
313 }318 }
314319
362367
363/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension368/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
364/// @dev See https://eips.ethereum.org/EIPS/eip-721369/// @dev See https://eips.ethereum.org/EIPS/eip-721
365#[solidity_interface(name = ERC721Enumerable, expect_selector = 0x780e9d63)]370#[solidity_interface(name = ERC721Enumerable, expect_selector = 0x780e9d63, enum(derive(PreDispatch)), enum_attr(weight))]
366impl<T: Config> NonfungibleHandle<T> {371impl<T: Config> NonfungibleHandle<T> {
367 /// @notice Enumerate valid NFTs372 /// @notice Enumerate valid NFTs
368 /// @param index A counter less than `totalSupply()`373 /// @param index A counter less than `totalSupply()`
369 /// @return The token identifier for the `index`th NFT,374 /// @return The token identifier for the `index`th NFT,
370 /// (sort order not specified)375 /// (sort order not specified)
371 fn token_by_index(&self, index: U256) -> Result<U256> {376 fn token_by_index(&self, index: U256) -> U256 {
372 Ok(index)377 index
373 }378 }
374379
375 /// @dev Not implemented380 /// @dev Not implemented
389394
390/// @title ERC-721 Non-Fungible Token Standard395/// @title ERC-721 Non-Fungible Token Standard
391/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md396/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
392#[solidity_interface(name = ERC721, events(ERC721Events), expect_selector = 0x80ac58cd)]397#[solidity_interface(name = ERC721, events(ERC721Events), enum(derive(PreDispatch)), enum_attr(weight), expect_selector = 0x80ac58cd)]
393impl<T: Config> NonfungibleHandle<T> {398impl<T: Config> NonfungibleHandle<T> {
394 /// @notice Count all NFTs assigned to an owner399 /// @notice Count all NFTs assigned to an owner
395 /// @dev NFTs assigned to the zero address are considered invalid, and this400 /// @dev NFTs assigned to the zero address are considered invalid, and this
516}521}
517522
518/// @title ERC721 Token that can be irreversibly burned (destroyed).523/// @title ERC721 Token that can be irreversibly burned (destroyed).
519#[solidity_interface(name = ERC721Burnable)]524#[solidity_interface(name = ERC721Burnable, enum(derive(PreDispatch)), enum_attr(weight))]
520impl<T: Config> NonfungibleHandle<T> {525impl<T: Config> NonfungibleHandle<T> {
521 /// @notice Burns a specific ERC721 token.526 /// @notice Burns a specific ERC721 token.
522 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized527 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
533}538}
534539
535/// @title ERC721 minting logic.540/// @title ERC721 minting logic.
536#[solidity_interface(name = ERC721UniqueMintable)]541#[solidity_interface(name = ERC721UniqueMintable, enum(derive(PreDispatch)), enum_attr(weight))]
537impl<T: Config> NonfungibleHandle<T> {542impl<T: Config> NonfungibleHandle<T> {
538 /// @notice Function to mint a token.543 /// @notice Function to mint a token.
539 /// @param to The new owner544 /// @param to The new owner
698}703}
699704
700/// @title Unique extensions for ERC721.705/// @title Unique extensions for ERC721.
701#[solidity_interface(name = ERC721UniqueExtensions)]706#[solidity_interface(name = ERC721UniqueExtensions, enum(derive(PreDispatch)), enum_attr(weight))]
702impl<T: Config> NonfungibleHandle<T>707impl<T: Config> NonfungibleHandle<T>
703where708where
704 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,709 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,
705{710{
706 /// @notice A descriptive name for a collection of NFTs in this contract711 /// @notice A descriptive name for a collection of NFTs in this contract
707 fn name(&self) -> Result<String> {712 fn name(&self) -> String {
708 Ok(decode_utf16(self.name.iter().copied())713 decode_utf16(self.name.iter().copied())
709 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))714 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))
710 .collect::<String>())715 .collect::<String>()
711 }716 }
712717
713 /// @notice An abbreviated name for NFTs in this contract718 /// @notice An abbreviated name for NFTs in this contract
714 fn symbol(&self) -> Result<String> {719 fn symbol(&self) -> String {
715 Ok(String::from_utf8_lossy(&self.token_prefix).into())720 String::from_utf8_lossy(&self.token_prefix).into()
716 }721 }
717722
718 /// @notice A description for the collection.723 /// @notice A description for the collection.
719 fn description(&self) -> Result<String> {724 fn description(&self) -> String {
720 Ok(decode_utf16(self.description.iter().copied())725 decode_utf16(self.description.iter().copied())
721 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))726 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))
722 .collect::<String>())727 .collect::<String>()
723 }728 }
724729
725 /// Returns the owner (in cross format) of the token.730 /// Returns the owner (in cross format) of the token.
1035 }1040 }
10361041
1037 /// @notice Returns collection helper contract address1042 /// @notice Returns collection helper contract address
1038 fn collection_helper_address(&self) -> Result<Address> {1043 fn collection_helper_address(&self) -> Address {
1039 Ok(T::ContractAddress::get())1044 T::ContractAddress::get()
1040 }1045 }
1041}1046}
10421047
1051 ERC721Metadata(if(this.flags.erc721metadata)),1056 ERC721Metadata(if(this.flags.erc721metadata)),
1052 Collection(via(common_mut returns CollectionHandle<T>)),1057 Collection(via(common_mut returns CollectionHandle<T>)),
1053 TokenProperties,1058 TokenProperties,
1054 )1059 ),
1060 enum(derive(PreDispatch)),
1055)]1061)]
1056impl<T: Config> NonfungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}1062impl<T: Config> NonfungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}
10571063
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
26 convert::TryInto,26 convert::TryInto,
27};27};
28use evm_coder::{28use evm_coder::{abi::AbiType, ToLog, generate_stubgen, solidity_interface, types::*};
29 abi::AbiType, ToLog, execution::*, generate_stubgen, solidity, solidity_interface, types::*,
30 weight,
31};
32use frame_support::{BoundedBTreeMap, BoundedVec};29use frame_support::{BoundedBTreeMap, BoundedVec};
33use pallet_common::{30use pallet_common::{
38};35};
39use pallet_evm::{account::CrossAccountId, PrecompileHandle};36use pallet_evm::{account::CrossAccountId, PrecompileHandle};
40use pallet_evm_coder_substrate::{call, dispatch_to_evm};37use pallet_evm_coder_substrate::{
38 call, dispatch_to_evm,
39 execution::{PreDispatch, Result, Error},
40 frontier_contract,
41};
41use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};42use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
42use sp_core::{H160, U256, Get};43use sp_core::{H160, U256, Get};
51 TokenProperties, TokensMinted, TotalSupply, weights::WeightInfo,52 TokenProperties, TokensMinted, TotalSupply, weights::WeightInfo,
52};53};
54
55frontier_contract! {
56 macro_rules! RefungibleHandle_result {...}
57 impl<T: Config> Contract for RefungibleHandle<T> {...}
58}
5359
54pub const ADDRESS_FOR_PARTIALLY_OWNED_TOKENS: H160 = H160::repeat_byte(0xff);60pub const ADDRESS_FOR_PARTIALLY_OWNED_TOKENS: H160 = H160::repeat_byte(0xff);
5561
56/// @title A contract that allows to set and delete token properties and change token property permissions.62/// @title A contract that allows to set and delete token properties and change token property permissions.
57#[solidity_interface(name = TokenProperties)]63#[solidity_interface(name = TokenProperties, enum(derive(PreDispatch)), enum_attr(weight))]
58impl<T: Config> RefungibleHandle<T> {64impl<T: Config> RefungibleHandle<T> {
59 /// @notice Set permissions for token property.65 /// @notice Set permissions for token property.
60 /// @dev Throws error if `msg.sender` is not admin or owner of the collection.66 /// @dev Throws error if `msg.sender` is not admin or owner of the collection.
61 /// @param key Property key.67 /// @param key Property key.
62 /// @param isMutable Permission to mutate property.68 /// @param isMutable Permission to mutate property.
63 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.69 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.
64 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.70 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.
71 #[solidity(hide)]
65 #[weight(<SelfWeightOf<T>>::set_token_property_permissions(1))]72 #[weight(<SelfWeightOf<T>>::set_token_property_permissions(1))]
66 #[solidity(hide)]
67 fn set_token_property_permission(73 fn set_token_property_permission(
68 &mut self,74 &mut self,
69 caller: Caller,75 caller: Caller,
290296
291/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension297/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
292/// @dev See https://eips.ethereum.org/EIPS/eip-721298/// @dev See https://eips.ethereum.org/EIPS/eip-721
293#[solidity_interface(name = ERC721Metadata, expect_selector = 0x5b5e139f)]299#[solidity_interface(name = ERC721Metadata, enum(derive(PreDispatch)), expect_selector = 0x5b5e139f)]
294impl<T: Config> RefungibleHandle<T>300impl<T: Config> RefungibleHandle<T>
295where301where
296 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,302 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,
359365
360/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension366/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
361/// @dev See https://eips.ethereum.org/EIPS/eip-721367/// @dev See https://eips.ethereum.org/EIPS/eip-721
362#[solidity_interface(name = ERC721Enumerable, expect_selector = 0x780e9d63)]368#[solidity_interface(name = ERC721Enumerable, enum(derive(PreDispatch)), expect_selector = 0x780e9d63)]
363impl<T: Config> RefungibleHandle<T> {369impl<T: Config> RefungibleHandle<T> {
364 /// @notice Enumerate valid RFTs370 /// @notice Enumerate valid RFTs
365 /// @param index A counter less than `totalSupply()`371 /// @param index A counter less than `totalSupply()`
366 /// @return The token identifier for the `index`th NFT,372 /// @return The token identifier for the `index`th NFT,
367 /// (sort order not specified)373 /// (sort order not specified)
368 fn token_by_index(&self, index: U256) -> Result<U256> {374 fn token_by_index(&self, index: U256) -> U256 {
369 Ok(index)375 index
370 }376 }
371377
372 /// Not implemented378 /// Not implemented
386392
387/// @title ERC-721 Non-Fungible Token Standard393/// @title ERC-721 Non-Fungible Token Standard
388/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md394/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
389#[solidity_interface(name = ERC721, events(ERC721Events), expect_selector = 0x80ac58cd)]395#[solidity_interface(name = ERC721, events(ERC721Events), enum(derive(PreDispatch)), enum_attr(weight), expect_selector = 0x80ac58cd)]
390impl<T: Config> RefungibleHandle<T> {396impl<T: Config> RefungibleHandle<T> {
391 /// @notice Count all RFTs assigned to an owner397 /// @notice Count all RFTs assigned to an owner
392 /// @dev RFTs assigned to the zero address are considered invalid, and this398 /// @dev RFTs assigned to the zero address are considered invalid, and this
547}553}
548554
549/// @title ERC721 Token that can be irreversibly burned (destroyed).555/// @title ERC721 Token that can be irreversibly burned (destroyed).
550#[solidity_interface(name = ERC721Burnable)]556#[solidity_interface(name = ERC721Burnable, enum(derive(PreDispatch)), enum_attr(weight))]
551impl<T: Config> RefungibleHandle<T> {557impl<T: Config> RefungibleHandle<T> {
552 /// @notice Burns a specific ERC721 token.558 /// @notice Burns a specific ERC721 token.
553 /// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized559 /// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized
567}573}
568574
569/// @title ERC721 minting logic.575/// @title ERC721 minting logic.
570#[solidity_interface(name = ERC721UniqueMintable)]576#[solidity_interface(name = ERC721UniqueMintable, enum(derive(PreDispatch)), enum_attr(weight))]
571impl<T: Config> RefungibleHandle<T> {577impl<T: Config> RefungibleHandle<T> {
572 /// @notice Function to mint a token.578 /// @notice Function to mint a token.
573 /// @param to The new owner579 /// @param to The new owner
739}745}
740746
741/// @title Unique extensions for ERC721.747/// @title Unique extensions for ERC721.
742#[solidity_interface(name = ERC721UniqueExtensions)]748#[solidity_interface(name = ERC721UniqueExtensions, enum(derive(PreDispatch)), enum_attr(weight))]
743impl<T: Config> RefungibleHandle<T>749impl<T: Config> RefungibleHandle<T>
744where750where
745 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,751 T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,
1120 ERC721Metadata(if(this.flags.erc721metadata)),1126 ERC721Metadata(if(this.flags.erc721metadata)),
1121 Collection(via(common_mut returns CollectionHandle<T>)),1127 Collection(via(common_mut returns CollectionHandle<T>)),
1122 TokenProperties,1128 TokenProperties,
1123 )1129 ),
1130 enum(derive(PreDispatch)),
1124)]1131)]
1125impl<T: Config> RefungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}1132impl<T: Config> RefungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}
11261133
modifiedpallets/refungible/src/erc_token.rsdiffbeforeafterboth
25 ops::Deref,25 ops::Deref,
26};26};
27use evm_coder::{27use evm_coder::{abi::AbiType, ToLog, generate_stubgen, solidity_interface, types::*};
28 abi::AbiType, ToLog, execution::*, generate_stubgen, solidity_interface, solidity, types::*,
29 weight,
30};
31use pallet_common::{28use pallet_common::{
32 CommonWeightInfo,
33 erc::{CommonEvmHandler, PrecompileResult},29 erc::{CommonEvmHandler, PrecompileResult},
34 eth::{collection_id_to_address, CrossAddress},30 eth::{collection_id_to_address, CrossAddress},
35};31};
36use pallet_evm::{account::CrossAccountId, PrecompileHandle};32use pallet_evm::{account::CrossAccountId, PrecompileHandle};
37use pallet_evm_coder_substrate::{call, dispatch_to_evm, WithRecorder};33use pallet_evm_coder_substrate::{
34 call, dispatch_to_evm, WithRecorder, frontier_contract,
35 execution::{Result, PreDispatch},
36};
38use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};37use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
39use sp_std::vec::Vec;38use sp_std::vec::Vec;
40use sp_core::U256;39use sp_core::U256;
41use up_data_structs::TokenId;40use up_data_structs::TokenId;
4241
43use crate::{42use crate::{Allowance, Balance, Config, Pallet, RefungibleHandle, TotalSupply};
44 Allowance, Balance, common::CommonWeights, Config, Pallet, RefungibleHandle, SelfWeightOf,
45 TotalSupply, weights::WeightInfo,
46};
4743
48/// Refungible token handle contains information about token's collection and id44/// Refungible token handle contains information about token's collection and id
49///45///
50/// RefungibleTokenHandle doesn't check token's existance upon creation46/// RefungibleTokenHandle doesn't check token's existance upon creation
51pub struct RefungibleTokenHandle<T: Config>(pub RefungibleHandle<T>, pub TokenId);47pub struct RefungibleTokenHandle<T: Config>(pub RefungibleHandle<T>, pub TokenId);
48
49frontier_contract! {
50 macro_rules! RefungibleTokenHandle_result {...}
51 impl<T: Config> Contract for RefungibleTokenHandle<T> {...}
52}
5253
53#[solidity_interface(name = ERC1633)]54#[solidity_interface(name = ERC1633, enum(derive(PreDispatch)), enum_attr(weight))]
54impl<T: Config> RefungibleTokenHandle<T> {55impl<T: Config> RefungibleTokenHandle<T> {
55 fn parent_token(&self) -> Result<Address> {56 fn parent_token(&self) -> Address {
56 Ok(collection_id_to_address(self.id))57 collection_id_to_address(self.id)
57 }58 }
5859
59 fn parent_token_id(&self) -> Result<U256> {60 fn parent_token_id(&self) -> U256 {
60 Ok(self.1.into())61 self.1.into()
61 }62 }
62}63}
6364
89///90///
90/// @dev Implementation of the basic standard token.91/// @dev Implementation of the basic standard token.
91/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md92/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
92#[solidity_interface(name = ERC20, events(ERC20Events))]93#[solidity_interface(name = ERC20, events(ERC20Events), enum(derive(PreDispatch)), enum_attr(weight))]
93impl<T: Config> RefungibleTokenHandle<T> {94impl<T: Config> RefungibleTokenHandle<T> {
94 /// @return the name of the token.95 /// @return the name of the token.
95 fn name(&self) -> Result<String> {96 fn name(&self) -> String {
96 Ok(decode_utf16(self.name.iter().copied())97 decode_utf16(self.name.iter().copied())
97 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))98 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))
98 .collect::<String>())99 .collect::<String>()
99 }100 }
100101
101 /// @return the symbol of the token.102 /// @return the symbol of the token.
102 fn symbol(&self) -> Result<String> {103 fn symbol(&self) -> String {
103 Ok(String::from_utf8_lossy(&self.token_prefix).into())104 String::from_utf8_lossy(&self.token_prefix).into()
104 }105 }
105106
106 /// @dev Total number of tokens in existence107 /// @dev Total number of tokens in existence
198 }199 }
199}200}
200201
201#[solidity_interface(name = ERC20UniqueExtensions)]202#[solidity_interface(name = ERC20UniqueExtensions, enum(derive(PreDispatch)), enum_attr(weight))]
202impl<T: Config> RefungibleTokenHandle<T>203impl<T: Config> RefungibleTokenHandle<T>
203where204where
204 T::AccountId: From<[u8; 32]>,205 T::AccountId: From<[u8; 32]>,
361362
362#[solidity_interface(363#[solidity_interface(
363 name = UniqueRefungibleToken,364 name = UniqueRefungibleToken,
364 is(ERC20, ERC20UniqueExtensions, ERC1633)365 is(ERC20, ERC20UniqueExtensions, ERC1633),
366 enum(derive(PreDispatch)),
365)]367)]
366impl<T: Config> RefungibleTokenHandle<T> where T::AccountId: From<[u8; 32]> {}368impl<T: Config> RefungibleTokenHandle<T> where T::AccountId: From<[u8; 32]> {}
367369
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
19use core::marker::PhantomData;19use core::marker::PhantomData;
20use ethereum as _;20use ethereum as _;
21use evm_coder::{21use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*};
22 abi::AbiType, execution::*, generate_stubgen, solidity, solidity_interface, types::*, weight,
23};
24use frame_support::traits::Get;22use frame_support::traits::Get;
25use crate::Pallet;23use crate::Pallet;
33};31};
34use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};32use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};
35use pallet_evm_coder_substrate::{dispatch_to_evm, SubstrateRecorder, WithRecorder};33use pallet_evm_coder_substrate::{
34 dispatch_to_evm, SubstrateRecorder, WithRecorder,
35 execution::{PreDispatch, Result, Error},
36 frontier_contract,
37};
36use up_data_structs::{38use up_data_structs::{
37 CollectionDescription, CollectionMode, CollectionName, CollectionTokenPrefix,39 CollectionDescription, CollectionMode, CollectionName, CollectionTokenPrefix,
43use alloc::format;45use alloc::format;
44use sp_std::vec::Vec;46use sp_std::vec::Vec;
4547
48frontier_contract! {
49 macro_rules! EvmCollectionHelpers_result {...}
50 impl<T: Config> Contract for EvmCollectionHelpers<T> {...}
51}
46/// See [`CollectionHelpersCall`]52/// See [`CollectionHelpersCall`]
47pub struct EvmCollectionHelpers<T: Config>(SubstrateRecorder<T>);53pub struct EvmCollectionHelpers<T: Config>(SubstrateRecorder<T>);
48impl<T: Config> WithRecorder<T> for EvmCollectionHelpers<T> {54impl<T: Config> WithRecorder<T> for EvmCollectionHelpers<T> {
135}141}
136142
137/// @title Contract, which allows users to operate with collections143/// @title Contract, which allows users to operate with collections
138#[solidity_interface(name = CollectionHelpers, events(CollectionHelpersEvents))]144#[solidity_interface(name = CollectionHelpers, events(CollectionHelpersEvents), enum(derive(PreDispatch)), enum_attr(weight))]
139impl<T> EvmCollectionHelpers<T>145impl<T> EvmCollectionHelpers<T>
140where146where
141 T: Config + pallet_common::Config + pallet_nonfungible::Config + pallet_refungible::Config,147 T: Config + pallet_common::Config + pallet_nonfungible::Config + pallet_refungible::Config,
183 /// @param description Informative description of the collection189 /// @param description Informative description of the collection
184 /// @param tokenPrefix Token prefix to represent the collection tokens in UI and user applications190 /// @param tokenPrefix Token prefix to represent the collection tokens in UI and user applications
185 /// @return address Address of the newly created collection191 /// @return address Address of the newly created collection
186 #[weight(<SelfWeightOf<T>>::create_collection())]
187 #[deprecated(note = "mathod was renamed to `create_nft_collection`, prefer it instead")]192 #[deprecated(note = "mathod was renamed to `create_nft_collection`, prefer it instead")]
188 #[solidity(hide)]193 #[solidity(hide)]
194 #[weight(<SelfWeightOf<T>>::create_collection())]
189 fn create_nonfungible_collection(195 fn create_nonfungible_collection(
190 &mut self,196 &mut self,
191 caller: Caller,197 caller: Caller,
modifiedruntime/tests/Cargo.tomldiffbeforeafterboth
40parity-scale-codec = { version = "3.2.2", default-features = false, features = ["derive"] }40parity-scale-codec = { version = "3.2.2", default-features = false, features = ["derive"] }
41scale-info = "*"41scale-info = "*"
4242
43evm-coder = { default-features = false, path = "../../crates/evm-coder" }43evm-coder = { workspace = true }
44up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.37" }44up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.37" }
4545