difftreelog
Merge branch 'develop' into tests/vesting
in: master
144 files changed
.docker/Dockerfile-try-runtimediffbeforeafterboth--- a/.docker/Dockerfile-try-runtime
+++ b/.docker/Dockerfile-try-runtime
@@ -46,4 +46,4 @@
echo "Fork from: $REPLICA_FROM\n" && \
cargo build --features=try-runtime,${NETWORK}-runtime --release
-CMD cargo run --features=try-runtime,${NETWORK}-runtime --release -- try-runtime --no-spec-check-panic on-runtime-upgrade live --uri $REPLICA_FROM
+CMD cargo run --features=try-runtime,${NETWORK}-runtime --release -- try-runtime -ltry-runtime::cli=debug --no-spec-check-panic on-runtime-upgrade live --uri $REPLICA_FROM
.docker/additional/Dockerfile-polkadotdiffbeforeafterboth--- /dev/null
+++ b/.docker/additional/Dockerfile-polkadot
@@ -0,0 +1,45 @@
+# ===== Rust builder =====
+FROM ubuntu:20.04 as rust-builder
+LABEL maintainer="Unique.Network"
+
+ARG RUST_TOOLCHAIN=nightly-2022-10-09
+
+ENV CARGO_HOME="/cargo-home"
+ENV PATH="/cargo-home/bin:$PATH"
+ENV TZ=UTC
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN apt-get update && \
+ apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \
+ apt-get clean && \
+ rm -r /var/lib/apt/lists/*
+
+RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
+
+RUN rustup toolchain uninstall $(rustup toolchain list) && \
+ rustup toolchain install $RUST_TOOLCHAIN && \
+ rustup default $RUST_TOOLCHAIN && \
+ rustup target list --installed && \
+ rustup show
+RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN
+
+RUN mkdir /unique_parachain
+WORKDIR /unique_parachain
+
+# ===== BUILD POLKADOT =====
+FROM rust-builder as builder-polkadot-bin
+
+ARG POLKADOT_BUILD_BRANCH=release-v0.9.33
+
+WORKDIR /unique_parachain
+
+RUN git clone -b $POLKADOT_BUILD_BRANCH --depth 1 https://github.com/paritytech/polkadot.git && \
+ cd polkadot && \
+ cargo build --release
+
+# ===== BIN ======
+
+FROM ubuntu:20.04 as builder-polkadot
+
+COPY --from=builder-polkadot-bin /unique_parachain/polkadot/target/release/polkadot /unique_parachain/polkadot/target/release/polkadot
+COPY --from=builder-polkadot-bin /unique_parachain/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm /unique_parachain/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm
.docker/docker-compose.tmp-node.j2diffbeforeafterboth--- a/.docker/docker-compose.tmp-node.j2
+++ b/.docker/docker-compose.tmp-node.j2
@@ -23,10 +23,12 @@
read_only: true
expose:
- 9944
+ - 9945
- 9933
- 9844
ports:
- 127.0.0.1:9944:9944
+ - 127.0.0.1:9945:9945
- 127.0.0.1:9933:9933
- 127.0.0.1:9844:9844
logging:
.docker/forkless-config/launch-config-forkless-data.j2diffbeforeafterboth--- a/.docker/forkless-config/launch-config-forkless-data.j2
+++ b/.docker/forkless-config/launch-config-forkless-data.j2
@@ -107,7 +107,11 @@
"--rpc-cors=all",
"--unsafe-rpc-external",
"--unsafe-ws-external",
- "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug"
+ "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
+ "--",
+ "--port=31335",
+ "--ws-port=9745",
+ "--rpc-port=9734"
]
},
{
.docker/forkless-config/launch-config-forkless-nodata.j2diffbeforeafterboth--- a/.docker/forkless-config/launch-config-forkless-nodata.j2
+++ b/.docker/forkless-config/launch-config-forkless-nodata.j2
@@ -102,7 +102,11 @@
"--unsafe-rpc-external",
"--unsafe-ws-external",
"-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
- "--ws-max-connections=1000"
+ "--ws-max-connections=1000",
+ "--",
+ "--port=31335",
+ "--ws-port=9745",
+ "--rpc-port=9734"
]
},
{
@@ -115,7 +119,11 @@
"--unsafe-rpc-external",
"--unsafe-ws-external",
"-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
- "--ws-max-connections=1000"
+ "--ws-max-connections=1000",
+ "--",
+ "--port=31337",
+ "--ws-port=9747",
+ "--rpc-port=9737"
]
}
]
.docker/forkless-config/launch-config-node-update-only-v3.j2diffbeforeafterboth--- a/.docker/forkless-config/launch-config-node-update-only-v3.j2
+++ b/.docker/forkless-config/launch-config-node-update-only-v3.j2
@@ -102,7 +102,11 @@
"--unsafe-rpc-external",
"--unsafe-ws-external",
"-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
- "--ws-max-connections=1000"
+ "--ws-max-connections=1000",
+ "--",
+ "--port=31335",
+ "--ws-port=9745",
+ "--rpc-port=9734"
]
},
{
.github/workflows/codestyle.ymldiffbeforeafterboth--- a/.github/workflows/codestyle.yml
+++ b/.github/workflows/codestyle.yml
@@ -11,7 +11,11 @@
rustfmt:
runs-on: [ self-hosted-ci ]
steps:
+ - name: Clean Workspace
+ uses: AutoModality/action-clean@v1.1.0
- uses: actions/checkout@v3
+ with:
+ ref: ${{ github.head_ref }}
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
@@ -28,7 +32,11 @@
yarn_eslint:
runs-on: [ self-hosted-ci ]
steps:
+ - name: Clean Workspace
+ uses: AutoModality/action-clean@v1.1.0
- uses: actions/checkout@v3
+ with:
+ ref: ${{ github.head_ref }}
- uses: actions/setup-node@v3
with:
node-version: 16
.github/workflows/node-only-update.ymldiffbeforeafterboth--- a/.github/workflows/node-only-update.yml
+++ b/.github/workflows/node-only-update.yml
@@ -80,7 +80,7 @@
REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
- POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}
+ POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}
POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}
MAINNET_TAG=${{ matrix.mainnet_tag }}
MAINNET_BRANCH=${{ matrix.mainnet_branch }}
@@ -160,56 +160,35 @@
ref: ${{ matrix.mainnet_branch }} #Checking out head commit
path: ${{ matrix.mainnet_branch }}
- - name: Run tests before Node Parachain upgrade
+ - name: Run Parallel tests before Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/tests
+ if: success() || failure()
run: |
yarn install
yarn add mochawesome
node scripts/readyness.js
echo "Ready to start tests"
yarn polkadot-types
- NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-before-${NOW}
+ NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
RPC_URL: http://127.0.0.1:9933/
-
- - name: Upload Test Report Before Node upgrade
- uses: phoenix-actions/test-reporting@v8
- id: test-report-before
- if: success() || failure() # run this step even if previous step failed
- with:
- name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created
- path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-before-*.json # Path to test results
- reporter: mochawesome-json
- fail-on-error: 'false'
- # TODO uncomment thease steps after the merge
- #- name: Run Parallel tests before Node Parachain upgrade
- # working-directory: ${{ matrix.mainnet_branch }}/tests
- # run: |
- # yarn install
- # yarn add mochawesome
- # echo "Ready to start tests"
- # yarn polkadot-types
- # NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
- # env:
- # RPC_URL: http://127.0.0.1:9933/
-
- #- name: Upload Parallel Test Report Before Node upgrade
- # uses: phoenix-actions/test-reporting@v8
- # id: test-parallel-report-before
- # if: success() || failure() # run this step even if previous step failed
- # with:
- # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created
- # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results
- # reporter: mochawesome-json
- # fail-on-error: 'false'
+ # - name: Upload Parallel Test Report Before Node upgrade
+ # uses: phoenix-actions/test-reporting@v8
+ # id: test-parallel-report-before
+ # if: success() || failure() # run this step even if previous step failed
+ # with:
+ # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created
+ # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results
+ # reporter: mochawesome-json
+ # fail-on-error: 'false'
- # - name: Run Sequential tests before Node Parachain upgrade
- # if: success() || failure()
- # working-directory: ${{ matrix.mainnet_branch }}/tests
- # run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
- # env:
- # RPC_URL: http://127.0.0.1:9933/
+ - name: Run Sequential tests before Node Parachain upgrade
+ if: success() || failure()
+ working-directory: ${{ matrix.mainnet_branch }}/tests
+ run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
+ env:
+ RPC_URL: http://127.0.0.1:9933/
# - name: Upload Sequential Test Report Before Node upgrade
# uses: phoenix-actions/test-reporting@v8
@@ -220,7 +199,7 @@
# path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results
# reporter: mochawesome-json
# fail-on-error: 'false'
-
+
- name: Send SIGUSR1 to polkadot-launch process
if: success() || failure()
run: |
@@ -228,24 +207,37 @@
ContainerID=$(docker ps -aqf "name=node-parachain")
PID=$(docker exec node-parachain pidof 'polkadot-launch')
sleep 30s
- echo -e "Show logs of node-parachain container.\n"
- docker logs ${ContainerID}
echo -e "\n"
echo -e "Restart polkadot-launch process: $PID\n"
docker exec node-parachain kill -SIGUSR1 ${PID}
echo "SIGUSR1 sent to Polkadot-launch PID: $PID"
+ sleep 60s
+ echo -e "Show logs of node-parachain container.\n"
docker logs ${ContainerID}
-
+
- name: Get chain logs in case of docker image crashed after Polkadot Launch restart
if: failure() # run this step only at failure
run: |
- docker exec node-parachain cat /polkadot-launch/9944.log
- docker exec node-parachain cat /polkadot-launch/9945.log
- docker exec node-parachain cat /polkadot-launch/alice.log
- docker exec node-parachain cat /polkadot-launch/eve.log
- docker exec node-parachain cat /polkadot-launch/dave.log
- docker exec node-parachain cat /polkadot-launch/charlie.log
+ docker exec node-parachain tail -n 1000 /polkadot-launch/9944.log
+ docker exec node-parachain tail -n 1000 /polkadot-launch/9945.log
+ docker exec node-parachain tail -n 1000 /polkadot-launch/alice.log
+
+ - name: copy chain log files from container to the host
+ if: success() || failure() # run this step even if previous step failed
+ run: |
+ mkdir -p /tmp/node-only-update
+ docker cp node-parachain:/polkadot-launch/9944.log /tmp/node-only-update/
+ docker cp node-parachain:/polkadot-launch/9945.log /tmp/node-only-update/
+ docker cp node-parachain:/polkadot-launch/alice.log /tmp/node-only-update/
+ - name: Upload chain log files
+ if: success() || failure()
+ uses: actions/upload-artifact@v3
+ with:
+ name: node-only-update-chain-logs
+ path: /tmp/node-only-update/
+ if-no-files-found: warn
+
- name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.
if: success()
run: |
@@ -290,43 +282,20 @@
echo "Halting script"
exit 0
shell: bash
-
- ## TODO: Remove next two blocks before switch to Parrallel & Sequental tests. Uncoment commented blocks.
- - name: Run tests after Node Parachain upgrade
+
+ - name: Run Parallel tests after Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/tests
+ if: success() || failure() # run this step even if previous step failed
run: |
yarn install
yarn add mochawesome
node scripts/readyness.js
echo "Ready to start tests"
yarn polkadot-types
- NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-after-${NOW}
+ NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
RPC_URL: http://127.0.0.1:9933/
- - name: Test Report After Node upgrade
- uses: phoenix-actions/test-reporting@v8
- id: test-report-after
- if: success() || failure() # run this step even if previous step failed
- with:
- name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created
- path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-after-*.json # Path to test results
- reporter: mochawesome-json
- fail-on-error: 'false'
-
- # TODO uncomment thease steps after the merge
- #- name: Run Parallel tests after Node Parachain upgrade
- # working-directory: ${{ matrix.mainnet_branch }}/tests
- # run: |
- # yarn install
- # yarn add mochawesome
- # node scripts/readyness.js
- # echo "Ready to start tests"
- # yarn polkadot-types
- # NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
- # env:
- # RPC_URL: http://127.0.0.1:9933/
-
#- name: Test Report Parallel After Node upgrade
# uses: phoenix-actions/test-reporting@v8
# id: test-report-parallel-after
@@ -336,14 +305,14 @@
# path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results
# reporter: mochawesome-json
# fail-on-error: 'false'
-
- #- name: Run Sequential tests after Node Parachain upgrade
- # if: success() || failure()
- # working-directory: ${{ matrix.mainnet_branch }}/tests
- # run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
- # env:
- # RPC_URL: http://127.0.0.1:9933/
+ - name: Run Sequential tests after Node Parachain upgrade
+ if: success() || failure()
+ working-directory: ${{ matrix.mainnet_branch }}/tests
+ run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
+ env:
+ RPC_URL: http://127.0.0.1:9933/
+
#- name: Upload Sequential Test Report After Node upgrade
# uses: phoenix-actions/test-reporting@v8
# id: test-sequential-report-after
@@ -353,7 +322,6 @@
# path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results
# reporter: mochawesome-json
# fail-on-error: 'false'
-
- name: Stop running containers
if: always() # run this step always
.maintain/scripts/generate_abi.shdiffbeforeafterboth--- a/.maintain/scripts/generate_abi.sh
+++ b/.maintain/scripts/generate_abi.sh
@@ -4,6 +4,7 @@
dir=$PWD
tmp=$(mktemp -d)
+echo "Tmp file: $tmp/input.sol"
cd $tmp
cp $dir/$INPUT input.sol
solcjs --abi -p input.sol
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -75,9 +75,9 @@
[[package]]
name = "aho-corasick"
-version = "0.7.19"
+version = "0.7.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e"
+checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
dependencies = [
"memchr",
]
@@ -137,9 +137,9 @@
[[package]]
name = "array-bytes"
-version = "4.1.0"
+version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a913633b0c922e6b745072795f50d90ebea78ba31a57e2ac8c2fc7b50950949"
+checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6"
[[package]]
name = "arrayref"
@@ -196,30 +196,30 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e14485364214912d3b19cc3435dde4df66065127f05fa0d75c712f36f12c2f28"
dependencies = [
- "concurrent-queue",
+ "concurrent-queue 1.2.4",
"event-listener",
"futures-core",
]
[[package]]
name = "async-executor"
-version = "1.4.1"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965"
+checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b"
dependencies = [
+ "async-lock",
"async-task",
- "concurrent-queue",
+ "concurrent-queue 2.0.0",
"fastrand",
"futures-lite",
- "once_cell",
"slab",
]
[[package]]
name = "async-global-executor"
-version = "2.3.0"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0da5b41ee986eed3f524c380e6d64965aea573882a8907682ad100f7859305ca"
+checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776"
dependencies = [
"async-channel",
"async-executor",
@@ -232,16 +232,16 @@
[[package]]
name = "async-io"
-version = "1.9.0"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83e21f3a490c72b3b0cf44962180e60045de2925d8dff97918f7ee43c8f637c7"
+checksum = "e8121296a9f05be7f34aa4196b1747243b3b62e048bb7906f644f3fbfc490cf7"
dependencies = [
+ "async-lock",
"autocfg",
- "concurrent-queue",
+ "concurrent-queue 1.2.4",
"futures-lite",
"libc",
"log",
- "once_cell",
"parking",
"polling",
"slab",
@@ -340,9 +340,9 @@
[[package]]
name = "asynchronous-codec"
-version = "0.6.0"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690"
+checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182"
dependencies = [
"bytes",
"futures-sink",
@@ -595,16 +595,16 @@
"funty 2.0.0",
"radium 0.7.0",
"tap",
- "wyz 0.5.0",
+ "wyz 0.5.1",
]
[[package]]
name = "blake2"
-version = "0.10.4"
+version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388"
+checksum = "b12e5fd123190ce1c2e559308a94c9bacad77907d4c6005d9e58fe1a0689e55e"
dependencies = [
- "digest 0.10.5",
+ "digest 0.10.6",
]
[[package]]
@@ -614,7 +614,7 @@
checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
dependencies = [
"arrayvec 0.4.12",
- "constant_time_eq",
+ "constant_time_eq 0.1.5",
]
[[package]]
@@ -625,7 +625,7 @@
dependencies = [
"arrayref",
"arrayvec 0.7.2",
- "constant_time_eq",
+ "constant_time_eq 0.1.5",
]
[[package]]
@@ -636,21 +636,21 @@
dependencies = [
"arrayref",
"arrayvec 0.7.2",
- "constant_time_eq",
+ "constant_time_eq 0.1.5",
]
[[package]]
name = "blake3"
-version = "1.3.1"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f"
+checksum = "895adc16c8b3273fbbc32685a7d55227705eda08c01e77704020f3491924b44b"
dependencies = [
"arrayref",
"arrayvec 0.7.2",
"cc",
"cfg-if 1.0.0",
- "constant_time_eq",
- "digest 0.10.5",
+ "constant_time_eq 0.2.4",
+ "digest 0.10.6",
]
[[package]]
@@ -769,9 +769,9 @@
[[package]]
name = "byte-slice-cast"
-version = "1.2.1"
+version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e"
+checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c"
[[package]]
name = "byte-tools"
@@ -787,9 +787,9 @@
[[package]]
name = "bytes"
-version = "1.2.1"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db"
+checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"
[[package]]
name = "bzip2-sys"
@@ -841,9 +841,9 @@
[[package]]
name = "cc"
-version = "1.0.73"
+version = "1.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
+checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
dependencies = [
"jobserver",
]
@@ -911,9 +911,9 @@
[[package]]
name = "chrono"
-version = "0.4.22"
+version = "0.4.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1"
+checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
dependencies = [
"iana-time-zone",
"js-sys",
@@ -973,7 +973,7 @@
dependencies = [
"glob",
"libc",
- "libloading 0.7.3",
+ "libloading 0.7.4",
]
[[package]]
@@ -1017,9 +1017,9 @@
[[package]]
name = "cmake"
-version = "0.1.48"
+version = "0.1.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a"
+checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c"
dependencies = [
"cc",
]
@@ -1048,9 +1048,9 @@
[[package]]
name = "comfy-table"
-version = "6.1.1"
+version = "6.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b3d16bb3da60be2f7c7acfc438f2ae6f3496897ce68c291d0509bb67b4e248e"
+checksum = "e621e7e86c46fd8a14c32c6ae3cb95656621b4743a27d0cffedb831d46e7ad21"
dependencies = [
"strum",
"strum_macros",
@@ -1058,22 +1058,21 @@
]
[[package]]
-name = "concat-idents"
-version = "1.1.3"
+name = "concurrent-queue"
+version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b6f90860248d75014b7b103db8fee4f291c07bfb41306cdf77a0a5ab7a10d2f"
+checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c"
dependencies = [
- "quote",
- "syn",
+ "cache-padded",
]
[[package]]
name = "concurrent-queue"
-version = "1.2.4"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c"
+checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b"
dependencies = [
- "cache-padded",
+ "crossbeam-utils",
]
[[package]]
@@ -1102,6 +1101,12 @@
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
+name = "constant_time_eq"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279"
+
+[[package]]
name = "convert_case"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1152,18 +1157,18 @@
[[package]]
name = "cranelift-bforest"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44409ccf2d0f663920cab563d2b79fcd6b2e9a2bcc6e929fef76c8f82ad6c17a"
+checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98de2018ad96eb97f621f7d6b900a0cc661aec8d02ea4a50e56ecb48e5a2fcaf"
+checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74"
dependencies = [
"arrayvec 0.7.2",
"bumpalo",
@@ -1181,33 +1186,33 @@
[[package]]
name = "cranelift-codegen-meta"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5287ce36e6c4758fbaf298bd1a8697ad97a4f2375a3d1b61142ea538db4877e5"
+checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f"
dependencies = [
"cranelift-codegen-shared",
]
[[package]]
name = "cranelift-codegen-shared"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2855c24219e2f08827f3f4ffb2da92e134ae8d8ecc185b11ec8f9878cf5f588e"
+checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc"
[[package]]
name = "cranelift-entity"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b65673279d75d34bf11af9660ae2dbd1c22e6d28f163f5c72f4e1dc56d56103"
+checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352"
dependencies = [
"serde",
]
[[package]]
name = "cranelift-frontend"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ed2b3d7a4751163f6c4a349205ab1b7d9c00eecf19dcea48592ef1f7688eefc"
+checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a"
dependencies = [
"cranelift-codegen",
"log",
@@ -1217,15 +1222,15 @@
[[package]]
name = "cranelift-isle"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3be64cecea9d90105fc6a2ba2d003e98c867c1d6c4c86cc878f97ad9fb916293"
+checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470"
[[package]]
name = "cranelift-native"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4a03a6ac1b063e416ca4b93f6247978c991475e8271465340caa6f92f3c16a4"
+checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318"
dependencies = [
"cranelift-codegen",
"libc",
@@ -1234,9 +1239,9 @@
[[package]]
name = "cranelift-wasm"
-version = "0.88.1"
+version = "0.88.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c699873f7b30bc5f20dd03a796b4183e073a46616c91704792ec35e45d13f913"
+checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
@@ -1280,22 +1285,22 @@
[[package]]
name = "crossbeam-epoch"
-version = "0.9.11"
+version = "0.9.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348"
+checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a"
dependencies = [
"autocfg",
"cfg-if 1.0.0",
"crossbeam-utils",
- "memoffset",
+ "memoffset 0.7.1",
"scopeguard",
]
[[package]]
name = "crossbeam-queue"
-version = "0.3.6"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cd42583b04998a5363558e5f9291ee5a5ff6b49944332103f251e7479a82aa7"
+checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
@@ -1303,9 +1308,9 @@
[[package]]
name = "crossbeam-utils"
-version = "0.8.12"
+version = "0.8.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac"
+checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f"
dependencies = [
"cfg-if 1.0.0",
]
@@ -1872,9 +1877,9 @@
[[package]]
name = "cxx"
-version = "1.0.80"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a"
+checksum = "d4a41a86530d0fe7f5d9ea779916b7cadd2d4f9add748b99c2c029cbbdfaf453"
dependencies = [
"cc",
"cxxbridge-flags",
@@ -1884,9 +1889,9 @@
[[package]]
name = "cxx-build"
-version = "1.0.80"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827"
+checksum = "06416d667ff3e3ad2df1cd8cd8afae5da26cf9cec4d0825040f88b5ca659a2f0"
dependencies = [
"cc",
"codespan-reporting",
@@ -1899,15 +1904,15 @@
[[package]]
name = "cxxbridge-flags"
-version = "1.0.80"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a"
+checksum = "820a9a2af1669deeef27cb271f476ffd196a2c4b6731336011e0ba63e2c7cf71"
[[package]]
name = "cxxbridge-macro"
-version = "1.0.80"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7"
+checksum = "a08a6e2fcc370a089ad3b4aaf54db3b1b4cee38ddabce5896b33eb693275f470"
dependencies = [
"proc-macro2",
"quote",
@@ -1993,9 +1998,9 @@
[[package]]
name = "digest"
-version = "0.10.5"
+version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c"
+checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
dependencies = [
"block-buffer 0.10.3",
"crypto-common",
@@ -2216,9 +2221,9 @@
[[package]]
name = "env_logger"
-version = "0.9.1"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272"
+checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
dependencies = [
"atty",
"humantime",
@@ -2332,9 +2337,8 @@
[[package]]
name = "evm-coder"
-version = "0.1.4"
+version = "0.1.5"
dependencies = [
- "concat-idents",
"ethereum",
"evm-coder-procedural",
"evm-core",
@@ -2352,7 +2356,7 @@
[[package]]
name = "evm-coder-procedural"
-version = "0.2.1"
+version = "0.2.2"
dependencies = [
"Inflector",
"hex",
@@ -2479,7 +2483,7 @@
[[package]]
name = "fc-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"async-trait",
"fc-db",
@@ -2498,14 +2502,16 @@
[[package]]
name = "fc-db"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"fp-storage",
"kvdb-rocksdb",
+ "log",
"parity-db",
"parity-scale-codec 3.2.1",
"parking_lot 0.12.1",
"sc-client-db",
+ "sp-blockchain",
"sp-core",
"sp-database",
"sp-runtime",
@@ -2514,7 +2520,7 @@
[[package]]
name = "fc-mapping-sync"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"fc-db",
"fp-consensus",
@@ -2531,13 +2537,15 @@
[[package]]
name = "fc-rpc"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"ethereum",
"ethereum-types",
"evm",
"fc-db",
"fc-rpc-core",
+ "fp-ethereum",
+ "fp-evm",
"fp-rpc",
"fp-storage",
"futures 0.3.25",
@@ -2545,12 +2553,11 @@
"jsonrpsee",
"libsecp256k1",
"log",
- "lru 0.7.8",
+ "lru 0.8.1",
"parity-scale-codec 3.2.1",
"prometheus",
"rand 0.8.5",
"rlp",
- "rustc-hex",
"sc-client-api",
"sc-network",
"sc-network-common",
@@ -2573,7 +2580,7 @@
[[package]]
name = "fc-rpc-core"
version = "1.1.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2713,7 +2720,7 @@
[[package]]
name = "fp-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"ethereum",
"parity-scale-codec 3.2.1",
@@ -2723,9 +2730,24 @@
]
[[package]]
+name = "fp-ethereum"
+version = "1.0.0-dev"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
+dependencies = [
+ "ethereum",
+ "ethereum-types",
+ "fp-evm",
+ "frame-support",
+ "num_enum",
+ "parity-scale-codec 3.2.1",
+ "sp-core",
+ "sp-std",
+]
+
+[[package]]
name = "fp-evm"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"evm",
"frame-support",
@@ -2739,7 +2761,7 @@
[[package]]
name = "fp-evm-mapping"
version = "0.1.0"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"frame-support",
"sp-core",
@@ -2748,7 +2770,7 @@
[[package]]
name = "fp-rpc"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2765,7 +2787,7 @@
[[package]]
name = "fp-self-contained"
version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"ethereum",
"frame-support",
@@ -2773,17 +2795,16 @@
"parity-util-mem",
"scale-info",
"serde",
- "sp-debug-derive",
- "sp-io",
"sp-runtime",
]
[[package]]
name = "fp-storage"
version = "2.0.0"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"parity-scale-codec 3.2.1",
+ "serde",
]
[[package]]
@@ -3040,9 +3061,9 @@
[[package]]
name = "fs-err"
-version = "2.8.1"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50"
+checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541"
[[package]]
name = "fs-swap"
@@ -3512,9 +3533,9 @@
[[package]]
name = "hyper"
-version = "0.14.20"
+version = "0.14.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac"
+checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c"
dependencies = [
"bytes",
"futures-channel",
@@ -3536,9 +3557,9 @@
[[package]]
name = "hyper-rustls"
-version = "0.23.0"
+version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac"
+checksum = "59df7c4e19c950e6e0e868dcc0a300b09a9b88e9ec55bd879ca819087a77355d"
dependencies = [
"http",
"hyper",
@@ -3551,9 +3572,9 @@
[[package]]
name = "iana-time-zone"
-version = "0.1.51"
+version = "0.1.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5a6ef98976b22b3b7f2f3a806f858cb862044cfa66805aa3ad84cb3d3b785ed"
+checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765"
dependencies = [
"android_system_properties",
"core-foundation-sys",
@@ -3662,9 +3683,9 @@
[[package]]
name = "indexmap"
-version = "1.9.1"
+version = "1.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
+checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
dependencies = [
"autocfg",
"hashbrown",
@@ -3706,9 +3727,19 @@
[[package]]
name = "io-lifetimes"
-version = "0.7.4"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074"
+
+[[package]]
+name = "io-lifetimes"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6e481ccbe3dea62107216d0d1138bb8ad8e5e5c43009a098bd1990272c497b0"
+checksum = "a7d367024b3f3414d8e01f437f704f41a9f64ab36f9067fa73e526ad4c763c87"
+dependencies = [
+ "libc",
+ "windows-sys 0.42.0",
+]
[[package]]
name = "ip_network"
@@ -3718,9 +3749,9 @@
[[package]]
name = "ipconfig"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "723519edce41262b05d4143ceb95050e4c614f483e78e9fd9e39a8275a84ad98"
+checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be"
dependencies = [
"socket2",
"widestring",
@@ -3730,9 +3761,9 @@
[[package]]
name = "ipnet"
-version = "2.5.0"
+version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
+checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745"
[[package]]
name = "itertools"
@@ -3925,9 +3956,12 @@
[[package]]
name = "keccak"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838"
+checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768"
+dependencies = [
+ "cpufeatures",
+]
[[package]]
name = "kusama-runtime"
@@ -4113,9 +4147,9 @@
[[package]]
name = "libloading"
-version = "0.7.3"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if 1.0.0",
"winapi",
@@ -4123,9 +4157,9 @@
[[package]]
name = "libm"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565"
+checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
[[package]]
name = "libp2p"
@@ -4757,6 +4791,12 @@
checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d"
[[package]]
+name = "linux-raw-sys"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb68f22743a3fb35785f1e7f844ca5a3de2dde5bd0c0ef5b372065814699b121"
+
+[[package]]
name = "lock_api"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4880,18 +4920,18 @@
[[package]]
name = "memfd"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "480b5a5de855d11ff13195950bdc8b98b5e942ef47afc447f6615cdcc4e15d80"
+checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb"
dependencies = [
- "rustix",
+ "rustix 0.36.2",
]
[[package]]
name = "memmap2"
-version = "0.5.7"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498"
+checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc"
dependencies = [
"libc",
]
@@ -4906,6 +4946,15 @@
]
[[package]]
+name = "memoffset"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
name = "memory-db"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5020,7 +5069,7 @@
"blake2s_simd",
"blake3",
"core2",
- "digest 0.10.5",
+ "digest 0.10.6",
"multihash-derive",
"sha2 0.10.6",
"sha3",
@@ -5291,15 +5340,36 @@
[[package]]
name = "num_cpus"
-version = "1.13.1"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
+checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
dependencies = [
"hermit-abi",
"libc",
]
[[package]]
+name = "num_enum"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9"
+dependencies = [
+ "num_enum_derive",
+]
+
+[[package]]
+name = "num_enum_derive"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
name = "num_threads"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5322,9 +5392,9 @@
[[package]]
name = "once_cell"
-version = "1.15.0"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
+checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
[[package]]
name = "opal-runtime"
@@ -5577,9 +5647,9 @@
[[package]]
name = "os_str_bytes"
-version = "6.3.0"
+version = "6.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
+checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
[[package]]
name = "owning_ref"
@@ -5724,7 +5794,7 @@
[[package]]
name = "pallet-base-fee"
version = "1.0.0"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"fp-evm",
"frame-support",
@@ -5831,7 +5901,7 @@
[[package]]
name = "pallet-common"
-version = "0.1.11"
+version = "0.1.12"
dependencies = [
"ethereum",
"evm-coder",
@@ -5940,12 +6010,13 @@
[[package]]
name = "pallet-ethereum"
version = "4.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
"ethereum",
"ethereum-types",
"evm",
"fp-consensus",
+ "fp-ethereum",
"fp-evm",
"fp-evm-mapping",
"fp-rpc",
@@ -5953,14 +6024,12 @@
"fp-storage",
"frame-support",
"frame-system",
- "log",
"pallet-evm",
"pallet-timestamp",
"parity-scale-codec 3.2.1",
"rlp",
"scale-info",
"serde",
- "sha3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -5969,8 +6038,9 @@
[[package]]
name = "pallet-evm"
version = "6.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30#65930cb2982258bee67b73a1f017711f6f4aa0a4"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.30-2#6fce4a7f9c3591f4090dd1db39fe71f6562804d0"
dependencies = [
+ "environmental",
"evm",
"fp-evm",
"fp-evm-mapping",
@@ -5986,7 +6056,6 @@
"rlp",
"scale-info",
"serde",
- "sha3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -7163,9 +7232,9 @@
[[package]]
name = "pest"
-version = "2.4.0"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbc7bc69c062e492337d74d59b120c274fd3d261b6bf6d3207d499b4b379c41a"
+checksum = "a528564cc62c19a7acac4d81e01f39e53e25e17b934878f4c6d25cc2836e62f8"
dependencies = [
"thiserror",
"ucd-trie",
@@ -7173,9 +7242,9 @@
[[package]]
name = "pest_derive"
-version = "2.4.0"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60b75706b9642ebcb34dab3bc7750f811609a0eb1dd8b88c2d15bf628c1c65b2"
+checksum = "d5fd9bc6500181952d34bd0b2b0163a54d794227b498be0b7afa7698d0a7b18f"
dependencies = [
"pest",
"pest_generator",
@@ -7183,9 +7252,9 @@
[[package]]
name = "pest_generator"
-version = "2.4.0"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4f9272122f5979a6511a749af9db9bfc810393f63119970d7085fed1c4ea0db"
+checksum = "d2610d5ac5156217b4ff8e46ddcef7cdf44b273da2ac5bca2ecbfa86a330e7c4"
dependencies = [
"pest",
"pest_meta",
@@ -7196,9 +7265,9 @@
[[package]]
name = "pest_meta"
-version = "2.4.0"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c8717927f9b79515e565a64fe46c38b8cd0427e64c40680b14a7365ab09ac8d"
+checksum = "824749bf7e21dd66b36fbe26b3f45c713879cccd4a009a917ab8e045ca8246fe"
dependencies = [
"once_cell",
"pest",
@@ -8556,9 +8625,19 @@
[[package]]
name = "ppv-lite86"
-version = "0.2.16"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
+[[package]]
+name = "prettyplease"
+version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
+checksum = "c142c0e46b57171fe0c528bee8c5b7569e80f0c17e377cd0e30ea57dbc11bb51"
+dependencies = [
+ "proc-macro2",
+ "syn",
+]
[[package]]
name = "primitive-types"
@@ -8682,12 +8761,12 @@
[[package]]
name = "prost"
-version = "0.11.0"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7"
+checksum = "a0841812012b2d4a6145fae9a6af1534873c32aa67fff26bd09f8fa42c83f95a"
dependencies = [
"bytes",
- "prost-derive 0.11.0",
+ "prost-derive 0.11.2",
]
[[package]]
@@ -8714,9 +8793,9 @@
[[package]]
name = "prost-build"
-version = "0.11.1"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb"
+checksum = "1d8b442418ea0822409d9e7d047cbf1e7e9e1760b172bf9982cf29d517c93511"
dependencies = [
"bytes",
"heck",
@@ -8725,9 +8804,11 @@
"log",
"multimap",
"petgraph",
- "prost 0.11.0",
- "prost-types 0.11.1",
+ "prettyplease",
+ "prost 0.11.2",
+ "prost-types 0.11.2",
"regex",
+ "syn",
"tempfile",
"which",
]
@@ -8760,9 +8841,9 @@
[[package]]
name = "prost-derive"
-version = "0.11.0"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
+checksum = "164ae68b6587001ca506d3bf7f1000bfa248d0e1217b618108fba4ec1d0cc306"
dependencies = [
"anyhow",
"itertools",
@@ -8783,12 +8864,12 @@
[[package]]
name = "prost-types"
-version = "0.11.1"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e"
+checksum = "747761bc3dc48f9a34553bf65605cf6cb6288ba219f3450b4275dbd81539551a"
dependencies = [
"bytes",
- "prost 0.11.0",
+ "prost 0.11.2",
]
[[package]]
@@ -9039,11 +9120,10 @@
[[package]]
name = "rayon"
-version = "1.5.3"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d"
+checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b"
dependencies = [
- "autocfg",
"crossbeam-deque",
"either",
"rayon-core",
@@ -9051,9 +9131,9 @@
[[package]]
name = "rayon-core"
-version = "1.9.3"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f"
+checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3"
dependencies = [
"crossbeam-channel",
"crossbeam-deque",
@@ -9096,18 +9176,18 @@
[[package]]
name = "ref-cast"
-version = "1.0.12"
+version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12a733f1746c929b4913fe48f8697fcf9c55e3304ba251a79ffb41adfeaf49c2"
+checksum = "53b15debb4f9d60d767cd8ca9ef7abb2452922f3214671ff052defc7f3502c44"
dependencies = [
"ref-cast-impl",
]
[[package]]
name = "ref-cast-impl"
-version = "1.0.12"
+version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5887de4a01acafd221861463be6113e6e87275e79804e56779f4cdc131c60368"
+checksum = "abfa8511e9e94fd3de6585a3d3cd00e01ed556dc9814829280af0e8dc72a8f36"
dependencies = [
"proc-macro2",
"quote",
@@ -9128,9 +9208,9 @@
[[package]]
name = "regex"
-version = "1.6.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
+checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
dependencies = [
"aho-corasick",
"memchr",
@@ -9148,9 +9228,9 @@
[[package]]
name = "regex-syntax"
-version = "0.6.27"
+version = "0.6.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
+checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
[[package]]
name = "remote-externalities"
@@ -9426,19 +9506,33 @@
[[package]]
name = "rustix"
-version = "0.35.12"
+version = "0.35.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "985947f9b6423159c4726323f373be0a21bdb514c5af06a849cb3d2dce2d01e8"
+checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9"
dependencies = [
"bitflags",
"errno",
- "io-lifetimes",
+ "io-lifetimes 0.7.5",
"libc",
- "linux-raw-sys",
- "windows-sys 0.36.1",
+ "linux-raw-sys 0.0.46",
+ "windows-sys 0.42.0",
]
[[package]]
+name = "rustix"
+version = "0.36.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "203974af07ea769452490ee8de3e5947971efc3a090dca8a779dd432d3fa46a7"
+dependencies = [
+ "bitflags",
+ "errno",
+ "io-lifetimes 1.0.1",
+ "libc",
+ "linux-raw-sys 0.1.2",
+ "windows-sys 0.42.0",
+]
+
+[[package]]
name = "rustls"
version = "0.20.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -9976,7 +10070,7 @@
"once_cell",
"parity-scale-codec 3.2.1",
"parity-wasm 0.45.0",
- "rustix",
+ "rustix 0.35.13",
"sc-allocator",
"sc-executor-common",
"sp-runtime-interface",
@@ -10135,8 +10229,8 @@
"futures 0.3.25",
"libp2p",
"log",
- "prost 0.11.0",
- "prost-build 0.11.1",
+ "prost 0.11.2",
+ "prost-build 0.11.2",
"sc-client-api",
"sc-network-common",
"sp-blockchain",
@@ -10612,9 +10706,9 @@
[[package]]
name = "scale-info"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "333af15b02563b8182cd863f925bd31ef8fa86a0e095d30c091956057d436153"
+checksum = "88d8a765117b237ef233705cc2cc4c6a27fccd46eea6ef0c8c6dae5f3ef407f8"
dependencies = [
"bitvec 1.0.1",
"cfg-if 1.0.0",
@@ -10626,9 +10720,9 @@
[[package]]
name = "scale-info-derive"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53f56acbd0743d29ffa08f911ab5397def774ad01bab3786804cf6ee057fb5e1"
+checksum = "cdcd47b380d8c4541044e341dcd9475f55ba37ddc50c908d945fc036a8642496"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -10804,9 +10898,9 @@
[[package]]
name = "serde_json"
-version = "1.0.87"
+version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45"
+checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
dependencies = [
"itoa",
"ryu",
@@ -10843,7 +10937,7 @@
dependencies = [
"cfg-if 1.0.0",
"cpufeatures",
- "digest 0.10.5",
+ "digest 0.10.6",
]
[[package]]
@@ -10879,7 +10973,7 @@
dependencies = [
"cfg-if 1.0.0",
"cpufeatures",
- "digest 0.10.5",
+ "digest 0.10.6",
]
[[package]]
@@ -10888,7 +10982,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9"
dependencies = [
- "digest 0.10.5",
+ "digest 0.10.6",
"keccak",
]
@@ -10956,9 +11050,9 @@
[[package]]
name = "similar"
-version = "2.2.0"
+version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62ac7f900db32bf3fd12e0117dd3dc4da74bc52ebaac97f39668446d89694803"
+checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf"
dependencies = [
"bstr",
"unicode-segmentation",
@@ -11018,9 +11112,9 @@
[[package]]
name = "snap"
-version = "1.0.5"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45456094d1983e2ee2a18fdfebce3189fa451699d0502cb8e3b49dba5ba41451"
+checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831"
[[package]]
name = "snow"
@@ -11318,7 +11412,7 @@
dependencies = [
"blake2",
"byteorder",
- "digest 0.10.5",
+ "digest 0.10.6",
"sha2 0.10.6",
"sha3",
"sp-std",
@@ -11816,9 +11910,9 @@
[[package]]
name = "ss58-registry"
-version = "1.33.0"
+version = "1.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ab7554f8a8b6f8d71cd5a8e6536ef116e2ce0504cf97ebf16311d58065dc8a6"
+checksum = "fa0813c10b9dbdc842c2305f949f724c64866e4ef4d09c9151e96f6a2106773c"
dependencies = [
"Inflector",
"num-format",
@@ -12141,9 +12235,9 @@
[[package]]
name = "target-lexicon"
-version = "0.12.4"
+version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1"
+checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d"
[[package]]
name = "tempfile"
@@ -12368,9 +12462,9 @@
[[package]]
name = "tokio"
-version = "1.21.2"
+version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099"
+checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3"
dependencies = [
"autocfg",
"bytes",
@@ -12694,7 +12788,7 @@
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if 1.0.0",
- "digest 0.10.5",
+ "digest 0.10.6",
"rand 0.8.5",
"static_assertions",
]
@@ -13340,9 +13434,9 @@
[[package]]
name = "wasmtime"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1f511c4917c83d04da68333921107db75747c4e11a2f654a8e909cc5e0520dc"
+checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731"
dependencies = [
"anyhow",
"bincode",
@@ -13368,18 +13462,18 @@
[[package]]
name = "wasmtime-asm-macros"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39bf3debfe744bf19dd3732990ce6f8c0ced7439e2370ba4e1d8f5a3660a3178"
+checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597"
dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "wasmtime-cache"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ece42fa4676a263f7558cdaaf5a71c2592bebcbac22a0580e33cf3406c103da2"
+checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882"
dependencies = [
"anyhow",
"base64",
@@ -13387,7 +13481,7 @@
"directories-next",
"file-per-thread-logger",
"log",
- "rustix",
+ "rustix 0.35.13",
"serde",
"sha2 0.9.9",
"toml",
@@ -13397,9 +13491,9 @@
[[package]]
name = "wasmtime-cranelift"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "058217e28644b012bdcdf0e445f58d496d78c2e0b6a6dd93558e701591dad705"
+checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6"
dependencies = [
"anyhow",
"cranelift-codegen",
@@ -13418,9 +13512,9 @@
[[package]]
name = "wasmtime-environ"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7af06848df28b7661471d9a80d30a973e0f401f2e3ed5396ad7e225ed217047"
+checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644"
dependencies = [
"anyhow",
"cranelift-entity",
@@ -13437,9 +13531,9 @@
[[package]]
name = "wasmtime-jit"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9028fb63a54185b3c192b7500ef8039c7bb8d7f62bfc9e7c258483a33a3d13bb"
+checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681"
dependencies = [
"addr2line",
"anyhow",
@@ -13450,7 +13544,7 @@
"log",
"object",
"rustc-demangle",
- "rustix",
+ "rustix 0.35.13",
"serde",
"target-lexicon",
"thiserror",
@@ -13462,20 +13556,20 @@
[[package]]
name = "wasmtime-jit-debug"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25e82d4ef93296785de7efca92f7679dc67fe68a13b625a5ecc8d7503b377a37"
+checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731"
dependencies = [
"object",
"once_cell",
- "rustix",
+ "rustix 0.35.13",
]
[[package]]
name = "wasmtime-runtime"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f0e9bea7d517d114fe66b930b2124ee086516ee93eeebfd97f75f366c5b0553"
+checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd"
dependencies = [
"anyhow",
"cc",
@@ -13485,10 +13579,10 @@
"log",
"mach",
"memfd",
- "memoffset",
+ "memoffset 0.6.5",
"paste",
"rand 0.8.5",
- "rustix",
+ "rustix 0.35.13",
"thiserror",
"wasmtime-asm-macros",
"wasmtime-environ",
@@ -13498,9 +13592,9 @@
[[package]]
name = "wasmtime-types"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69b83e93ed41b8fdc936244cfd5e455480cf1eca1fd60c78a0040038b4ce5075"
+checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb"
dependencies = [
"cranelift-entity",
"serde",
@@ -13841,9 +13935,9 @@
[[package]]
name = "winreg"
-version = "0.7.0"
+version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69"
+checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
dependencies = [
"winapi",
]
@@ -13856,9 +13950,9 @@
[[package]]
name = "wyz"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e"
+checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
dependencies = [
"tap",
]
client/rpc/Cargo.tomldiffbeforeafterboth--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -19,4 +19,4 @@
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
crates/evm-coder/CHANGELOG.mddiffbeforeafterboth--- a/crates/evm-coder/CHANGELOG.md
+++ b/crates/evm-coder/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
<!-- bureaucrate goes here -->
+## [v0.1.5] - 2022-11-30
+
+### Added
+- Derive macro to support structures and enums.
## [v0.1.4] - 2022-11-02
crates/evm-coder/Cargo.tomldiffbeforeafterboth--- a/crates/evm-coder/Cargo.toml
+++ b/crates/evm-coder/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "evm-coder"
-version = "0.1.4"
+version = "0.1.5"
license = "GPLv3"
edition = "2021"
@@ -19,14 +19,13 @@
# We have tuple-heavy code in solidity.rs
impl-trait-for-tuples = "0.2.2"
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
[dev-dependencies]
# We want to assert some large binary blobs equality in tests
hex = "0.4.3"
hex-literal = "0.3.4"
similar-asserts = "1.4.2"
-concat-idents = "1.1.3"
trybuild = "1.0"
[features]
crates/evm-coder/procedural/Cargo.tomldiffbeforeafterboth--- a/crates/evm-coder/procedural/Cargo.toml
+++ b/crates/evm-coder/procedural/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "evm-coder-procedural"
-version = "0.2.1"
+version = "0.2.2"
license = "GPLv3"
edition = "2021"
crates/evm-coder/procedural/src/abi_derive/derive_enum.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/procedural/src/abi_derive/derive_enum.rs
@@ -0,0 +1,211 @@
+use quote::quote;
+
+pub fn impl_solidity_option<'a>(
+ name: &proc_macro2::Ident,
+ enum_options: impl Iterator<Item = &'a syn::Ident>,
+) -> proc_macro2::TokenStream {
+ let enum_options = enum_options.map(|opt| {
+ let s = name.to_string() + "." + opt.to_string().as_str();
+ let as_string = proc_macro2::Literal::string(s.as_str());
+ quote!(#name::#opt => #as_string,)
+ });
+ quote!(
+ #[cfg(feature = "stubgen")]
+ impl ::evm_coder::solidity::SolidityEnum for #name {
+ fn solidity_option(&self) -> &str {
+ match self {
+ #(#enum_options)*
+ }
+ }
+ }
+ )
+}
+
+pub fn impl_enum_from_u8<'a>(
+ name: &proc_macro2::Ident,
+ enum_options: impl Iterator<Item = &'a syn::Ident>,
+) -> proc_macro2::TokenStream {
+ let error_str = format!("Value not convertible into enum \"{name}\"");
+ let error_str = proc_macro2::Literal::string(&error_str);
+ let enum_options = enum_options.enumerate().map(|(i, opt)| {
+ let n = proc_macro2::Literal::u8_suffixed(i as u8);
+ quote! {#n => Ok(#name::#opt),}
+ });
+
+ quote!(
+ impl TryFrom<u8> for #name {
+ type Error = &'static str;
+
+ fn try_from(value: u8) -> ::core::result::Result<Self, Self::Error> {
+ const err: &'static str = #error_str;
+ match value {
+ #(#enum_options)*
+ _ => Err(err)
+ }
+ }
+ }
+ )
+}
+
+pub fn impl_enum_abi_type(name: &syn::Ident) -> proc_macro2::TokenStream {
+ quote! {
+ impl ::evm_coder::abi::AbiType for #name {
+ const SIGNATURE: ::evm_coder::custom_signature::SignatureUnit = <u8 as ::evm_coder::abi::AbiType>::SIGNATURE;
+
+ fn is_dynamic() -> bool {
+ <u8 as ::evm_coder::abi::AbiType>::is_dynamic()
+ }
+ fn size() -> usize {
+ <u8 as ::evm_coder::abi::AbiType>::size()
+ }
+ }
+ }
+}
+
+pub fn impl_enum_abi_read(name: &syn::Ident) -> proc_macro2::TokenStream {
+ quote!(
+ impl ::evm_coder::abi::AbiRead for #name {
+ fn abi_read(reader: &mut ::evm_coder::abi::AbiReader) -> ::evm_coder::execution::Result<Self> {
+ Ok(
+ <u8 as ::evm_coder::abi::AbiRead>::abi_read(reader)?
+ .try_into()?
+ )
+ }
+ }
+ )
+}
+
+pub fn impl_enum_abi_write(name: &syn::Ident) -> proc_macro2::TokenStream {
+ quote!(
+ impl ::evm_coder::abi::AbiWrite for #name {
+ fn abi_write(&self, writer: &mut ::evm_coder::abi::AbiWriter) {
+ ::evm_coder::abi::AbiWrite::abi_write(&(*self as u8), writer);
+ }
+ }
+ )
+}
+
+pub fn impl_enum_solidity_type_name(name: &syn::Ident) -> proc_macro2::TokenStream {
+ quote!(
+ #[cfg(feature = "stubgen")]
+ impl ::evm_coder::solidity::SolidityTypeName for #name {
+ fn solidity_name(
+ writer: &mut impl ::core::fmt::Write,
+ tc: &::evm_coder::solidity::TypeCollector,
+ ) -> ::core::fmt::Result {
+ write!(writer, "{}", tc.collect_struct::<Self>())
+ }
+
+ fn is_simple() -> bool {
+ true
+ }
+
+ fn solidity_default(
+ writer: &mut impl ::core::fmt::Write,
+ tc: &::evm_coder::solidity::TypeCollector,
+ ) -> ::core::fmt::Result {
+ write!(writer, "{}", <#name as ::evm_coder::solidity::SolidityEnum>::solidity_option(&<#name>::default()))
+ }
+ }
+ )
+}
+
+pub fn impl_enum_solidity_struct_collect<'a>(
+ name: &syn::Ident,
+ enum_options: impl Iterator<Item = &'a syn::Ident>,
+ option_count: usize,
+ enum_options_docs: impl Iterator<Item = syn::Result<Vec<proc_macro2::TokenStream>>>,
+ docs: &[proc_macro2::TokenStream],
+) -> proc_macro2::TokenStream {
+ let string_name = name.to_string();
+ let enum_options = enum_options
+ .zip(enum_options_docs)
+ .enumerate()
+ .map(|(i, (opt, doc))| {
+ let opt = proc_macro2::Literal::string(opt.to_string().as_str());
+ let doc = doc.expect("Doc parsing error");
+ let comma = if i != option_count - 1 { "," } else { "" };
+ quote! {
+ #(#doc)*
+ writeln!(str, "\t{}{}", #opt, #comma).expect("Enum format option");
+ }
+ });
+
+ quote!(
+ #[cfg(feature = "stubgen")]
+ impl ::evm_coder::solidity::StructCollect for #name {
+ fn name() -> String {
+ #string_name.into()
+ }
+
+ fn declaration() -> String {
+ use std::fmt::Write;
+
+ let mut str = String::new();
+ #(#docs)*
+ writeln!(str, "enum {} {{", <Self as ::evm_coder::solidity::StructCollect>::name()).unwrap();
+ #(#enum_options)*
+ writeln!(str, "}}").unwrap();
+ str
+ }
+ }
+ )
+}
+
+pub fn check_and_count_options(de: &syn::DataEnum) -> syn::Result<usize> {
+ let mut count = 0;
+ for v in de.variants.iter() {
+ if !v.fields.is_empty() {
+ return Err(syn::Error::new(
+ v.ident.span(),
+ "Enumeration parameters should not have fields",
+ ));
+ } else if v.discriminant.is_some() {
+ return Err(syn::Error::new(
+ v.ident.span(),
+ "Enumeration options should not have an explicit specified value",
+ ));
+ } else {
+ count += 1;
+ }
+ }
+
+ Ok(count)
+}
+
+pub fn check_repr_u8(name: &syn::Ident, attrs: &[syn::Attribute]) -> syn::Result<()> {
+ let mut has_repr = false;
+ for attr in attrs.iter() {
+ if attr.path.is_ident("repr") {
+ has_repr = true;
+ let meta = attr.parse_meta()?;
+ check_meta_u8(&meta)?;
+ }
+ }
+
+ if !has_repr {
+ return Err(syn::Error::new(name.span(), "Enum is not \"repr(u8)\""));
+ }
+
+ Ok(())
+}
+
+fn check_meta_u8(meta: &syn::Meta) -> Result<(), syn::Error> {
+ if let syn::Meta::List(p) = meta {
+ for nm in p.nested.iter() {
+ if let syn::NestedMeta::Meta(syn::Meta::Path(p)) = nm {
+ if !p.is_ident("u8") {
+ return Err(syn::Error::new(
+ p.segments
+ .first()
+ .expect("repr segments are empty")
+ .ident
+ .span(),
+ "Enum is not \"repr(u8)\"",
+ ));
+ }
+ }
+ }
+ }
+ Ok(())
+}
crates/evm-coder/procedural/src/abi_derive/derive_struct.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/procedural/src/abi_derive/derive_struct.rs
@@ -0,0 +1,260 @@
+use super::extract_docs;
+use quote::quote;
+
+pub fn tuple_type<'a>(
+ field_types: impl Iterator<Item = &'a syn::Type> + Clone,
+) -> proc_macro2::TokenStream {
+ let field_types = field_types.map(|ty| quote!(#ty,));
+ quote! {(#(#field_types)*)}
+}
+
+pub fn tuple_ref_type<'a>(
+ field_types: impl Iterator<Item = &'a syn::Type> + Clone,
+) -> proc_macro2::TokenStream {
+ let field_types = field_types.map(|ty| quote!(&#ty,));
+ quote! {(#(#field_types)*)}
+}
+
+pub fn tuple_data_as_ref(
+ is_named_fields: bool,
+ field_names: impl Iterator<Item = syn::Ident> + Clone,
+) -> proc_macro2::TokenStream {
+ let field_names = field_names.enumerate().map(|(i, field)| {
+ if is_named_fields {
+ quote!(&self.#field,)
+ } else {
+ let field = proc_macro2::Literal::usize_unsuffixed(i);
+ quote!(&self.#field,)
+ }
+ });
+ quote! {(#(#field_names)*)}
+}
+
+pub fn tuple_names(
+ is_named_fields: bool,
+ field_names: impl Iterator<Item = syn::Ident> + Clone,
+) -> proc_macro2::TokenStream {
+ let field_names = field_names.enumerate().map(|(i, field)| {
+ if is_named_fields {
+ quote!(#field,)
+ } else {
+ let field = proc_macro2::Ident::new(
+ format!("field{}", i).as_str(),
+ proc_macro2::Span::call_site(),
+ );
+ quote!(#field,)
+ }
+ });
+ quote! {(#(#field_names)*)}
+}
+
+pub fn struct_from_tuple(
+ name: &syn::Ident,
+ is_named_fields: bool,
+ field_names: impl Iterator<Item = syn::Ident> + Clone,
+) -> proc_macro2::TokenStream {
+ let field_names = field_names.enumerate().map(|(i, field)| {
+ if is_named_fields {
+ quote!(#field,)
+ } else {
+ let field = proc_macro2::Ident::new(
+ format!("field{}", i).as_str(),
+ proc_macro2::Span::call_site(),
+ );
+ quote!(#field,)
+ }
+ });
+
+ if is_named_fields {
+ quote! {#name {#(#field_names)*}}
+ } else {
+ quote! {#name (#(#field_names)*)}
+ }
+}
+
+pub fn map_field_to_name(field: (usize, &syn::Field)) -> syn::Ident {
+ match field.1.ident.as_ref() {
+ Some(name) => name.clone(),
+ None => {
+ let mut name = "field".to_string();
+ name.push_str(field.0.to_string().as_str());
+ syn::Ident::new(name.as_str(), proc_macro2::Span::call_site())
+ }
+ }
+}
+
+pub fn map_field_to_type(field: &syn::Field) -> &syn::Type {
+ &field.ty
+}
+
+pub fn map_field_to_doc(field: &syn::Field) -> syn::Result<Vec<proc_macro2::TokenStream>> {
+ extract_docs(&field.attrs, true)
+}
+
+pub fn impl_can_be_placed_in_vec(ident: &syn::Ident) -> proc_macro2::TokenStream {
+ quote! {
+ impl ::evm_coder::sealed::CanBePlacedInVec for #ident {}
+ }
+}
+
+pub fn impl_struct_abi_type(
+ name: &syn::Ident,
+ tuple_type: proc_macro2::TokenStream,
+) -> proc_macro2::TokenStream {
+ quote! {
+ impl ::evm_coder::abi::AbiType for #name {
+ const SIGNATURE: ::evm_coder::custom_signature::SignatureUnit = <#tuple_type as ::evm_coder::abi::AbiType>::SIGNATURE;
+ fn is_dynamic() -> bool {
+ <#tuple_type as ::evm_coder::abi::AbiType>::is_dynamic()
+ }
+ fn size() -> usize {
+ <#tuple_type as ::evm_coder::abi::AbiType>::size()
+ }
+ }
+ }
+}
+
+pub fn impl_struct_abi_read(
+ name: &syn::Ident,
+ tuple_type: proc_macro2::TokenStream,
+ tuple_names: proc_macro2::TokenStream,
+ struct_from_tuple: proc_macro2::TokenStream,
+) -> proc_macro2::TokenStream {
+ quote!(
+ impl ::evm_coder::abi::AbiRead for #name {
+ fn abi_read(reader: &mut ::evm_coder::abi::AbiReader) -> ::evm_coder::execution::Result<Self> {
+ let #tuple_names = <#tuple_type as ::evm_coder::abi::AbiRead>::abi_read(reader)?;
+ Ok(#struct_from_tuple)
+ }
+ }
+ )
+}
+
+pub fn impl_struct_abi_write(
+ name: &syn::Ident,
+ _is_named_fields: bool,
+ tuple_type: proc_macro2::TokenStream,
+ tuple_data: proc_macro2::TokenStream,
+) -> proc_macro2::TokenStream {
+ quote!(
+ impl ::evm_coder::abi::AbiWrite for #name {
+ fn abi_write(&self, writer: &mut ::evm_coder::abi::AbiWriter) {
+ <#tuple_type as ::evm_coder::abi::AbiWrite>::abi_write(&#tuple_data, writer)
+ }
+ }
+ )
+}
+
+pub fn impl_struct_solidity_type<'a>(
+ name: &syn::Ident,
+ field_types: impl Iterator<Item = &'a syn::Type> + Clone,
+ params_count: usize,
+) -> proc_macro2::TokenStream {
+ let len = proc_macro2::Literal::usize_suffixed(params_count);
+ quote! {
+ #[cfg(feature = "stubgen")]
+ impl ::evm_coder::solidity::SolidityType for #name {
+ fn names(tc: &::evm_coder::solidity::TypeCollector) -> Vec<String> {
+ let mut collected =
+ Vec::with_capacity(<Self as ::evm_coder::solidity::SolidityType>::len());
+ #({
+ let mut out = String::new();
+ <#field_types as ::evm_coder::solidity::SolidityTypeName>::solidity_name(&mut out, tc)
+ .expect("no fmt error");
+ collected.push(out);
+ })*
+ collected
+ }
+
+ fn len() -> usize {
+ #len
+ }
+ }
+ }
+}
+
+pub fn impl_struct_solidity_type_name<'a>(
+ name: &syn::Ident,
+ field_types: impl Iterator<Item = &'a syn::Type> + Clone,
+ params_count: usize,
+) -> proc_macro2::TokenStream {
+ let arg_dafaults = field_types.enumerate().map(|(i, ty)| {
+ let mut defult_value = quote!(<#ty as ::evm_coder::solidity::SolidityTypeName
+ >::solidity_default(writer, tc)?;);
+ let last_item = params_count - 1;
+ if i != last_item {
+ defult_value.extend(quote! {write!(writer, ",")?;})
+ }
+ defult_value
+ });
+
+ quote! {
+ #[cfg(feature = "stubgen")]
+ impl ::evm_coder::solidity::SolidityTypeName for #name {
+ fn solidity_name(
+ writer: &mut impl ::core::fmt::Write,
+ tc: &::evm_coder::solidity::TypeCollector,
+ ) -> ::core::fmt::Result {
+ write!(writer, "{}", tc.collect_struct::<Self>())
+ }
+
+ fn is_simple() -> bool {
+ false
+ }
+
+ fn solidity_default(
+ writer: &mut impl ::core::fmt::Write,
+ tc: &::evm_coder::solidity::TypeCollector,
+ ) -> ::core::fmt::Result {
+ write!(writer, "{}(", tc.collect_struct::<Self>())?;
+
+ #(#arg_dafaults)*
+
+ write!(writer, ")")
+ }
+ }
+ }
+}
+
+pub fn impl_struct_solidity_struct_collect<'a>(
+ name: &syn::Ident,
+ field_names: impl Iterator<Item = proc_macro2::Ident> + Clone,
+ field_types: impl Iterator<Item = &'a syn::Type> + Clone,
+ field_docs: impl Iterator<Item = syn::Result<Vec<proc_macro2::TokenStream>>> + Clone,
+ docs: &[proc_macro2::TokenStream],
+) -> syn::Result<proc_macro2::TokenStream> {
+ let string_name = name.to_string();
+ let name_type = field_names
+ .into_iter()
+ .zip(field_types)
+ .zip(field_docs)
+ .map(|((name, ty), doc)| {
+ let field_docs = doc.expect("Doc parse error");
+ let name = format!("{}", name);
+ quote!(
+ #(#field_docs)*
+ write!(str, "\t{} ", <#ty as ::evm_coder::solidity::StructCollect>::name()).unwrap();
+ writeln!(str, "{};", #name).unwrap();
+ )
+ });
+
+ Ok(quote! {
+ #[cfg(feature = "stubgen")]
+ impl ::evm_coder::solidity::StructCollect for #name {
+ fn name() -> String {
+ #string_name.into()
+ }
+
+ fn declaration() -> String {
+ use std::fmt::Write;
+
+ let mut str = String::new();
+ #(#docs)*
+ writeln!(str, "struct {} {{", Self::name()).unwrap();
+ #(#name_type)*
+ writeln!(str, "}}").unwrap();
+ str
+ }
+ }
+ })
+}
crates/evm-coder/procedural/src/abi_derive/mod.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/procedural/src/abi_derive/mod.rs
@@ -0,0 +1,145 @@
+mod derive_enum;
+mod derive_struct;
+
+use quote::quote;
+use derive_struct::*;
+use derive_enum::*;
+
+pub(crate) fn impl_abi_macro(ast: &syn::DeriveInput) -> syn::Result<proc_macro2::TokenStream> {
+ let name = &ast.ident;
+ match &ast.data {
+ syn::Data::Struct(ds) => expand_struct(ds, ast),
+ syn::Data::Enum(de) => expand_enum(de, ast),
+ syn::Data::Union(_) => Err(syn::Error::new(name.span(), "Unions not supported")),
+ }
+}
+
+fn expand_struct(
+ ds: &syn::DataStruct,
+ ast: &syn::DeriveInput,
+) -> syn::Result<proc_macro2::TokenStream> {
+ let name = &ast.ident;
+ let docs = extract_docs(&ast.attrs, false)?;
+ let (is_named_fields, field_names, field_types, field_docs, params_count) = match ds.fields {
+ syn::Fields::Named(ref fields) => Ok((
+ true,
+ fields.named.iter().enumerate().map(map_field_to_name),
+ fields.named.iter().map(map_field_to_type),
+ fields.named.iter().map(map_field_to_doc),
+ fields.named.len(),
+ )),
+ syn::Fields::Unnamed(ref fields) => Ok((
+ false,
+ fields.unnamed.iter().enumerate().map(map_field_to_name),
+ fields.unnamed.iter().map(map_field_to_type),
+ fields.unnamed.iter().map(map_field_to_doc),
+ fields.unnamed.len(),
+ )),
+ syn::Fields::Unit => Err(syn::Error::new(name.span(), "Unit structs not supported")),
+ }?;
+
+ if params_count == 0 {
+ return Err(syn::Error::new(name.span(), "Empty structs not supported"));
+ };
+
+ let tuple_type = tuple_type(field_types.clone());
+ let tuple_ref_type = tuple_ref_type(field_types.clone());
+ let tuple_data = tuple_data_as_ref(is_named_fields, field_names.clone());
+ let tuple_names = tuple_names(is_named_fields, field_names.clone());
+ let struct_from_tuple = struct_from_tuple(name, is_named_fields, field_names.clone());
+
+ let can_be_plcaed_in_vec = impl_can_be_placed_in_vec(name);
+ let abi_type = impl_struct_abi_type(name, tuple_type.clone());
+ let abi_read = impl_struct_abi_read(name, tuple_type, tuple_names, struct_from_tuple);
+ let abi_write = impl_struct_abi_write(name, is_named_fields, tuple_ref_type, tuple_data);
+ let solidity_type = impl_struct_solidity_type(name, field_types.clone(), params_count);
+ let solidity_type_name =
+ impl_struct_solidity_type_name(name, field_types.clone(), params_count);
+ let solidity_struct_collect =
+ impl_struct_solidity_struct_collect(name, field_names, field_types, field_docs, &docs)?;
+
+ Ok(quote! {
+ #can_be_plcaed_in_vec
+ #abi_type
+ #abi_read
+ #abi_write
+ #solidity_type
+ #solidity_type_name
+ #solidity_struct_collect
+ })
+}
+
+fn expand_enum(
+ de: &syn::DataEnum,
+ ast: &syn::DeriveInput,
+) -> syn::Result<proc_macro2::TokenStream> {
+ let name = &ast.ident;
+ check_repr_u8(name, &ast.attrs)?;
+ let docs = extract_docs(&ast.attrs, false)?;
+ let option_count = check_and_count_options(de)?;
+ let enum_options = de.variants.iter().map(|v| &v.ident);
+ let enum_options_docs = de.variants.iter().map(|v| extract_docs(&v.attrs, true));
+
+ let from = impl_enum_from_u8(name, enum_options.clone());
+ let solidity_option = impl_solidity_option(name, enum_options.clone());
+ let can_be_plcaed_in_vec = impl_can_be_placed_in_vec(name);
+ let abi_type = impl_enum_abi_type(name);
+ let abi_read = impl_enum_abi_read(name);
+ let abi_write = impl_enum_abi_write(name);
+ let solidity_type_name = impl_enum_solidity_type_name(name);
+ let solidity_struct_collect = impl_enum_solidity_struct_collect(
+ name,
+ enum_options,
+ option_count,
+ enum_options_docs,
+ &docs,
+ );
+
+ Ok(quote! {
+ #from
+ #solidity_option
+ #can_be_plcaed_in_vec
+ #abi_type
+ #abi_read
+ #abi_write
+ #solidity_type_name
+ #solidity_struct_collect
+ })
+}
+
+fn extract_docs(
+ attrs: &[syn::Attribute],
+ is_field_doc: bool,
+) -> syn::Result<Vec<proc_macro2::TokenStream>> {
+ attrs
+ .iter()
+ .filter_map(|attr| {
+ if let Some(ps) = attr.path.segments.first() {
+ if ps.ident == "doc" {
+ let meta = match attr.parse_meta() {
+ Ok(meta) => meta,
+ Err(e) => return Some(Err(e)),
+ };
+ match meta {
+ syn::Meta::NameValue(mnv) => match &mnv.lit {
+ syn::Lit::Str(ls) => return Some(Ok(ls.value())),
+ _ => unreachable!(),
+ },
+ _ => unreachable!(),
+ }
+ }
+ }
+ None
+ })
+ .enumerate()
+ .map(|(i, doc)| {
+ let doc = doc?;
+ let doc = doc.trim();
+ let dev = if i == 0 { " @dev" } else { "" };
+ let tab = if is_field_doc { "\t" } else { "" };
+ Ok(quote! {
+ writeln!(str, "{}///{} {}", #tab, #dev, #doc).unwrap();
+ })
+ })
+ .collect()
+}
crates/evm-coder/procedural/src/lib.rsdiffbeforeafterboth--- a/crates/evm-coder/procedural/src/lib.rs
+++ b/crates/evm-coder/procedural/src/lib.rs
@@ -25,6 +25,7 @@
parse_macro_input, spanned::Spanned,
};
+mod abi_derive;
mod solidity_interface;
mod to_log;
@@ -242,3 +243,13 @@
}
.into()
}
+
+#[proc_macro_derive(AbiCoder)]
+pub fn abi_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
+ let ast = syn::parse(input).unwrap();
+ let ts = match abi_derive::impl_abi_macro(&ast) {
+ Ok(e) => e,
+ Err(e) => e.to_compile_error(),
+ };
+ ts.into()
+}
crates/evm-coder/procedural/src/solidity_interface.rsdiffbeforeafterboth--- a/crates/evm-coder/procedural/src/solidity_interface.rs
+++ b/crates/evm-coder/procedural/src/solidity_interface.rs
@@ -404,7 +404,11 @@
let name = &self.name;
let ty = &self.ty;
quote! {
- #name: <#ty>::abi_read(reader)?
+ #name: {
+ let value = <#ty as ::evm_coder::abi::AbiRead>::abi_read(reader)?;
+ if !is_dynamic {reader.bytes_read(<#ty as ::evm_coder::abi::AbiType>::size())};
+ value
+ }
}
}
@@ -630,17 +634,18 @@
let pascal_name = &self.pascal_name;
let screaming_name = &self.screaming_name;
if self.has_normal_args {
- let parsers = self
- .args
- .iter()
- .filter(|a| !a.is_special())
- .map(|a| a.expand_parse());
+ let args_iter = self.args.iter().filter(|a| !a.is_special());
+ let arg_type = args_iter.clone().map(|a| &a.ty);
+ let parsers = args_iter.map(|a| a.expand_parse());
quote! {
- Self::#screaming_name => return Ok(Some(Self::#pascal_name {
- #(
- #parsers,
- )*
- }))
+ Self::#screaming_name => {
+ let is_dynamic = false #(|| <#arg_type as ::evm_coder::abi::AbiType>::is_dynamic())*;
+ return Ok(Some(Self::#pascal_name {
+ #(
+ #parsers,
+ )*
+ }))
+ }
}
} else {
quote! { Self::#screaming_name => return Ok(Some(Self::#pascal_name)) }
crates/evm-coder/src/abi/impls.rsdiffbeforeafterboth--- a/crates/evm-coder/src/abi/impls.rs
+++ b/crates/evm-coder/src/abi/impls.rs
@@ -1,8 +1,8 @@
use crate::{
+ custom_signature::SignatureUnit,
execution::{Result, ResultWithPostInfo, WithPostDispatchInfo},
+ make_signature, sealed,
types::*,
- make_signature,
- custom_signature::SignatureUnit,
};
use super::{traits::*, ABI_ALIGNMENT, AbiReader, AbiWriter};
use primitive_types::{U256, H160};
@@ -10,12 +10,12 @@
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
-macro_rules! impl_abi_readable {
- ($ty:ty, $method:ident, $dynamic:literal) => {
+macro_rules! impl_abi_type {
+ ($ty:ty, $name:ident, $dynamic:literal) => {
impl sealed::CanBePlacedInVec for $ty {}
impl AbiType for $ty {
- const SIGNATURE: SignatureUnit = make_signature!(new fixed(stringify!($ty)));
+ const SIGNATURE: SignatureUnit = make_signature!(new fixed(stringify!($name)));
fn is_dynamic() -> bool {
$dynamic
@@ -25,7 +25,11 @@
ABI_ALIGNMENT
}
}
+ };
+}
+macro_rules! impl_abi_readable {
+ ($ty:ty, $method:ident) => {
impl AbiRead for $ty {
fn abi_read(reader: &mut AbiReader) -> Result<$ty> {
reader.$method()
@@ -34,79 +38,93 @@
};
}
-impl_abi_readable!(uint32, uint32, false);
-impl_abi_readable!(uint64, uint64, false);
-impl_abi_readable!(uint128, uint128, false);
-impl_abi_readable!(uint256, uint256, false);
-impl_abi_readable!(bytes4, bytes4, false);
-impl_abi_readable!(address, address, false);
-impl_abi_readable!(string, string, true);
+macro_rules! impl_abi_writeable {
+ ($ty:ty, $method:ident) => {
+ impl AbiWrite for $ty {
+ fn abi_write(&self, writer: &mut AbiWriter) {
+ writer.$method(&self)
+ }
+ }
+ };
+}
-impl sealed::CanBePlacedInVec for bool {}
+macro_rules! impl_abi {
+ ($ty:ty, $method:ident, $dynamic:literal) => {
+ impl_abi_type!($ty, $method, $dynamic);
+ impl_abi_readable!($ty, $method);
+ impl_abi_writeable!($ty, $method);
+ };
+}
-impl AbiType for bool {
- const SIGNATURE: SignatureUnit = make_signature!(new fixed("bool"));
+impl_abi!(bool, bool, false);
+impl_abi!(u8, uint8, false);
+impl_abi!(u32, uint32, false);
+impl_abi!(u64, uint64, false);
+impl_abi!(u128, uint128, false);
+impl_abi!(U256, uint256, false);
+impl_abi!(H160, address, false);
+impl_abi!(string, string, true);
- fn is_dynamic() -> bool {
- false
- }
- fn size() -> usize {
- ABI_ALIGNMENT
+impl_abi_writeable!(&str, string);
+
+impl_abi_type!(bytes, bytes, true);
+
+impl AbiRead for bytes {
+ fn abi_read(reader: &mut AbiReader) -> Result<bytes> {
+ Ok(bytes(reader.bytes()?))
}
}
-impl AbiRead for bool {
- fn abi_read(reader: &mut AbiReader) -> Result<bool> {
- reader.bool()
+
+impl AbiWrite for bytes {
+ fn abi_write(&self, writer: &mut AbiWriter) {
+ writer.bytes(self.0.as_slice())
}
}
-
-impl AbiType for uint8 {
- const SIGNATURE: SignatureUnit = make_signature!(new fixed("uint8"));
- fn is_dynamic() -> bool {
- false
- }
- fn size() -> usize {
- ABI_ALIGNMENT
+impl_abi_type!(bytes4, bytes4, false);
+impl AbiRead for bytes4 {
+ fn abi_read(reader: &mut AbiReader) -> Result<bytes4> {
+ reader.bytes4()
}
}
-impl AbiRead for uint8 {
- fn abi_read(reader: &mut AbiReader) -> Result<uint8> {
- reader.uint8()
+
+impl<T: AbiWrite> AbiWrite for &T {
+ fn abi_write(&self, writer: &mut AbiWriter) {
+ T::abi_write(self, writer);
}
}
-impl AbiType for bytes {
- const SIGNATURE: SignatureUnit = make_signature!(new fixed("bytes"));
+impl<T: AbiType> AbiType for &T {
+ const SIGNATURE: SignatureUnit = T::SIGNATURE;
fn is_dynamic() -> bool {
- true
+ T::is_dynamic()
}
+
fn size() -> usize {
- ABI_ALIGNMENT
- }
-}
-impl AbiRead for bytes {
- fn abi_read(reader: &mut AbiReader) -> Result<bytes> {
- Ok(bytes(reader.bytes()?))
+ T::size()
}
}
-impl<R: AbiRead + sealed::CanBePlacedInVec> AbiRead for Vec<R> {
- fn abi_read(reader: &mut AbiReader) -> Result<Vec<R>> {
+impl<T: AbiType + AbiRead + sealed::CanBePlacedInVec> AbiRead for Vec<T> {
+ fn abi_read(reader: &mut AbiReader) -> Result<Vec<T>> {
let mut sub = reader.subresult(None)?;
let size = sub.uint32()? as usize;
sub.subresult_offset = sub.offset;
+ let is_dynamic = <T as AbiType>::is_dynamic();
let mut out = Vec::with_capacity(size);
for _ in 0..size {
- out.push(<R>::abi_read(&mut sub)?);
+ out.push(<T as AbiRead>::abi_read(&mut sub)?);
+ if !is_dynamic {
+ sub.bytes_read(<T as AbiType>::size());
+ };
}
Ok(out)
}
}
-impl<R: AbiType> AbiType for Vec<R> {
- const SIGNATURE: SignatureUnit = make_signature!(new nameof(R::SIGNATURE) fixed("[]"));
+impl<T: AbiType> AbiType for Vec<T> {
+ const SIGNATURE: SignatureUnit = make_signature!(new nameof(T::SIGNATURE) fixed("[]"));
fn is_dynamic() -> bool {
true
@@ -114,42 +132,6 @@
fn size() -> usize {
ABI_ALIGNMENT
- }
-}
-
-impl sealed::CanBePlacedInVec for EthCrossAccount {}
-
-impl AbiType for EthCrossAccount {
- const SIGNATURE: SignatureUnit = make_signature!(new fixed("(address,uint256)"));
-
- fn is_dynamic() -> bool {
- address::is_dynamic() || uint256::is_dynamic()
- }
-
- fn size() -> usize {
- <address as AbiType>::size() + <uint256 as AbiType>::size()
- }
-}
-
-impl AbiRead for EthCrossAccount {
- fn abi_read(reader: &mut AbiReader) -> Result<EthCrossAccount> {
- let size = if !EthCrossAccount::is_dynamic() {
- Some(<EthCrossAccount as AbiType>::size())
- } else {
- None
- };
- let mut subresult = reader.subresult(size)?;
- let eth = <address>::abi_read(&mut subresult)?;
- let sub = <uint256>::abi_read(&mut subresult)?;
-
- Ok(EthCrossAccount { eth, sub })
- }
-}
-
-impl AbiWrite for EthCrossAccount {
- fn abi_write(&self, writer: &mut AbiWriter) {
- self.eth.abi_write(writer);
- self.sub.abi_write(writer);
}
}
@@ -188,36 +170,6 @@
}
}
-macro_rules! impl_abi_writeable {
- ($ty:ty, $method:ident) => {
- impl AbiWrite for $ty {
- fn abi_write(&self, writer: &mut AbiWriter) {
- writer.$method(&self)
- }
- }
- };
-}
-
-impl_abi_writeable!(u8, uint8);
-impl_abi_writeable!(u32, uint32);
-impl_abi_writeable!(u128, uint128);
-impl_abi_writeable!(U256, uint256);
-impl_abi_writeable!(H160, address);
-impl_abi_writeable!(bool, bool);
-impl_abi_writeable!(&str, string);
-
-impl AbiWrite for string {
- fn abi_write(&self, writer: &mut AbiWriter) {
- writer.string(self)
- }
-}
-
-impl AbiWrite for bytes {
- fn abi_write(&self, writer: &mut AbiWriter) {
- writer.bytes(self.0.as_slice())
- }
-}
-
impl<T: AbiWrite + AbiType> AbiWrite for Vec<T> {
fn abi_write(&self, writer: &mut AbiWriter) {
let is_dynamic = T::is_dynamic();
@@ -295,14 +247,19 @@
impl<$($ident),+> AbiRead for ($($ident,)+)
where
- $($ident: AbiRead,)+
- ($($ident,)+): AbiType,
+ Self: AbiType,
+ $($ident: AbiRead + AbiType,)+
{
fn abi_read(reader: &mut AbiReader) -> Result<($($ident,)+)> {
- let size = if !<($($ident,)+)>::is_dynamic() { Some(<($($ident,)+)>::size()) } else { None };
+ let is_dynamic = <Self>::is_dynamic();
+ let size = if !is_dynamic { Some(<Self>::size()) } else { None };
let mut subresult = reader.subresult(size)?;
Ok((
- $(<$ident>::abi_read(&mut subresult)?,)+
+ $({
+ let value = <$ident>::abi_read(&mut subresult)?;
+ if !is_dynamic {subresult.bytes_read(<$ident as AbiType>::size())};
+ value
+ },)+
))
}
}
@@ -310,11 +267,11 @@
#[allow(non_snake_case)]
impl<$($ident),+> AbiWrite for ($($ident,)+)
where
- $($ident: AbiWrite,)+
+ $($ident: AbiWrite + AbiType,)+
{
fn abi_write(&self, writer: &mut AbiWriter) {
let ($($ident,)+) = self;
- if writer.is_dynamic {
+ if <Self as AbiType>::is_dynamic() {
let mut sub = AbiWriter::new();
$($ident.abi_write(&mut sub);)+
writer.write_subresult(sub);
crates/evm-coder/src/abi/mod.rsdiffbeforeafterboth--- a/crates/evm-coder/src/abi/mod.rs
+++ b/crates/evm-coder/src/abi/mod.rs
@@ -75,19 +75,19 @@
buf: &[u8],
offset: usize,
pad_start: usize,
- pad_size: usize,
+ pad_end: usize,
block_start: usize,
- block_size: usize,
+ block_end: usize,
) -> Result<[u8; S]> {
if buf.len() - offset < ABI_ALIGNMENT {
return Err(Error::Error(ExitError::OutOfOffset));
}
let mut block = [0; S];
- let is_pad_zeroed = buf[pad_start..pad_size].iter().all(|&v| v == 0);
+ let is_pad_zeroed = buf[pad_start..pad_end].iter().all(|&v| v == 0);
if !is_pad_zeroed {
return Err(Error::Error(ExitError::InvalidRange));
}
- block.copy_from_slice(&buf[block_start..block_size]);
+ block.copy_from_slice(&buf[block_start..block_end]);
Ok(block)
}
@@ -186,11 +186,10 @@
/// Slice recursive buffer, advance one word for buffer offset
/// If `size` is [`None`] then [`Self::offset`] and [`Self::subresult_offset`] evals from [`Self::buf`].
- fn subresult(&mut self, size: Option<usize>) -> Result<AbiReader<'i>> {
+ pub fn subresult(&mut self, size: Option<usize>) -> Result<AbiReader<'i>> {
let subresult_offset = self.subresult_offset;
let offset = if let Some(size) = size {
self.offset += size;
- self.subresult_offset += size;
0
} else {
self.uint32()? as usize
@@ -208,6 +207,11 @@
})
}
+ /// Notify about readed data portion.
+ pub fn bytes_read(&mut self, size: usize) {
+ self.subresult_offset += size;
+ }
+
/// Is this parser reached end of buffer?
pub fn is_finished(&self) -> bool {
self.buf.len() == self.offset
@@ -277,6 +281,11 @@
self.write_padleft(&u32::to_be_bytes(*value))
}
+ /// Write [`u64`] to end of buffer
+ pub fn uint64(&mut self, value: &u64) {
+ self.write_padleft(&u64::to_be_bytes(*value))
+ }
+
/// Write [`u128`] to end of buffer
pub fn uint128(&mut self, value: &u128) {
self.write_padleft(&u128::to_be_bytes(*value))
crates/evm-coder/src/abi/test.rsdiffbeforeafterboth--- a/crates/evm-coder/src/abi/test.rs
+++ b/crates/evm-coder/src/abi/test.rs
@@ -6,36 +6,25 @@
use super::{AbiReader, AbiWriter};
use hex_literal::hex;
use primitive_types::{H160, U256};
-use concat_idents::concat_idents;
-macro_rules! test_impl {
- ($name:ident, $type:ty, $function_identifier:expr, $decoded_data:expr, $encoded_data:expr) => {
- concat_idents!(test_name = encode_decode_, $name {
- #[test]
- fn test_name() {
- let function_identifier: u32 = $function_identifier;
- let decoded_data = $decoded_data;
- let encoded_data = $encoded_data;
-
- let (call, mut decoder) = AbiReader::new_call(encoded_data).unwrap();
- assert_eq!(call, u32::to_be_bytes(function_identifier));
- let data = <$type>::abi_read(&mut decoder).unwrap();
- assert_eq!(data, decoded_data);
+fn test_impl<T>(function_identifier: u32, decoded_data: T, encoded_data: &[u8])
+where
+ T: AbiWrite + AbiRead + std::cmp::PartialEq + std::fmt::Debug,
+{
+ let (call, mut decoder) = AbiReader::new_call(encoded_data).unwrap();
+ assert_eq!(call, u32::to_be_bytes(function_identifier));
+ let data = <T>::abi_read(&mut decoder).unwrap();
+ assert_eq!(data, decoded_data);
- let mut writer = AbiWriter::new_call(function_identifier);
- decoded_data.abi_write(&mut writer);
- let ed = writer.finish();
- similar_asserts::assert_eq!(encoded_data, ed.as_slice());
- }
- });
- };
+ let mut writer = AbiWriter::new_call(function_identifier);
+ decoded_data.abi_write(&mut writer);
+ let ed = writer.finish();
+ similar_asserts::assert_eq!(encoded_data, ed.as_slice());
}
macro_rules! test_impl_uint {
($type:ident) => {
- test_impl!(
- $type,
- $type,
+ test_impl::<$type>(
0xdeadbeef,
255 as $type,
&hex!(
@@ -43,101 +32,148 @@
deadbeef
00000000000000000000000000000000000000000000000000000000000000ff
"
- )
+ ),
);
};
}
-test_impl_uint!(uint8);
-test_impl_uint!(uint32);
-test_impl_uint!(uint128);
+#[test]
+fn encode_decode_uint8() {
+ test_impl_uint!(uint8);
+}
-test_impl!(
- uint256,
- uint256,
- 0xdeadbeef,
- U256([255, 0, 0, 0]),
- &hex!(
- "
- deadbeef
- 00000000000000000000000000000000000000000000000000000000000000ff
- "
- )
-);
+#[test]
+fn encode_decode_uint32() {
+ test_impl_uint!(uint32);
+}
-test_impl!(
- vec_tuple_address_uint256,
- Vec<(address, uint256)>,
- 0x1ACF2D55,
- vec![
- (
- H160(hex!("2D2FF76104B7BACB2E8F6731D5BFC184EBECDDBC")),
- U256([10, 0, 0, 0]),
- ),
- (
- H160(hex!("AB8E3D9134955566483B11E6825C9223B6737B10")),
- U256([20, 0, 0, 0]),
- ),
- (
- H160(hex!("8C582BDF2953046705FC56F189385255EFC1BE18")),
- U256([30, 0, 0, 0]),
- ),
- ],
- &hex!(
- "
- 1ACF2D55
- 0000000000000000000000000000000000000000000000000000000000000020 // offset of (address, uint256)[]
- 0000000000000000000000000000000000000000000000000000000000000003 // length of (address, uint256)[]
+#[test]
+fn encode_decode_uint128() {
+ test_impl_uint!(uint128);
+}
- 0000000000000000000000002D2FF76104B7BACB2E8F6731D5BFC184EBECDDBC // address
- 000000000000000000000000000000000000000000000000000000000000000A // uint256
+#[test]
+fn encode_decode_uint256() {
+ test_impl::<uint256>(
+ 0xdeadbeef,
+ U256([255, 0, 0, 0]),
+ &hex!(
+ "
+ deadbeef
+ 00000000000000000000000000000000000000000000000000000000000000ff
+ "
+ ),
+ );
+}
- 000000000000000000000000AB8E3D9134955566483B11E6825C9223B6737B10 // address
- 0000000000000000000000000000000000000000000000000000000000000014 // uint256
+#[test]
+fn encode_decode_string() {
+ test_impl::<String>(
+ 0xdeadbeef,
+ "some string".to_string(),
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 000000000000000000000000000000000000000000000000000000000000000b
+ 736f6d6520737472696e67000000000000000000000000000000000000000000
+ "
+ ),
+ );
+}
- 0000000000000000000000008C582BDF2953046705FC56F189385255EFC1BE18 // address
- 000000000000000000000000000000000000000000000000000000000000001E // uint256
- "
- )
-);
+#[test]
+fn encode_decode_tuple_string() {
+ test_impl::<(String,)>(
+ 0xdeadbeef,
+ ("some string".to_string(),),
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 000000000000000000000000000000000000000000000000000000000000000b
+ 736f6d6520737472696e67000000000000000000000000000000000000000000
+ "
+ ),
+ );
+}
-test_impl!(
- vec_tuple_uint256_string,
- Vec<(uint256, string)>,
- 0xdeadbeef,
- vec![
- (1.into(), "Test URI 0".to_string()),
- (11.into(), "Test URI 1".to_string()),
- (12.into(), "Test URI 2".to_string()),
- ],
- &hex!(
- "
- deadbeef
- 0000000000000000000000000000000000000000000000000000000000000020 // offset of (uint256, string)[]
- 0000000000000000000000000000000000000000000000000000000000000003 // length of (uint256, string)[]
+#[test]
+fn encode_decode_vec_tuple_address_uint256() {
+ test_impl::<Vec<(address, uint256)>>(
+ 0x1ACF2D55,
+ vec![
+ (
+ H160(hex!("2D2FF76104B7BACB2E8F6731D5BFC184EBECDDBC")),
+ U256([10, 0, 0, 0]),
+ ),
+ (
+ H160(hex!("AB8E3D9134955566483B11E6825C9223B6737B10")),
+ U256([20, 0, 0, 0]),
+ ),
+ (
+ H160(hex!("8C582BDF2953046705FC56F189385255EFC1BE18")),
+ U256([30, 0, 0, 0]),
+ ),
+ ],
+ &hex!(
+ "
+ 1ACF2D55
+ 0000000000000000000000000000000000000000000000000000000000000020 // offset of (address, uint256)[]
+ 0000000000000000000000000000000000000000000000000000000000000003 // length of (address, uint256)[]
- 0000000000000000000000000000000000000000000000000000000000000060 // offset of first elem
- 00000000000000000000000000000000000000000000000000000000000000e0 // offset of second elem
- 0000000000000000000000000000000000000000000000000000000000000160 // offset of third elem
+ 0000000000000000000000002D2FF76104B7BACB2E8F6731D5BFC184EBECDDBC // address
+ 000000000000000000000000000000000000000000000000000000000000000A // uint256
- 0000000000000000000000000000000000000000000000000000000000000001 // first token id? #60
- 0000000000000000000000000000000000000000000000000000000000000040 // offset of string
- 000000000000000000000000000000000000000000000000000000000000000a // size of string
- 5465737420555249203000000000000000000000000000000000000000000000 // string
+ 000000000000000000000000AB8E3D9134955566483B11E6825C9223B6737B10 // address
+ 0000000000000000000000000000000000000000000000000000000000000014 // uint256
- 000000000000000000000000000000000000000000000000000000000000000b // second token id? Why ==11? #e0
- 0000000000000000000000000000000000000000000000000000000000000040 // offset of string
- 000000000000000000000000000000000000000000000000000000000000000a // size of string
- 5465737420555249203100000000000000000000000000000000000000000000 // string
+ 0000000000000000000000008C582BDF2953046705FC56F189385255EFC1BE18 // address
+ 000000000000000000000000000000000000000000000000000000000000001E // uint256
+ "
+ )
+ );
+}
- 000000000000000000000000000000000000000000000000000000000000000c // third token id? Why ==12? #160
- 0000000000000000000000000000000000000000000000000000000000000040 // offset of string
- 000000000000000000000000000000000000000000000000000000000000000a // size of string
- 5465737420555249203200000000000000000000000000000000000000000000 // string
- "
- )
-);
+#[test]
+fn encode_decode_vec_tuple_uint256_string() {
+ test_impl::<Vec<(uint256, string)>>(
+ 0xdeadbeef,
+ vec![
+ (1.into(), "Test URI 0".to_string()),
+ (11.into(), "Test URI 1".to_string()),
+ (12.into(), "Test URI 2".to_string()),
+ ],
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020 // offset of (uint256, string)[]
+ 0000000000000000000000000000000000000000000000000000000000000003 // length of (uint256, string)[]
+ 0000000000000000000000000000000000000000000000000000000000000060 // offset of first elem
+ 00000000000000000000000000000000000000000000000000000000000000e0 // offset of second elem
+ 0000000000000000000000000000000000000000000000000000000000000160 // offset of third elem
+
+ 0000000000000000000000000000000000000000000000000000000000000001 // first token id? #60
+ 0000000000000000000000000000000000000000000000000000000000000040 // offset of string
+ 000000000000000000000000000000000000000000000000000000000000000a // size of string
+ 5465737420555249203000000000000000000000000000000000000000000000 // string
+
+ 000000000000000000000000000000000000000000000000000000000000000b // second token id? Why ==11? #e0
+ 0000000000000000000000000000000000000000000000000000000000000040 // offset of string
+ 000000000000000000000000000000000000000000000000000000000000000a // size of string
+ 5465737420555249203100000000000000000000000000000000000000000000 // string
+
+ 000000000000000000000000000000000000000000000000000000000000000c // third token id? Why ==12? #160
+ 0000000000000000000000000000000000000000000000000000000000000040 // offset of string
+ 000000000000000000000000000000000000000000000000000000000000000a // size of string
+ 5465737420555249203200000000000000000000000000000000000000000000 // string
+ "
+ )
+ );
+}
+
#[test]
fn dynamic_after_static() {
let mut encoder = AbiWriter::new();
@@ -235,63 +271,270 @@
similar_asserts::assert_eq!(encoded_data, ed.as_slice());
}
-test_impl!(
- vec_tuple_string_bytes,
- Vec<(string, bytes)>,
- 0xdeadbeef,
- vec![
- (
- "Test URI 0".to_string(),
- bytes(vec![
- 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
- 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
- 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
- 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
- ])
+#[test]
+fn encode_decode_vec_tuple_string_bytes() {
+ test_impl::<Vec<(string, bytes)>>(
+ 0xdeadbeef,
+ vec![
+ (
+ "Test URI 0".to_string(),
+ bytes(vec![
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ ]),
+ ),
+ (
+ "Test URI 1".to_string(),
+ bytes(vec![
+ 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+ 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+ 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+ 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+ ]),
+ ),
+ ("Test URI 2".to_string(), bytes(vec![0x33, 0x33])),
+ ],
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 0000000000000000000000000000000000000000000000000000000000000003
+
+ 0000000000000000000000000000000000000000000000000000000000000060
+ 0000000000000000000000000000000000000000000000000000000000000140
+ 0000000000000000000000000000000000000000000000000000000000000220
+
+ 0000000000000000000000000000000000000000000000000000000000000040
+ 0000000000000000000000000000000000000000000000000000000000000080
+ 000000000000000000000000000000000000000000000000000000000000000a
+ 5465737420555249203000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000030
+ 1111111111111111111111111111111111111111111111111111111111111111
+ 1111111111111111111111111111111100000000000000000000000000000000
+
+ 0000000000000000000000000000000000000000000000000000000000000040
+ 0000000000000000000000000000000000000000000000000000000000000080
+ 000000000000000000000000000000000000000000000000000000000000000a
+ 5465737420555249203100000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000002f
+ 2222222222222222222222222222222222222222222222222222222222222222
+ 2222222222222222222222222222220000000000000000000000000000000000
+
+ 0000000000000000000000000000000000000000000000000000000000000040
+ 0000000000000000000000000000000000000000000000000000000000000080
+ 000000000000000000000000000000000000000000000000000000000000000a
+ 5465737420555249203200000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000002
+ 3333000000000000000000000000000000000000000000000000000000000000
+ "
+ ),
+ );
+}
+
+#[test]
+// #[ignore = "reason"]
+fn encode_decode_tuple0_tuple1_uint8_tuple1_string_bytes_tuple1_uint8_bytes() {
+ let int = 0xff;
+ let by = bytes(vec![0x11, 0x22, 0x33]);
+ let string = "some string".to_string();
+
+ test_impl::<((u8,), (String, bytes), (u8, bytes))>(
+ 0xdeadbeef,
+ ((int,), (string.clone(), by.clone()), (int, by)),
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 00000000000000000000000000000000000000000000000000000000000000ff
+ 0000000000000000000000000000000000000000000000000000000000000060
+ 0000000000000000000000000000000000000000000000000000000000000120
+ 0000000000000000000000000000000000000000000000000000000000000040
+ 0000000000000000000000000000000000000000000000000000000000000080
+ 000000000000000000000000000000000000000000000000000000000000000b
+ 736f6d6520737472696e67000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000003
+ 1122330000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000000ff
+ 0000000000000000000000000000000000000000000000000000000000000040
+ 0000000000000000000000000000000000000000000000000000000000000003
+ 1122330000000000000000000000000000000000000000000000000000000000
+ "
+ ),
+ );
+}
+
+#[test]
+fn encode_decode_tuple0_tuple1_uint8_tuple1_uint8_uint8_tuple1_uint8_uint8() {
+ test_impl::<((u8,), (u8, u8), (u8, u8))>(
+ 0xdeadbeef,
+ ((43,), (44, 45), (46, 47)),
+ &hex!(
+ "
+ deadbeef
+ 000000000000000000000000000000000000000000000000000000000000002b
+ 000000000000000000000000000000000000000000000000000000000000002c
+ 000000000000000000000000000000000000000000000000000000000000002d
+ 000000000000000000000000000000000000000000000000000000000000002e
+ 000000000000000000000000000000000000000000000000000000000000002f
+ "
+ ),
+ );
+}
+
+#[test]
+fn encode_decode_tuple0_tuple1_uint8_tuple1_uint8() {
+ test_impl::<((u8,), (u8,))>(
+ 0xdeadbeef,
+ ((43,), (44,)),
+ &hex!(
+ "
+ deadbeef
+ 000000000000000000000000000000000000000000000000000000000000002b
+ 000000000000000000000000000000000000000000000000000000000000002c
+ "
+ ),
+ );
+}
+
+#[test]
+fn encode_decode_tuple0_tuple1_uint8_uint8() {
+ test_impl::<((u8, u8),)>(
+ 0xdeadbeef,
+ ((43, 44),),
+ &hex!(
+ "
+ deadbeef
+ 000000000000000000000000000000000000000000000000000000000000002b
+ 000000000000000000000000000000000000000000000000000000000000002c
+ "
+ ),
+ );
+}
+
+#[test]
+fn encode_decode_tuple_uint8_uint8() {
+ test_impl::<(u8, u8)>(
+ 0xdeadbeef,
+ (43, 44),
+ &hex!(
+ "
+ deadbeef
+ 000000000000000000000000000000000000000000000000000000000000002b
+ 000000000000000000000000000000000000000000000000000000000000002c
+ "
+ ),
+ );
+}
+
+#[test]
+fn encode_decode_tuple0_tuple1_uint8_uint8_tuple1_uint8_uint8_and_uint8() {
+ test_impl::<((u8, u8), (u8, u8), u8)>(
+ 0xdeadbeef,
+ ((10, 11), (12, 13), 14),
+ &hex!(
+ "
+ deadbeef
+ 000000000000000000000000000000000000000000000000000000000000000a
+ 000000000000000000000000000000000000000000000000000000000000000b
+ 000000000000000000000000000000000000000000000000000000000000000c
+ 000000000000000000000000000000000000000000000000000000000000000d
+ 000000000000000000000000000000000000000000000000000000000000000e
+ "
),
- (
- "Test URI 1".to_string(),
- bytes(vec![
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22
- ])
+ );
+}
+
+#[test]
+fn encode_decode_tuple0_tuple1_string() {
+ test_impl::<((String,),)>(
+ 0xdeadbeef,
+ (("some string".to_string(),),),
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 000000000000000000000000000000000000000000000000000000000000000b
+ 736f6d6520737472696e67000000000000000000000000000000000000000000
+ "
),
- ("Test URI 2".to_string(), bytes(vec![0x33, 0x33])),
- ],
- &hex!(
- "
- deadbeef
- 0000000000000000000000000000000000000000000000000000000000000020
- 0000000000000000000000000000000000000000000000000000000000000003
-
- 0000000000000000000000000000000000000000000000000000000000000060
- 0000000000000000000000000000000000000000000000000000000000000140
- 0000000000000000000000000000000000000000000000000000000000000220
+ );
+}
- 0000000000000000000000000000000000000000000000000000000000000040
- 0000000000000000000000000000000000000000000000000000000000000080
- 000000000000000000000000000000000000000000000000000000000000000a
- 5465737420555249203000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000030
- 1111111111111111111111111111111111111111111111111111111111111111
- 1111111111111111111111111111111100000000000000000000000000000000
+#[test]
+fn encode_decode_tuple0_tuple1_uint8_string() {
+ test_impl::<((u8, String),)>(
+ 0xdeadbeef,
+ ((0xff, "some string".to_string()),),
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 00000000000000000000000000000000000000000000000000000000000000ff
+ 0000000000000000000000000000000000000000000000000000000000000040
+ 000000000000000000000000000000000000000000000000000000000000000b
+ 736f6d6520737472696e67000000000000000000000000000000000000000000
+ "
+ ),
+ );
+}
- 0000000000000000000000000000000000000000000000000000000000000040
- 0000000000000000000000000000000000000000000000000000000000000080
- 000000000000000000000000000000000000000000000000000000000000000a
- 5465737420555249203100000000000000000000000000000000000000000000
- 000000000000000000000000000000000000000000000000000000000000002f
- 2222222222222222222222222222222222222222222222222222222222222222
- 2222222222222222222222222222220000000000000000000000000000000000
+#[test]
+fn encode_decode_tuple0_tuple1_string_bytes() {
+ test_impl::<((String, bytes),)>(
+ 0xdeadbeef,
+ (("some string".to_string(), bytes(vec![1, 2, 3])),),
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 0000000000000000000000000000000000000000000000000000000000000040
+ 0000000000000000000000000000000000000000000000000000000000000080
+ 000000000000000000000000000000000000000000000000000000000000000b
+ 736f6d6520737472696e67000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000003
+ 0102030000000000000000000000000000000000000000000000000000000000
+ "
+ ),
+ );
+}
- 0000000000000000000000000000000000000000000000000000000000000040
- 0000000000000000000000000000000000000000000000000000000000000080
+#[test]
+fn encode_decode_tuple0_tuple1_uint8_tuple1_string() {
+ test_impl::<((u8,), (String,))>(
+ 0xdeadbeef,
+ ((0xff,), ("some string".to_string(),)),
+ &hex!(
+ "
+ deadbeef
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 00000000000000000000000000000000000000000000000000000000000000ff
+ 0000000000000000000000000000000000000000000000000000000000000040
+ 0000000000000000000000000000000000000000000000000000000000000020
+ 000000000000000000000000000000000000000000000000000000000000000b
+ 736f6d6520737472696e67000000000000000000000000000000000000000000
+ "
+ ),
+ );
+}
+
+#[test]
+fn parse_multiple_params() {
+ let encoded_data = hex!(
+ "
+ deadbeef
000000000000000000000000000000000000000000000000000000000000000a
- 5465737420555249203200000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000002
- 3333000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000000b
"
- )
-);
+ );
+ let (_, mut decoder) = AbiReader::new_call(&encoded_data).unwrap();
+ let p1 = <u8>::abi_read(&mut decoder).unwrap();
+ let p2 = <u8>::abi_read(&mut decoder).unwrap();
+ assert_eq!(p1, 0x0a);
+ assert_eq!(p2, 0x0b);
+}
crates/evm-coder/src/abi/traits.rsdiffbeforeafterboth--- a/crates/evm-coder/src/abi/traits.rs
+++ b/crates/evm-coder/src/abi/traits.rs
@@ -22,12 +22,6 @@
fn size() -> usize;
}
-/// Sealed traits.
-pub mod sealed {
- /// Not all types can be placed in vec, i.e `Vec<u8>` is restricted, `bytes` should be used instead
- pub trait CanBePlacedInVec {}
-}
-
/// [`AbiReader`] implements reading of many types.
pub trait AbiRead {
/// Read item from current position, advanding decoder
@@ -47,11 +41,5 @@
let mut writer = AbiWriter::new();
self.abi_write(&mut writer);
Ok(writer.into())
- }
-}
-
-impl<T: AbiWrite> AbiWrite for &T {
- fn abi_write(&self, writer: &mut AbiWriter) {
- T::abi_write(self, writer);
}
}
crates/evm-coder/src/lib.rsdiffbeforeafterboth--- a/crates/evm-coder/src/lib.rs
+++ b/crates/evm-coder/src/lib.rs
@@ -93,6 +93,7 @@
pub use evm_coder_procedural::solidity;
/// See [`solidity_interface`]
pub use evm_coder_procedural::weight;
+pub use evm_coder_procedural::AbiCoder;
pub use sha3_const;
/// Derives [`ToLog`] for enum
@@ -111,6 +112,15 @@
#[cfg(feature = "stubgen")]
pub mod solidity;
+/// Sealed traits.
+pub mod sealed {
+ /// Not every type should be directly placed in vec.
+ /// Vec encoding is not memory efficient, as every item will be padded
+ /// to 32 bytes.
+ /// Instead you should use specialized types (`bytes` in case of `Vec<u8>`)
+ pub trait CanBePlacedInVec {}
+}
+
/// Solidity type definitions (aliases from solidity name to rust type)
/// To be used in [`solidity_interface`] definitions, to make sure there is no
/// type conflict between Rust code and generated definitions
@@ -119,7 +129,6 @@
#[cfg(not(feature = "std"))]
use alloc::{vec::Vec};
- use pallet_evm::account::CrossAccountId;
use primitive_types::{U256, H160, H256};
pub type address = H160;
@@ -137,7 +146,7 @@
#[cfg(feature = "std")]
pub type string = ::std::string::String;
- #[derive(Default, Debug, PartialEq)]
+ #[derive(Default, Debug, PartialEq, Eq, Clone)]
pub struct bytes(pub Vec<u8>);
/// Solidity doesn't have `void` type, however we have special implementation
@@ -185,73 +194,7 @@
#[must_use]
pub fn is_empty(&self) -> bool {
self.len() == 0
- }
- }
-
- #[derive(Debug, Default)]
- pub struct EthCrossAccount {
- pub(crate) eth: address,
- pub(crate) sub: uint256,
- }
-
- impl EthCrossAccount {
- pub fn from_sub_cross_account<T>(cross_account_id: &T::CrossAccountId) -> Self
- where
- T: pallet_evm::account::Config,
- T::AccountId: AsRef<[u8; 32]>,
- {
- if cross_account_id.is_canonical_substrate() {
- Self {
- eth: Default::default(),
- sub: convert_cross_account_to_uint256::<T>(cross_account_id),
- }
- } else {
- Self {
- eth: *cross_account_id.as_eth(),
- sub: Default::default(),
- }
- }
}
-
- pub fn into_sub_cross_account<T>(&self) -> crate::execution::Result<T::CrossAccountId>
- where
- T: pallet_evm::account::Config,
- T::AccountId: From<[u8; 32]>,
- {
- if self.eth == Default::default() && self.sub == Default::default() {
- Err("All fields of cross account is zeroed".into())
- } else if self.eth == Default::default() {
- Ok(convert_uint256_to_cross_account::<T>(self.sub))
- } else if self.sub == Default::default() {
- Ok(T::CrossAccountId::from_eth(self.eth))
- } else {
- Err("All fields of cross account is non zeroed".into())
- }
- }
- }
-
- /// Convert `CrossAccountId` to `uint256`.
- pub fn convert_cross_account_to_uint256<T: pallet_evm::account::Config>(
- from: &T::CrossAccountId,
- ) -> uint256
- where
- T::AccountId: AsRef<[u8; 32]>,
- {
- let slice = from.as_sub().as_ref();
- uint256::from_big_endian(slice)
- }
-
- /// Convert `uint256` to `CrossAccountId`.
- pub fn convert_uint256_to_cross_account<T: pallet_evm::account::Config>(
- from: uint256,
- ) -> T::CrossAccountId
- where
- T::AccountId: From<[u8; 32]>,
- {
- let mut new_admin_arr = [0_u8; 32];
- from.to_big_endian(&mut new_admin_arr);
- let account_id = T::AccountId::from(new_admin_arr);
- T::CrossAccountId::from_sub(account_id)
}
#[derive(Debug, Default)]
crates/evm-coder/src/solidity.rsdiffbeforeafterboth--- a/crates/evm-coder/src/solidity.rs
+++ /dev/null
@@ -1,702 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-//! Implementation detail of [`crate::solidity_interface`] macro code-generation.
-//! You should not rely on any public item from this module, as it is only intended to be used
-//! by procedural macro, API and output format may be changed at any time.
-//!
-//! Purpose of this module is to receive solidity contract definition in module-specified
-//! format, and then output string, representing interface of this contract in solidity language
-
-#[cfg(not(feature = "std"))]
-use alloc::{string::String, vec::Vec, collections::BTreeMap, format};
-#[cfg(feature = "std")]
-use std::collections::BTreeMap;
-use core::{
- fmt::{self, Write},
- marker::PhantomData,
- cell::{Cell, RefCell},
- cmp::Reverse,
-};
-use impl_trait_for_tuples::impl_for_tuples;
-use crate::{types::*, custom_signature::SignatureUnit};
-
-#[derive(Default)]
-pub struct TypeCollector {
- /// Code => id
- /// id ordering is required to perform topo-sort on the resulting data
- structs: RefCell<BTreeMap<string, usize>>,
- anonymous: RefCell<BTreeMap<Vec<string>, usize>>,
- id: Cell<usize>,
-}
-impl TypeCollector {
- pub fn new() -> Self {
- Self::default()
- }
- pub fn collect(&self, item: string) {
- let id = self.next_id();
- self.structs.borrow_mut().insert(item, id);
- }
- pub fn next_id(&self) -> usize {
- let v = self.id.get();
- self.id.set(v + 1);
- v
- }
- pub fn collect_tuple<T: SolidityTupleType>(&self) -> String {
- let names = T::names(self);
- if let Some(id) = self.anonymous.borrow().get(&names).cloned() {
- return format!("Tuple{}", id);
- }
- let id = self.next_id();
- let mut str = String::new();
- writeln!(str, "/// @dev anonymous struct").unwrap();
- writeln!(str, "struct Tuple{} {{", id).unwrap();
- for (i, name) in names.iter().enumerate() {
- writeln!(str, "\t{} field_{};", name, i).unwrap();
- }
- writeln!(str, "}}").unwrap();
- self.collect(str);
- self.anonymous.borrow_mut().insert(names, id);
- format!("Tuple{}", id)
- }
- pub fn collect_struct<T: StructCollect>(&self) -> String {
- self.collect(<T as StructCollect>::declaration());
- <T as StructCollect>::name()
- }
- pub fn finish(self) -> Vec<string> {
- let mut data = self.structs.into_inner().into_iter().collect::<Vec<_>>();
- data.sort_by_key(|(_, id)| Reverse(*id));
- data.into_iter().map(|(code, _)| code).collect()
- }
-}
-
-pub trait StructCollect: 'static {
- /// Structure name.
- fn name() -> String;
- /// Structure declaration.
- fn declaration() -> String;
-}
-
-pub trait SolidityTypeName: 'static {
- fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;
- /// "simple" types are stored inline, no `memory` modifier should be used in solidity
- fn is_simple() -> bool;
- fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;
- /// Specialization
- fn is_void() -> bool {
- false
- }
-}
-macro_rules! solidity_type_name {
- ($($ty:ty => $name:literal $simple:literal = $default:literal),* $(,)?) => {
- $(
- impl SolidityTypeName for $ty {
- fn solidity_name(writer: &mut impl core::fmt::Write, _tc: &TypeCollector) -> core::fmt::Result {
- write!(writer, $name)
- }
- fn is_simple() -> bool {
- $simple
- }
- fn solidity_default(writer: &mut impl core::fmt::Write, _tc: &TypeCollector) -> core::fmt::Result {
- write!(writer, $default)
- }
- }
- )*
- };
-}
-
-solidity_type_name! {
- uint8 => "uint8" true = "0",
- uint32 => "uint32" true = "0",
- uint64 => "uint64" true = "0",
- uint128 => "uint128" true = "0",
- uint256 => "uint256" true = "0",
- bytes4 => "bytes4" true = "bytes4(0)",
- address => "address" true = "0x0000000000000000000000000000000000000000",
- string => "string" false = "\"\"",
- bytes => "bytes" false = "hex\"\"",
- bool => "bool" true = "false",
-}
-impl SolidityTypeName for void {
- fn solidity_name(_writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {
- Ok(())
- }
- fn is_simple() -> bool {
- true
- }
- fn solidity_default(_writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {
- Ok(())
- }
- fn is_void() -> bool {
- true
- }
-}
-
-mod sealed {
- /// Not every type should be directly placed in vec.
- /// Vec encoding is not memory efficient, as every item will be padded
- /// to 32 bytes.
- /// Instead you should use specialized types (`bytes` in case of `Vec<u8>`)
- pub trait CanBePlacedInVec {}
-}
-
-impl sealed::CanBePlacedInVec for uint256 {}
-impl sealed::CanBePlacedInVec for string {}
-impl sealed::CanBePlacedInVec for address {}
-impl sealed::CanBePlacedInVec for EthCrossAccount {}
-impl sealed::CanBePlacedInVec for Property {}
-
-impl<T: SolidityTypeName + sealed::CanBePlacedInVec> SolidityTypeName for Vec<T> {
- fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- T::solidity_name(writer, tc)?;
- write!(writer, "[]")
- }
- fn is_simple() -> bool {
- false
- }
- fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- write!(writer, "new ")?;
- T::solidity_name(writer, tc)?;
- write!(writer, "[](0)")
- }
-}
-
-impl SolidityTupleType for EthCrossAccount {
- fn names(tc: &TypeCollector) -> Vec<string> {
- let mut collected = Vec::with_capacity(Self::len());
- {
- let mut out = string::new();
- address::solidity_name(&mut out, tc).expect("no fmt error");
- collected.push(out);
- }
- {
- let mut out = string::new();
- uint256::solidity_name(&mut out, tc).expect("no fmt error");
- collected.push(out);
- }
- collected
- }
-
- fn len() -> usize {
- 2
- }
-}
-
-impl SolidityTypeName for EthCrossAccount {
- fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- write!(writer, "{}", tc.collect_struct::<Self>())
- }
-
- fn is_simple() -> bool {
- false
- }
-
- fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- write!(writer, "{}(", tc.collect_struct::<Self>())?;
- address::solidity_default(writer, tc)?;
- write!(writer, ",")?;
- uint256::solidity_default(writer, tc)?;
- write!(writer, ")")
- }
-}
-
-impl StructCollect for EthCrossAccount {
- fn name() -> String {
- "EthCrossAccount".into()
- }
-
- fn declaration() -> String {
- let mut str = String::new();
- writeln!(str, "/// @dev Cross account struct").unwrap();
- writeln!(str, "struct {} {{", Self::name()).unwrap();
- writeln!(str, "\taddress eth;").unwrap();
- writeln!(str, "\tuint256 sub;").unwrap();
- writeln!(str, "}}").unwrap();
- str
- }
-}
-
-impl StructCollect for Property {
- fn name() -> String {
- "Property".into()
- }
-
- fn declaration() -> String {
- let mut str = String::new();
- writeln!(str, "/// @dev Property struct").unwrap();
- writeln!(str, "struct {} {{", Self::name()).unwrap();
- writeln!(str, "\tstring key;").unwrap();
- writeln!(str, "\tbytes value;").unwrap();
- writeln!(str, "}}").unwrap();
- str
- }
-}
-
-impl SolidityTypeName for Property {
- fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- write!(writer, "{}", tc.collect_struct::<Self>())
- }
-
- fn is_simple() -> bool {
- false
- }
-
- fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- write!(writer, "{}(", tc.collect_struct::<Self>())?;
- address::solidity_default(writer, tc)?;
- write!(writer, ",")?;
- uint256::solidity_default(writer, tc)?;
- write!(writer, ")")
- }
-}
-
-impl SolidityTupleType for Property {
- fn names(tc: &TypeCollector) -> Vec<string> {
- let mut collected = Vec::with_capacity(Self::len());
- {
- let mut out = string::new();
- string::solidity_name(&mut out, tc).expect("no fmt error");
- collected.push(out);
- }
- {
- let mut out = string::new();
- bytes::solidity_name(&mut out, tc).expect("no fmt error");
- collected.push(out);
- }
- collected
- }
-
- fn len() -> usize {
- 2
- }
-}
-
-pub trait SolidityTupleType {
- fn names(tc: &TypeCollector) -> Vec<String>;
- fn len() -> usize;
-}
-
-macro_rules! count {
- () => (0usize);
- ( $x:tt $($xs:tt)* ) => (1usize + count!($($xs)*));
-}
-
-macro_rules! impl_tuples {
- ($($ident:ident)+) => {
- impl<$($ident),+> sealed::CanBePlacedInVec for ($($ident,)+) {}
- impl<$($ident: SolidityTypeName + 'static),+> SolidityTupleType for ($($ident,)+) {
- fn names(tc: &TypeCollector) -> Vec<string> {
- let mut collected = Vec::with_capacity(Self::len());
- $({
- let mut out = string::new();
- $ident::solidity_name(&mut out, tc).expect("no fmt error");
- collected.push(out);
- })*;
- collected
- }
-
- fn len() -> usize {
- count!($($ident)*)
- }
- }
- impl<$($ident: SolidityTypeName + 'static),+> SolidityTypeName for ($($ident,)+) {
- fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- write!(writer, "{}", tc.collect_tuple::<Self>())
- }
- fn is_simple() -> bool {
- false
- }
- #[allow(unused_assignments)]
- fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- write!(writer, "{}(", tc.collect_tuple::<Self>())?;
- let mut first = true;
- $(
- if !first {
- write!(writer, ",")?;
- } else {
- first = false;
- }
- <$ident>::solidity_default(writer, tc)?;
- )*
- write!(writer, ")")
- }
- }
- };
-}
-
-impl_tuples! {A}
-impl_tuples! {A B}
-impl_tuples! {A B C}
-impl_tuples! {A B C D}
-impl_tuples! {A B C D E}
-impl_tuples! {A B C D E F}
-impl_tuples! {A B C D E F G}
-impl_tuples! {A B C D E F G H}
-impl_tuples! {A B C D E F G H I}
-impl_tuples! {A B C D E F G H I J}
-
-pub trait SolidityArguments {
- fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;
- fn solidity_get(&self, prefix: &str, writer: &mut impl fmt::Write) -> fmt::Result;
- fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;
- fn is_empty(&self) -> bool {
- self.len() == 0
- }
- fn len(&self) -> usize;
-}
-
-#[derive(Default)]
-pub struct UnnamedArgument<T>(PhantomData<*const T>);
-
-impl<T: SolidityTypeName> SolidityArguments for UnnamedArgument<T> {
- fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- if !T::is_void() {
- T::solidity_name(writer, tc)?;
- if !T::is_simple() {
- write!(writer, " memory")?;
- }
- Ok(())
- } else {
- Ok(())
- }
- }
- fn solidity_get(&self, _prefix: &str, _writer: &mut impl fmt::Write) -> fmt::Result {
- Ok(())
- }
- fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- T::solidity_default(writer, tc)
- }
- fn len(&self) -> usize {
- if T::is_void() {
- 0
- } else {
- 1
- }
- }
-}
-
-pub struct NamedArgument<T>(&'static str, PhantomData<*const T>);
-
-impl<T> NamedArgument<T> {
- pub fn new(name: &'static str) -> Self {
- Self(name, Default::default())
- }
-}
-
-impl<T: SolidityTypeName> SolidityArguments for NamedArgument<T> {
- fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- if !T::is_void() {
- T::solidity_name(writer, tc)?;
- if !T::is_simple() {
- write!(writer, " memory")?;
- }
- write!(writer, " {}", self.0)
- } else {
- Ok(())
- }
- }
- fn solidity_get(&self, prefix: &str, writer: &mut impl fmt::Write) -> fmt::Result {
- writeln!(writer, "\t{prefix}\t{};", self.0)
- }
- fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- T::solidity_default(writer, tc)
- }
- fn len(&self) -> usize {
- if T::is_void() {
- 0
- } else {
- 1
- }
- }
-}
-
-pub struct SolidityEventArgument<T>(pub bool, &'static str, PhantomData<*const T>);
-
-impl<T> SolidityEventArgument<T> {
- pub fn new(indexed: bool, name: &'static str) -> Self {
- Self(indexed, name, Default::default())
- }
-}
-
-impl<T: SolidityTypeName> SolidityArguments for SolidityEventArgument<T> {
- fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- if !T::is_void() {
- T::solidity_name(writer, tc)?;
- if self.0 {
- write!(writer, " indexed")?;
- }
- write!(writer, " {}", self.1)
- } else {
- Ok(())
- }
- }
- fn solidity_get(&self, prefix: &str, writer: &mut impl fmt::Write) -> fmt::Result {
- writeln!(writer, "\t{prefix}\t{};", self.1)
- }
- fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- T::solidity_default(writer, tc)
- }
- fn len(&self) -> usize {
- if T::is_void() {
- 0
- } else {
- 1
- }
- }
-}
-
-impl SolidityArguments for () {
- fn solidity_name(&self, _writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {
- Ok(())
- }
- fn solidity_get(&self, _prefix: &str, _writer: &mut impl fmt::Write) -> fmt::Result {
- Ok(())
- }
- fn solidity_default(&self, _writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {
- Ok(())
- }
- fn len(&self) -> usize {
- 0
- }
-}
-
-#[impl_for_tuples(1, 12)]
-impl SolidityArguments for Tuple {
- for_tuples!( where #( Tuple: SolidityArguments ),* );
-
- fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- let mut first = true;
- for_tuples!( #(
- if !Tuple.is_empty() {
- if !first {
- write!(writer, ", ")?;
- }
- first = false;
- Tuple.solidity_name(writer, tc)?;
- }
- )* );
- Ok(())
- }
- fn solidity_get(&self, prefix: &str, writer: &mut impl fmt::Write) -> fmt::Result {
- for_tuples!( #(
- Tuple.solidity_get(prefix, writer)?;
- )* );
- Ok(())
- }
- fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
- if self.is_empty() {
- Ok(())
- } else if self.len() == 1 {
- for_tuples!( #(
- Tuple.solidity_default(writer, tc)?;
- )* );
- Ok(())
- } else {
- write!(writer, "(")?;
- let mut first = true;
- for_tuples!( #(
- if !Tuple.is_empty() {
- if !first {
- write!(writer, ", ")?;
- }
- first = false;
- Tuple.solidity_default(writer, tc)?;
- }
- )* );
- write!(writer, ")")?;
- Ok(())
- }
- }
- fn len(&self) -> usize {
- for_tuples!( #( Tuple.len() )+* )
- }
-}
-
-pub trait SolidityFunctions {
- fn solidity_name(
- &self,
- is_impl: bool,
- writer: &mut impl fmt::Write,
- tc: &TypeCollector,
- ) -> fmt::Result;
-}
-
-pub enum SolidityMutability {
- Pure,
- View,
- Mutable,
-}
-pub struct SolidityFunction<A, R> {
- pub docs: &'static [&'static str],
- pub selector: u32,
- pub hide: bool,
- pub custom_signature: SignatureUnit,
- pub name: &'static str,
- pub args: A,
- pub result: R,
- pub mutability: SolidityMutability,
- pub is_payable: bool,
-}
-impl<A: SolidityArguments, R: SolidityArguments> SolidityFunctions for SolidityFunction<A, R> {
- fn solidity_name(
- &self,
- is_impl: bool,
- writer: &mut impl fmt::Write,
- tc: &TypeCollector,
- ) -> fmt::Result {
- let hide_comment = self.hide.then(|| "// ").unwrap_or("");
- for doc in self.docs {
- writeln!(writer, "\t{hide_comment}///{}", doc)?;
- }
- writeln!(
- writer,
- "\t{hide_comment}/// @dev EVM selector for this function is: 0x{:0>8x},",
- self.selector
- )?;
- writeln!(
- writer,
- "\t{hide_comment}/// or in textual repr: {}",
- self.custom_signature.as_str().expect("bad utf-8")
- )?;
- write!(writer, "\t{hide_comment}function {}(", self.name)?;
- self.args.solidity_name(writer, tc)?;
- write!(writer, ")")?;
- if is_impl {
- write!(writer, " public")?;
- } else {
- write!(writer, " external")?;
- }
- match &self.mutability {
- SolidityMutability::Pure => write!(writer, " pure")?,
- SolidityMutability::View => write!(writer, " view")?,
- SolidityMutability::Mutable => {}
- }
- if self.is_payable {
- write!(writer, " payable")?;
- }
- if !self.result.is_empty() {
- write!(writer, " returns (")?;
- self.result.solidity_name(writer, tc)?;
- write!(writer, ")")?;
- }
- if is_impl {
- writeln!(writer, " {{")?;
- writeln!(writer, "\t{hide_comment}\trequire(false, stub_error);")?;
- self.args.solidity_get(hide_comment, writer)?;
- match &self.mutability {
- SolidityMutability::Pure => {}
- SolidityMutability::View => writeln!(writer, "\t{hide_comment}\tdummy;")?,
- SolidityMutability::Mutable => writeln!(writer, "\t{hide_comment}\tdummy = 0;")?,
- }
- if !self.result.is_empty() {
- write!(writer, "\t{hide_comment}\treturn ")?;
- self.result.solidity_default(writer, tc)?;
- writeln!(writer, ";")?;
- }
- writeln!(writer, "\t{hide_comment}}}")?;
- } else {
- writeln!(writer, ";")?;
- }
- if self.hide {
- writeln!(writer, "// FORMATTING: FORCE NEWLINE")?;
- }
- Ok(())
- }
-}
-
-#[impl_for_tuples(0, 48)]
-impl SolidityFunctions for Tuple {
- for_tuples!( where #( Tuple: SolidityFunctions ),* );
-
- fn solidity_name(
- &self,
- is_impl: bool,
- writer: &mut impl fmt::Write,
- tc: &TypeCollector,
- ) -> fmt::Result {
- let mut first = false;
- for_tuples!( #(
- Tuple.solidity_name(is_impl, writer, tc)?;
- )* );
- Ok(())
- }
-}
-
-pub struct SolidityInterface<F: SolidityFunctions> {
- pub docs: &'static [&'static str],
- pub selector: bytes4,
- pub name: &'static str,
- pub is: &'static [&'static str],
- pub functions: F,
-}
-
-impl<F: SolidityFunctions> SolidityInterface<F> {
- pub fn format(
- &self,
- is_impl: bool,
- out: &mut impl fmt::Write,
- tc: &TypeCollector,
- ) -> fmt::Result {
- const ZERO_BYTES: [u8; 4] = [0; 4];
- for doc in self.docs {
- writeln!(out, "///{}", doc)?;
- }
- if self.selector != ZERO_BYTES {
- writeln!(
- out,
- "/// @dev the ERC-165 identifier for this interface is 0x{:0>8x}",
- u32::from_be_bytes(self.selector)
- )?;
- }
- if is_impl {
- write!(out, "contract ")?;
- } else {
- write!(out, "interface ")?;
- }
- write!(out, "{}", self.name)?;
- if !self.is.is_empty() {
- write!(out, " is")?;
- for (i, n) in self.is.iter().enumerate() {
- if i != 0 {
- write!(out, ",")?;
- }
- write!(out, " {}", n)?;
- }
- }
- writeln!(out, " {{")?;
- self.functions.solidity_name(is_impl, out, tc)?;
- writeln!(out, "}}")?;
- Ok(())
- }
-}
-
-pub struct SolidityEvent<A> {
- pub name: &'static str,
- pub args: A,
-}
-
-impl<A: SolidityArguments> SolidityFunctions for SolidityEvent<A> {
- fn solidity_name(
- &self,
- _is_impl: bool,
- writer: &mut impl fmt::Write,
- tc: &TypeCollector,
- ) -> fmt::Result {
- write!(writer, "\tevent {}(", self.name)?;
- self.args.solidity_name(writer, tc)?;
- writeln!(writer, ");")
- }
-}
crates/evm-coder/src/solidity/impls.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/src/solidity/impls.rs
@@ -0,0 +1,190 @@
+use super::{TypeCollector, SolidityTypeName, SolidityType, StructCollect};
+use crate::{sealed, types::*};
+use core::fmt;
+use primitive_types::{U256, H160};
+
+macro_rules! solidity_type_name {
+ ($($ty:ty => $name:literal $simple:literal = $default:literal),* $(,)?) => {
+ $(
+ impl SolidityTypeName for $ty {
+ fn solidity_name(writer: &mut impl core::fmt::Write, _tc: &TypeCollector) -> core::fmt::Result {
+ write!(writer, $name)
+ }
+ fn is_simple() -> bool {
+ $simple
+ }
+ fn solidity_default(writer: &mut impl core::fmt::Write, _tc: &TypeCollector) -> core::fmt::Result {
+ write!(writer, $default)
+ }
+ }
+
+ impl StructCollect for $ty {
+ fn name() -> String {
+ $name.to_string()
+ }
+
+ fn declaration() -> String {
+ String::default()
+ }
+ }
+ )*
+ };
+}
+
+solidity_type_name! {
+ u8 => "uint8" true = "0",
+ u32 => "uint32" true = "0",
+ u64 => "uint64" true = "0",
+ u128 => "uint128" true = "0",
+ U256 => "uint256" true = "0",
+ bytes4 => "bytes4" true = "bytes4(0)",
+ H160 => "address" true = "0x0000000000000000000000000000000000000000",
+ string => "string" false = "\"\"",
+ bytes => "bytes" false = "hex\"\"",
+ bool => "bool" true = "false",
+}
+
+impl SolidityTypeName for void {
+ fn solidity_name(_writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {
+ Ok(())
+ }
+ fn is_simple() -> bool {
+ true
+ }
+ fn solidity_default(_writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {
+ Ok(())
+ }
+ fn is_void() -> bool {
+ true
+ }
+}
+
+impl<T: SolidityTypeName + sealed::CanBePlacedInVec> SolidityTypeName for Vec<T> {
+ fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ T::solidity_name(writer, tc)?;
+ write!(writer, "[]")
+ }
+ fn is_simple() -> bool {
+ false
+ }
+ fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ write!(writer, "new ")?;
+ T::solidity_name(writer, tc)?;
+ write!(writer, "[](0)")
+ }
+}
+
+macro_rules! count {
+ () => (0usize);
+ ( $x:tt $($xs:tt)* ) => (1usize + count!($($xs)*));
+}
+
+macro_rules! impl_tuples {
+ ($($ident:ident)+) => {
+ impl<$($ident: SolidityTypeName + 'static),+> SolidityType for ($($ident,)+) {
+ fn names(tc: &TypeCollector) -> Vec<string> {
+ let mut collected = Vec::with_capacity(Self::len());
+ $({
+ let mut out = string::new();
+ $ident::solidity_name(&mut out, tc).expect("no fmt error");
+ collected.push(out);
+ })*;
+ collected
+ }
+
+ fn len() -> usize {
+ count!($($ident)*)
+ }
+ }
+ impl<$($ident: SolidityTypeName + 'static),+> SolidityTypeName for ($($ident,)+) {
+ fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ write!(writer, "{}", tc.collect_tuple::<Self>())
+ }
+ fn is_simple() -> bool {
+ false
+ }
+ #[allow(unused_assignments)]
+ fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ write!(writer, "{}(", tc.collect_tuple::<Self>())?;
+ let mut first = true;
+ $(
+ if !first {
+ write!(writer, ",")?;
+ } else {
+ first = false;
+ }
+ <$ident>::solidity_default(writer, tc)?;
+ )*
+ write!(writer, ")")
+ }
+ }
+ };
+}
+
+impl_tuples! {A}
+impl_tuples! {A B}
+impl_tuples! {A B C}
+impl_tuples! {A B C D}
+impl_tuples! {A B C D E}
+impl_tuples! {A B C D E F}
+impl_tuples! {A B C D E F G}
+impl_tuples! {A B C D E F G H}
+impl_tuples! {A B C D E F G H I}
+impl_tuples! {A B C D E F G H I J}
+
+impl StructCollect for Property {
+ fn name() -> String {
+ "Property".into()
+ }
+
+ fn declaration() -> String {
+ use std::fmt::Write;
+
+ let mut str = String::new();
+ writeln!(str, "/// @dev Property struct").unwrap();
+ writeln!(str, "struct {} {{", Self::name()).unwrap();
+ writeln!(str, "\tstring key;").unwrap();
+ writeln!(str, "\tbytes value;").unwrap();
+ writeln!(str, "}}").unwrap();
+ str
+ }
+}
+
+impl SolidityTypeName for Property {
+ fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ write!(writer, "{}", tc.collect_struct::<Self>())
+ }
+
+ fn is_simple() -> bool {
+ false
+ }
+
+ fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ write!(writer, "{}(", tc.collect_struct::<Self>())?;
+ address::solidity_default(writer, tc)?;
+ write!(writer, ",")?;
+ uint256::solidity_default(writer, tc)?;
+ write!(writer, ")")
+ }
+}
+
+impl SolidityType for Property {
+ fn names(tc: &TypeCollector) -> Vec<string> {
+ let mut collected = Vec::with_capacity(Self::len());
+ {
+ let mut out = string::new();
+ string::solidity_name(&mut out, tc).expect("no fmt error");
+ collected.push(out);
+ }
+ {
+ let mut out = string::new();
+ bytes::solidity_name(&mut out, tc).expect("no fmt error");
+ collected.push(out);
+ }
+ collected
+ }
+
+ fn len() -> usize {
+ 2
+ }
+}
crates/evm-coder/src/solidity/mod.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/src/solidity/mod.rs
@@ -0,0 +1,421 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+//! Implementation detail of [`crate::solidity_interface`] macro code-generation.
+//! You should not rely on any public item from this module, as it is only intended to be used
+//! by procedural macro, API and output format may be changed at any time.
+//!
+//! Purpose of this module is to receive solidity contract definition in module-specified
+//! format, and then output string, representing interface of this contract in solidity language
+
+mod traits;
+pub use traits::*;
+mod impls;
+
+#[cfg(not(feature = "std"))]
+use alloc::{string::String, vec::Vec, collections::BTreeMap, format};
+#[cfg(feature = "std")]
+use std::collections::BTreeMap;
+use core::{
+ fmt::{self, Write},
+ marker::PhantomData,
+ cell::{Cell, RefCell},
+ cmp::Reverse,
+};
+use impl_trait_for_tuples::impl_for_tuples;
+use crate::{types::*, custom_signature::SignatureUnit};
+
+#[derive(Default)]
+pub struct TypeCollector {
+ /// Code => id
+ /// id ordering is required to perform topo-sort on the resulting data
+ structs: RefCell<BTreeMap<string, usize>>,
+ anonymous: RefCell<BTreeMap<Vec<string>, usize>>,
+ id: Cell<usize>,
+}
+impl TypeCollector {
+ pub fn new() -> Self {
+ Self::default()
+ }
+ pub fn collect(&self, item: string) {
+ let id = self.next_id();
+ self.structs.borrow_mut().insert(item, id);
+ }
+ pub fn next_id(&self) -> usize {
+ let v = self.id.get();
+ self.id.set(v + 1);
+ v
+ }
+ pub fn collect_tuple<T: SolidityType>(&self) -> String {
+ let names = T::names(self);
+ if let Some(id) = self.anonymous.borrow().get(&names).cloned() {
+ return format!("Tuple{}", id);
+ }
+ let id = self.next_id();
+ let mut str = String::new();
+ writeln!(str, "/// @dev anonymous struct").unwrap();
+ writeln!(str, "struct Tuple{} {{", id).unwrap();
+ for (i, name) in names.iter().enumerate() {
+ writeln!(str, "\t{} field_{};", name, i).unwrap();
+ }
+ writeln!(str, "}}").unwrap();
+ self.collect(str);
+ self.anonymous.borrow_mut().insert(names, id);
+ format!("Tuple{}", id)
+ }
+ pub fn collect_struct<T: StructCollect>(&self) -> String {
+ self.collect(<T as StructCollect>::declaration());
+ <T as StructCollect>::name()
+ }
+ pub fn finish(self) -> Vec<string> {
+ let mut data = self.structs.into_inner().into_iter().collect::<Vec<_>>();
+ data.sort_by_key(|(_, id)| Reverse(*id));
+ data.into_iter().map(|(code, _)| code).collect()
+ }
+}
+#[derive(Default)]
+pub struct UnnamedArgument<T>(PhantomData<*const T>);
+
+impl<T: SolidityTypeName> SolidityArguments for UnnamedArgument<T> {
+ fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ if !T::is_void() {
+ T::solidity_name(writer, tc)?;
+ if !T::is_simple() {
+ write!(writer, " memory")?;
+ }
+ Ok(())
+ } else {
+ Ok(())
+ }
+ }
+ fn solidity_get(&self, _prefix: &str, _writer: &mut impl fmt::Write) -> fmt::Result {
+ Ok(())
+ }
+ fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ T::solidity_default(writer, tc)
+ }
+ fn len(&self) -> usize {
+ if T::is_void() {
+ 0
+ } else {
+ 1
+ }
+ }
+}
+
+pub struct NamedArgument<T>(&'static str, PhantomData<*const T>);
+
+impl<T> NamedArgument<T> {
+ pub fn new(name: &'static str) -> Self {
+ Self(name, Default::default())
+ }
+}
+
+impl<T: SolidityTypeName> SolidityArguments for NamedArgument<T> {
+ fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ if !T::is_void() {
+ T::solidity_name(writer, tc)?;
+ if !T::is_simple() {
+ write!(writer, " memory")?;
+ }
+ write!(writer, " {}", self.0)
+ } else {
+ Ok(())
+ }
+ }
+ fn solidity_get(&self, prefix: &str, writer: &mut impl fmt::Write) -> fmt::Result {
+ writeln!(writer, "\t{prefix}\t{};", self.0)
+ }
+ fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ T::solidity_default(writer, tc)
+ }
+ fn len(&self) -> usize {
+ if T::is_void() {
+ 0
+ } else {
+ 1
+ }
+ }
+}
+
+pub struct SolidityEventArgument<T>(pub bool, &'static str, PhantomData<*const T>);
+
+impl<T> SolidityEventArgument<T> {
+ pub fn new(indexed: bool, name: &'static str) -> Self {
+ Self(indexed, name, Default::default())
+ }
+}
+
+impl<T: SolidityTypeName> SolidityArguments for SolidityEventArgument<T> {
+ fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ if !T::is_void() {
+ T::solidity_name(writer, tc)?;
+ if self.0 {
+ write!(writer, " indexed")?;
+ }
+ write!(writer, " {}", self.1)
+ } else {
+ Ok(())
+ }
+ }
+ fn solidity_get(&self, prefix: &str, writer: &mut impl fmt::Write) -> fmt::Result {
+ writeln!(writer, "\t{prefix}\t{};", self.1)
+ }
+ fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ T::solidity_default(writer, tc)
+ }
+ fn len(&self) -> usize {
+ if T::is_void() {
+ 0
+ } else {
+ 1
+ }
+ }
+}
+
+impl SolidityArguments for () {
+ fn solidity_name(&self, _writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {
+ Ok(())
+ }
+ fn solidity_get(&self, _prefix: &str, _writer: &mut impl fmt::Write) -> fmt::Result {
+ Ok(())
+ }
+ fn solidity_default(&self, _writer: &mut impl fmt::Write, _tc: &TypeCollector) -> fmt::Result {
+ Ok(())
+ }
+ fn len(&self) -> usize {
+ 0
+ }
+}
+
+#[impl_for_tuples(1, 12)]
+impl SolidityArguments for Tuple {
+ for_tuples!( where #( Tuple: SolidityArguments ),* );
+
+ fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ let mut first = true;
+ for_tuples!( #(
+ if !Tuple.is_empty() {
+ if !first {
+ write!(writer, ", ")?;
+ }
+ first = false;
+ Tuple.solidity_name(writer, tc)?;
+ }
+ )* );
+ Ok(())
+ }
+ fn solidity_get(&self, prefix: &str, writer: &mut impl fmt::Write) -> fmt::Result {
+ for_tuples!( #(
+ Tuple.solidity_get(prefix, writer)?;
+ )* );
+ Ok(())
+ }
+ fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
+ if self.is_empty() {
+ Ok(())
+ } else if self.len() == 1 {
+ for_tuples!( #(
+ Tuple.solidity_default(writer, tc)?;
+ )* );
+ Ok(())
+ } else {
+ write!(writer, "(")?;
+ let mut first = true;
+ for_tuples!( #(
+ if !Tuple.is_empty() {
+ if !first {
+ write!(writer, ", ")?;
+ }
+ first = false;
+ Tuple.solidity_default(writer, tc)?;
+ }
+ )* );
+ write!(writer, ")")?;
+ Ok(())
+ }
+ }
+ fn len(&self) -> usize {
+ for_tuples!( #( Tuple.len() )+* )
+ }
+}
+
+pub enum SolidityMutability {
+ Pure,
+ View,
+ Mutable,
+}
+pub struct SolidityFunction<A, R> {
+ pub docs: &'static [&'static str],
+ pub selector: u32,
+ pub hide: bool,
+ pub custom_signature: SignatureUnit,
+ pub name: &'static str,
+ pub args: A,
+ pub result: R,
+ pub mutability: SolidityMutability,
+ pub is_payable: bool,
+}
+impl<A: SolidityArguments, R: SolidityArguments> SolidityFunctions for SolidityFunction<A, R> {
+ fn solidity_name(
+ &self,
+ is_impl: bool,
+ writer: &mut impl fmt::Write,
+ tc: &TypeCollector,
+ ) -> fmt::Result {
+ let hide_comment = self.hide.then_some("// ").unwrap_or("");
+ for doc in self.docs {
+ writeln!(writer, "\t{hide_comment}///{}", doc)?;
+ }
+ writeln!(
+ writer,
+ "\t{hide_comment}/// @dev EVM selector for this function is: 0x{:0>8x},",
+ self.selector
+ )?;
+ writeln!(
+ writer,
+ "\t{hide_comment}/// or in textual repr: {}",
+ self.custom_signature.as_str().expect("bad utf-8")
+ )?;
+ write!(writer, "\t{hide_comment}function {}(", self.name)?;
+ self.args.solidity_name(writer, tc)?;
+ write!(writer, ")")?;
+ if is_impl {
+ write!(writer, " public")?;
+ } else {
+ write!(writer, " external")?;
+ }
+ match &self.mutability {
+ SolidityMutability::Pure => write!(writer, " pure")?,
+ SolidityMutability::View => write!(writer, " view")?,
+ SolidityMutability::Mutable => {}
+ }
+ if self.is_payable {
+ write!(writer, " payable")?;
+ }
+ if !self.result.is_empty() {
+ write!(writer, " returns (")?;
+ self.result.solidity_name(writer, tc)?;
+ write!(writer, ")")?;
+ }
+ if is_impl {
+ writeln!(writer, " {{")?;
+ writeln!(writer, "\t{hide_comment}\trequire(false, stub_error);")?;
+ self.args.solidity_get(hide_comment, writer)?;
+ match &self.mutability {
+ SolidityMutability::Pure => {}
+ SolidityMutability::View => writeln!(writer, "\t{hide_comment}\tdummy;")?,
+ SolidityMutability::Mutable => writeln!(writer, "\t{hide_comment}\tdummy = 0;")?,
+ }
+ if !self.result.is_empty() {
+ write!(writer, "\t{hide_comment}\treturn ")?;
+ self.result.solidity_default(writer, tc)?;
+ writeln!(writer, ";")?;
+ }
+ writeln!(writer, "\t{hide_comment}}}")?;
+ } else {
+ writeln!(writer, ";")?;
+ }
+ if self.hide {
+ writeln!(writer, "// FORMATTING: FORCE NEWLINE")?;
+ }
+ Ok(())
+ }
+}
+
+#[impl_for_tuples(0, 48)]
+impl SolidityFunctions for Tuple {
+ for_tuples!( where #( Tuple: SolidityFunctions ),* );
+
+ fn solidity_name(
+ &self,
+ is_impl: bool,
+ writer: &mut impl fmt::Write,
+ tc: &TypeCollector,
+ ) -> fmt::Result {
+ let mut first = false;
+ for_tuples!( #(
+ Tuple.solidity_name(is_impl, writer, tc)?;
+ )* );
+ Ok(())
+ }
+}
+
+pub struct SolidityInterface<F: SolidityFunctions> {
+ pub docs: &'static [&'static str],
+ pub selector: bytes4,
+ pub name: &'static str,
+ pub is: &'static [&'static str],
+ pub functions: F,
+}
+
+impl<F: SolidityFunctions> SolidityInterface<F> {
+ pub fn format(
+ &self,
+ is_impl: bool,
+ out: &mut impl fmt::Write,
+ tc: &TypeCollector,
+ ) -> fmt::Result {
+ const ZERO_BYTES: [u8; 4] = [0; 4];
+ for doc in self.docs {
+ writeln!(out, "///{}", doc)?;
+ }
+ if self.selector != ZERO_BYTES {
+ writeln!(
+ out,
+ "/// @dev the ERC-165 identifier for this interface is 0x{:0>8x}",
+ u32::from_be_bytes(self.selector)
+ )?;
+ }
+ if is_impl {
+ write!(out, "contract ")?;
+ } else {
+ write!(out, "interface ")?;
+ }
+ write!(out, "{}", self.name)?;
+ if !self.is.is_empty() {
+ write!(out, " is")?;
+ for (i, n) in self.is.iter().enumerate() {
+ if i != 0 {
+ write!(out, ",")?;
+ }
+ write!(out, " {}", n)?;
+ }
+ }
+ writeln!(out, " {{")?;
+ self.functions.solidity_name(is_impl, out, tc)?;
+ writeln!(out, "}}")?;
+ Ok(())
+ }
+}
+
+pub struct SolidityEvent<A> {
+ pub name: &'static str,
+ pub args: A,
+}
+
+impl<A: SolidityArguments> SolidityFunctions for SolidityEvent<A> {
+ fn solidity_name(
+ &self,
+ _is_impl: bool,
+ writer: &mut impl fmt::Write,
+ tc: &TypeCollector,
+ ) -> fmt::Result {
+ write!(writer, "\tevent {}(", self.name)?;
+ self.args.solidity_name(writer, tc)?;
+ writeln!(writer, ");")
+ }
+}
crates/evm-coder/src/solidity/traits.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/src/solidity/traits.rs
@@ -0,0 +1,48 @@
+use super::TypeCollector;
+use core::fmt;
+
+pub trait StructCollect: 'static {
+ /// Structure name.
+ fn name() -> String;
+ /// Structure declaration.
+ fn declaration() -> String;
+}
+
+pub trait SolidityEnum: 'static {
+ fn solidity_option(&self) -> &str;
+}
+
+pub trait SolidityTypeName: 'static {
+ fn solidity_name(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;
+ /// "simple" types are stored inline, no `memory` modifier should be used in solidity
+ fn is_simple() -> bool;
+ fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;
+ /// Specialization
+ fn is_void() -> bool {
+ false
+ }
+}
+
+pub trait SolidityType {
+ fn names(tc: &TypeCollector) -> Vec<String>;
+ fn len() -> usize;
+}
+
+pub trait SolidityArguments {
+ fn solidity_name(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;
+ fn solidity_get(&self, prefix: &str, writer: &mut impl fmt::Write) -> fmt::Result;
+ fn solidity_default(&self, writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result;
+ fn is_empty(&self) -> bool {
+ self.len() == 0
+ }
+ fn len(&self) -> usize;
+}
+
+pub trait SolidityFunctions {
+ fn solidity_name(
+ &self,
+ is_impl: bool,
+ writer: &mut impl fmt::Write,
+ tc: &TypeCollector,
+ ) -> fmt::Result;
+}
crates/evm-coder/tests/abi_derive_generation.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/tests/abi_derive_generation.rs
@@ -0,0 +1,841 @@
+mod test_struct {
+ use evm_coder_procedural::AbiCoder;
+ use evm_coder::types::bytes;
+
+ #[test]
+ fn empty_struct() {
+ let t = trybuild::TestCases::new();
+ t.compile_fail("tests/build_failed/abi_derive_struct_generation.rs");
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct1SimpleParam {
+ _a: u8,
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct1DynamicParam {
+ _a: String,
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct2SimpleParam {
+ _a: u8,
+ _b: u32,
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct2DynamicParam {
+ _a: String,
+ _b: bytes,
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct2MixedParam {
+ _a: u8,
+ _b: bytes,
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct1DerivedSimpleParam {
+ _a: TypeStruct1SimpleParam,
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct2DerivedSimpleParam {
+ _a: TypeStruct1SimpleParam,
+ _b: TypeStruct2SimpleParam,
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct1DerivedDynamicParam {
+ _a: TypeStruct1DynamicParam,
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct2DerivedDynamicParam {
+ _a: TypeStruct1DynamicParam,
+ _b: TypeStruct2DynamicParam,
+ }
+
+ /// Some docs
+ /// At multi
+ /// line
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct3DerivedMixedParam {
+ /// Docs for A
+ /// multi
+ /// line
+ _a: TypeStruct1SimpleParam,
+ /// Docs for B
+ _b: TypeStruct2DynamicParam,
+ /// Docs for C
+ _c: TypeStruct2MixedParam,
+ }
+
+ #[test]
+ #[cfg(feature = "stubgen")]
+ fn struct_collect_type_struct3_derived_mixed_param() {
+ assert_eq!(
+ <TypeStruct3DerivedMixedParam as ::evm_coder::solidity::StructCollect>::name(),
+ "TypeStruct3DerivedMixedParam"
+ );
+ similar_asserts::assert_eq!(
+ <TypeStruct3DerivedMixedParam as ::evm_coder::solidity::StructCollect>::declaration(),
+ r#"/// @dev Some docs
+/// At multi
+/// line
+struct TypeStruct3DerivedMixedParam {
+ /// @dev Docs for A
+ /// multi
+ /// line
+ TypeStruct1SimpleParam _a;
+ /// @dev Docs for B
+ TypeStruct2DynamicParam _b;
+ /// @dev Docs for C
+ TypeStruct2MixedParam _c;
+}
+"#
+ );
+ }
+
+ #[test]
+ fn impl_abi_type_signature() {
+ assert_eq!(
+ <TypeStruct1SimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "(uint8)"
+ );
+ assert_eq!(
+ <TypeStruct1DynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "(string)"
+ );
+ assert_eq!(
+ <TypeStruct2SimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "(uint8,uint32)"
+ );
+ assert_eq!(
+ <TypeStruct2DynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "(string,bytes)"
+ );
+ assert_eq!(
+ <TypeStruct2MixedParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "(uint8,bytes)"
+ );
+ assert_eq!(
+ <TypeStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "((uint8))"
+ );
+ assert_eq!(
+ <TypeStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "((uint8),(uint8,uint32))"
+ );
+ assert_eq!(
+ <TypeStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "((string))"
+ );
+ assert_eq!(
+ <TypeStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "((string),(string,bytes))"
+ );
+ assert_eq!(
+ <TypeStruct3DerivedMixedParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ "((uint8),(string,bytes),(uint8,bytes))"
+ );
+ }
+
+ #[test]
+ fn impl_abi_type_is_dynamic() {
+ assert_eq!(
+ <TypeStruct1SimpleParam as evm_coder::abi::AbiType>::is_dynamic(),
+ false
+ );
+ assert_eq!(
+ <TypeStruct1DynamicParam as evm_coder::abi::AbiType>::is_dynamic(),
+ true
+ );
+ assert_eq!(
+ <TypeStruct2SimpleParam as evm_coder::abi::AbiType>::is_dynamic(),
+ false
+ );
+ assert_eq!(
+ <TypeStruct2DynamicParam as evm_coder::abi::AbiType>::is_dynamic(),
+ true
+ );
+ assert_eq!(
+ <TypeStruct2MixedParam as evm_coder::abi::AbiType>::is_dynamic(),
+ true
+ );
+ assert_eq!(
+ <TypeStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::is_dynamic(),
+ false
+ );
+ assert_eq!(
+ <TypeStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::is_dynamic(),
+ false
+ );
+ assert_eq!(
+ <TypeStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::is_dynamic(),
+ true
+ );
+ assert_eq!(
+ <TypeStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::is_dynamic(),
+ true
+ );
+ assert_eq!(
+ <TypeStruct3DerivedMixedParam as evm_coder::abi::AbiType>::is_dynamic(),
+ true
+ );
+ }
+
+ #[test]
+ fn impl_abi_type_size() {
+ const ABI_ALIGNMENT: usize = 32;
+ assert_eq!(
+ <TypeStruct1SimpleParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT
+ );
+ assert_eq!(
+ <TypeStruct1DynamicParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT
+ );
+ assert_eq!(
+ <TypeStruct2SimpleParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT * 2
+ );
+ assert_eq!(
+ <TypeStruct2DynamicParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT * 2
+ );
+ assert_eq!(
+ <TypeStruct2MixedParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT * 2
+ );
+ assert_eq!(
+ <TypeStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT
+ );
+ assert_eq!(
+ <TypeStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT * 3
+ );
+ assert_eq!(
+ <TypeStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT
+ );
+ assert_eq!(
+ <TypeStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT * 3
+ );
+ assert_eq!(
+ <TypeStruct3DerivedMixedParam as evm_coder::abi::AbiType>::size(),
+ ABI_ALIGNMENT * 5
+ );
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct1SimpleParam(u8);
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct1DynamicParam(String);
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct2SimpleParam(u8, u32);
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct2DynamicParam(String, bytes);
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct2MixedParam(u8, bytes);
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct1DerivedSimpleParam(TupleStruct1SimpleParam);
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct2DerivedSimpleParam(TupleStruct1SimpleParam, TupleStruct2SimpleParam);
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct1DerivedDynamicParam(TupleStruct1DynamicParam);
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct2DerivedDynamicParam(TupleStruct1DynamicParam, TupleStruct2DynamicParam);
+
+ /// Some docs
+ /// At multi
+ /// line
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct3DerivedMixedParam(
+ /// Docs for A
+ /// multi
+ /// line
+ TupleStruct1SimpleParam,
+ TupleStruct2DynamicParam,
+ /// Docs for C
+ TupleStruct2MixedParam,
+ );
+
+ #[test]
+ #[cfg(feature = "stubgen")]
+ fn struct_collect_tuple_struct3_derived_mixed_param() {
+ assert_eq!(
+ <TupleStruct3DerivedMixedParam as ::evm_coder::solidity::StructCollect>::name(),
+ "TupleStruct3DerivedMixedParam"
+ );
+ similar_asserts::assert_eq!(
+ <TupleStruct3DerivedMixedParam as ::evm_coder::solidity::StructCollect>::declaration(),
+ r#"/// @dev Some docs
+/// At multi
+/// line
+struct TupleStruct3DerivedMixedParam {
+ /// @dev Docs for A
+ /// multi
+ /// line
+ TupleStruct1SimpleParam field0;
+ TupleStruct2DynamicParam field1;
+ /// @dev Docs for C
+ TupleStruct2MixedParam field2;
+}
+"#
+ );
+ }
+
+ #[test]
+ fn impl_abi_type_signature_same_for_structs() {
+ assert_eq!(
+ <TypeStruct1SimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct1SimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap()
+ );
+ assert_eq!(
+ <TypeStruct1DynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct1DynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap()
+ );
+ assert_eq!(
+ <TypeStruct2SimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct2SimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap()
+ );
+ assert_eq!(
+ <TypeStruct2DynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct2DynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap()
+ );
+ assert_eq!(
+ <TypeStruct2MixedParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct2MixedParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ );
+ assert_eq!(
+ <TypeStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ );
+ assert_eq!(
+ <TypeStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ );
+ assert_eq!(
+ <TypeStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ );
+ assert_eq!(
+ <TypeStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ );
+ assert_eq!(
+ <TypeStruct3DerivedMixedParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <TupleStruct3DerivedMixedParam as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ );
+ }
+
+ #[test]
+ fn impl_abi_type_is_dynamic_same_for_structs() {
+ assert_eq!(
+ <TypeStruct1SimpleParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct1SimpleParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct1DynamicParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct1DynamicParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct2SimpleParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct2SimpleParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct2DynamicParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct2DynamicParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct2MixedParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct2MixedParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ assert_eq!(
+ <TypeStruct3DerivedMixedParam as evm_coder::abi::AbiType>::is_dynamic(),
+ <TupleStruct3DerivedMixedParam as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ }
+
+ #[test]
+ fn impl_abi_type_size_same_for_structs() {
+ assert_eq!(
+ <TypeStruct1SimpleParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct1SimpleParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct1DynamicParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct1DynamicParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct2SimpleParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct2SimpleParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct2DynamicParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct2DynamicParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct2MixedParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct2MixedParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct1DerivedSimpleParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct2DerivedSimpleParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct1DerivedDynamicParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct2DerivedDynamicParam as evm_coder::abi::AbiType>::size()
+ );
+ assert_eq!(
+ <TypeStruct3DerivedMixedParam as evm_coder::abi::AbiType>::size(),
+ <TupleStruct3DerivedMixedParam as evm_coder::abi::AbiType>::size()
+ );
+ }
+
+ const FUNCTION_IDENTIFIER: u32 = 0xdeadbeef;
+
+ fn test_impl<Tuple, TupleStruct, TypeStruct>(
+ tuple_data: Tuple,
+ tuple_struct_data: TupleStruct,
+ type_struct_data: TypeStruct,
+ ) where
+ TypeStruct: evm_coder::abi::AbiWrite
+ + evm_coder::abi::AbiRead
+ + std::cmp::PartialEq
+ + std::fmt::Debug,
+ TupleStruct: evm_coder::abi::AbiWrite
+ + evm_coder::abi::AbiRead
+ + std::cmp::PartialEq
+ + std::fmt::Debug,
+ Tuple: evm_coder::abi::AbiWrite
+ + evm_coder::abi::AbiRead
+ + std::cmp::PartialEq
+ + std::fmt::Debug,
+ {
+ let encoded_type_struct = test_abi_write_impl(&type_struct_data);
+ let encoded_tuple_struct = test_abi_write_impl(&tuple_struct_data);
+ let encoded_tuple = test_abi_write_impl(&tuple_data);
+
+ similar_asserts::assert_eq!(encoded_tuple, encoded_type_struct);
+ similar_asserts::assert_eq!(encoded_tuple, encoded_tuple_struct);
+
+ {
+ let (_, mut decoder) = evm_coder::abi::AbiReader::new_call(&encoded_tuple).unwrap();
+ let restored_struct_data = <TypeStruct>::abi_read(&mut decoder).unwrap();
+ assert_eq!(restored_struct_data, type_struct_data);
+ }
+ {
+ let (_, mut decoder) = evm_coder::abi::AbiReader::new_call(&encoded_tuple).unwrap();
+ let restored_struct_data = <TupleStruct>::abi_read(&mut decoder).unwrap();
+ assert_eq!(restored_struct_data, tuple_struct_data);
+ }
+
+ {
+ let (_, mut decoder) =
+ evm_coder::abi::AbiReader::new_call(&encoded_type_struct).unwrap();
+ let restored_tuple_data = <Tuple>::abi_read(&mut decoder).unwrap();
+ assert_eq!(restored_tuple_data, tuple_data);
+ }
+ {
+ let (_, mut decoder) =
+ evm_coder::abi::AbiReader::new_call(&encoded_tuple_struct).unwrap();
+ let restored_tuple_data = <Tuple>::abi_read(&mut decoder).unwrap();
+ assert_eq!(restored_tuple_data, tuple_data);
+ }
+ }
+
+ fn test_abi_write_impl<A>(data: &A) -> Vec<u8>
+ where
+ A: evm_coder::abi::AbiWrite
+ + evm_coder::abi::AbiRead
+ + std::cmp::PartialEq
+ + std::fmt::Debug,
+ {
+ let mut writer = evm_coder::abi::AbiWriter::new_call(FUNCTION_IDENTIFIER);
+ data.abi_write(&mut writer);
+ let encoded_tuple = writer.finish();
+ encoded_tuple
+ }
+
+ #[test]
+ fn codec_struct_1_simple() {
+ let _a = 0xff;
+ test_impl::<(u8,), TupleStruct1SimpleParam, TypeStruct1SimpleParam>(
+ (_a,),
+ TupleStruct1SimpleParam(_a),
+ TypeStruct1SimpleParam { _a },
+ );
+ }
+
+ #[test]
+ fn codec_struct_1_dynamic() {
+ let _a: String = "some string".into();
+ test_impl::<(String,), TupleStruct1DynamicParam, TypeStruct1DynamicParam>(
+ (_a.clone(),),
+ TupleStruct1DynamicParam(_a.clone()),
+ TypeStruct1DynamicParam { _a },
+ );
+ }
+
+ #[test]
+ fn codec_struct_1_derived_simple() {
+ let _a: u8 = 0xff;
+ test_impl::<((u8,),), TupleStruct1DerivedSimpleParam, TypeStruct1DerivedSimpleParam>(
+ ((_a,),),
+ TupleStruct1DerivedSimpleParam(TupleStruct1SimpleParam(_a)),
+ TypeStruct1DerivedSimpleParam {
+ _a: TypeStruct1SimpleParam { _a },
+ },
+ );
+ }
+
+ #[test]
+ fn codec_struct_1_derived_dynamic() {
+ let _a: String = "some string".into();
+ test_impl::<((String,),), TupleStruct1DerivedDynamicParam, TypeStruct1DerivedDynamicParam>(
+ ((_a.clone(),),),
+ TupleStruct1DerivedDynamicParam(TupleStruct1DynamicParam(_a.clone())),
+ TypeStruct1DerivedDynamicParam {
+ _a: TypeStruct1DynamicParam { _a },
+ },
+ );
+ }
+
+ #[test]
+ fn codec_struct_2_simple() {
+ let _a = 0xff;
+ let _b = 0xbeefbaba;
+ test_impl::<(u8, u32), TupleStruct2SimpleParam, TypeStruct2SimpleParam>(
+ (_a, _b),
+ TupleStruct2SimpleParam(_a, _b),
+ TypeStruct2SimpleParam { _a, _b },
+ );
+ }
+
+ #[test]
+ fn codec_struct_2_dynamic() {
+ let _a: String = "some string".into();
+ let _b: bytes = bytes(vec![0x11, 0x22, 0x33]);
+ test_impl::<(String, bytes), TupleStruct2DynamicParam, TypeStruct2DynamicParam>(
+ (_a.clone(), _b.clone()),
+ TupleStruct2DynamicParam(_a.clone(), _b.clone()),
+ TypeStruct2DynamicParam { _a, _b },
+ );
+ }
+
+ #[test]
+ fn codec_struct_2_mixed() {
+ let _a: u8 = 0xff;
+ let _b: bytes = bytes(vec![0x11, 0x22, 0x33]);
+ test_impl::<(u8, bytes), TupleStruct2MixedParam, TypeStruct2MixedParam>(
+ (_a.clone(), _b.clone()),
+ TupleStruct2MixedParam(_a.clone(), _b.clone()),
+ TypeStruct2MixedParam { _a, _b },
+ );
+ }
+
+ #[test]
+ fn codec_struct_2_derived_simple() {
+ let _a = 0xff;
+ let _b = 0xbeefbaba;
+ test_impl::<
+ ((u8,), (u8, u32)),
+ TupleStruct2DerivedSimpleParam,
+ TypeStruct2DerivedSimpleParam,
+ >(
+ ((_a,), (_a, _b)),
+ TupleStruct2DerivedSimpleParam(
+ TupleStruct1SimpleParam(_a),
+ TupleStruct2SimpleParam(_a, _b),
+ ),
+ TypeStruct2DerivedSimpleParam {
+ _a: TypeStruct1SimpleParam { _a },
+ _b: TypeStruct2SimpleParam { _a, _b },
+ },
+ );
+ }
+
+ #[test]
+ fn codec_struct_2_derived_dynamic() {
+ let _a = "some string".to_string();
+ let _b = bytes(vec![0x11, 0x22, 0x33]);
+ test_impl::<
+ ((String,), (String, bytes)),
+ TupleStruct2DerivedDynamicParam,
+ TypeStruct2DerivedDynamicParam,
+ >(
+ ((_a.clone(),), (_a.clone(), _b.clone())),
+ TupleStruct2DerivedDynamicParam(
+ TupleStruct1DynamicParam(_a.clone()),
+ TupleStruct2DynamicParam(_a.clone(), _b.clone()),
+ ),
+ TypeStruct2DerivedDynamicParam {
+ _a: TypeStruct1DynamicParam { _a: _a.clone() },
+ _b: TypeStruct2DynamicParam { _a, _b },
+ },
+ );
+ }
+
+ #[test]
+ fn codec_struct_3_derived_mixed() {
+ let int = 0xff;
+ let by = bytes(vec![0x11, 0x22, 0x33]);
+ let string = "some string".to_string();
+ test_impl::<
+ ((u8,), (String, bytes), (u8, bytes)),
+ TupleStruct3DerivedMixedParam,
+ TypeStruct3DerivedMixedParam,
+ >(
+ ((int,), (string.clone(), by.clone()), (int, by.clone())),
+ TupleStruct3DerivedMixedParam(
+ TupleStruct1SimpleParam(int),
+ TupleStruct2DynamicParam(string.clone(), by.clone()),
+ TupleStruct2MixedParam(int, by.clone()),
+ ),
+ TypeStruct3DerivedMixedParam {
+ _a: TypeStruct1SimpleParam { _a: int },
+ _b: TypeStruct2DynamicParam {
+ _a: string.clone(),
+ _b: by.clone(),
+ },
+ _c: TypeStruct2MixedParam { _a: int, _b: by },
+ },
+ );
+ }
+
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TypeStruct2SimpleStruct1Simple {
+ _a: TypeStruct2SimpleParam,
+ _b: TypeStruct2SimpleParam,
+ _c: u8,
+ }
+ #[derive(AbiCoder, PartialEq, Debug)]
+ struct TupleStruct2SimpleStruct1Simple(TupleStruct2SimpleParam, TupleStruct2SimpleParam, u8);
+
+ #[test]
+ fn codec_struct_2_struct_simple_1_simple() {
+ let _a = 0xff;
+ let _b = 0xbeefbaba;
+ test_impl::<
+ ((u8, u32), (u8, u32), u8),
+ TupleStruct2SimpleStruct1Simple,
+ TypeStruct2SimpleStruct1Simple,
+ >(
+ ((_a, _b), (_a, _b), _a),
+ TupleStruct2SimpleStruct1Simple(
+ TupleStruct2SimpleParam(_a, _b),
+ TupleStruct2SimpleParam(_a, _b),
+ _a,
+ ),
+ TypeStruct2SimpleStruct1Simple {
+ _a: TypeStruct2SimpleParam { _a, _b },
+ _b: TypeStruct2SimpleParam { _a, _b },
+ _c: _a,
+ },
+ );
+ }
+}
+
+mod test_enum {
+ use evm_coder::AbiCoder;
+
+ /// Some docs
+ /// At multi
+ /// line
+ #[derive(AbiCoder, Debug, PartialEq, Default)]
+ #[repr(u8)]
+ enum Color {
+ /// Docs for Red
+ /// multi
+ /// line
+ Red,
+ Green,
+ /// Docs for Blue
+ #[default]
+ Blue,
+ }
+
+ #[test]
+ fn empty() {}
+
+ #[test]
+ fn bad_enums() {
+ let t = trybuild::TestCases::new();
+ t.compile_fail("tests/build_failed/abi_derive_enum_generation.rs");
+ }
+
+ #[test]
+ fn impl_abi_type_signature_same_for_structs() {
+ assert_eq!(
+ <Color as evm_coder::abi::AbiType>::SIGNATURE
+ .as_str()
+ .unwrap(),
+ <u8 as evm_coder::abi::AbiType>::SIGNATURE.as_str().unwrap()
+ );
+ }
+
+ #[test]
+ fn impl_abi_type_is_dynamic_same_for_structs() {
+ assert_eq!(
+ <Color as evm_coder::abi::AbiType>::is_dynamic(),
+ <u8 as evm_coder::abi::AbiType>::is_dynamic()
+ );
+ }
+
+ #[test]
+ fn impl_abi_type_size_same_for_structs() {
+ assert_eq!(
+ <Color as evm_coder::abi::AbiType>::size(),
+ <u8 as evm_coder::abi::AbiType>::size()
+ );
+ }
+
+ #[test]
+ fn test_coder() {
+ const FUNCTION_IDENTIFIER: u32 = 0xdeadbeef;
+
+ let encoded_enum = {
+ let mut writer = evm_coder::abi::AbiWriter::new_call(FUNCTION_IDENTIFIER);
+ <Color as evm_coder::abi::AbiWrite>::abi_write(&Color::Green, &mut writer);
+ writer.finish()
+ };
+
+ let encoded_u8 = {
+ let mut writer = evm_coder::abi::AbiWriter::new_call(FUNCTION_IDENTIFIER);
+ <u8 as evm_coder::abi::AbiWrite>::abi_write(&(Color::Green as u8), &mut writer);
+ writer.finish()
+ };
+
+ similar_asserts::assert_eq!(encoded_enum, encoded_u8);
+
+ {
+ let (_, mut decoder) = evm_coder::abi::AbiReader::new_call(&encoded_enum).unwrap();
+ let restored_enum_data =
+ <Color as evm_coder::abi::AbiRead>::abi_read(&mut decoder).unwrap();
+ assert_eq!(restored_enum_data, Color::Green);
+ }
+ }
+
+ #[test]
+ #[cfg(feature = "stubgen")]
+ fn struct_collect_enum() {
+ assert_eq!(
+ <Color as ::evm_coder::solidity::StructCollect>::name(),
+ "Color"
+ );
+ similar_asserts::assert_eq!(
+ <Color as ::evm_coder::solidity::StructCollect>::declaration(),
+ r#"/// @dev Some docs
+/// At multi
+/// line
+enum Color {
+ /// @dev Docs for Red
+ /// multi
+ /// line
+ Red,
+ Green,
+ /// @dev Docs for Blue
+ Blue
+}
+"#
+ );
+ }
+}
crates/evm-coder/tests/build_failed/abi_derive_enum_generation.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/tests/build_failed/abi_derive_enum_generation.rs
@@ -0,0 +1,36 @@
+use evm_coder_procedural::AbiCoder;
+
+#[derive(AbiCoder)]
+enum NonRepr {
+ A,
+ B,
+ C,
+}
+
+#[derive(AbiCoder)]
+#[repr(u32)]
+enum NonReprU8 {
+ A,
+ B,
+ C,
+}
+
+#[derive(AbiCoder)]
+#[repr(u8)]
+enum RustEnum {
+ A(u128),
+ B,
+ C,
+}
+
+#[derive(AbiCoder)]
+#[repr(u8)]
+enum WithExplicit {
+ A = 128,
+ B,
+ C,
+}
+
+fn main() {
+ assert!(false);
+}
crates/evm-coder/tests/build_failed/abi_derive_enum_generation.stderrdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/tests/build_failed/abi_derive_enum_generation.stderr
@@ -0,0 +1,23 @@
+error: Enum is not "repr(u8)"
+ --> tests/build_failed/abi_derive_enum_generation.rs:4:6
+ |
+4 | enum NonRepr {
+ | ^^^^^^^
+
+error: Enum is not "repr(u8)"
+ --> tests/build_failed/abi_derive_enum_generation.rs:11:8
+ |
+11 | #[repr(u32)]
+ | ^^^
+
+error: Enumeration parameters should not have fields
+ --> tests/build_failed/abi_derive_enum_generation.rs:21:2
+ |
+21 | A(u128),
+ | ^
+
+error: Enumeration options should not have an explicit specified value
+ --> tests/build_failed/abi_derive_enum_generation.rs:29:2
+ |
+29 | A = 128,
+ | ^
crates/evm-coder/tests/build_failed/abi_derive_struct_generation.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/tests/build_failed/abi_derive_struct_generation.rs
@@ -0,0 +1,11 @@
+use evm_coder_procedural::AbiCoder;
+
+#[derive(AbiCoder, PartialEq, Debug)]
+struct EmptyStruct {}
+
+#[derive(AbiCoder, PartialEq, Debug)]
+struct EmptyTupleStruct();
+
+fn main() {
+ assert!(false);
+}
crates/evm-coder/tests/build_failed/abi_derive_struct_generation.stderrdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/tests/build_failed/abi_derive_struct_generation.stderr
@@ -0,0 +1,11 @@
+error: Empty structs not supported
+ --> tests/build_failed/abi_derive_struct_generation.rs:4:8
+ |
+4 | struct EmptyStruct {}
+ | ^^^^^^^^^^^
+
+error: Empty structs not supported
+ --> tests/build_failed/abi_derive_struct_generation.rs:7:8
+ |
+7 | struct EmptyTupleStruct();
+ | ^^^^^^^^^^^^^^^^
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -309,13 +309,13 @@
jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
tokio = { version = "1.19.2", features = ["time"] }
-fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fc-consensus = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fc-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fc-db = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fc-consensus = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fc-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fc-db = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
unique-rpc = { default-features = false, path = "../rpc" }
app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }
@@ -335,3 +335,7 @@
'quartz-runtime?/try-runtime',
'opal-runtime?/try-runtime',
]
+sapphire-runtime = [
+ 'opal-runtime',
+ 'opal-runtime/become-sapphire',
+]
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -66,7 +66,7 @@
}
#[cfg(not(feature = "unique-runtime"))]
-/// PARA_ID for Opal/Quartz
+/// PARA_ID for Opal/Sapphire/Quartz
const PARA_ID: u32 = 2095;
#[cfg(feature = "unique-runtime")]
@@ -89,7 +89,11 @@
return RuntimeId::Quartz;
}
- if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {
+ if self.id().starts_with("opal")
+ || self.id().starts_with("sapphire")
+ || self.id() == "dev"
+ || self.id() == "local_testnet"
+ {
return RuntimeId::Opal;
}
node/cli/src/cli.rsdiffbeforeafterboth--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -101,6 +101,8 @@
"Unique"
} else if cfg!(feature = "quartz-runtime") {
"Quartz"
+ } else if cfg!(feature = "sapphire-runtime") {
+ "Sapphire"
} else {
"Opal"
}
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -46,6 +46,7 @@
use cumulus_relay_chain_rpc_interface::{RelayChainRpcInterface, create_client_and_start_worker};
// Substrate Imports
+use sp_api::BlockT;
use sc_executor::NativeElseWasmExecutor;
use sc_executor::NativeExecutionDispatch;
use sc_network::{NetworkService, NetworkBlock};
@@ -159,7 +160,10 @@
}
}
-pub fn open_frontier_backend(config: &Configuration) -> Result<Arc<fc_db::Backend<Block>>, String> {
+pub fn open_frontier_backend<Block: BlockT, C: sp_blockchain::HeaderBackend<Block>>(
+ client: Arc<C>,
+ config: &Configuration,
+) -> Result<Arc<fc_db::Backend<Block>>, String> {
let config_dir = config
.base_path
.as_ref()
@@ -170,6 +174,7 @@
let database_dir = config_dir.join("frontier").join("db");
Ok(Arc::new(fc_db::Backend::<Block>::new(
+ client,
&fc_db::DatabaseSettings {
source: fc_db::DatabaseSource::RocksDb {
path: database_dir,
@@ -285,7 +290,7 @@
let filter_pool: Option<FilterPool> = Some(Arc::new(Mutex::new(BTreeMap::new())));
- let frontier_backend = open_frontier_backend(config)?;
+ let frontier_backend = open_frontier_backend(client.clone(), config)?;
let import_queue = build_import_queue(
client.clone(),
node/rpc/Cargo.tomldiffbeforeafterboth--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -40,20 +40,20 @@
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
tokio = { version = "1.19.2", features = ["macros", "sync"] }
-pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
pallet-common = { default-features = false, path = "../../pallets/common" }
up-common = { path = "../../primitives/common" }
pallet-unique = { path = "../../pallets/unique" }
uc-rpc = { path = "../../client/rpc" }
up-rpc = { path = "../../primitives/rpc" }
-app-promotion-rpc = { path = "../../primitives/app_promotion_rpc"}
+app-promotion-rpc = { path = "../../primitives/app_promotion_rpc" }
rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
up-data-structs = { default-features = false, path = "../../primitives/data-structs" }
node/rpc/src/lib.rsdiffbeforeafterboth--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -216,6 +216,7 @@
let overrides = overrides_handle::<_, _, R>(client.clone());
+ let execute_gas_limit_multiplier = 10;
io.merge(
Eth::new(
client.clone(),
@@ -230,6 +231,7 @@
block_data_cache.clone(),
fee_history_cache,
fee_history_limit,
+ execute_gas_limit_multiplier,
)
.into_rpc(),
)?;
pallets/app-promotion/Cargo.tomldiffbeforeafterboth--- a/pallets/app-promotion/Cargo.toml
+++ b/pallets/app-promotion/Cargo.toml
@@ -47,28 +47,30 @@
################################################################################
# Substrate Dependencies
-codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = '3.1.2' }
-frame-benchmarking = {default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+codec = { default-features = false, features = [
+ 'derive',
+], package = 'parity-scale-codec', version = '3.1.2' }
+frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-frame-system ={ default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-balances ={ default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-timestamp ={ default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-randomness-collective-flip ={ default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm ={ default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-sp-std ={ default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-sp-io ={ default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
serde = { default-features = false, features = ['derive'], version = '1.0.130' }
################################################################################
# local dependencies
-up-data-structs ={ default-features = false, path = "../../primitives/data-structs" }
-pallet-common ={ default-features = false, path = "../common" }
-pallet-unique ={ default-features = false, path = "../unique" }
-pallet-evm-contract-helpers ={ default-features = false, path = "../evm-contract-helpers" }
-pallet-evm-migration ={ default-features = false, path = "../evm-migration" }
+up-data-structs = { default-features = false, path = "../../primitives/data-structs" }
+pallet-common = { default-features = false, path = "../common" }
+pallet-unique = { default-features = false, path = "../unique" }
+pallet-evm-contract-helpers = { default-features = false, path = "../evm-contract-helpers" }
+pallet-evm-migration = { default-features = false, path = "../evm-migration" }
# [dev-dependencies]
pallets/app-promotion/src/lib.rsdiffbeforeafterboth--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -102,7 +102,7 @@
use frame_system::pallet_prelude::*;
#[pallet::config]
- pub trait Config: frame_system::Config + pallet_evm::account::Config {
+ pub trait Config: frame_system::Config + pallet_evm::Config {
/// Type to interact with the native token
type Currency: ExtendedLockableCurrency<Self::AccountId>
+ ReservableCurrency<Self::AccountId>;
@@ -274,11 +274,13 @@
if !block_pending.is_empty() {
block_pending.into_iter().for_each(|(staker, amount)| {
- <T::Currency as ReservableCurrency<T::AccountId>>::unreserve(&staker, amount);
+ <<T as Config>::Currency as ReservableCurrency<T::AccountId>>::unreserve(
+ &staker, amount,
+ );
});
}
- T::WeightInfo::on_initialize(counter)
+ <T as Config>::WeightInfo::on_initialize(counter)
}
}
@@ -297,7 +299,7 @@
/// # Arguments
///
/// * `admin`: account of the new admin.
- #[pallet::weight(T::WeightInfo::set_admin_address())]
+ #[pallet::weight(<T as Config>::WeightInfo::set_admin_address())]
pub fn set_admin_address(origin: OriginFor<T>, admin: T::CrossAccountId) -> DispatchResult {
ensure_root(origin)?;
@@ -315,7 +317,7 @@
/// # Arguments
///
/// * `amount`: in native tokens.
- #[pallet::weight(T::WeightInfo::stake())]
+ #[pallet::weight(<T as Config>::WeightInfo::stake())]
pub fn stake(staker: OriginFor<T>, amount: BalanceOf<T>) -> DispatchResult {
let staker_id = ensure_signed(staker)?;
@@ -388,7 +390,7 @@
/// Moves the sum of all stakes to the `reserved` state.
/// After the end of `PendingInterval` this sum becomes completely
/// free for further use.
- #[pallet::weight(T::WeightInfo::unstake())]
+ #[pallet::weight(<T as Config>::WeightInfo::unstake())]
pub fn unstake(staker: OriginFor<T>) -> DispatchResultWithPostInfo {
let staker_id = ensure_signed(staker)?;
@@ -421,7 +423,10 @@
Self::unlock_balance(&staker_id, total_staked)?;
- <T::Currency as ReservableCurrency<T::AccountId>>::reserve(&staker_id, total_staked)?;
+ <<T as Config>::Currency as ReservableCurrency<T::AccountId>>::reserve(
+ &staker_id,
+ total_staked,
+ )?;
TotalStaked::<T>::set(
TotalStaked::<T>::get()
@@ -445,7 +450,7 @@
/// # Arguments
///
/// * `collection_id`: ID of the collection that will be sponsored by `pallet_id`
- #[pallet::weight(T::WeightInfo::sponsor_collection())]
+ #[pallet::weight(<T as Config>::WeightInfo::sponsor_collection())]
pub fn sponsor_collection(
admin: OriginFor<T>,
collection_id: CollectionId,
@@ -470,7 +475,7 @@
/// # Arguments
///
/// * `collection_id`: ID of the collection that is sponsored by `pallet_id`
- #[pallet::weight(T::WeightInfo::stop_sponsoring_collection())]
+ #[pallet::weight(<T as Config>::WeightInfo::stop_sponsoring_collection())]
pub fn stop_sponsoring_collection(
admin: OriginFor<T>,
collection_id: CollectionId,
@@ -499,7 +504,7 @@
/// # Arguments
///
/// * `contract_id`: the contract address that will be sponsored by `pallet_id`
- #[pallet::weight(T::WeightInfo::sponsor_contract())]
+ #[pallet::weight(<T as Config>::WeightInfo::sponsor_contract())]
pub fn sponsor_contract(admin: OriginFor<T>, contract_id: H160) -> DispatchResult {
let admin_id = ensure_signed(admin)?;
@@ -525,7 +530,7 @@
/// # Arguments
///
/// * `contract_id`: the contract address that is sponsored by `pallet_id`
- #[pallet::weight(T::WeightInfo::stop_sponsoring_contract())]
+ #[pallet::weight(<T as Config>::WeightInfo::stop_sponsoring_contract())]
pub fn stop_sponsoring_contract(admin: OriginFor<T>, contract_id: H160) -> DispatchResult {
let admin_id = ensure_signed(admin)?;
@@ -555,7 +560,7 @@
/// # Arguments
///
/// * `stakers_number`: the number of stakers for which recalculation will be performed
- #[pallet::weight(T::WeightInfo::payout_stakers(stakers_number.unwrap_or(20) as u32))]
+ #[pallet::weight(<T as Config>::WeightInfo::payout_stakers(stakers_number.unwrap_or(20) as u32))]
pub fn payout_stakers(admin: OriginFor<T>, stakers_number: Option<u8>) -> DispatchResult {
let admin_id = ensure_signed(admin)?;
@@ -589,7 +594,7 @@
let flush_stake = || -> DispatchResult {
if let Some(last_id) = &*last_id.borrow() {
if !income_acc.borrow().is_zero() {
- <T::Currency as Currency<T::AccountId>>::transfer(
+ <<T as Config>::Currency as Currency<T::AccountId>>::transfer(
&T::TreasuryAccountId::get(),
last_id,
*income_acc.borrow(),
@@ -700,9 +705,12 @@
/// - `amount`: amount of locked funds.
fn set_lock_unchecked(staker: &T::AccountId, amount: BalanceOf<T>) {
if amount.is_zero() {
- <T::Currency as LockableCurrency<T::AccountId>>::remove_lock(LOCK_IDENTIFIER, &staker);
+ <<T as Config>::Currency as LockableCurrency<T::AccountId>>::remove_lock(
+ LOCK_IDENTIFIER,
+ &staker,
+ );
} else {
- <T::Currency as LockableCurrency<T::AccountId>>::set_lock(
+ <<T as Config>::Currency as LockableCurrency<T::AccountId>>::set_lock(
LOCK_IDENTIFIER,
staker,
amount,
@@ -717,7 +725,7 @@
pub fn get_locked_balance(
staker: impl EncodeLike<T::AccountId>,
) -> Option<BalanceLock<BalanceOf<T>>> {
- <T::Currency as ExtendedLockableCurrency<T::AccountId>>::locks(staker)
+ <<T as Config>::Currency as ExtendedLockableCurrency<T::AccountId>>::locks(staker)
.into_iter()
.find(|l| l.id == LOCK_IDENTIFIER)
}
pallets/common/CHANGELOG.mddiffbeforeafterboth--- a/pallets/common/CHANGELOG.md
+++ b/pallets/common/CHANGELOG.md
@@ -4,7 +4,7 @@
<!-- bureaucrate goes here -->
-## [0.1.11] - 2022-11-16
+## [0.1.12] - 2022-11-16
### Changed
@@ -12,6 +12,14 @@
Removed method overload: single signature `(string, uint256)`
is used for both cases.
+## [0.1.11] - 2022-11-12
+
+### Changed
+
+- In the `Collection` solidity interface,
+ the `allowed` function has been renamed to `allow_listed_cross`.
+ Also `EthCrossAccount` type is now used as `user` arg.
+
## [0.1.10] - 2022-11-02
### Changed
pallets/common/Cargo.tomldiffbeforeafterboth--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "pallet-common"
-version = "0.1.11"
+version = "0.1.12"
license = "GPLv3"
edition = "2021"
@@ -17,12 +17,12 @@
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
ethereum = { version = "0.12.0", default-features = false }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
serde = { version = "1.0.130", default-features = false }
scale-info = { version = "2.0.1", default-features = false, features = [
pallets/common/src/erc.rsdiffbeforeafterboth--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -16,6 +16,7 @@
//! This module contains the implementation of pallet methods for evm.
+pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};
use evm_coder::{
abi::AbiType,
solidity_interface, solidity, ToLog,
@@ -24,7 +25,6 @@
execution::{Result, Error},
weight,
};
-pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};
use pallet_evm_coder_substrate::dispatch_to_evm;
use sp_std::vec::Vec;
use up_data_structs::{
@@ -35,7 +35,8 @@
use crate::{
Pallet, CollectionHandle, Config, CollectionProperties, SelfWeightOf,
- eth::convert_cross_account_to_uint256, weights::WeightInfo,
+ eth::{EthCrossAccount, convert_cross_account_to_uint256},
+ weights::WeightInfo,
};
/// Events for ethereum collection helper.
@@ -529,11 +530,9 @@
/// Checks that user allowed to operate with collection.
///
/// @param user User address to check.
- fn allowed(&self, user: address) -> Result<bool> {
- Ok(Pallet::<T>::allowed(
- self.id,
- T::CrossAccountId::from_eth(user),
- ))
+ fn allowlisted_cross(&self, user: EthCrossAccount) -> Result<bool> {
+ let user = user.into_sub_cross_account::<T>()?;
+ Ok(Pallet::<T>::allowed(self.id, user))
}
/// Add the user to the allowed list.
pallets/common/src/eth.rsdiffbeforeafterboth--- a/pallets/common/src/eth.rs
+++ b/pallets/common/src/eth.rs
@@ -16,8 +16,11 @@
//! The module contains a number of functions for converting and checking ethereum identifiers.
-use evm_coder::types::{uint256, address};
-pub use pallet_evm::account::{Config, CrossAccountId};
+use evm_coder::{
+ AbiCoder,
+ types::{uint256, address},
+};
+pub use pallet_evm::{Config, account::CrossAccountId};
use sp_core::H160;
use up_data_structs::CollectionId;
@@ -109,3 +112,46 @@
Err("All fields of cross account is non zeroed".into())
}
}
+
+/// Cross account struct
+#[derive(Debug, Default, AbiCoder)]
+pub struct EthCrossAccount {
+ pub(crate) eth: address,
+ pub(crate) sub: uint256,
+}
+
+impl EthCrossAccount {
+ pub fn from_sub_cross_account<T>(cross_account_id: &T::CrossAccountId) -> Self
+ where
+ T: pallet_evm::Config,
+ T::AccountId: AsRef<[u8; 32]>,
+ {
+ if cross_account_id.is_canonical_substrate() {
+ Self {
+ eth: Default::default(),
+ sub: convert_cross_account_to_uint256::<T>(cross_account_id),
+ }
+ } else {
+ Self {
+ eth: *cross_account_id.as_eth(),
+ sub: Default::default(),
+ }
+ }
+ }
+
+ pub fn into_sub_cross_account<T>(&self) -> evm_coder::execution::Result<T::CrossAccountId>
+ where
+ T: pallet_evm::Config,
+ T::AccountId: From<[u8; 32]>,
+ {
+ if self.eth == Default::default() && self.sub == Default::default() {
+ Err("All fields of cross account is zeroed".into())
+ } else if self.eth == Default::default() {
+ Ok(convert_uint256_to_cross_account::<T>(self.sub))
+ } else if self.sub == Default::default() {
+ Ok(T::CrossAccountId::from_eth(self.eth))
+ } else {
+ Err("All fields of cross account is non zeroed".into())
+ }
+ }
+}
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -342,7 +342,6 @@
#[frame_support::pallet]
pub mod pallet {
use super::*;
- use pallet_evm::account;
use dispatch::CollectionDispatch;
use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};
use frame_system::pallet_prelude::*;
@@ -353,11 +352,7 @@
#[pallet::config]
pub trait Config:
- frame_system::Config
- + pallet_evm_coder_substrate::Config
- + pallet_evm::Config
- + TypeInfo
- + account::Config
+ frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config + TypeInfo
{
/// Weight information for functions of this pallet.
type WeightInfo: WeightInfo;
@@ -381,6 +376,7 @@
type TreasuryAccountId: Get<Self::AccountId>;
/// Address under which the CollectionHelper contract would be available.
+ #[pallet::constant]
type ContractAddress: Get<H160>;
/// Mapper for token addresses to Ethereum addresses.
pallets/configuration/Cargo.tomldiffbeforeafterboth--- a/pallets/configuration/Cargo.toml
+++ b/pallets/configuration/Cargo.toml
@@ -16,7 +16,7 @@
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
smallvec = "1.6.1"
[features]
pallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -12,8 +12,8 @@
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
ethereum = { version = "0.12.0", default-features = false }
evm-coder = { default-features = false, path = "../../crates/evm-coder" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
pallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -19,8 +19,8 @@
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
# Unique
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.30" }
# Locals
pallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -41,12 +41,13 @@
#[pallet::config]
pub trait Config:
- frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::account::Config
+ frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config
{
/// Overarching event type.
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
/// Address, under which magic contract will be available
+ #[pallet::constant]
type ContractAddress: Get<H160>;
/// In case of enabled sponsoring, but no sponsoring rate limit set,
pallets/evm-migration/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -16,8 +16,8 @@
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
[dependencies.codec]
default-features = false
pallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -14,11 +14,11 @@
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.30" }
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
[dependencies.codec]
default-features = false
pallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-transaction-payment/src/lib.rs
+++ b/pallets/evm-transaction-payment/src/lib.rs
@@ -44,7 +44,7 @@
}
#[pallet::config]
- pub trait Config: frame_system::Config + pallet_evm::account::Config {
+ pub trait Config: frame_system::Config + pallet_evm::Config {
/// Loosly-coupled handlers for evm call sponsoring
type EvmSponsorshipHandler: SponsorshipHandler<Self::CrossAccountId, CallContext>;
}
pallets/fungible/Cargo.tomldiffbeforeafterboth--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -23,7 +23,7 @@
pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }
ethereum = { version = "0.12.0", default-features = false }
frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
pallets/fungible/src/erc.rsdiffbeforeafterboth--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -24,12 +24,16 @@
weight,
};
use up_data_structs::CollectionMode;
-use pallet_common::erc::{CommonEvmHandler, PrecompileResult};
+use pallet_common::{
+ CollectionHandle,
+ erc::{CommonEvmHandler, PrecompileResult, CollectionCall},
+ eth::EthCrossAccount,
+};
use sp_std::vec::Vec;
use pallet_evm::{account::CrossAccountId, PrecompileHandle};
use pallet_evm_coder_substrate::{call, dispatch_to_evm};
use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use pallet_common::{CollectionHandle, erc::CollectionCall};
+use sp_core::Get;
use crate::{
Allowance, Balance, Config, FungibleHandle, Pallet, SelfWeightOf, TotalSupply,
@@ -132,6 +136,11 @@
Ok(<Allowance<T>>::get((self.id, owner, spender)).into())
}
+
+ /// @notice Returns collection helper contract address
+ fn collection_helper_address(&self) -> Result<address> {
+ Ok(T::ContractAddress::get())
+ }
}
#[solidity_interface(name = ERC20Mintable)]
pallets/fungible/src/lib.rsdiffbeforeafterboth--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -106,7 +106,7 @@
pub mod erc;
pub mod weights;
-pub type CreateItemData<T> = (<T as pallet_evm::account::Config>::CrossAccountId, u128);
+pub type CreateItemData<T> = (<T as pallet_evm::Config>::CrossAccountId, u128);
pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
#[frame_support::pallet]
@@ -379,7 +379,7 @@
let balance_from = <Balance<T>>::get((collection.id, from))
.checked_sub(amount)
.ok_or(<CommonError<T>>::TokenValueTooLow)?;
- let balance_to = if from != to {
+ let balance_to = if from != to && amount != 0 {
Some(
<Balance<T>>::get((collection.id, to))
.checked_add(amount)
@@ -390,17 +390,18 @@
};
// =========
-
- <PalletStructure<T>>::nest_if_sent_to_token(
- from.clone(),
- to,
- collection.id,
- TokenId::default(),
- nesting_budget,
- )?;
if let Some(balance_to) = balance_to {
- // from != to
+ // from != to && amount != 0
+
+ <PalletStructure<T>>::nest_if_sent_to_token(
+ from.clone(),
+ to,
+ collection.id,
+ TokenId::default(),
+ nesting_budget,
+ )?;
+
if balance_from == 0 {
<Balance<T>>::remove((collection.id, from));
<PalletStructure<T>>::unnest_if_nested(from, collection.id, TokenId::default());
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -18,7 +18,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x8b91d192
+/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
contract Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -269,9 +269,9 @@
/// Checks that user allowed to operate with collection.
///
/// @param user User address to check.
- /// @dev EVM selector for this function is: 0xd63a8e11,
- /// or in textual repr: allowed(address)
- function allowed(address user) public view returns (bool) {
+ /// @dev EVM selector for this function is: 0x91b6df49,
+ /// or in textual repr: allowlistedCross((address,uint256))
+ function allowlistedCross(EthCrossAccount memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -547,7 +547,7 @@
event Approval(address indexed owner, address indexed spender, uint256 value);
}
-/// @dev the ERC-165 identifier for this interface is 0x942e8b22
+/// @dev the ERC-165 identifier for this interface is 0x8cb847c4
contract ERC20 is Dummy, ERC165, ERC20Events {
/// @dev EVM selector for this function is: 0x06fdde03,
/// or in textual repr: name()
@@ -634,6 +634,15 @@
dummy;
return 0;
}
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() public view returns (address) {
+ require(false, stub_error);
+ dummy;
+ return 0x0000000000000000000000000000000000000000;
+ }
}
contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}
pallets/nonfungible/Cargo.tomldiffbeforeafterboth--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -16,7 +16,7 @@
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
pallet-common = { default-features = false, path = '../common' }
pallet-structure = { default-features = false, path = '../structure' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
pallets/nonfungible/src/common.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -291,6 +291,7 @@
<CommonWeights<T>>::burn_item(),
)
} else {
+ <Pallet<T>>::check_token_immediate_ownership(self, token, &sender)?;
Ok(().into())
}
}
@@ -320,6 +321,7 @@
<CommonWeights<T>>::transfer(),
)
} else {
+ <Pallet<T>>::check_token_immediate_ownership(self, token, &from)?;
Ok(().into())
}
}
@@ -360,6 +362,8 @@
<CommonWeights<T>>::transfer_from(),
)
} else {
+ <Pallet<T>>::check_allowed(self, &sender, &from, token, nesting_budget)?;
+
Ok(().into())
}
}
@@ -380,6 +384,8 @@
<CommonWeights<T>>::burn_from(),
)
} else {
+ <Pallet<T>>::check_allowed(self, &sender, &from, token, nesting_budget)?;
+
Ok(().into())
}
}
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -36,12 +36,14 @@
use pallet_evm_coder_substrate::dispatch_to_evm;
use sp_std::vec::Vec;
use pallet_common::{
+ CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,
erc::{CommonEvmHandler, PrecompileResult, CollectionCall, static_property::key},
- CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,
+ eth::EthCrossAccount,
};
use pallet_evm::{account::CrossAccountId, PrecompileHandle};
use pallet_evm_coder_substrate::call;
use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
+use sp_core::Get;
use crate::{
AccountBalance, Config, CreateItemData, NonfungibleHandle, Pallet, TokenData, TokensMinted,
@@ -489,6 +491,11 @@
// TODO: Not implemetable
Err("not implemented".into())
}
+
+ /// @notice Returns collection helper contract address
+ fn collection_helper_address(&self) -> Result<address> {
+ Ok(T::ContractAddress::get())
+ }
}
/// @title ERC721 Token that can be irreversibly burned (destroyed).
@@ -721,11 +728,7 @@
/// @param tokenId Id for the token.
/// @param keys Properties keys. Empty keys for all propertyes.
/// @return Vector of properties key/value pairs.
- fn token_properties(
- &self,
- token_id: uint256,
- keys: Vec<string>,
- ) -> Result<Vec<PropertyStruct>> {
+ fn properties(&self, token_id: uint256, keys: Vec<string>) -> Result<Vec<PropertyStruct>> {
let keys = keys
.into_iter()
.map(|key| {
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -127,7 +127,7 @@
pub mod erc;
pub mod weights;
-pub type CreateItemData<T> = CreateNftExData<<T as pallet_evm::account::Config>::CrossAccountId>;
+pub type CreateItemData<T> = CreateNftExData<<T as pallet_evm::Config>::CrossAccountId>;
pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
/// Token data, stored independently from other data used to describe it
@@ -814,6 +814,20 @@
<PalletCommon<T>>::set_property_permission(collection, sender, permission)
}
+ pub fn check_token_immediate_ownership(
+ collection: &NonfungibleHandle<T>,
+ token: TokenId,
+ possible_owner: &T::CrossAccountId,
+ ) -> DispatchResult {
+ let token_data =
+ <TokenData<T>>::get((collection.id, token)).ok_or(<CommonError<T>>::TokenNotFound)?;
+ ensure!(
+ &token_data.owner == possible_owner,
+ <CommonError<T>>::NoPermission
+ );
+ Ok(())
+ }
+
/// Transfer NFT token from one account to another.
///
/// `from` account stops being the owner and `to` account becomes the owner of the token.
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -119,7 +119,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x8b91d192
+/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
contract Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -370,9 +370,9 @@
/// Checks that user allowed to operate with collection.
///
/// @param user User address to check.
- /// @dev EVM selector for this function is: 0xd63a8e11,
- /// or in textual repr: allowed(address)
- function allowed(address user) public view returns (bool) {
+ /// @dev EVM selector for this function is: 0x91b6df49,
+ /// or in textual repr: allowlistedCross((address,uint256))
+ function allowlistedCross(EthCrossAccount memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -676,7 +676,7 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0xb8f094a0
+/// @dev the ERC-165 identifier for this interface is 0xb74c26b7
contract ERC721UniqueExtensions is Dummy, ERC165 {
/// @notice A descriptive name for a collection of NFTs in this contract
/// @dev EVM selector for this function is: 0x06fdde03,
@@ -722,9 +722,9 @@
/// @param tokenId Id for the token.
/// @param keys Properties keys. Empty keys for all propertyes.
/// @return Vector of properties key/value pairs.
- /// @dev EVM selector for this function is: 0xefc26c69,
- /// or in textual repr: tokenProperties(uint256,string[])
- function tokenProperties(uint256 tokenId, string[] memory keys) public view returns (Property[] memory) {
+ /// @dev EVM selector for this function is: 0xe07ede7e,
+ /// or in textual repr: properties(uint256,string[])
+ function properties(uint256 tokenId, string[] memory keys) public view returns (Property[] memory) {
require(false, stub_error);
tokenId;
keys;
@@ -920,7 +920,7 @@
/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-/// @dev the ERC-165 identifier for this interface is 0x80ac58cd
+/// @dev the ERC-165 identifier for this interface is 0x983a942b
contract ERC721 is Dummy, ERC165, ERC721Events {
/// @notice Count all NFTs assigned to an owner
/// @dev NFTs assigned to the zero address are considered invalid, and this
@@ -1050,6 +1050,15 @@
dummy;
return 0x0000000000000000000000000000000000000000;
}
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() public view returns (address) {
+ require(false, stub_error);
+ dummy;
+ return 0x0000000000000000000000000000000000000000;
+ }
}
contract UniqueNFT is
pallets/proxy-rmrk-core/Cargo.tomldiffbeforeafterboth--- a/pallets/proxy-rmrk-core/Cargo.toml
+++ b/pallets/proxy-rmrk-core/Cargo.toml
@@ -20,7 +20,7 @@
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
pallet-structure = { default-features = false, path = "../../pallets/structure" }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
rmrk-traits = { default-features = false, path = "../../primitives/rmrk-traits" }
scale-info = { version = "2.0.1", default-features = false, features = [
pallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/lib.rs
+++ b/pallets/proxy-rmrk-core/src/lib.rs
@@ -178,7 +178,7 @@
use RmrkProperty::*;
-/// Maximum number of levels of depth in the token nesting tree.
+/// A maximum number of levels of depth in the token nesting tree.
pub const NESTING_BUDGET: u32 = 5;
type PendingTarget = (CollectionId, TokenId);
@@ -190,11 +190,13 @@
#[frame_support::pallet]
pub mod pallet {
use super::*;
- use pallet_evm::account;
#[pallet::config]
pub trait Config:
- frame_system::Config + pallet_common::Config + pallet_nonfungible::Config + account::Config
+ frame_system::Config
+ + pallet_common::Config
+ + pallet_nonfungible::Config
+ + pallet_evm::Config
{
/// Overarching event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
pallets/proxy-rmrk-equip/Cargo.tomldiffbeforeafterboth--- a/pallets/proxy-rmrk-equip/Cargo.toml
+++ b/pallets/proxy-rmrk-equip/Cargo.toml
@@ -19,7 +19,7 @@
pallet-common = { default-features = false, path = '../common' }
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
rmrk-traits = { default-features = false, path = "../../primitives/rmrk-traits" }
scale-info = { version = "2.0.1", default-features = false, features = [
pallets/refungible/Cargo.tomldiffbeforeafterboth--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -16,7 +16,7 @@
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
pallet-common = { default-features = false, path = '../common' }
pallets/refungible/src/erc.rsdiffbeforeafterboth--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -31,14 +31,15 @@
};
use frame_support::{BoundedBTreeMap, BoundedVec};
use pallet_common::{
- CollectionHandle, CollectionPropertyPermissions,
+ CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,
erc::{CommonEvmHandler, CollectionCall, static_property::key},
- CommonCollectionOperations,
+ eth::EthCrossAccount,
+ Error as CommonError,
};
use pallet_evm::{account::CrossAccountId, PrecompileHandle};
use pallet_evm_coder_substrate::{call, dispatch_to_evm};
use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use sp_core::H160;
+use sp_core::{H160, Get};
use sp_std::{collections::btree_map::BTreeMap, vec::Vec, vec};
use up_data_structs::{
CollectionId, CollectionPropertiesVec, mapping::TokenAddressMapping, Property, PropertyKey,
@@ -482,6 +483,11 @@
// TODO: Not implemetable
Err("not implemented".into())
}
+
+ /// @notice Returns collection helper contract address
+ fn collection_helper_address(&self) -> Result<address> {
+ Ok(T::ContractAddress::get())
+ }
}
/// Returns amount of pieces of `token` that `owner` have
@@ -503,6 +509,13 @@
) -> Result<()> {
collection.consume_store_reads(1)?;
let total_supply = <TotalSupply<T>>::get((collection.id, token));
+
+ if owner_balance == 0 {
+ return Err(dispatch_to_evm::<T>(
+ <CommonError<T>>::MustBeTokenOwner.into(),
+ ));
+ }
+
if total_supply != owner_balance {
return Err("token has multiple owners".into());
}
@@ -749,11 +762,7 @@
/// @param tokenId Id for the token.
/// @param keys Properties keys. Empty keys for all propertyes.
/// @return Vector of properties key/value pairs.
- fn token_properties(
- &self,
- token_id: uint256,
- keys: Vec<string>,
- ) -> Result<Vec<PropertyStruct>> {
+ fn properties(&self, token_id: uint256, keys: Vec<string>) -> Result<Vec<PropertyStruct>> {
let keys = keys
.into_iter()
.map(|key| {
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -452,6 +452,10 @@
token: TokenId,
amount: u128,
) -> DispatchResult {
+ if <Balance<T>>::get((collection.id, token, owner)) == 0 {
+ return Err(<CommonError<T>>::TokenValueTooLow.into());
+ }
+
let total_supply = <TotalSupply<T>>::get((collection.id, token))
.checked_sub(amount)
.ok_or(<CommonError<T>>::TokenValueTooLow)?;
@@ -739,12 +743,17 @@
<PalletCommon<T>>::ensure_correct_receiver(to)?;
let initial_balance_from = <Balance<T>>::get((collection.id, token, from));
+
+ if initial_balance_from == 0 {
+ return Err(<CommonError<T>>::TokenValueTooLow.into());
+ }
+
let updated_balance_from = initial_balance_from
.checked_sub(amount)
.ok_or(<CommonError<T>>::TokenValueTooLow)?;
let mut create_target = false;
let from_to_differ = from != to;
- let updated_balance_to = if from != to {
+ let updated_balance_to = if from != to && amount != 0 {
let old_balance = <Balance<T>>::get((collection.id, token, to));
if old_balance == 0 {
create_target = true;
@@ -786,16 +795,17 @@
// =========
- <PalletStructure<T>>::nest_if_sent_to_token(
- from.clone(),
- to,
- collection.id,
- token,
- nesting_budget,
- )?;
+ if let Some(updated_balance_to) = updated_balance_to {
+ // from != to && amount != 0
+
+ <PalletStructure<T>>::nest_if_sent_to_token(
+ from.clone(),
+ to,
+ collection.id,
+ token,
+ nesting_budget,
+ )?;
- if let Some(updated_balance_to) = updated_balance_to {
- // from != to
if updated_balance_from == 0 {
<Balance<T>>::remove((collection.id, token, from));
<PalletStructure<T>>::unnest_if_nested(from, collection.id, token);
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -119,7 +119,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x8b91d192
+/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
contract Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -370,9 +370,9 @@
/// Checks that user allowed to operate with collection.
///
/// @param user User address to check.
- /// @dev EVM selector for this function is: 0xd63a8e11,
- /// or in textual repr: allowed(address)
- function allowed(address user) public view returns (bool) {
+ /// @dev EVM selector for this function is: 0x91b6df49,
+ /// or in textual repr: allowlistedCross((address,uint256))
+ function allowlistedCross(EthCrossAccount memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -674,7 +674,7 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x1d4b64d6
+/// @dev the ERC-165 identifier for this interface is 0x12f7d6c1
contract ERC721UniqueExtensions is Dummy, ERC165 {
/// @notice A descriptive name for a collection of NFTs in this contract
/// @dev EVM selector for this function is: 0x06fdde03,
@@ -720,9 +720,9 @@
/// @param tokenId Id for the token.
/// @param keys Properties keys. Empty keys for all propertyes.
/// @return Vector of properties key/value pairs.
- /// @dev EVM selector for this function is: 0xefc26c69,
- /// or in textual repr: tokenProperties(uint256,string[])
- function tokenProperties(uint256 tokenId, string[] memory keys) public view returns (Property[] memory) {
+ /// @dev EVM selector for this function is: 0xe07ede7e,
+ /// or in textual repr: properties(uint256,string[])
+ function properties(uint256 tokenId, string[] memory keys) public view returns (Property[] memory) {
require(false, stub_error);
tokenId;
keys;
@@ -919,7 +919,7 @@
/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-/// @dev the ERC-165 identifier for this interface is 0x58800161
+/// @dev the ERC-165 identifier for this interface is 0x4016cd87
contract ERC721 is Dummy, ERC165, ERC721Events {
/// @notice Count all RFTs assigned to an owner
/// @dev RFTs assigned to the zero address are considered invalid, and this
@@ -1047,6 +1047,15 @@
dummy;
return 0x0000000000000000000000000000000000000000;
}
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() public view returns (address) {
+ require(false, stub_error);
+ dummy;
+ return 0x0000000000000000000000000000000000000000;
+ }
}
contract UniqueRefungible is
pallets/structure/Cargo.tomldiffbeforeafterboth--- a/pallets/structure/Cargo.toml
+++ b/pallets/structure/Cargo.toml
@@ -16,7 +16,7 @@
"derive",
] }
up-data-structs = { path = "../../primitives/data-structs", default-features = false }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
[features]
default = ["std"]
pallets/unique/Cargo.tomldiffbeforeafterboth--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -100,7 +100,7 @@
scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
pallet-common = { default-features = false, path = "../common" }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
pallets/unique/src/eth/mod.rsdiffbeforeafterboth--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -28,6 +28,7 @@
CollectionById,
dispatch::CollectionDispatch,
erc::{CollectionHelpersEvents, static_property::key},
+ eth::{map_eth_to_id, collection_id_to_address},
Pallet as PalletCommon,
};
use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};
@@ -35,7 +36,7 @@
use sp_std::vec;
use up_data_structs::{
CollectionDescription, CollectionMode, CollectionName, CollectionTokenPrefix,
- CreateCollectionData,
+ CreateCollectionData, CollectionId,
};
use crate::{weights::WeightInfo, Config, SelfWeightOf};
@@ -361,6 +362,25 @@
.expect("Collection creation price should be convertible to u128");
Ok(price.into())
}
+
+ /// Returns address of a collection.
+ /// @param collectionId - CollectionId of the collection
+ /// @return eth mirror address of the collection
+ fn collection_address(&self, collection_id: uint32) -> Result<address> {
+ Ok(collection_id_to_address(collection_id.into()))
+ }
+
+ /// Returns collectionId of a collection.
+ /// @param collectionAddress - Eth address of the collection
+ /// @return collectionId of the collection
+ fn collection_id(&self, collection_address: address) -> Result<uint32> {
+ map_eth_to_id(&collection_address)
+ .map(|id| id.0)
+ .ok_or(Error::Revert(format!(
+ "failed to convert address {} into collectionId.",
+ collection_address
+ )))
+ }
}
/// Implements [`OnMethodCall`], which delegates call to [`EvmCollectionHelpers`]
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/unique/src/eth/stubs/CollectionHelpers.soldiffbeforeafterboth--- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol
+++ b/pallets/unique/src/eth/stubs/CollectionHelpers.sol
@@ -24,7 +24,7 @@
}
/// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0x7dea03b1
+/// @dev the ERC-165 identifier for this interface is 0xe65011aa
contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
/// Create an NFT collection
/// @param name Name of the collection
@@ -130,4 +130,28 @@
dummy;
return 0;
}
+
+ /// Returns address of a collection.
+ /// @param collectionId - CollectionId of the collection
+ /// @return eth mirror address of the collection
+ /// @dev EVM selector for this function is: 0x2e716683,
+ /// or in textual repr: collectionAddress(uint32)
+ function collectionAddress(uint32 collectionId) public view returns (address) {
+ require(false, stub_error);
+ collectionId;
+ dummy;
+ return 0x0000000000000000000000000000000000000000;
+ }
+
+ /// Returns collectionId of a collection.
+ /// @param collectionAddress - Eth address of the collection
+ /// @return collectionId of the collection
+ /// @dev EVM selector for this function is: 0xb5cb7498,
+ /// or in textual repr: collectionId(address)
+ function collectionId(address collectionAddress) public view returns (uint32) {
+ require(false, stub_error);
+ collectionAddress;
+ dummy;
+ return 0;
+ }
}
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -86,6 +86,8 @@
use sp_std::{vec, vec::Vec};
use up_data_structs::{
MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
+ MAX_PROPERTIES_PER_ITEM, MAX_PROPERTY_KEY_LENGTH, MAX_PROPERTY_VALUE_LENGTH,
+ MAX_COLLECTION_PROPERTIES_SIZE, COLLECTION_ADMINS_LIMIT, MAX_TOKEN_PROPERTIES_SIZE,
CreateItemData, CollectionLimits, CollectionPermissions, CollectionId, CollectionMode, TokenId,
SponsorshipState, CreateCollectionData, CreateItemExData, budget, Property, PropertyKey,
PropertyKeyPermission,
@@ -102,7 +104,7 @@
pub mod weights;
use weights::WeightInfo;
-/// Maximum number of levels of depth in the token nesting tree.
+/// A maximum number of levels of depth in the token nesting tree.
pub const NESTING_BUDGET: u32 = 5;
decl_error! {
@@ -138,7 +140,7 @@
pub enum Event<T>
where
<T as frame_system::Config>::AccountId,
- <T as pallet_evm::account::Config>::CrossAccountId,
+ <T as pallet_evm::Config>::CrossAccountId,
{
/// Collection sponsor was removed
///
@@ -277,6 +279,46 @@
{
type Error = Error<T>;
+ #[doc = "A maximum number of levels of depth in the token nesting tree."]
+ const NESTING_BUDGET: u32 = NESTING_BUDGET;
+
+ #[doc = "Maximal length of a collection name."]
+ const MAX_COLLECTION_NAME_LENGTH: u32 = MAX_COLLECTION_NAME_LENGTH;
+
+ #[doc = "Maximal length of a collection description."]
+ const MAX_COLLECTION_DESCRIPTION_LENGTH: u32 = MAX_COLLECTION_DESCRIPTION_LENGTH;
+
+ #[doc = "Maximal length of a token prefix."]
+ const MAX_TOKEN_PREFIX_LENGTH: u32 = MAX_TOKEN_PREFIX_LENGTH;
+
+ #[doc = "Maximum admins per collection."]
+ const COLLECTION_ADMINS_LIMIT: u32 = COLLECTION_ADMINS_LIMIT;
+
+ #[doc = "Maximal length of a property key."]
+ const MAX_PROPERTY_KEY_LENGTH: u32 = MAX_PROPERTY_KEY_LENGTH;
+
+ #[doc = "Maximal length of a property value."]
+ const MAX_PROPERTY_VALUE_LENGTH: u32 = MAX_PROPERTY_VALUE_LENGTH;
+
+ #[doc = "A maximum number of token properties."]
+ const MAX_PROPERTIES_PER_ITEM: u32 = MAX_PROPERTIES_PER_ITEM;
+
+ #[doc = "Maximum size for all collection properties."]
+ const MAX_COLLECTION_PROPERTIES_SIZE: u32 = MAX_COLLECTION_PROPERTIES_SIZE;
+
+ #[doc = "Maximum size of all token properties."]
+ const MAX_TOKEN_PROPERTIES_SIZE: u32 = MAX_TOKEN_PROPERTIES_SIZE;
+
+ #[doc = "Default NFT collection limit."]
+ const NFT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::NFT);
+
+ #[doc = "Default RFT collection limit."]
+ const RFT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::ReFungible);
+
+ #[doc = "Default FT collection limit."]
+ const FT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::Fungible(0));
+
+
pub fn deposit_event() = default;
fn on_initialize(_now: T::BlockNumber) -> Weight {
primitives/app_promotion_rpc/Cargo.tomldiffbeforeafterboth--- a/primitives/app_promotion_rpc/Cargo.toml
+++ b/primitives/app_promotion_rpc/Cargo.toml
@@ -14,7 +14,7 @@
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
[features]
default = ["std"]
primitives/common/Cargo.tomldiffbeforeafterboth--- a/primitives/common/Cargo.toml
+++ b/primitives/common/Cargo.toml
@@ -48,9 +48,9 @@
[dependencies.fp-rpc]
default-features = false
git = "https://github.com/uniquenetwork/frontier"
-branch = "unique-polkadot-v0.9.30"
+branch = "unique-polkadot-v0.9.30-2"
[dependencies.pallet-evm]
default-features = false
git = "https://github.com/uniquenetwork/frontier"
-branch = "unique-polkadot-v0.9.30"
+branch = "unique-polkadot-v0.9.30-2"
primitives/data-structs/CHANGELOG.mddiffbeforeafterboth--- a/primitives/data-structs/CHANGELOG.md
+++ b/primitives/data-structs/CHANGELOG.md
@@ -3,6 +3,7 @@
All notable changes to this project will be documented in this file.
<!-- bureaucrate goes here -->
+
## [v0.2.2] 2022-08-16
### Other changes
@@ -28,12 +29,19 @@
multiple users into `RefungibleMultipleItems` call.
## [v0.2.0] - 2022-08-01
+
### Deprecated
+
- `CreateReFungibleData::const_data`
## [v0.1.2] - 2022-07-25
+
### Added
+
- Type aliases `CollectionName`, `CollectionDescription`, `CollectionTokenPrefix`
+
## [v0.1.1] - 2022-07-22
+
### Added
-- Аields with properties to `CreateReFungibleData` and `CreateRefungibleExData`.
\ No newline at end of file
+
+- Fields with properties to `CreateReFungibleData` and `CreateRefungibleExData`.
primitives/data-structs/Cargo.tomldiffbeforeafterboth--- a/primitives/data-structs/Cargo.toml
+++ b/primitives/data-structs/Cargo.toml
@@ -25,9 +25,11 @@
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
derivative = { version = "2.2.0", features = ["use_core"] }
struct-versioning = { path = "../../crates/struct-versioning" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
rmrk-traits = { default-features = false, path = "../rmrk-traits" }
-bondrewd = { version = "0.1.14", features = ["derive"], default-features = false }
+bondrewd = { version = "0.1.14", features = [
+ "derive",
+], default-features = false }
[features]
default = ["std"]
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -120,22 +120,22 @@
// TODO: not used. Delete?
pub const COLLECTION_FIELD_LIMIT: u32 = CONST_ON_CHAIN_SCHEMA_LIMIT;
-/// Maximum length for collection name.
+/// Maximal length of a collection name.
pub const MAX_COLLECTION_NAME_LENGTH: u32 = 64;
-/// Maximum length for collection description.
+/// Maximal length of a collection description.
pub const MAX_COLLECTION_DESCRIPTION_LENGTH: u32 = 256;
-/// Maximal token prefix length.
+/// Maximal length of a token prefix.
pub const MAX_TOKEN_PREFIX_LENGTH: u32 = 16;
-/// Maximal lenght of property key.
+/// Maximal length of a property key.
pub const MAX_PROPERTY_KEY_LENGTH: u32 = 256;
-/// Maximal lenght of property value.
+/// Maximal length of a property value.
pub const MAX_PROPERTY_VALUE_LENGTH: u32 = 32768;
-/// Maximum properties that can be assigned to token.
+/// A maximum number of token properties.
pub const MAX_PROPERTIES_PER_ITEM: u32 = 64;
/// Maximal lenght of extended property value.
@@ -144,7 +144,7 @@
/// Maximum size for all collection properties.
pub const MAX_COLLECTION_PROPERTIES_SIZE: u32 = 40960;
-/// Maximum size for all token properties.
+/// Maximum size of all token properties.
pub const MAX_TOKEN_PROPERTIES_SIZE: u32 = 32768;
/// How much items can be created per single
@@ -609,6 +609,24 @@
}
impl CollectionLimits {
+ pub fn with_default_limits(collection_type: CollectionMode) -> Self {
+ CollectionLimits {
+ account_token_ownership_limit: Some(ACCOUNT_TOKEN_OWNERSHIP_LIMIT),
+ sponsored_data_size: Some(CUSTOM_DATA_LIMIT),
+ sponsored_data_rate_limit: Some(SponsoringRateLimit::SponsoringDisabled),
+ token_limit: Some(COLLECTION_TOKEN_LIMIT),
+ sponsor_transfer_timeout: match collection_type {
+ CollectionMode::NFT => Some(NFT_SPONSOR_TRANSFER_TIMEOUT),
+ CollectionMode::ReFungible => Some(REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT),
+ CollectionMode::Fungible(_) => Some(FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT),
+ },
+ sponsor_approve_timeout: Some(SPONSOR_APPROVE_TIMEOUT),
+ owner_can_transfer: Some(false),
+ owner_can_destroy: Some(true),
+ transfers_enabled: Some(true),
+ }
+ }
+
/// Get effective value for [`account_token_ownership_limit`](self.account_token_ownership_limit).
pub fn account_token_ownership_limit(&self) -> u32 {
self.account_token_ownership_limit
@@ -962,12 +980,15 @@
use scale_info::{
Type, Path,
build::{FieldsBuilder, UnnamedFields},
+ form::MetaForm,
type_params,
};
Type::builder()
.path(Path::new("up_data_structs", "PhantomType"))
.type_params(type_params!(T))
- .composite(<FieldsBuilder<UnnamedFields>>::default().field(|b| b.ty::<[T; 0]>()))
+ .composite(
+ <FieldsBuilder<MetaForm, UnnamedFields>>::default().field(|b| b.ty::<[T; 0]>()),
+ )
}
}
impl<T> MaxEncodedLen for PhantomType<T> {
primitives/rpc/Cargo.tomldiffbeforeafterboth--- a/primitives/rpc/Cargo.toml
+++ b/primitives/rpc/Cargo.toml
@@ -14,7 +14,7 @@
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
[features]
default = ["std"]
runtime/common/config/ethereum.rsdiffbeforeafterboth--- a/runtime/common/config/ethereum.rs
+++ b/runtime/common/config/ethereum.rs
@@ -17,19 +17,15 @@
pub type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
-impl pallet_evm::account::Config for Runtime {
- type CrossAccountId = CrossAccountId;
- type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;
- type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
-}
-
// Assuming slowest ethereum opcode is SSTORE, with gas price of 20000 as our worst case
// (contract, which only writes a lot of data),
// approximating on top of our real store write weight
parameter_types! {
pub const WritesPerSecond: u64 = WEIGHT_PER_SECOND.ref_time() / <Runtime as frame_system::Config>::DbWeight::get().write;
pub const GasPerSecond: u64 = WritesPerSecond::get() * 20000;
- pub const WeightPerGas: u64 = WEIGHT_PER_SECOND.ref_time() / GasPerSecond::get();
+ pub const WeightTimePerGas: u64 = WEIGHT_PER_SECOND.ref_time() / GasPerSecond::get();
+
+ pub const WeightPerGas: Weight = Weight::from_ref_time(WeightTimePerGas::get());
}
/// Limiting EVM execution to 50% of block for substrate users and management tasks
@@ -37,17 +33,7 @@
/// scheduled fairly
const EVM_DISPATCH_RATIO: Perbill = Perbill::from_percent(50);
parameter_types! {
- pub BlockGasLimit: U256 = U256::from((NORMAL_DISPATCH_RATIO * EVM_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WeightPerGas::get()).ref_time());
-}
-
-pub enum FixedGasWeightMapping {}
-impl pallet_evm::GasWeightMapping for FixedGasWeightMapping {
- fn gas_to_weight(gas: u64) -> Weight {
- Weight::from_ref_time(gas).saturating_mul(WeightPerGas::get())
- }
- fn weight_to_gas(weight: Weight) -> u64 {
- (weight / WeightPerGas::get()).ref_time()
- }
+ pub BlockGasLimit: U256 = U256::from((NORMAL_DISPATCH_RATIO * EVM_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WeightTimePerGas::get()).ref_time());
}
pub struct EthereumFindAuthor<F>(core::marker::PhantomData<F>);
@@ -65,9 +51,13 @@
}
impl pallet_evm::Config for Runtime {
+ type CrossAccountId = CrossAccountId;
+ type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;
+ type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
type BlockGasLimit = BlockGasLimit;
type FeeCalculator = pallet_configuration::FeeCalculator<Self>;
- type GasWeightMapping = FixedGasWeightMapping;
+ type GasWeightMapping = pallet_evm::FixedGasWeightMapping<Self>;
+ type WeightPerGas = WeightPerGas;
type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping<Self>;
type CallOrigin = EnsureAddressTruncated<Self>;
type WithdrawOrigin = EnsureAddressTruncated<Self>;
runtime/common/config/pallets/app_promotion.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/app_promotion.rs
+++ b/runtime/common/config/pallets/app_promotion.rs
@@ -22,7 +22,7 @@
use frame_support::{parameter_types, PalletId};
use sp_arithmetic::Perbill;
use up_common::{
- constants::{UNIQUE, RELAY_DAYS},
+ constants::{UNIQUE, RELAY_DAYS, DAYS},
types::Balance,
};
@@ -32,7 +32,6 @@
pub const RecalculationInterval: BlockNumber = 8;
pub const PendingInterval: BlockNumber = 4;
pub const Nominal: Balance = UNIQUE;
- // pub const Day: BlockNumber = DAYS;
pub IntervalIncome: Perbill = Perbill::from_rational(RecalculationInterval::get(), RELAY_DAYS) * Perbill::from_rational(5u32, 10_000);
}
@@ -40,9 +39,8 @@
parameter_types! {
pub const AppPromotionId: PalletId = PalletId(*b"appstake");
pub const RecalculationInterval: BlockNumber = RELAY_DAYS;
- pub const PendingInterval: BlockNumber = 7 * RELAY_DAYS;
+ pub const PendingInterval: BlockNumber = 7 * DAYS;
pub const Nominal: Balance = UNIQUE;
- // pub const Day: BlockNumber = RELAY_DAYS;
pub IntervalIncome: Perbill = Perbill::from_rational(5u32, 10_000);
}
@@ -56,7 +54,6 @@
type RelayBlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;
type RecalculationInterval = RecalculationInterval;
type PendingInterval = PendingInterval;
- // type Day = Day;
type Nominal = Nominal;
type IntervalIncome = IntervalIncome;
type RuntimeEvent = RuntimeEvent;
runtime/common/ethereum/self_contained_call.rsdiffbeforeafterboth--- a/runtime/common/ethereum/self_contained_call.rs
+++ b/runtime/common/ethereum/self_contained_call.rs
@@ -69,9 +69,13 @@
fn pre_dispatch_self_contained(
&self,
info: &Self::SignedInfo,
+ dispatch_info: &DispatchInfoOf<RuntimeCall>,
+ len: usize,
) -> Option<Result<(), TransactionValidityError>> {
match self {
- RuntimeCall::Ethereum(call) => call.pre_dispatch_self_contained(info),
+ RuntimeCall::Ethereum(call) => {
+ call.pre_dispatch_self_contained(info, dispatch_info, len)
+ }
_ => None,
}
}
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -482,6 +482,7 @@
};
let is_transactional = false;
+ let validate = false;
<Runtime as pallet_evm::Config>::Runner::call(
CrossAccountId::from_eth(from),
to,
@@ -493,6 +494,7 @@
nonce,
access_list.unwrap_or_default(),
is_transactional,
+ validate,
config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
).map_err(|err| err.error.into())
}
@@ -518,6 +520,7 @@
};
let is_transactional = false;
+ let validate = false;
<Runtime as pallet_evm::Config>::Runner::create(
CrossAccountId::from_eth(from),
data,
@@ -528,6 +531,7 @@
nonce,
access_list.unwrap_or_default(),
is_transactional,
+ validate,
config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
).map_err(|err| err.error.into())
}
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -82,7 +82,6 @@
'pallet-proxy-rmrk-equip/try-runtime',
'pallet-app-promotion/try-runtime',
'pallet-foreign-assets/try-runtime',
- 'pallet-evm/try-runtime',
'pallet-ethereum/try-runtime',
'pallet-evm-coder-substrate/try-runtime',
'pallet-evm-contract-helpers/try-runtime',
@@ -174,7 +173,15 @@
'pallet-test-utils?/std',
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-opal-runtime = ['refungible', 'scheduler', 'rmrk', 'app-promotion', 'foreign-assets', 'pallet-test-utils']
+opal-runtime = [
+ 'refungible',
+ 'scheduler',
+ 'rmrk',
+ 'app-promotion',
+ 'foreign-assets',
+ 'pallet-test-utils',
+]
+become-sapphire = []
refungible = []
scheduler = []
@@ -461,7 +468,7 @@
up-rpc = { path = "../../primitives/rpc", default-features = false }
app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }
rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
pallet-inflation = { path = '../../pallets/inflation', default-features = false }
pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }
up-data-structs = { path = '../../primitives/data-structs', default-features = false }
@@ -479,11 +486,11 @@
pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }
pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }
pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -42,7 +42,14 @@
pub use runtime_common::*;
+#[cfg(feature = "become-sapphire")]
+pub const RUNTIME_NAME: &str = "sapphire";
+#[cfg(feature = "become-sapphire")]
+pub const TOKEN_SYMBOL: &str = "QTZ";
+
+#[cfg(not(feature = "become-sapphire"))]
pub const RUNTIME_NAME: &str = "opal";
+#[cfg(not(feature = "become-sapphire"))]
pub const TOKEN_SYMBOL: &str = "OPL";
/// This runtime version.
@@ -59,7 +66,16 @@
parameter_types! {
pub const Version: RuntimeVersion = VERSION;
- pub const SS58Prefix: u8 = 42;
+}
+#[cfg(feature = "become-sapphire")]
+parameter_types! {
+ pub const SS58Prefix: u16 = 8883;
+ pub const ChainId: u64 = 8883;
+}
+
+#[cfg(not(feature = "become-sapphire"))]
+parameter_types! {
+ pub const SS58Prefix: u16 = 42;
pub const ChainId: u64 = 8882;
}
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -80,7 +80,6 @@
'pallet-proxy-rmrk-equip/try-runtime',
'pallet-app-promotion/try-runtime',
'pallet-foreign-assets/try-runtime',
- 'pallet-evm/try-runtime',
'pallet-ethereum/try-runtime',
'pallet-evm-coder-substrate/try-runtime',
'pallet-evm-contract-helpers/try-runtime',
@@ -460,7 +459,7 @@
pallet-unique = { path = '../../pallets/unique', default-features = false }
up-rpc = { path = "../../primitives/rpc", default-features = false }
app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
pallet-inflation = { path = '../../pallets/inflation', default-features = false }
pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }
up-data-structs = { path = '../../primitives/data-structs', default-features = false }
@@ -478,11 +477,11 @@
pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }
pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }
pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }
runtime/tests/Cargo.tomldiffbeforeafterboth--- a/runtime/tests/Cargo.toml
+++ b/runtime/tests/Cargo.toml
@@ -16,7 +16,7 @@
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
@@ -25,8 +25,8 @@
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
pallet-common = { path = '../../pallets/common' }
pallet-structure = { path = '../../pallets/structure' }
runtime/tests/src/lib.rsdiffbeforeafterboth--- a/runtime/tests/src/lib.rs
+++ b/runtime/tests/src/lib.rs
@@ -21,6 +21,7 @@
parameter_types,
traits::{Everything, ConstU32, ConstU64},
weights::IdentityFee,
+ pallet_prelude::Weight,
};
use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
@@ -202,6 +203,7 @@
parameter_types! {
pub BlockGasLimit: U256 = 0u32.into();
+ pub WeightPerGas: Weight = Weight::from_ref_time(20);
}
impl pallet_ethereum::Config for Test {
@@ -210,11 +212,15 @@
}
impl pallet_evm::Config for Test {
+ type CrossAccountId = TestCrossAccountId;
+ type EvmAddressMapping = TestEvmAddressMapping;
+ type EvmBackwardsAddressMapping = TestEvmBackwardsAddressMapping;
type RuntimeEvent = RuntimeEvent;
type FeeCalculator = ();
- type GasWeightMapping = ();
- type CallOrigin = EnsureAddressNever<Self::CrossAccountId>;
- type WithdrawOrigin = EnsureAddressNever<Self::CrossAccountId>;
+ type GasWeightMapping = pallet_evm::FixedGasWeightMapping<Self>;
+ type WeightPerGas = WeightPerGas;
+ type CallOrigin = EnsureAddressNever<Self>;
+ type WithdrawOrigin = EnsureAddressNever<Self>;
type AddressMapping = TestEvmAddressMapping;
type Currency = Balances;
type PrecompilesType = ();
@@ -242,12 +248,6 @@
type EvmTokenAddressMapping = EvmTokenAddressMapping;
type CrossTokenAddressMapping = CrossTokenAddressMapping<Self::AccountId>;
type ContractAddress = EvmCollectionHelpersAddress;
-}
-
-impl pallet_evm::account::Config for Test {
- type CrossAccountId = TestCrossAccountId;
- type EvmAddressMapping = TestEvmAddressMapping;
- type EvmBackwardsAddressMapping = TestEvmBackwardsAddressMapping;
}
impl pallet_structure::Config for Test {
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -81,7 +81,6 @@
'pallet-proxy-rmrk-equip/try-runtime',
'pallet-app-promotion/try-runtime',
'pallet-foreign-assets/try-runtime',
- 'pallet-evm/try-runtime',
'pallet-ethereum/try-runtime',
'pallet-evm-coder-substrate/try-runtime',
'pallet-evm-contract-helpers/try-runtime',
@@ -472,12 +471,12 @@
pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }
pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30-2" }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }
pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -102,6 +102,7 @@
"testXcmTransferStatemine": "mocha --timeout 9999999 -r ts-node/register ./**/xcm/xcmTransferStatemine.test.ts statemineId=1000 uniqueId=5000",
"testXcmTransferMoonbeam": "mocha --timeout 9999999 -r ts-node/register ./**/xcm/xcmTransferMoonbeam.test.ts",
"benchMintingFee": "ts-node src/benchmarks/mintFee/benchmark.ts",
+ "testApiConsts": "mocha --timeout 9999999 -r ts-node/register ./**/apiConsts.test.ts",
"load": "mocha --timeout 9999999 -r ts-node/register './**/*.load.ts'",
"loadTransfer": "ts-node src/transfer.nload.ts",
"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",
tests/scripts/functions.shdiffbeforeafterboth--- /dev/null
+++ b/tests/scripts/functions.sh
@@ -0,0 +1,4 @@
+
+function do_rpc {
+ curl -s --header "Content-Type: application/json" -XPOST --data "{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"$1\",\"params\":[$2]}" $RPC_URL
+}
tests/scripts/generate_types_package.shdiffbeforeafterboth--- /dev/null
+++ b/tests/scripts/generate_types_package.sh
@@ -0,0 +1,214 @@
+#!/usr/bin/env bash
+
+set -eu
+
+DIR=$(realpath $(dirname "$0"))
+TEMPLATE=$DIR/types_template
+GIT_REPO=git@github.com:UniqueNetwork/unique-types-js.git
+
+. $DIR/functions.sh
+
+usage() {
+ echo "Usage: [RPC_URL=http://localhost:9933] $0 <--rc|--release|--sapphire> [--force] [--push] [--rpc-url=http://localhost:9933]" 1>&2
+ exit 1
+}
+
+rc=
+sapphire=
+release=
+force=
+push=
+
+for i in "$@"; do
+case $i in
+ --rc)
+ rc=1
+ if test "$release" -o "$sapphire"; then usage; fi
+ ;;
+ --sapphire)
+ sapphire=1
+ if test "$rc" -o "$release"; then usage; fi
+ ;;
+ --release)
+ release=1
+ if test "$rc" -o "$sapphire"; then usage; fi
+ ;;
+ --force)
+ force=1
+ ;;
+ --push)
+ push=1
+ ;;
+ --rpc-url=*)
+ RPC_URL=${i#*=}
+ ;;
+ *)
+ usage
+ ;;
+esac
+done
+
+if test \( ! \( "$rc" -o "$release" -o "$sapphire" \) \) -o \( "${RPC_URL=}" = "" \); then
+ usage
+elif test "$rc"; then
+ echo "Rc build"
+else
+ echo "Release build"
+fi
+
+cd $DIR/..
+yarn polkadot-types
+
+version=$(do_rpc state_getRuntimeVersion "")
+spec_version=$(echo $version | jq -r .result.specVersion)
+spec_name=$(echo $version | jq -r .result.specName)
+echo "Spec version: $spec_version, name: $spec_name"
+
+case $spec_name in
+ opal)
+ package_name=@unique-nft/opal-testnet-types
+ repo_branch=opal-testnet
+ repo_tag=$repo_branch
+ ;;
+ quartz)
+ package_name=@unique-nft/quartz-mainnet-types
+ repo_branch=quartz-mainnet
+ repo_tag=$repo_branch
+ ;;
+ unique)
+ package_name=@unique-nft/unique-mainnet-types
+ repo_branch=master
+ repo_tag=unique-mainnet
+ ;;
+ *)
+ echo "unknown spec name: $spec_name"
+ exit 1
+ ;;
+esac
+
+if test "$rc" = 1; then
+ if "$spec_name" != opal; then
+ echo "rc types can only be based on opal spec"
+ exit 1
+ fi
+ package_name=@unique-nft/rc-types
+ repo_branch=rc
+ repo_tag=$repo_branch
+fi
+if test "$sapphire" = 1; then
+ if "$spec_name" != opal; then
+ echo "sapphire types can only be based on opal spec"
+ exit 1
+ fi
+ package_name=@unique-nft/sapphire-mainnet-types
+ repo_branch=sapphire-mainnet
+ repo_tag=$repo_branch
+fi
+
+package_version=${spec_version:0:3}.$(echo ${spec_version:3:3} | sed 's/^0*//').
+last_patch=NEVER
+for tag in $(git ls-remote -t --refs $GIT_REPO | cut -f 2 | sort -r); do
+ tag_prefix=refs/tags/$repo_tag-v$package_version
+ if [[ $tag == $tag_prefix* ]]; then
+ last_patch=${tag#$tag_prefix}
+ break;
+ fi
+done
+echo "Package version: ${package_version}X, name: $package_name"
+echo "Last published: $package_version$last_patch"
+
+if test "$last_patch" = "NEVER"; then
+ new_package_version=${package_version}0
+else
+ new_package_version=${package_version}$((last_patch+1))
+fi
+package_version=${package_version}$last_patch
+echo "New package version: $new_package_version"
+
+pjsapi_ver=^$(cat $DIR/../package.json | jq -r '.dependencies."@polkadot/api"' | sed -e "s/^\^//")
+tsnode_ver=^$(cat $DIR/../package.json | jq -r '.devDependencies."ts-node"' | sed -e "s/^\^//")
+ts_ver=^$(cat $DIR/../package.json | jq -r '.devDependencies."typescript"' | sed -e "s/^\^//")
+
+gen=$(mktemp -d)
+pushd $gen
+git clone $GIT_REPO -b $repo_branch --depth 1 .
+if test "$last_patch" != "NEVER"; then
+ git reset --hard $repo_tag-v$package_version
+fi
+git rm -r "*"
+popd
+
+# Using old package_version here, becaue we first check if
+# there is any difference between generated and already uplaoded types
+cat $TEMPLATE/package.json \
+| jq '.private = false' - \
+| jq '.name = "'$package_name'"' - \
+| jq '.version = "'$package_version'"' - \
+| jq '.peerDependencies."@polkadot/api" = "'$pjsapi_ver'"' - \
+| jq '.peerDependencies."@polkadot/types" = "'$pjsapi_ver'"' - \
+| jq '.devDependencies."@polkadot/api" = "'$pjsapi_ver'"' - \
+| jq '.devDependencies."@polkadot/types" = "'$pjsapi_ver'"' - \
+| jq '.devDependencies."ts-node" = "'$tsnode_ver'"' - \
+| jq '.devDependencies."typescript" = "'$ts_ver'"' - \
+> $gen/package.json
+for file in .gitignore .npmignore README.md tsconfig.json; do
+ cp $TEMPLATE/$file $gen/
+done
+package_name_replacement=$(printf '%s\n' "$package_name" | sed -e 's/[\/&]/\\&/g')
+sed -i 's/PKGNAME/'$package_name_replacement'/' $gen/README.md
+
+rsync -ar --exclude .gitignore src/interfaces/ $gen
+for file in $gen/augment-* $gen/**/types.ts $gen/registry.ts; do
+ sed -i '1s;^;//@ts-nocheck\n;' $file
+done
+
+pushd $gen
+git add .
+popd
+
+pushd $gen
+if git diff --quiet HEAD && test ! "$force"; then
+ echo "no changes detected"
+ exit 0
+fi
+popd
+
+mv $gen/package.json $gen/package.old.json
+cat $gen/package.old.json \
+| jq '.version = "'$new_package_version'"' - \
+> $gen/package.json
+rm $gen/package.old.json
+pushd $gen
+git add package.json
+popd
+
+echo "package.json contents:"
+cat $gen/package.json
+echo "overall diff:"
+pushd $gen
+git status
+git diff HEAD || true
+popd
+
+# This check is only active if running in interactive terminal
+if [ -t 0 ]; then
+ read -p "Is everything ok at $gen [y/n]? " -n 1 -r
+ echo
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
+ echo "Aborting!"
+ exit 1
+ fi
+fi
+
+pushd $gen
+yarn
+yarn prepublish
+git commit -m "chore: upgrade types to v$new_package_version"
+git tag --force $repo_tag-v$new_package_version
+if test "$push" = 1; then
+ git push --tags --force -u origin HEAD
+else
+ echo "--push not given, origin repo left intact"
+ echo "To publish manually, go to $gen, and run \"git push --tags --force -u origin HEAD\""
+fi
+popd
tests/scripts/types_template/.gitignorediffbeforeafterboth--- /dev/null
+++ b/tests/scripts/types_template/.gitignore
@@ -0,0 +1,5 @@
+*.js
+*.map
+*.d.ts
+/node_modules
+metadata.json
tests/scripts/types_template/.npmignorediffbeforeafterboth--- /dev/null
+++ b/tests/scripts/types_template/.npmignore
@@ -0,0 +1 @@
+/src
tests/scripts/types_template/README.mddiffbeforeafterboth--- /dev/null
+++ b/tests/scripts/types_template/README.md
@@ -0,0 +1,31 @@
+# PKGNAME
+
+Unique network api types
+
+Do not edit by hand, those types are generated automatically, and definitions are located in chain repo
+
+## Using types
+
+Install library:
+
+```bash
+yarn add --dev PKGNAME
+```
+
+Replace polkadot.js types with our chain types adding corresponding path override to the tsconfig `compilerOptions.paths` section:
+
+```json
+// in tsconfig.json
+{
+ "compilerOptions": {
+ "paths": {
+ "@polkadot/types/lookup": ["node_modules/PKGNAME/types-lookup"]
+ }
+ }
+}
+```
+
+Since polkadot v7 api augmentations not loaded by default, in every file, where you need to access `api.tx`, `api.query`, `api.rpc`, etc; you should explicitly import corresponding augmentation before any other `polkadot.js` related import:
+```
+import 'PKGNAME/augment-api';
+```
tests/scripts/types_template/package.jsondiffbeforeafterboth--- /dev/null
+++ b/tests/scripts/types_template/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "TODO",
+ "private": true,
+ "version": "TODO",
+ "main": "index.js",
+ "repository": "git@github.com:UniqueNetwork/unique-types-js.git",
+ "homepage": "https://unique.network/",
+ "license": "MIT",
+ "scripts": {
+ "prepublish": "tsc -d"
+ },
+ "peerDependencies": {
+ "@polkadot/api": "TODO",
+ "@polkadot/types": "TODO"
+ },
+ "devDependencies": {
+ "@polkadot/api": "TODO",
+ "@polkadot/types": "TODO",
+ "ts-node": "TODO",
+ "typescript": "TODO"
+ }
+}
tests/scripts/types_template/tsconfig.jsondiffbeforeafterboth--- /dev/null
+++ b/tests/scripts/types_template/tsconfig.json
@@ -0,0 +1,28 @@
+{
+ "exclude": [
+ "node_modules",
+ "node_modules/**/*",
+ "../node_modules/**/*",
+ "**/node_modules/**/*"
+ ],
+ "compilerOptions": {
+ "target": "ES2020",
+ "moduleResolution": "node",
+ "esModuleInterop": true,
+ "resolveJsonModule": true,
+ "module": "commonjs",
+ "sourceMap": true,
+ "outDir": ".",
+ "rootDir": ".",
+ "strict": true,
+ "paths": {
+ },
+ "skipLibCheck": true,
+ },
+ "include": [
+ "**/*",
+ ],
+ "lib": [
+ "es2017"
+ ],
+}
tests/scripts/wait_for_first_block.shdiffbeforeafterboth--- a/tests/scripts/wait_for_first_block.sh
+++ b/tests/scripts/wait_for_first_block.sh
@@ -1,15 +1,11 @@
#!/usr/bin/env bash
-function do_rpc {
- curl -s --header "Content-Type: application/json" -XPOST --data "{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"$1\",\"params\":[$2]}" $RPC_URL
-}
+DIR=$(dirname "$0")
+
+. $DIR/functions.sh
function is_started {
- block_hash_rpc=$(do_rpc chain_getFinalizedHead)
- echo Rpc response = $block_hash_rpc
- block_hash=$(echo $block_hash_rpc | jq -r .result)
- echo Head = $block_hash
- block_id_hex=$(do_rpc chain_getHeader "\"$block_hash\"" | jq -r .result.number)
+ block_id_hex=$(do_rpc chain_getHeader | jq -r .result.number)
block_id=$((${block_id_hex}))
echo Id = $block_id
if (( $block_id > 1 )); then
tests/src/apiConsts.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/apiConsts.test.ts
@@ -0,0 +1,120 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+import {ApiPromise} from '@polkadot/api';
+import {ApiBase} from '@polkadot/api/base';
+import {usingPlaygrounds, itSub, expect} from './util';
+
+
+const MAX_COLLECTION_DESCRIPTION_LENGTH = 256n;
+const MAX_COLLECTION_NAME_LENGTH = 64n;
+const COLLECTION_ADMINS_LIMIT = 5n;
+const MAX_COLLECTION_PROPERTIES_SIZE = 40960n;
+const MAX_TOKEN_PREFIX_LENGTH = 16n;
+const MAX_PROPERTY_KEY_LENGTH = 256n;
+const MAX_PROPERTY_VALUE_LENGTH = 32768n;
+const MAX_PROPERTIES_PER_ITEM = 64n;
+const MAX_TOKEN_PROPERTIES_SIZE = 32768n;
+const NESTING_BUDGET = 5n;
+
+const DEFAULT_COLLETCTION_LIMIT = {
+ accountTokenOwnershipLimit: '1,000,000',
+ sponsoredDataSize: '2,048',
+ sponsoredDataRateLimit: 'SponsoringDisabled',
+ tokenLimit: '4,294,967,295',
+ sponsorTransferTimeout: '5',
+ sponsorApproveTimeout: '5',
+ ownerCanTransfer: false,
+ ownerCanDestroy: true,
+ transfersEnabled: true,
+};
+
+const EVM_COLLECTION_HELPERS_ADDRESS = '0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f';
+const HELPERS_CONTRACT_ADDRESS = '0x842899ECF380553E8a4de75bF534cdf6fBF64049';
+
+describe('integration test: API UNIQUE consts', () => {
+ let api: ApiPromise;
+
+ before(async () => {
+ await usingPlaygrounds(async (helper) => {
+ api = await helper.getApi();
+ });
+ });
+
+ itSub('DEFAULT_NFT_COLLECTION_LIMITS', () => {
+ expect(api.consts.unique.nftDefaultCollectionLimits.toHuman()).to.deep.equal(DEFAULT_COLLETCTION_LIMIT);
+ });
+
+ itSub('DEFAULT_RFT_COLLECTION_LIMITS', () => {
+ expect(api.consts.unique.rftDefaultCollectionLimits.toHuman()).to.deep.equal(DEFAULT_COLLETCTION_LIMIT);
+ });
+
+ itSub('DEFAULT_FT_COLLECTION_LIMITS', () => {
+ expect(api.consts.unique.ftDefaultCollectionLimits.toHuman()).to.deep.equal(DEFAULT_COLLETCTION_LIMIT);
+ });
+
+ itSub('MAX_COLLECTION_NAME_LENGTH', () => {
+ checkConst(api.consts.unique.maxCollectionNameLength, MAX_COLLECTION_NAME_LENGTH);
+ });
+
+ itSub('MAX_COLLECTION_DESCRIPTION_LENGTH', () => {
+ checkConst(api.consts.unique.maxCollectionDescriptionLength, MAX_COLLECTION_DESCRIPTION_LENGTH);
+ });
+
+ itSub('MAX_COLLECTION_PROPERTIES_SIZE', () => {
+ checkConst(api.consts.unique.maxCollectionPropertiesSize, MAX_COLLECTION_PROPERTIES_SIZE);
+ });
+
+ itSub('MAX_TOKEN_PREFIX_LENGTH', () => {
+ checkConst(api.consts.unique.maxTokenPrefixLength, MAX_TOKEN_PREFIX_LENGTH);
+ });
+
+ itSub('MAX_PROPERTY_KEY_LENGTH', () => {
+ checkConst(api.consts.unique.maxPropertyKeyLength, MAX_PROPERTY_KEY_LENGTH);
+ });
+
+ itSub('MAX_PROPERTY_VALUE_LENGTH', () => {
+ checkConst(api.consts.unique.maxPropertyValueLength, MAX_PROPERTY_VALUE_LENGTH);
+ });
+
+ itSub('MAX_PROPERTIES_PER_ITEM', () => {
+ checkConst(api.consts.unique.maxPropertiesPerItem, MAX_PROPERTIES_PER_ITEM);
+ });
+
+ itSub('NESTING_BUDGET', () => {
+ checkConst(api.consts.unique.nestingBudget, NESTING_BUDGET);
+ });
+
+ itSub('MAX_TOKEN_PROPERTIES_SIZE', () => {
+ checkConst(api.consts.unique.maxTokenPropertiesSize, MAX_TOKEN_PROPERTIES_SIZE);
+ });
+
+ itSub('COLLECTION_ADMINS_LIMIT', () => {
+ checkConst(api.consts.unique.collectionAdminsLimit, COLLECTION_ADMINS_LIMIT);
+ });
+
+ itSub('HELPERS_CONTRACT_ADDRESS', () => {
+ expect(api.consts.evmContractHelpers.contractAddress.toString().toLowerCase()).to.be.equal(HELPERS_CONTRACT_ADDRESS.toLowerCase());
+ });
+
+ itSub('EVM_COLLECTION_HELPERS_ADDRESS', () => {
+ expect(api.consts.common.contractAddress.toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS.toLowerCase());
+ });
+});
+
+function checkConst<T>(constValue: any, expectedValue: T) {
+ expect(constValue.toBigInt()).equal(expectedValue);
+}
\ No newline at end of file
tests/src/burnItem.test.tsdiffbeforeafterboth--- a/tests/src/burnItem.test.ts
+++ b/tests/src/burnItem.test.ts
@@ -140,6 +140,31 @@
await expect(token.burn(bob)).to.be.rejectedWith('common.NoPermission');
});
+ itSub.ifWithPallets('RFT: cannot burn non-owned token pieces', [Pallets.ReFungible], async ({helper}) => {
+ const collection = await helper.rft.mintCollection(alice);
+ const aliceToken = await collection.mintToken(alice, 10n, {Substrate: alice.address});
+ const bobToken = await collection.mintToken(alice, 10n, {Substrate: bob.address});
+
+ // 1. Cannot burn non-owned token:
+ await expect(bobToken.burn(alice, 0n)).to.be.rejectedWith('common.TokenValueTooLow');
+ await expect(bobToken.burn(alice, 5n)).to.be.rejectedWith('common.TokenValueTooLow');
+ // 2. Cannot burn non-existing token:
+ await expect(helper.rft.burnToken(alice, 99999, 10)).to.be.rejectedWith('common.CollectionNotFound');
+ await expect(helper.rft.burnToken(alice, collection.collectionId, 99999)).to.be.rejectedWith('common.TokenValueTooLow');
+ // 3. Can burn zero amount of owned tokens (EIP-20)
+ await aliceToken.burn(alice, 0n);
+
+ // 4. Storage is not corrupted:
+ expect(await aliceToken.getTop10Owners()).to.deep.eq([{Substrate: alice.address}]);
+ expect(await bobToken.getTop10Owners()).to.deep.eq([{Substrate: bob.address}]);
+
+ // 4.1 Tokens can be transfered:
+ await aliceToken.transfer(alice, {Substrate: bob.address}, 10n);
+ await bobToken.transfer(bob, {Substrate: alice.address}, 10n);
+ expect(await aliceToken.getTop10Owners()).to.deep.eq([{Substrate: bob.address}]);
+ expect(await bobToken.getTop10Owners()).to.deep.eq([{Substrate: alice.address}]);
+ });
+
itSub('Transfer a burned token', async ({helper}) => {
const collection = await helper.nft.mintCollection(alice);
const token = await collection.mintToken(alice);
@@ -155,4 +180,48 @@
await expect(collection.burnTokens(alice, 11n)).to.be.rejectedWith('common.TokenValueTooLow');
expect(await collection.getBalance({Substrate: alice.address})).to.eq(10n);
});
+
+ itSub('Zero burn NFT', async ({helper}) => {
+ const collection = await helper.nft.mintCollection(alice, {name: 'Coll', description: 'Desc', tokenPrefix: 'T'});
+ const tokenAlice = await collection.mintToken(alice, {Substrate: alice.address});
+ const tokenBob = await collection.mintToken(alice, {Substrate: bob.address});
+
+ // 1. Zero burn of own tokens allowed:
+ await helper.executeExtrinsic(alice, 'api.tx.unique.burnItem', [collection.collectionId, tokenAlice.tokenId, 0]);
+ // 2. Zero burn of non-owned tokens not allowed:
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.burnItem', [collection.collectionId, tokenBob.tokenId, 0])).to.be.rejectedWith('common.NoPermission');
+ // 3. Zero burn of non-existing tokens not allowed:
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.burnItem', [collection.collectionId, 9999, 0])).to.be.rejectedWith('common.TokenNotFound');
+ expect(await tokenAlice.doesExist()).to.be.true;
+ expect(await tokenAlice.getOwner()).to.deep.eq({Substrate: alice.address});
+ expect(await tokenBob.getOwner()).to.deep.eq({Substrate: bob.address});
+ // 4. Storage is not corrupted:
+ await tokenAlice.transfer(alice, {Substrate: bob.address});
+ await tokenBob.transfer(bob, {Substrate: alice.address});
+ expect(await tokenAlice.getOwner()).to.deep.eq({Substrate: bob.address});
+ expect(await tokenBob.getOwner()).to.deep.eq({Substrate: alice.address});
+ });
+
+ itSub('zero burnFrom NFT', async ({helper}) => {
+ const collection = await helper.nft.mintCollection(alice, {name: 'Zero', description: 'Zero transfer', tokenPrefix: 'TF'});
+ const notApprovedNft = await collection.mintToken(alice, {Substrate: bob.address});
+ const approvedNft = await collection.mintToken(alice, {Substrate: bob.address});
+ await approvedNft.approve(bob, {Substrate: alice.address});
+
+ // 1. Zero burnFrom of non-existing tokens not allowed:
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.burnFrom', [collection.collectionId, {Substrate: bob.address}, 9999, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');
+ // 2. Zero burnFrom of not approved tokens not allowed:
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.burnFrom', [collection.collectionId, {Substrate: bob.address}, notApprovedNft.tokenId, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');
+ // 3. Zero burnFrom of approved tokens allowed:
+ await helper.executeExtrinsic(alice, 'api.tx.unique.burnFrom', [collection.collectionId, {Substrate: bob.address}, approvedNft.tokenId, 0]);
+
+ // 4.1 approvedNft still approved:
+ expect(await approvedNft.isApproved({Substrate: alice.address})).to.be.true;
+ // 4.2 bob is still the owner:
+ expect(await approvedNft.getOwner()).to.deep.eq({Substrate: bob.address});
+ expect(await notApprovedNft.getOwner()).to.deep.eq({Substrate: bob.address});
+ // 4.3 Alice can burn approved nft:
+ await approvedNft.burnFrom(alice, {Substrate: bob.address});
+ expect(await approvedNft.doesExist()).to.be.false;
+ });
});
tests/src/eth/abi/collectionHelpers.jsondiffbeforeafterboth--- a/tests/src/eth/abi/collectionHelpers.json
+++ b/tests/src/eth/abi/collectionHelpers.json
@@ -32,6 +32,15 @@
"type": "event"
},
{
+ "inputs": [
+ { "internalType": "uint32", "name": "collectionId", "type": "uint32" }
+ ],
+ "name": "collectionAddress",
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
"inputs": [],
"name": "collectionCreationFee",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
@@ -40,6 +49,19 @@
},
{
"inputs": [
+ {
+ "internalType": "address",
+ "name": "collectionAddress",
+ "type": "address"
+ }
+ ],
+ "name": "collectionId",
+ "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
{ "internalType": "string", "name": "name", "type": "string" },
{ "internalType": "uint8", "name": "decimals", "type": "uint8" },
{ "internalType": "string", "name": "description", "type": "string" },
tests/src/eth/abi/fungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/fungible.json
+++ b/tests/src/eth/abi/fungible.json
@@ -95,9 +95,17 @@
},
{
"inputs": [
- { "internalType": "address", "name": "user", "type": "address" }
+ {
+ "components": [
+ { "internalType": "address", "name": "eth", "type": "address" },
+ { "internalType": "uint256", "name": "sub", "type": "uint256" }
+ ],
+ "internalType": "struct EthCrossAccount",
+ "name": "user",
+ "type": "tuple"
+ }
],
- "name": "allowed",
+ "name": "allowlistedCross",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
@@ -193,6 +201,13 @@
},
{
"inputs": [],
+ "name": "collectionHelperAddress",
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "collectionOwner",
"outputs": [
{
tests/src/eth/abi/nonFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -116,9 +116,17 @@
},
{
"inputs": [
- { "internalType": "address", "name": "user", "type": "address" }
+ {
+ "components": [
+ { "internalType": "address", "name": "eth", "type": "address" },
+ { "internalType": "uint256", "name": "sub", "type": "uint256" }
+ ],
+ "internalType": "struct EthCrossAccount",
+ "name": "user",
+ "type": "tuple"
+ }
],
- "name": "allowed",
+ "name": "allowlistedCross",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
@@ -223,6 +231,13 @@
},
{
"inputs": [],
+ "name": "collectionHelperAddress",
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "collectionOwner",
"outputs": [
{
@@ -440,6 +455,26 @@
{
"inputs": [
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" },
+ { "internalType": "string[]", "name": "keys", "type": "string[]" }
+ ],
+ "name": "properties",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "string", "name": "key", "type": "string" },
+ { "internalType": "bytes", "name": "value", "type": "bytes" }
+ ],
+ "internalType": "struct Property[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
{ "internalType": "string", "name": "key", "type": "string" }
],
"name": "property",
@@ -662,26 +697,6 @@
],
"name": "tokenOfOwnerByIndex",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
- { "internalType": "string[]", "name": "keys", "type": "string[]" }
- ],
- "name": "tokenProperties",
- "outputs": [
- {
- "components": [
- { "internalType": "string", "name": "key", "type": "string" },
- { "internalType": "bytes", "name": "value", "type": "bytes" }
- ],
- "internalType": "struct Property[]",
- "name": "",
- "type": "tuple[]"
- }
- ],
"stateMutability": "view",
"type": "function"
},
tests/src/eth/abi/reFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/reFungible.json
+++ b/tests/src/eth/abi/reFungible.json
@@ -116,9 +116,17 @@
},
{
"inputs": [
- { "internalType": "address", "name": "user", "type": "address" }
+ {
+ "components": [
+ { "internalType": "address", "name": "eth", "type": "address" },
+ { "internalType": "uint256", "name": "sub", "type": "uint256" }
+ ],
+ "internalType": "struct EthCrossAccount",
+ "name": "user",
+ "type": "tuple"
+ }
],
- "name": "allowed",
+ "name": "allowlistedCross",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
@@ -205,6 +213,13 @@
},
{
"inputs": [],
+ "name": "collectionHelperAddress",
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "collectionOwner",
"outputs": [
{
@@ -422,6 +437,26 @@
{
"inputs": [
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" },
+ { "internalType": "string[]", "name": "keys", "type": "string[]" }
+ ],
+ "name": "properties",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "string", "name": "key", "type": "string" },
+ { "internalType": "bytes", "name": "value", "type": "bytes" }
+ ],
+ "internalType": "struct Property[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
{ "internalType": "string", "name": "key", "type": "string" }
],
"name": "property",
@@ -653,26 +688,6 @@
],
"name": "tokenOfOwnerByIndex",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
- { "internalType": "string[]", "name": "keys", "type": "string[]" }
- ],
- "name": "tokenProperties",
- "outputs": [
- {
- "components": [
- { "internalType": "string", "name": "key", "type": "string" },
- { "internalType": "bytes", "name": "value", "type": "bytes" }
- ],
- "internalType": "struct Property[]",
- "name": "",
- "type": "tuple[]"
- }
- ],
"stateMutability": "view",
"type": "function"
},
tests/src/eth/allowlist.test.tsdiffbeforeafterboth--- a/tests/src/eth/allowlist.test.ts
+++ b/tests/src/eth/allowlist.test.ts
@@ -78,32 +78,61 @@
itEth('Collection allowlist can be added and removed by [eth] address', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
const user = helper.eth.createAccount();
-
+ const crossUser = helper.ethCrossAccount.fromAddress(user);
+
const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);
- expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.false;
+ expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.false;
await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
- expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.true;
+ expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.true;
await collectionEvm.methods.removeFromCollectionAllowList(user).send({from: owner});
- expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.false;
+ expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.false;
});
itEth('Collection allowlist can be added and removed by [cross] address', async ({helper}) => {
- const owner = await helper.eth.createAccountWithBalance(donor);
- const user = donor;
+ const owner = (await helper.eth.createAccountWithBalance(donor)).toLowerCase();
+ const [userSub] = await helper.arrange.createAccounts([10n], donor);
+ const userEth = await helper.eth.createAccountWithBalance(donor);
const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
- const userCross = helper.ethCrossAccount.fromKeyringPair(user);
+ const userCrossSub = helper.ethCrossAccount.fromKeyringPair(userSub);
+ const userCrossEth = helper.ethCrossAccount.fromAddress(userEth);
+ const ownerCrossEth = helper.ethCrossAccount.fromAddress(owner);
+
+ // Can addToCollectionAllowListCross:
+ expect(await helper.collection.allowed(collectionId, {Substrate: userSub.address})).to.be.false;
+ await collectionEvm.methods.addToCollectionAllowListCross(userCrossSub).send({from: owner});
+ await collectionEvm.methods.addToCollectionAllowListCross(userCrossEth).send({from: owner});
+ await collectionEvm.methods.addToCollectionAllowListCross(ownerCrossEth).send({from: owner});
+ expect(await helper.collection.allowed(collectionId, {Substrate: userSub.address})).to.be.true;
+ expect(await helper.collection.allowed(collectionId, {Ethereum: userEth})).to.be.true;
+ expect(await collectionEvm.methods.allowlistedCross(userCrossSub).call({from: owner})).to.be.true;
+ expect(await collectionEvm.methods.allowlistedCross(userCrossEth).call({from: owner})).to.be.true;
+
+ await collectionEvm.methods.mint(userEth).send(); // token #1
+ await collectionEvm.methods.mint(userEth).send(); // token #2
+ await collectionEvm.methods.setCollectionAccess(1).send();
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
- await collectionEvm.methods.addToCollectionAllowListCross(userCross).send({from: owner});
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
+ // allowlisted account can transfer and transferCross:
+ await collectionEvm.methods.transfer(owner, 1).send({from: userEth});
+ await collectionEvm.methods.transferCross(userCrossSub, 2).send({from: userEth});
+ expect(await helper.nft.getTokenOwner(collectionId, 1)).to.deep.eq({Ethereum: owner});
+ expect(await helper.nft.getTokenOwner(collectionId, 2)).to.deep.eq({Substrate: userSub.address});
- await collectionEvm.methods.removeFromCollectionAllowListCross(userCross).send({from: owner});
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+ // can removeFromCollectionAllowListCross:
+ await collectionEvm.methods.removeFromCollectionAllowListCross(userCrossSub).send({from: owner});
+ await collectionEvm.methods.removeFromCollectionAllowListCross(userCrossEth).send({from: owner});
+ expect(await helper.collection.allowed(collectionId, {Substrate: userSub.address})).to.be.false;
+ expect(await helper.collection.allowed(collectionId, {Ethereum: userEth})).to.be.false;
+ expect(await collectionEvm.methods.allowlistedCross(userCrossSub).call({from: owner})).to.be.false;
+ expect(await collectionEvm.methods.allowlistedCross(userCrossEth).call({from: owner})).to.be.false;
+
+ // cannot transfer anymore
+ await collectionEvm.methods.mint(userEth).send();
+ await expect(collectionEvm.methods.transfer(owner, 2).send({from: userEth})).to.be.rejectedWith(/Transaction has been reverted/);
});
// Soft-deprecated
@@ -111,17 +140,18 @@
const owner = await helper.eth.createAccountWithBalance(donor);
const notOwner = await helper.eth.createAccountWithBalance(donor);
const user = helper.eth.createAccount();
+ const crossUser = helper.ethCrossAccount.fromAddress(user);
const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);
- expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.false;
+ expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.false;
await expect(collectionEvm.methods.addToCollectionAllowList(user).call({from: notOwner})).to.be.rejectedWith('NoPermission');
- expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.false;
+ expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.false;
await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
- expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.true;
+ expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.true;
await expect(collectionEvm.methods.removeFromCollectionAllowList(user).call({from: notOwner})).to.be.rejectedWith('NoPermission');
- expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.true;
+ expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.true;
});
itEth('Collection allowlist can not be add and remove [cross] address by not owner', async ({helper}) => {
tests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth--- a/tests/src/eth/api/CollectionHelpers.sol
+++ b/tests/src/eth/api/CollectionHelpers.sol
@@ -19,7 +19,7 @@
}
/// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0x7dea03b1
+/// @dev the ERC-165 identifier for this interface is 0xe65011aa
interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
/// Create an NFT collection
/// @param name Name of the collection
@@ -78,4 +78,18 @@
/// @dev EVM selector for this function is: 0xd23a7ab1,
/// or in textual repr: collectionCreationFee()
function collectionCreationFee() external view returns (uint256);
+
+ /// Returns address of a collection.
+ /// @param collectionId - CollectionId of the collection
+ /// @return eth mirror address of the collection
+ /// @dev EVM selector for this function is: 0x2e716683,
+ /// or in textual repr: collectionAddress(uint32)
+ function collectionAddress(uint32 collectionId) external view returns (address);
+
+ /// Returns collectionId of a collection.
+ /// @param collectionAddress - Eth address of the collection
+ /// @return collectionId of the collection
+ /// @dev EVM selector for this function is: 0xb5cb7498,
+ /// or in textual repr: collectionId(address)
+ function collectionId(address collectionAddress) external view returns (uint32);
}
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -13,7 +13,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x8b91d192
+/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
interface Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -177,9 +177,9 @@
/// Checks that user allowed to operate with collection.
///
/// @param user User address to check.
- /// @dev EVM selector for this function is: 0xd63a8e11,
- /// or in textual repr: allowed(address)
- function allowed(address user) external view returns (bool);
+ /// @dev EVM selector for this function is: 0x91b6df49,
+ /// or in textual repr: allowlistedCross((address,uint256))
+ function allowlistedCross(EthCrossAccount memory user) external view returns (bool);
// /// Add the user to the allowed list.
// ///
@@ -354,7 +354,7 @@
event Approval(address indexed owner, address indexed spender, uint256 value);
}
-/// @dev the ERC-165 identifier for this interface is 0x942e8b22
+/// @dev the ERC-165 identifier for this interface is 0x8cb847c4
interface ERC20 is Dummy, ERC165, ERC20Events {
/// @dev EVM selector for this function is: 0x06fdde03,
/// or in textual repr: name()
@@ -395,6 +395,11 @@
/// @dev EVM selector for this function is: 0xdd62ed3e,
/// or in textual repr: allowance(address,address)
function allowance(address owner, address spender) external view returns (uint256);
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() external view returns (address);
}
interface UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -80,7 +80,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x8b91d192
+/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
interface Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -244,9 +244,9 @@
/// Checks that user allowed to operate with collection.
///
/// @param user User address to check.
- /// @dev EVM selector for this function is: 0xd63a8e11,
- /// or in textual repr: allowed(address)
- function allowed(address user) external view returns (bool);
+ /// @dev EVM selector for this function is: 0x91b6df49,
+ /// or in textual repr: allowlistedCross((address,uint256))
+ function allowlistedCross(EthCrossAccount memory user) external view returns (bool);
// /// Add the user to the allowed list.
// ///
@@ -446,7 +446,7 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0xb8f094a0
+/// @dev the ERC-165 identifier for this interface is 0xb74c26b7
interface ERC721UniqueExtensions is Dummy, ERC165 {
/// @notice A descriptive name for a collection of NFTs in this contract
/// @dev EVM selector for this function is: 0x06fdde03,
@@ -475,9 +475,9 @@
/// @param tokenId Id for the token.
/// @param keys Properties keys. Empty keys for all propertyes.
/// @return Vector of properties key/value pairs.
- /// @dev EVM selector for this function is: 0xefc26c69,
- /// or in textual repr: tokenProperties(uint256,string[])
- function tokenProperties(uint256 tokenId, string[] memory keys) external view returns (Property[] memory);
+ /// @dev EVM selector for this function is: 0xe07ede7e,
+ /// or in textual repr: properties(uint256,string[])
+ function properties(uint256 tokenId, string[] memory keys) external view returns (Property[] memory);
/// @notice Set or reaffirm the approved address for an NFT
/// @dev The zero address indicates there is no approved address.
@@ -605,7 +605,7 @@
/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-/// @dev the ERC-165 identifier for this interface is 0x80ac58cd
+/// @dev the ERC-165 identifier for this interface is 0x983a942b
interface ERC721 is Dummy, ERC165, ERC721Events {
/// @notice Count all NFTs assigned to an owner
/// @dev NFTs assigned to the zero address are considered invalid, and this
@@ -685,6 +685,11 @@
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
function isApprovedForAll(address owner, address operator) external view returns (address);
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() external view returns (address);
}
interface UniqueNFT is
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -80,7 +80,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x8b91d192
+/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
interface Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -244,9 +244,9 @@
/// Checks that user allowed to operate with collection.
///
/// @param user User address to check.
- /// @dev EVM selector for this function is: 0xd63a8e11,
- /// or in textual repr: allowed(address)
- function allowed(address user) external view returns (bool);
+ /// @dev EVM selector for this function is: 0x91b6df49,
+ /// or in textual repr: allowlistedCross((address,uint256))
+ function allowlistedCross(EthCrossAccount memory user) external view returns (bool);
// /// Add the user to the allowed list.
// ///
@@ -444,7 +444,7 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x1d4b64d6
+/// @dev the ERC-165 identifier for this interface is 0x12f7d6c1
interface ERC721UniqueExtensions is Dummy, ERC165 {
/// @notice A descriptive name for a collection of NFTs in this contract
/// @dev EVM selector for this function is: 0x06fdde03,
@@ -473,9 +473,9 @@
/// @param tokenId Id for the token.
/// @param keys Properties keys. Empty keys for all propertyes.
/// @return Vector of properties key/value pairs.
- /// @dev EVM selector for this function is: 0xefc26c69,
- /// or in textual repr: tokenProperties(uint256,string[])
- function tokenProperties(uint256 tokenId, string[] memory keys) external view returns (Property[] memory);
+ /// @dev EVM selector for this function is: 0xe07ede7e,
+ /// or in textual repr: properties(uint256,string[])
+ function properties(uint256 tokenId, string[] memory keys) external view returns (Property[] memory);
/// @notice Transfer ownership of an RFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -604,7 +604,7 @@
/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-/// @dev the ERC-165 identifier for this interface is 0x58800161
+/// @dev the ERC-165 identifier for this interface is 0x4016cd87
interface ERC721 is Dummy, ERC165, ERC721Events {
/// @notice Count all RFTs assigned to an owner
/// @dev RFTs assigned to the zero address are considered invalid, and this
@@ -682,6 +682,11 @@
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
function isApprovedForAll(address owner, address operator) external view returns (address);
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() external view returns (address);
}
interface UniqueRefungible is
tests/src/eth/base.test.tsdiffbeforeafterboth--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -117,7 +117,7 @@
});
itEth('ERC721UniqueExtensions support', async ({helper}) => {
- await checkInterface(helper, '0xb8f094a0', true, true);
+ await checkInterface(helper, '0xb74c26b7', true, true);
});
itEth('ERC721Burnable - 0x42966c68 - support', async ({helper}) => {
tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionAdmin.test.ts
+++ b/tests/src/eth/collectionAdmin.test.ts
@@ -39,80 +39,98 @@
});
});
- // Soft-deprecated
- itEth('Add admin by owner', async ({helper}) => {
+ itEth('can add account admin by owner', async ({helper, privateKey}) => {
+ // arrange
const owner = await helper.eth.createAccountWithBalance(donor);
+ const adminSub = await privateKey('//admin2');
+ const adminEth = helper.eth.createAccount().toLowerCase();
+
+ const adminDeprecated = helper.eth.createAccount().toLowerCase();
+ const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub);
+ const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth);
+
const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);
- const newAdmin = helper.eth.createAccount();
+ // Soft-deprecated: can addCollectionAdmin
+ await collectionEvm.methods.addCollectionAdmin(adminDeprecated).send();
+ // Can addCollectionAdminCross for substrate and ethereum address
+ await collectionEvm.methods.addCollectionAdminCross(adminCrossSub).send();
+ await collectionEvm.methods.addCollectionAdminCross(adminCrossEth).send();
- await collectionEvm.methods.addCollectionAdmin(newAdmin).send();
- const adminList = await helper.callRpc('api.rpc.unique.adminlist', [collectionId]);
- expect(adminList[0].asEthereum.toString().toLocaleLowerCase())
- .to.be.eq(newAdmin.toLocaleLowerCase());
+ // 1. Expect api.rpc.unique.adminlist returns admins:
+ const adminListRpc = await helper.collection.getAdmins(collectionId);
+ expect(adminListRpc).to.has.length(3);
+ expect(adminListRpc).to.be.deep.contain.members([{Substrate: adminSub.address}, {Ethereum: adminEth}, {Ethereum: adminDeprecated}]);
+
+ // 2. Expect methods.collectionAdmins == api.rpc.unique.adminlist
+ let adminListEth = await collectionEvm.methods.collectionAdmins().call();
+ adminListEth = adminListEth.map((element: IEthCrossAccountId) => {
+ return helper.address.convertCrossAccountFromEthCrossAccount(element);
+ });
+ expect(adminListRpc).to.be.like(adminListEth);
});
- itEth('Add cross account admin by owner', async ({helper, privateKey}) => {
+ itEth('cross account admin can mint', async ({helper}) => {
+ // arrange: create collection and accounts
const owner = await helper.eth.createAccountWithBalance(donor);
-
- const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
- const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+ const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner, 'Mint collection', 'a', 'b', 'uri');
+ const adminEth = (await helper.eth.createAccountWithBalance(donor)).toLowerCase();
+ const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth);
+ const [adminSub] = await helper.arrange.createAccounts([100n], donor);
+ const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub);
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);
+
+ // cannot mint while not admin
+ await expect(collectionEvm.methods.mint(owner).send({from: adminEth})).to.be.rejected;
+ await expect(helper.nft.mintToken(adminSub, {collectionId, owner: {Ethereum: owner}})).to.be.rejectedWith(/common.PublicMintingNotAllowed/);
- const newAdmin = await privateKey('//Bob');
- const newAdminCross = helper.ethCrossAccount.fromKeyringPair(newAdmin);
- await collectionEvm.methods.addCollectionAdminCross(newAdminCross).send();
+ // admin (sub and eth) can mint token:
+ await collectionEvm.methods.addCollectionAdminCross(adminCrossEth).send();
+ await collectionEvm.methods.addCollectionAdminCross(adminCrossSub).send();
+ await collectionEvm.methods.mint(owner).send({from: adminEth});
+ await helper.nft.mintToken(adminSub, {collectionId, owner: {Ethereum: owner}});
- const adminList = await helper.collection.getAdmins(collectionId);
- expect(adminList).to.be.like([{Substrate: newAdmin.address}]);
+ expect(await helper.collection.getLastTokenId(collectionId)).to.eq(2);
});
- itEth('Check adminlist', async ({helper, privateKey}) => {
+ itEth('cannot add invalid cross account admin', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
-
- const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
- const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);
+ const [admin] = await helper.arrange.createAccounts([100n, 100n], donor);
- const admin1 = helper.eth.createAccount();
- const admin2 = await privateKey('admin');
- const admin2Cross = helper.ethCrossAccount.fromKeyringPair(admin2);
-
- // Soft-deprecated
- await collectionEvm.methods.addCollectionAdmin(admin1).send();
- await collectionEvm.methods.addCollectionAdminCross(admin2Cross).send();
+ const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
- const adminListRpc = await helper.collection.getAdmins(collectionId);
- let adminListEth = await collectionEvm.methods.collectionAdmins().call();
- adminListEth = adminListEth.map((element: IEthCrossAccountId) => {
- return helper.address.convertCrossAccountFromEthCrossAcoount(element);
- });
- expect(adminListRpc).to.be.like(adminListEth);
+ const adminCross = {
+ eth: helper.address.substrateToEth(admin.address),
+ sub: admin.addressRaw,
+ };
+ await expect(collectionEvm.methods.addCollectionAdminCross(adminCross).send()).to.be.rejected;
});
- // Soft-deprecated
- itEth('Verify owner or admin', async ({helper}) => {
+ itEth('can verify owner with methods.isOwnerOrAdmin[Cross]', async ({helper, privateKey}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
- const newAdmin = helper.eth.createAccount();
+ const adminDeprecated = helper.eth.createAccount();
+ const admin1Cross = helper.ethCrossAccount.fromKeyringPair(await privateKey('admin'));
+ const admin2Cross = helper.ethCrossAccount.fromAddress(helper.address.substrateToEth((await privateKey('admin3')).address));
const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);
- expect(await collectionEvm.methods.isOwnerOrAdmin(newAdmin).call()).to.be.false;
- await collectionEvm.methods.addCollectionAdmin(newAdmin).send();
- expect(await collectionEvm.methods.isOwnerOrAdmin(newAdmin).call()).to.be.true;
- });
+ // Soft-deprecated:
+ expect(await collectionEvm.methods.isOwnerOrAdmin(adminDeprecated).call()).to.be.false;
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(admin1Cross).call()).to.be.false;
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(admin2Cross).call()).to.be.false;
- itEth('Verify owner or admin cross', async ({helper, privateKey}) => {
- const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
+ await collectionEvm.methods.addCollectionAdmin(adminDeprecated).send();
+ await collectionEvm.methods.addCollectionAdminCross(admin1Cross).send();
+ await collectionEvm.methods.addCollectionAdminCross(admin2Cross).send();
- const newAdmin = await privateKey('admin');
- const newAdminCross = helper.ethCrossAccount.fromKeyringPair(newAdmin);
- const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
-
- expect(await collectionEvm.methods.isOwnerOrAdminCross(newAdminCross).call()).to.be.false;
- await collectionEvm.methods.addCollectionAdminCross(newAdminCross).send();
- expect(await collectionEvm.methods.isOwnerOrAdminCross(newAdminCross).call()).to.be.true;
+ // Soft-deprecated: isOwnerOrAdmin returns true
+ expect(await collectionEvm.methods.isOwnerOrAdmin(adminDeprecated).call()).to.be.true;
+ // Expect isOwnerOrAdminCross return true
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(admin1Cross).call()).to.be.true;
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(admin2Cross).call()).to.be.true;
});
// Soft-deprecated
@@ -154,12 +172,11 @@
const owner = await helper.eth.createAccountWithBalance(donor);
const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
- const [admin] = await helper.arrange.createAccounts([10n], donor);
+ const [admin, notAdmin] = await helper.arrange.createAccounts([10n, 10n], donor);
const adminCross = helper.ethCrossAccount.fromKeyringPair(admin);
const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
await collectionEvm.methods.addCollectionAdminCross(adminCross).send();
- const [notAdmin] = await helper.arrange.createAccounts([10n], donor);
const notAdminCross = helper.ethCrossAccount.fromKeyringPair(notAdmin);
await expect(collectionEvm.methods.addCollectionAdminCross(notAdminCross).call({from: adminCross.eth}))
.to.be.rejectedWith('NoPermission');
@@ -222,19 +239,29 @@
const owner = await helper.eth.createAccountWithBalance(donor);
const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
- const [newAdmin] = await helper.arrange.createAccounts([10n], donor);
- const newAdminCross = helper.ethCrossAccount.fromKeyringPair(newAdmin);
+ const [adminSub] = await helper.arrange.createAccounts([10n], donor);
+ const adminEth = (await helper.eth.createAccountWithBalance(donor)).toLowerCase();
+ const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub);
+ const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth);
+
const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
- await collectionEvm.methods.addCollectionAdminCross(newAdminCross).send();
+ await collectionEvm.methods.addCollectionAdminCross(adminCrossSub).send();
+ await collectionEvm.methods.addCollectionAdminCross(adminCrossEth).send();
+
{
- const adminList = await helper.callRpc('api.rpc.unique.adminlist', [collectionId]);
- expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())
- .to.be.eq(newAdmin.address.toLocaleLowerCase());
+ const adminList = await helper.collection.getAdmins(collectionId);
+ expect(adminList).to.deep.include({Substrate: adminSub.address});
+ expect(adminList).to.deep.include({Ethereum: adminEth});
}
- await collectionEvm.methods.removeCollectionAdminCross(newAdminCross).send();
- const adminList = await helper.callRpc('api.rpc.unique.adminlist', [collectionId]);
+ await collectionEvm.methods.removeCollectionAdminCross(adminCrossSub).send();
+ await collectionEvm.methods.removeCollectionAdminCross(adminCrossEth).send();
+ const adminList = await helper.collection.getAdmins(collectionId);
expect(adminList.length).to.be.eq(0);
+
+ // Non admin cannot mint:
+ await expect(helper.nft.mintToken(adminSub, {collectionId, owner: {Substrate: adminSub.address}})).to.be.rejectedWith(/common.PublicMintingNotAllowed/);
+ await expect(collectionEvm.methods.mint(adminEth).send({from: adminEth})).to.be.rejected;
});
// Soft-deprecated
@@ -378,16 +405,27 @@
itEth('Change owner [cross]', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const [newOwner] = await helper.arrange.createAccounts([10n], donor);
- const newOwnerCross = helper.ethCrossAccount.fromKeyringPair(newOwner);
- const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
- const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+ const ownerEth = await helper.eth.createAccountWithBalance(donor);
+ const ownerCrossEth = helper.ethCrossAccount.fromAddress(ownerEth);
+ const [ownerSub] = await helper.arrange.createAccounts([10n], donor);
+ const ownerCrossSub = helper.ethCrossAccount.fromKeyringPair(ownerSub);
- expect(await collectionEvm.methods.isOwnerOrAdminCross(newOwnerCross).call()).to.be.false;
+ const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
- await collectionEvm.methods.changeCollectionOwnerCross(newOwnerCross).send();
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(ownerCrossSub).call()).to.be.false;
- expect(await collectionEvm.methods.isOwnerOrAdminCross(newOwnerCross).call()).to.be.true;
+ // Can set ethereum owner:
+ await collectionEvm.methods.changeCollectionOwnerCross(ownerCrossEth).send({from: owner});
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(ownerCrossEth).call()).to.be.true;
+ expect(await helper.collection.getData(collectionId))
+ .to.have.property('normalizedOwner').that.is.eq(helper.address.ethToSubstrate(ownerEth));
+
+ // Can set Substrate owner:
+ await collectionEvm.methods.changeCollectionOwnerCross(ownerCrossSub).send({from: ownerEth});
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(ownerCrossSub).call()).to.be.true;
+ expect(await helper.collection.getData(collectionId))
+ .to.have.property('normalizedOwner').that.is.eq(helper.address.normalizeSubstrate(ownerSub.address));
});
itEth.skip('change owner call fee', async ({helper}) => {
tests/src/eth/collectionHelperAddress.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/collectionHelperAddress.test.ts
@@ -0,0 +1,72 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+import {itEth, usingEthPlaygrounds, expect} from './util';
+import {IKeyringPair} from '@polkadot/types/types';
+import {Pallets} from '../util';
+
+const EVM_COLLECTION_HELPERS_ADDRESS = '0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f';
+
+describe('[eth]CollectionHelperAddress test: ERC20/ERC721 ', () => {
+ let donor: IKeyringPair;
+
+ before(async function() {
+ await usingEthPlaygrounds(async (helper, privateKey) => {
+ donor = await privateKey({filename: __filename});
+ });
+ });
+
+ itEth('NFT', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const {collectionAddress: nftCollectionAddress} = await helper.eth.createNFTCollection(owner, 'Sponsor', 'absolutely anything', 'ROC');
+ const nftCollection = helper.ethNativeContract.collection(nftCollectionAddress, 'nft', owner);
+
+ expect((await nftCollection.methods.collectionHelperAddress().call())
+ .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS);
+ });
+
+ itEth.ifWithPallets('RFT ', [Pallets.ReFungible], async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const {collectionAddress: rftCollectionAddress} = await helper.eth.createRFTCollection(owner, 'Sponsor', 'absolutely anything', 'ROC');
+
+ const rftCollection = helper.ethNativeContract.collection(rftCollectionAddress, 'rft', owner);
+ expect((await rftCollection.methods.collectionHelperAddress().call())
+ .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS);
+ });
+
+ itEth('FT', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const {collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Sponsor', 18, 'absolutely anything', 'ROC');
+ const collection = helper.ethNativeContract.collection(collectionAddress, 'ft', owner);
+
+ expect((await collection.methods.collectionHelperAddress().call())
+ .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS);
+ });
+
+ itEth('[collectionHelpers] convert collectionId into address', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const collectionId = 7;
+ const collectionAddress = helper.ethAddress.fromCollectionId(collectionId);
+ const helperContract = helper.ethNativeContract.collectionHelpers(owner);
+
+ expect(await helperContract.methods.collectionAddress(collectionId).call()).to.be.equal(collectionAddress);
+ expect(parseInt(await helperContract.methods.collectionId(collectionAddress).call())).to.be.equal(collectionId);
+ });
+
+});
tests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -372,7 +372,7 @@
const originalFlipperBalance = await helper.balance.getEthereum(flipper.options.address);
expect(originalFlipperBalance).to.be.not.equal('0');
- await expect(flipper.methods.flip().send({from: caller})).to.be.rejectedWith(/InvalidTransaction::Payment/);
+ await expect(flipper.methods.flip().send({from: caller})).to.be.rejectedWith(/Returned error: insufficient funds for gas \* price \+ value/);
expect(await flipper.methods.getValue().call()).to.be.false;
// Balance should be taken from flipper instead of caller
tests/src/eth/createFTCollection.test.tsdiffbeforeafterboth--- a/tests/src/eth/createFTCollection.test.ts
+++ b/tests/src/eth/createFTCollection.test.ts
@@ -144,7 +144,7 @@
itEth('destroyCollection', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Exister', DECIMALS, 'absolutely anything', 'WIWT');
+ const {collectionAddress, collectionId} = await helper.eth.createFungibleCollection(owner, 'Exister', DECIMALS, 'absolutely anything', 'WIWT');
const collectionHelper = helper.ethNativeContract.collectionHelpers(owner);
const result = await collectionHelper.methods
@@ -166,6 +166,7 @@
expect(await collectionHelper.methods
.isCollectionExist(collectionAddress)
.call()).to.be.false;
+ expect(await helper.collection.getData(collectionId)).to.be.null;
});
});
@@ -214,12 +215,15 @@
}
});
- itEth('(!negative test!) Create collection (no funds)', async ({helper}) => {
+ itEth('(!negative test!) cannot create collection if value !== 2', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
const collectionHelper = helper.ethNativeContract.collectionHelpers(owner);
- await expect(collectionHelper.methods
- .createFTCollection('Peasantry', DECIMALS, 'absolutely anything', 'TWIW')
- .call({value: Number(1n * nominal)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)');
+ const expects = [0n, 1n, 30n].map(async value => {
+ await expect(collectionHelper.methods
+ .createFTCollection('Peasantry', DECIMALS, 'absolutely anything', 'TWIW')
+ .call({value: Number(value * nominal)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)');
+ });
+ await Promise.all(expects);
});
// Soft-deprecated
tests/src/eth/createNFTCollection.test.tsdiffbeforeafterboth--- a/tests/src/eth/createNFTCollection.test.ts
+++ b/tests/src/eth/createNFTCollection.test.ts
@@ -308,7 +308,7 @@
itEth('destroyCollection', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'Limits', 'absolutely anything', 'OLF');
+ const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'Limits', 'absolutely anything', 'OLF');
const collectionHelper = helper.ethNativeContract.collectionHelpers(owner);
@@ -331,5 +331,6 @@
expect(await collectionHelper.methods
.isCollectionExist(collectionAddress)
.call()).to.be.false;
+ expect(await helper.collection.getData(collectionId)).to.be.null;
});
});
\ No newline at end of file
tests/src/eth/createRFTCollection.test.tsdiffbeforeafterboth--- a/tests/src/eth/createRFTCollection.test.ts
+++ b/tests/src/eth/createRFTCollection.test.ts
@@ -340,7 +340,7 @@
itEth('destroyCollection', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createRFTCollection(owner, 'Limits', 'absolutely anything', 'OLF');
+ const {collectionAddress, collectionId} = await helper.eth.createRFTCollection(owner, 'Limits', 'absolutely anything', 'OLF');
const collectionHelper = helper.ethNativeContract.collectionHelpers(owner);
await expect(collectionHelper.methods
@@ -349,6 +349,7 @@
expect(await collectionHelper.methods
.isCollectionExist(collectionAddress)
- .call()).to.be.false;
+ .call()).to.be.false;
+ expect(await helper.collection.getData(collectionId)).to.be.null;
});
});
tests/src/eth/destroyCollection.test.tsdiffbeforeafterboth--- a/tests/src/eth/destroyCollection.test.ts
+++ b/tests/src/eth/destroyCollection.test.ts
@@ -15,62 +15,48 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import {IKeyringPair} from '@polkadot/types/types';
-import {Pallets, requirePalletsOrSkip} from '../util';
+import {Pallets} from '../util';
import {expect, itEth, usingEthPlaygrounds} from './util';
-
-describe('Destroy Collection from EVM', () => {
+describe('Destroy Collection from EVM', function() {
let donor: IKeyringPair;
+ const testCases = [
+ {method: 'createRFTCollection' as const, params: ['Limits', 'absolutely anything', 'OLF'], requiredPallets: [Pallets.ReFungible]},
+ {method: 'createNFTCollection' as const, params: ['Limits', 'absolutely anything', 'OLF'], requiredPallets: [Pallets.NFT]},
+ {method: 'createFTCollection' as const, params: ['Limits', 'absolutely anything', 'OLF', 18], requiredPallets: [Pallets.Fungible]},
+ ];
before(async function() {
- await usingEthPlaygrounds(async (helper, privateKey) => {
- requirePalletsOrSkip(this, helper, [Pallets.ReFungible, Pallets.NFT]);
+ await usingEthPlaygrounds(async (_, privateKey) => {
donor = await privateKey({filename: __filename});
});
});
-
- itEth('(!negative test!) RFT', async ({helper}) => {
- const owner = await helper.eth.createAccountWithBalance(donor);
- const signer = await helper.eth.createAccountWithBalance(donor);
-
- const unexistedCollection = helper.ethAddress.fromCollectionId(1000000);
-
- const {collectionAddress} = await helper.eth.createRFTCollection(owner, 'Limits', 'absolutely anything', 'OLF');
- const collectionHelper = helper.ethNativeContract.collectionHelpers(signer);
-
- await expect(collectionHelper.methods
- .destroyCollection(collectionAddress)
- .send({from: signer})).to.be.rejected;
-
- await expect(collectionHelper.methods
- .destroyCollection(unexistedCollection)
- .send({from: signer})).to.be.rejected;
-
- expect(await collectionHelper.methods
- .isCollectionExist(unexistedCollection)
- .call()).to.be.false;
- });
-
- itEth('(!negative test!) NFT', async ({helper}) => {
- const owner = await helper.eth.createAccountWithBalance(donor);
- const signer = await helper.eth.createAccountWithBalance(donor);
-
- const unexistedCollection = helper.ethAddress.fromCollectionId(1000000);
-
- const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'Limits', 'absolutely anything', 'OLF');
- const collectionHelper = helper.ethNativeContract.collectionHelpers(signer);
-
- await expect(collectionHelper.methods
- .destroyCollection(collectionAddress)
- .send({from: signer})).to.be.rejected;
-
- await expect(collectionHelper.methods
- .destroyCollection(unexistedCollection)
- .send({from: signer})).to.be.rejected;
-
- expect(await collectionHelper.methods
- .isCollectionExist(unexistedCollection)
- .call()).to.be.false;
- });
+ testCases.map((testCase) =>
+ itEth.ifWithPallets(`Cannot burn non-owned or non-existing collection ${testCase.method}`, testCase.requiredPallets, async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const signer = await helper.eth.createAccountWithBalance(donor);
+
+ const unexistedCollection = helper.ethAddress.fromCollectionId(1000000);
+
+ const collectionHelpers = helper.ethNativeContract.collectionHelpers(signer);
+ const {collectionAddress} = await helper.eth.createCollecion(testCase.method, owner, ...testCase.params as [string, string, string, number?]);
+
+ // cannot burn collec
+ await expect(collectionHelpers.methods
+ .destroyCollection(collectionAddress)
+ .send({from: signer})).to.be.rejected;
+
+ await expect(collectionHelpers.methods
+ .destroyCollection(unexistedCollection)
+ .send({from: signer})).to.be.rejected;
+
+ expect(await collectionHelpers.methods
+ .isCollectionExist(unexistedCollection)
+ .call()).to.be.false;
+
+ expect(await collectionHelpers.methods
+ .isCollectionExist(collectionAddress)
+ .call()).to.be.true;
+ }));
});
tests/src/eth/fungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/fungible.test.ts
+++ b/tests/src/eth/fungible.test.ts
@@ -232,57 +232,70 @@
});
itEth('Can perform transferCross()', async ({helper}) => {
- const owner = await helper.eth.createAccountWithBalance(donor);
- const receiver = await helper.eth.createAccountWithBalance(donor);
- const to = helper.ethCrossAccount.fromAddress(receiver);
- const toSubstrate = helper.ethCrossAccount.fromKeyringPair(donor);
+ const sender = await helper.eth.createAccountWithBalance(donor);
+ const receiverEth = await helper.eth.createAccountWithBalance(donor);
+ const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth);
+ const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(donor);
const collection = await helper.ft.mintCollection(alice);
- await collection.mint(alice, 200n, {Ethereum: owner});
+ await collection.mint(alice, 200n, {Ethereum: sender});
const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
- const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner);
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', sender);
{
- const result = await contract.methods.transferCross(to, 50).send({from: owner});
-
+ // Can transferCross to ethereum address:
+ const result = await collectionEvm.methods.transferCross(receiverCrossEth, 50).send({from: sender});
+ // Check events:
const event = result.events.Transfer;
expect(event.address).to.be.equal(collectionAddress);
- expect(event.returnValues.from).to.be.equal(owner);
- expect(event.returnValues.to).to.be.equal(receiver);
+ expect(event.returnValues.from).to.be.equal(sender);
+ expect(event.returnValues.to).to.be.equal(receiverEth);
expect(event.returnValues.value).to.be.equal('50');
- }
-
- {
- const balance = await contract.methods.balanceOf(owner).call();
- expect(+balance).to.equal(150);
- }
-
- {
- const balance = await contract.methods.balanceOf(receiver).call();
- expect(+balance).to.equal(50);
+ // Sender's balance decreased:
+ const ownerBalance = await collectionEvm.methods.balanceOf(sender).call();
+ expect(+ownerBalance).to.equal(150);
+ // Receiver's balance increased:
+ const receiverBalance = await collectionEvm.methods.balanceOf(receiverEth).call();
+ expect(+receiverBalance).to.equal(50);
}
{
- const result = await contract.methods.transferCross(toSubstrate, 50).send({from: owner});
-
+ // Can transferCross to substrate address:
+ const result = await collectionEvm.methods.transferCross(receiverCrossSub, 50).send({from: sender});
+ // Check events:
const event = result.events.Transfer;
expect(event.address).to.be.equal(collectionAddress);
- expect(event.returnValues.from).to.be.equal(owner);
+ expect(event.returnValues.from).to.be.equal(sender);
expect(event.returnValues.to).to.be.equal(helper.address.substrateToEth(donor.address));
expect(event.returnValues.value).to.be.equal('50');
- }
-
- {
- const balance = await collection.getBalance({Ethereum: owner});
- expect(balance).to.equal(100n);
- }
-
- {
+ // Sender's balance decreased:
+ const senderBalance = await collection.getBalance({Ethereum: sender});
+ expect(senderBalance).to.equal(100n);
+ // Receiver's balance increased:
const balance = await collection.getBalance({Substrate: donor.address});
expect(balance).to.equal(50n);
}
-
});
+
+ ['transfer', 'transferCross'].map(testCase => itEth(`Cannot ${testCase} incorrect amount`, async ({helper}) => {
+ const sender = await helper.eth.createAccountWithBalance(donor);
+ const receiverEth = await helper.eth.createAccountWithBalance(donor);
+ const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth);
+ const BALANCE = 200n;
+ const BALANCE_TO_TRANSFER = BALANCE + 100n;
+
+ const collection = await helper.ft.mintCollection(alice);
+ await collection.mint(alice, BALANCE, {Ethereum: sender});
+ const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', sender);
+
+ // 1. Cannot transfer more than have
+ const receiver = testCase === 'transfer' ? receiverEth : receiverCrossEth;
+ await expect(collectionEvm.methods[testCase](receiver, BALANCE_TO_TRANSFER).send({from: sender})).to.be.rejected;
+ // 2. Zero transfer allowed (EIP-20):
+ await collectionEvm.methods[testCase](receiver, 0n).send({from: sender});
+ }));
+
itEth('Can perform transfer()', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
@@ -314,7 +327,7 @@
}
});
- itEth('Can perform transferFromCross()', async ({helper, privateKey}) => {
+ itEth('Can perform transferFromCross()', async ({helper}) => {
const sender = await helper.eth.createAccountWithBalance(donor, 100n);
const collection = await helper.ft.mintCollection(owner, {name: 'A', description: 'B', tokenPrefix: 'C'}, 0);
@@ -508,7 +521,7 @@
expect(event.returnValues.value).to.be.equal('51');
});
- itEth('Events emitted for transferFromCross()', async ({helper, privateKey}) => {
+ itEth('Events emitted for transferFromCross()', async ({helper}) => {
const sender = await helper.eth.createAccountWithBalance(donor, 100n);
const collection = await helper.ft.mintCollection(owner, {name: 'A', description: 'B', tokenPrefix: 'C'}, 0);
tests/src/eth/nonFungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/nonFungible.test.ts
+++ b/tests/src/eth/nonFungible.test.ts
@@ -17,7 +17,6 @@
import {itEth, usingEthPlaygrounds, expect, EthUniqueHelper} from './util';
import {IKeyringPair} from '@polkadot/types/types';
import {Contract} from 'web3-eth-contract';
-import exp from 'constants';
describe('NFT: Information getting', () => {
@@ -252,58 +251,124 @@
itEth('Can perform burnFromCross()', async ({helper}) => {
const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});
+ const ownerSub = bob;
+ const ownerCrossSub = helper.ethCrossAccount.fromKeyringPair(ownerSub);
+ const ownerEth = await helper.eth.createAccountWithBalance(donor, 100n);
+ const ownerCrossEth = helper.ethCrossAccount.fromAddress(ownerEth);
- const owner = bob;
- const spender = await helper.eth.createAccountWithBalance(donor, 100n);
+ const burnerEth = await helper.eth.createAccountWithBalance(donor, 100n);
+ const burnerCrossEth = helper.ethCrossAccount.fromAddress(burnerEth);
- const token = await collection.mintToken(minter, {Substrate: owner.address});
+ const token1 = await collection.mintToken(minter, {Substrate: ownerSub.address});
+ const token2 = await collection.mintToken(minter, {Ethereum: ownerEth});
- const address = helper.ethAddress.fromCollectionId(collection.collectionId);
- const contract = helper.ethNativeContract.collection(address, 'nft');
+ const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft');
- {
- await token.approve(owner, {Ethereum: spender});
- const ownerCross = helper.ethCrossAccount.fromKeyringPair(owner);
- const result = await contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender});
- const events = result.events.Transfer;
+ // Approve tokens from substrate and ethereum:
+ await token1.approve(ownerSub, {Ethereum: burnerEth});
+ await collectionEvm.methods.approveCross(burnerCrossEth, token2.tokenId).send({from: ownerEth});
- expect(events).to.be.like({
- address,
+ // can burnFromCross:
+ const result1 = await collectionEvm.methods.burnFromCross(ownerCrossSub, token1.tokenId).send({from: burnerEth});
+ const result2 = await collectionEvm.methods.burnFromCross(ownerCrossEth, token2.tokenId).send({from: burnerEth});
+ const events1 = result1.events.Transfer;
+ const events2 = result2.events.Transfer;
+
+ // Check events for burnFromCross (substrate and ethereum):
+ [
+ [events1, token1, helper.address.substrateToEth(ownerSub.address)],
+ [events2, token2, ownerEth],
+ ].map(burnData => {
+ expect(burnData[0]).to.be.like({
+ address: collectionAddress,
event: 'Transfer',
returnValues: {
- from: helper.address.substrateToEth(owner.address),
+ from: burnData[2],
to: '0x0000000000000000000000000000000000000000',
- tokenId: token.tokenId.toString(),
+ tokenId: burnData[1].tokenId.toString(),
},
});
- }
+ });
+
+ expect(await token1.doesExist()).to.be.false;
+ expect(await token2.doesExist()).to.be.false;
});
itEth('Can perform approveCross()', async ({helper}) => {
+ // arrange: create accounts
+ const owner = await helper.eth.createAccountWithBalance(donor, 100n);
+ const ownerCross = helper.ethCrossAccount.fromAddress(owner);
+ const receiverSub = charlie;
+ const recieverCrossSub = helper.ethCrossAccount.fromKeyringPair(receiverSub);
+ const receiverEth = await helper.eth.createAccountWithBalance(donor, 100n);
+ const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth);
+
+ // arrange: create collection and tokens:
const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});
+ const token1 = await collection.mintToken(minter, {Ethereum: owner});
+ const token2 = await collection.mintToken(minter, {Ethereum: owner});
+
+ const collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft');
+
+ // Can approveCross substrate and ethereum address:
+ const resultSub = await collectionEvm.methods.approveCross(recieverCrossSub, token1.tokenId).send({from: owner});
+ const resultEth = await collectionEvm.methods.approveCross(receiverCrossEth, token2.tokenId).send({from: owner});
+ const eventSub = resultSub.events.Approval;
+ const eventEth = resultEth.events.Approval;
+ expect(eventSub).to.be.like({
+ address: helper.ethAddress.fromCollectionId(collection.collectionId),
+ event: 'Approval',
+ returnValues: {
+ owner,
+ approved: helper.address.substrateToEth(receiverSub.address),
+ tokenId: token1.tokenId.toString(),
+ },
+ });
+ expect(eventEth).to.be.like({
+ address: helper.ethAddress.fromCollectionId(collection.collectionId),
+ event: 'Approval',
+ returnValues: {
+ owner,
+ approved: receiverEth,
+ tokenId: token2.tokenId.toString(),
+ },
+ });
+
+ // Substrate address can transferFrom approved tokens:
+ await helper.nft.transferTokenFrom(receiverSub, collection.collectionId, token1.tokenId, {Ethereum: owner}, {Substrate: receiverSub.address});
+ expect(await helper.nft.getTokenOwner(collection.collectionId, token1.tokenId)).to.deep.eq({Substrate: receiverSub.address});
+ // Ethereum address can transferFromCross approved tokens:
+ await collectionEvm.methods.transferFromCross(ownerCross, receiverCrossEth, token2.tokenId).send({from: receiverEth});
+ expect(await helper.nft.getTokenOwner(collection.collectionId, token2.tokenId)).to.deep.eq({Ethereum: receiverEth.toLowerCase()});
+ });
+ itEth('Can reaffirm approved address', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor, 100n);
- const receiver = charlie;
+ const ownerCrossEth = helper.ethCrossAccount.fromAddress(owner);
+ const [receiver1, receiver2] = await helper.arrange.createAccounts([100n, 100n], donor);
+ const receiver1Cross = helper.ethCrossAccount.fromKeyringPair(receiver1);
+ const receiver2Cross = helper.ethCrossAccount.fromKeyringPair(receiver2);
+ const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});
+ const token1 = await collection.mintToken(minter, {Ethereum: owner});
+ const token2 = await collection.mintToken(minter, {Ethereum: owner});
+ const collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft');
- const token = await collection.mintToken(minter, {Ethereum: owner});
+ // Can approve and reaffirm approved address:
+ await collectionEvm.methods.approveCross(receiver1Cross, token1.tokenId).send({from: owner});
+ await collectionEvm.methods.approveCross(receiver2Cross, token1.tokenId).send({from: owner});
- const address = helper.ethAddress.fromCollectionId(collection.collectionId);
- const contract = helper.ethNativeContract.collection(address, 'nft');
+ // receiver1 cannot transferFrom:
+ await expect(helper.nft.transferTokenFrom(receiver1, collection.collectionId, token1.tokenId, {Ethereum: owner}, {Substrate: receiver1.address})).to.be.rejected;
+ // receiver2 can transferFrom:
+ await helper.nft.transferTokenFrom(receiver2, collection.collectionId, token1.tokenId, {Ethereum: owner}, {Substrate: receiver2.address});
- {
- const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver);
- const result = await contract.methods.approveCross(recieverCross, token.tokenId).send({from: owner});
- const event = result.events.Approval;
- expect(event).to.be.like({
- address: helper.ethAddress.fromCollectionId(collection.collectionId),
- event: 'Approval',
- returnValues: {
- owner,
- approved: helper.address.substrateToEth(receiver.address),
- tokenId: token.tokenId.toString(),
- },
- });
- }
+ // can set approved address to self address to remove approval:
+ await collectionEvm.methods.approveCross(receiver1Cross, token2.tokenId).send({from: owner});
+ await collectionEvm.methods.approveCross(ownerCrossEth, token2.tokenId).send({from: owner});
+
+ // receiver1 cannot transfer token anymore:
+ await expect(helper.nft.transferTokenFrom(receiver1, collection.collectionId, token2.tokenId, {Ethereum: owner}, {Substrate: receiver1.address})).to.be.rejected;
});
itEth('Can perform transferFrom()', async ({helper}) => {
@@ -340,13 +405,11 @@
}
});
- itEth('Can perform transferFromCross()', async ({helper, privateKey}) => {
- const minter = await privateKey('//Alice');
+ itEth('Can perform transferFromCross()', async ({helper}) => {
const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});
- const owner = await privateKey('//Bob');
+ const [owner, receiver] = await helper.arrange.createAccounts([100n, 100n], donor);
const spender = await helper.eth.createAccountWithBalance(donor);
- const receiver = await privateKey('//Charlie');
const token = await collection.mintToken(minter, {Substrate: owner.address});
@@ -408,56 +471,72 @@
itEth('Can perform transferCross()', async ({helper}) => {
const collection = await helper.nft.mintCollection(minter, {});
const owner = await helper.eth.createAccountWithBalance(donor);
- const receiver = await helper.eth.createAccountWithBalance(donor);
- const to = helper.ethCrossAccount.fromAddress(receiver);
- const toSubstrate = helper.ethCrossAccount.fromKeyringPair(minter);
+ const receiverEth = await helper.eth.createAccountWithBalance(donor);
+ const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth);
+ const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(minter);
const {tokenId} = await collection.mintToken(minter, {Ethereum: owner});
const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
- const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
{
- const result = await contract.methods.transferCross(to, tokenId).send({from: owner});
-
+ // Can transferCross to ethereum address:
+ const result = await collectionEvm.methods.transferCross(receiverCrossEth, tokenId).send({from: owner});
+ // Check events:
const event = result.events.Transfer;
expect(event.address).to.be.equal(collectionAddress);
expect(event.returnValues.from).to.be.equal(owner);
- expect(event.returnValues.to).to.be.equal(receiver);
+ expect(event.returnValues.to).to.be.equal(receiverEth);
expect(event.returnValues.tokenId).to.be.equal(`${tokenId}`);
- }
-
- {
- const balance = await contract.methods.balanceOf(owner).call();
- expect(+balance).to.equal(0);
- }
-
- {
- const balance = await contract.methods.balanceOf(receiver).call();
- expect(+balance).to.equal(1);
+
+ // owner has balance = 0:
+ const ownerBalance = await collectionEvm.methods.balanceOf(owner).call();
+ expect(+ownerBalance).to.equal(0);
+ // receiver owns token:
+ const receiverBalance = await collectionEvm.methods.balanceOf(receiverEth).call();
+ expect(+receiverBalance).to.equal(1);
+ expect(await helper.nft.getTokenOwner(collection.collectionId, tokenId)).to.deep.eq({Ethereum: receiverEth.toLowerCase()});
}
{
- const substrateResult = await contract.methods.transferCross(toSubstrate, tokenId).send({from: receiver});
-
-
+ // Can transferCross to substrate address:
+ const substrateResult = await collectionEvm.methods.transferCross(receiverCrossSub, tokenId).send({from: receiverEth});
+ // Check events:
const event = substrateResult.events.Transfer;
expect(event.address).to.be.equal(collectionAddress);
- expect(event.returnValues.from).to.be.equal(receiver);
+ expect(event.returnValues.from).to.be.equal(receiverEth);
expect(event.returnValues.to).to.be.equal(helper.address.substrateToEth(minter.address));
expect(event.returnValues.tokenId).to.be.equal(`${tokenId}`);
+
+ // owner has balance = 0:
+ const ownerBalance = await collectionEvm.methods.balanceOf(receiverEth).call();
+ expect(+ownerBalance).to.equal(0);
+ // receiver owns token:
+ const receiverBalance = await helper.nft.getTokensByAddress(collection.collectionId, {Substrate: minter.address});
+ expect(receiverBalance).to.contain(tokenId);
}
+ });
+
+ ['transfer', 'transferCross'].map(testCase => itEth(`Cannot ${testCase} non-owned token`, async ({helper}) => {
+ const sender = await helper.eth.createAccountWithBalance(donor);
+ const tokenOwner = await helper.eth.createAccountWithBalance(donor);
+ const receiverSub = minter;
+ const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(minter);
- {
- const balance = await contract.methods.balanceOf(receiver).call();
- expect(+balance).to.equal(0);
- }
+ const collection = await helper.nft.mintCollection(minter, {});
+ const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', sender);
- {
- const balance = await helper.nft.getTokensByAddress(collection.collectionId, {Substrate: minter.address});
- expect(balance).to.be.contain(tokenId);
- }
- });
+ await collection.mintToken(minter, {Ethereum: sender});
+ const nonSendersToken = await collection.mintToken(minter, {Ethereum: tokenOwner});
+
+ // Cannot transferCross someone else's token:
+ const receiver = testCase === 'transfer' ? helper.address.substrateToEth(receiverSub.address) : receiverCrossSub;
+ await expect(collectionEvm.methods[testCase](receiver, nonSendersToken.tokenId).send({from: sender})).to.be.rejected;
+ // Cannot transfer token if it does not exist:
+ await expect(collectionEvm.methods[testCase](receiver, 999999).send({from: sender})).to.be.rejected;
+ }));
});
describe('NFT: Fees', () => {
@@ -501,7 +580,7 @@
expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal())));
});
- itEth('Can perform transferFromCross()', async ({helper, privateKey}) => {
+ itEth('Can perform transferFromCross()', async ({helper}) => {
const collectionMinter = alice;
const owner = bob;
const receiver = charlie;
tests/src/eth/reFungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/reFungible.test.ts
+++ b/tests/src/eth/reFungible.test.ts
@@ -363,57 +363,75 @@
});
itEth('Can perform transferCross()', async ({helper}) => {
- const caller = await helper.eth.createAccountWithBalance(donor);
- const receiver = await helper.eth.createAccountWithBalance(donor);
- const to = helper.ethCrossAccount.fromAddress(receiver);
- const toSubstrate = helper.ethCrossAccount.fromKeyringPair(minter);
+ const sender = await helper.eth.createAccountWithBalance(donor);
+ const receiverEth = await helper.eth.createAccountWithBalance(donor);
+ const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth);
+ const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(minter);
+
const collection = await helper.rft.mintCollection(minter, {});
const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
- const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller);
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', sender);
- const {tokenId} = await collection.mintToken(minter, 1n, {Ethereum: caller});
+ const token = await collection.mintToken(minter, 50n, {Ethereum: sender});
{
- const result = await contract.methods.transferCross(to, tokenId).send({from: caller});
-
+ // Can transferCross to ethereum address:
+ const result = await collectionEvm.methods.transferCross(receiverCrossEth, token.tokenId).send({from: sender});
+ // Check events:
const event = result.events.Transfer;
expect(event.address).to.equal(collectionAddress);
- expect(event.returnValues.from).to.equal(caller);
- expect(event.returnValues.to).to.equal(receiver);
- expect(event.returnValues.tokenId).to.equal(tokenId.toString());
- }
-
- {
- const balance = await contract.methods.balanceOf(caller).call();
- expect(+balance).to.equal(0);
+ expect(event.returnValues.from).to.equal(sender);
+ expect(event.returnValues.to).to.equal(receiverEth);
+ expect(event.returnValues.tokenId).to.equal(token.tokenId.toString());
+ // Sender's balance decreased:
+ const senderBalance = await collectionEvm.methods.balanceOf(sender).call();
+ expect(+senderBalance).to.equal(0);
+ expect(await token.getBalance({Ethereum: sender})).to.eq(0n);
+ // Receiver's balance increased:
+ const receiverBalance = await collectionEvm.methods.balanceOf(receiverEth).call();
+ expect(+receiverBalance).to.equal(1);
+ expect(await token.getBalance({Ethereum: receiverEth})).to.eq(50n);
}
-
- {
- const balance = await contract.methods.balanceOf(receiver).call();
- expect(+balance).to.equal(1);
- }
{
- const substrateResult = await contract.methods.transferCross(toSubstrate, tokenId).send({from: receiver});
-
-
+ // Can transferCross to substrate address:
+ const substrateResult = await collectionEvm.methods.transferCross(receiverCrossSub, token.tokenId).send({from: receiverEth});
+ // Check events:
const event = substrateResult.events.Transfer;
expect(event.address).to.be.equal(collectionAddress);
- expect(event.returnValues.from).to.be.equal(receiver);
+ expect(event.returnValues.from).to.be.equal(receiverEth);
expect(event.returnValues.to).to.be.equal(helper.address.substrateToEth(minter.address));
- expect(event.returnValues.tokenId).to.be.equal(`${tokenId}`);
+ expect(event.returnValues.tokenId).to.be.equal(`${token.tokenId}`);
+ // Sender's balance decreased:
+ const senderBalance = await collectionEvm.methods.balanceOf(receiverEth).call();
+ expect(+senderBalance).to.equal(0);
+ expect(await token.getBalance({Ethereum: receiverEth})).to.eq(0n);
+ // Receiver's balance increased:
+ const receiverBalance = await helper.nft.getTokensByAddress(collection.collectionId, {Substrate: minter.address});
+ expect(receiverBalance).to.contain(token.tokenId);
+ expect(await token.getBalance({Substrate: minter.address})).to.eq(50n);
}
+ });
+
+ ['transfer', 'transferCross'].map(testCase => itEth(`Cannot ${testCase} non-owned token`, async ({helper}) => {
+ const sender = await helper.eth.createAccountWithBalance(donor);
+ const tokenOwner = await helper.eth.createAccountWithBalance(donor);
+ const receiverSub = minter;
+ const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(minter);
- {
- const balance = await contract.methods.balanceOf(receiver).call();
- expect(+balance).to.equal(0);
- }
+ const collection = await helper.rft.mintCollection(minter, {});
+ const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
+ const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', sender);
+
+ await collection.mintToken(minter, 50n, {Ethereum: sender});
+ const nonSendersToken = await collection.mintToken(minter, 50n, {Ethereum: tokenOwner});
- {
- const balance = await helper.nft.getTokensByAddress(collection.collectionId, {Substrate: minter.address});
- expect(balance).to.be.contain(tokenId);
- }
- });
+ // Cannot transferCross someone else's token:
+ const receiver = testCase === 'transfer' ? helper.address.substrateToEth(receiverSub.address) : receiverCrossSub;
+ await expect(collectionEvm.methods[testCase](receiver, nonSendersToken.tokenId).send({from: sender})).to.be.rejected;
+ // Cannot transfer token if it does not exist:
+ await expect(collectionEvm.methods[testCase](receiver, 999999).send({from: sender})).to.be.rejected;
+ }));
itEth('transfer event on transfer from partial ownership to full ownership', async ({helper}) => {
const caller = await helper.eth.createAccountWithBalance(donor);
tests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth--- a/tests/src/eth/reFungibleToken.test.ts
+++ b/tests/src/eth/reFungibleToken.test.ts
@@ -227,6 +227,46 @@
}
});
+ [
+ 'transfer',
+ // 'transferCross', // TODO
+ ].map(testCase =>
+ itEth(`Cannot ${testCase}() non-owned token`, async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const receiver = await helper.eth.createAccountWithBalance(donor);
+ const collection = await helper.rft.mintCollection(alice);
+ const rftOwner = await collection.mintToken(alice, 10n, {Ethereum: owner});
+ const rftReceiver = await collection.mintToken(alice, 10n, {Ethereum: receiver});
+ const tokenIdNonExist = 9999999;
+
+ const tokenAddress1 = helper.ethAddress.fromTokenId(collection.collectionId, rftOwner.tokenId);
+ const tokenAddress2 = helper.ethAddress.fromTokenId(collection.collectionId, rftReceiver.tokenId);
+ const tokenAddressNonExist = helper.ethAddress.fromTokenId(collection.collectionId, tokenIdNonExist);
+ const tokenEvmOwner = helper.ethNativeContract.rftToken(tokenAddress1, owner);
+ const tokenEvmReceiver = helper.ethNativeContract.rftToken(tokenAddress2, owner);
+ const tokenEvmNonExist = helper.ethNativeContract.rftToken(tokenAddressNonExist, owner);
+
+ // 1. Can transfer zero amount (EIP-20):
+ await tokenEvmOwner.methods[testCase](receiver, 0).send({from: owner});
+ // 2. Cannot transfer non-owned token:
+ await expect(tokenEvmReceiver.methods[testCase](owner, 0).send({from: owner})).to.be.rejected;
+ await expect(tokenEvmReceiver.methods[testCase](owner, 5).send({from: owner})).to.be.rejected;
+ // 3. Cannot transfer non-existing token:
+ await expect(tokenEvmNonExist.methods[testCase](owner, 0).send({from: owner})).to.be.rejected;
+ await expect(tokenEvmNonExist.methods[testCase](owner, 5).send({from: owner})).to.be.rejected;
+
+ // 4. Storage is not corrupted:
+ expect(await rftOwner.getTop10Owners()).to.deep.eq([{Ethereum: owner.toLowerCase()}]);
+ expect(await rftReceiver.getTop10Owners()).to.deep.eq([{Ethereum: receiver.toLowerCase()}]);
+ expect(await helper.rft.getTokenTop10Owners(collection.collectionId, tokenIdNonExist)).to.deep.eq([]); // TODO
+
+ // 4.1 Tokens can be transferred:
+ await tokenEvmOwner.methods[testCase](receiver, 10).send({from: owner});
+ await tokenEvmReceiver.methods[testCase](owner, 10).send({from: receiver});
+ expect(await rftOwner.getTop10Owners()).to.deep.eq([{Ethereum: receiver.toLowerCase()}]);
+ expect(await rftReceiver.getTop10Owners()).to.deep.eq([{Ethereum: owner.toLowerCase()}]);
+ }));
+
itEth('Can perform repartition()', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
const receiver = await helper.eth.createAccountWithBalance(donor);
tests/src/eth/tokenProperties.test.tsdiffbeforeafterboth--- a/tests/src/eth/tokenProperties.test.ts
+++ b/tests/src/eth/tokenProperties.test.ts
@@ -120,17 +120,17 @@
const address = helper.ethAddress.fromCollectionId(collection.collectionId);
const contract = helper.ethNativeContract.collection(address, mode, caller);
- expect(await contract.methods.tokenProperties(token.tokenId, []).call()).to.be.deep.equal([]);
+ expect(await contract.methods.properties(token.tokenId, []).call()).to.be.deep.equal([]);
await contract.methods.setProperties(token.tokenId, properties).send({from: caller});
const values = await token.getProperties(properties.map(p => p.key));
expect(values).to.be.deep.equal(properties.map(p => { return {key: p.key, value: p.value.toString()}; }));
- expect(await contract.methods.tokenProperties(token.tokenId, []).call()).to.be.like(properties
+ expect(await contract.methods.properties(token.tokenId, []).call()).to.be.like(properties
.map(p => { return helper.ethProperty.property(p.key, p.value.toString()); }));
- expect(await contract.methods.tokenProperties(token.tokenId, [properties[0].key]).call())
+ expect(await contract.methods.properties(token.tokenId, [properties[0].key]).call())
.to.be.like([helper.ethProperty.property(properties[0].key, properties[0].value.toString())]);
}
tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth--- a/tests/src/eth/util/playgrounds/unique.dev.ts
+++ b/tests/src/eth/util/playgrounds/unique.dev.ts
@@ -103,12 +103,12 @@
contractHelpers(caller: string): Contract {
const web3 = this.helper.getWeb3();
- return new web3.eth.Contract(contractHelpersAbi as any, '0x842899ECF380553E8a4de75bF534cdf6fBF64049', {from: caller, gas: this.helper.eth.DEFAULT_GAS});
+ return new web3.eth.Contract(contractHelpersAbi as any, this.helper.getApi().consts.evmContractHelpers.contractAddress.toString(), {from: caller, gas: this.helper.eth.DEFAULT_GAS});
}
collectionHelpers(caller: string) {
const web3 = this.helper.getWeb3();
- return new web3.eth.Contract(collectionHelpersAbi as any, '0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f', {from: caller, gas: this.helper.eth.DEFAULT_GAS});
+ return new web3.eth.Contract(collectionHelpersAbi as any, this.helper.getApi().consts.common.contractAddress.toString(), {from: caller, gas: this.helper.eth.DEFAULT_GAS});
}
collection(address: string, mode: TCollectionMode, caller?: string, mergeDeprecated = false): Contract {
@@ -186,11 +186,12 @@
return await this.helper.callRpc('api.rpc.eth.call', [{from: signer, to: contractAddress, data: abi}]);
}
- async createCollecion(functionName: string, signer: string, name: string, description: string, tokenPrefix: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
+ async createCollecion(functionName: 'createNFTCollection' | 'createRFTCollection' | 'createFTCollection', signer: string, name: string, description: string, tokenPrefix: string, decimals?: number): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
const collectionCreationPrice = this.helper.balance.getCollectionCreationPrice();
const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer);
- const result = await collectionHelper.methods[functionName](name, description, tokenPrefix).send({value: Number(collectionCreationPrice)});
+ const functionParams = functionName === 'createFTCollection' ? [name, decimals, description, tokenPrefix] : [name, description, tokenPrefix];
+ const result = await collectionHelper.methods[functionName](...functionParams).send({value: Number(collectionCreationPrice)});
const collectionAddress = this.helper.ethAddress.normalizeAddress(result.events.CollectionCreated.returnValues.collectionId);
const collectionId = this.helper.ethAddress.extractCollectionId(collectionAddress);
@@ -217,17 +218,8 @@
return this.createCollecion('createRFTCollection', signer, name, description, tokenPrefix);
}
- async createFungibleCollection(signer: string, name: string, decimals: number, description: string, tokenPrefix: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[]}> {
- const collectionCreationPrice = this.helper.balance.getCollectionCreationPrice();
- const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer);
-
- const result = await collectionHelper.methods.createFTCollection(name, decimals, description, tokenPrefix).send({value: Number(collectionCreationPrice)});
- const collectionAddress = this.helper.ethAddress.normalizeAddress(result.events.CollectionCreated.returnValues.collectionId);
- const collectionId = this.helper.ethAddress.extractCollectionId(collectionAddress);
-
- const events = this.helper.eth.normalizeEvents(result.events);
-
- return {collectionId, collectionAddress, events};
+ createFungibleCollection(signer: string, name: string, decimals: number, description: string, tokenPrefix: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[]}> {
+ return this.createCollecion('createFTCollection', signer, name, description, tokenPrefix, decimals);
}
async createERC721MetadataCompatibleRFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
tests/src/fungible.test.tsdiffbeforeafterboth--- a/tests/src/fungible.test.ts
+++ b/tests/src/fungible.test.ts
@@ -15,7 +15,7 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import {IKeyringPair} from '@polkadot/types/types';
-import {itSub, usingPlaygrounds, expect} from './util';
+import {itSub, usingPlaygrounds, expect, requirePalletsOrSkip, Pallets} from './util';
const U128_MAX = (1n << 128n) - 1n;
@@ -145,3 +145,42 @@
expect(await collection.getBalance(ethAcc)).to.be.equal(10n);
});
});
+
+describe('Fungible negative tests', () => {
+ let donor: IKeyringPair;
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
+
+ before(async function() {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ requirePalletsOrSkip(this, helper, [Pallets.Fungible]);
+
+ donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
+
+ itSub('Cannot transfer incorrect amount of tokens', async ({helper}) => {
+ const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
+ const nonExistingCollection = helper.ft.getCollectionObject(99999);
+ await collection.mint(alice, 10n, {Substrate: bob.address});
+
+ // 1. Alice cannot transfer more than 0 tokens if balance low:
+ await expect(collection.transfer(alice, {Substrate: charlie.address}, 1n)).to.be.rejectedWith('common.TokenValueTooLow');
+ await expect(collection.transfer(alice, {Substrate: charlie.address}, 100n)).to.be.rejectedWith('common.TokenValueTooLow');
+
+ // 2. Alice cannot transfer non-existing token:
+ await expect(nonExistingCollection.transfer(alice, {Substrate: charlie.address}, 0n)).to.be.rejectedWith('common.CollectionNotFound');
+ await expect(nonExistingCollection.transfer(alice, {Substrate: charlie.address}, 1n)).to.be.rejectedWith('common.CollectionNotFound');
+
+ // 3. Zero transfer allowed (EIP-20):
+ await collection.transfer(bob, {Substrate: charlie.address}, 0n);
+ // 3.1 even if the balance = 0
+ await collection.transfer(alice, {Substrate: charlie.address}, 0n);
+
+ expect(await collection.getBalance({Substrate: alice.address})).to.eq(0n);
+ expect(await collection.getBalance({Substrate: bob.address})).to.eq(10n);
+ expect(await collection.getBalance({Substrate: charlie.address})).to.eq(0n);
+ });
+});
tests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-consts.ts
+++ b/tests/src/interfaces/augment-api-consts.ts
@@ -8,8 +8,8 @@
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Option, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
-import type { Perbill, Permill, Weight } from '@polkadot/types/interfaces/runtime';
-import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, XcmV1MultiLocation } from '@polkadot/types/lookup';
+import type { H160, Perbill, Permill, Weight } from '@polkadot/types/interfaces/runtime';
+import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, UpDataStructsCollectionLimits, XcmV1MultiLocation } from '@polkadot/types/lookup';
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -70,6 +70,10 @@
**/
collectionCreationPrice: u128 & AugmentedConst<ApiType>;
/**
+ * Address under which the CollectionHelper contract would be available.
+ **/
+ contractAddress: H160 & AugmentedConst<ApiType>;
+ /**
* Generic const
**/
[key: string]: Codec;
@@ -82,6 +86,16 @@
**/
[key: string]: Codec;
};
+ evmContractHelpers: {
+ /**
+ * Address, under which magic contract will be available
+ **/
+ contractAddress: H160 & AugmentedConst<ApiType>;
+ /**
+ * Generic const
+ **/
+ [key: string]: Codec;
+ };
inflation: {
/**
* Number of blocks that pass between treasury balance updates due to inflation
@@ -94,13 +108,11 @@
};
scheduler: {
/**
- * The maximum weight that may be scheduled per block for any dispatchables of less
- * priority than `schedule::HARD_DEADLINE`.
+ * The maximum weight that may be scheduled per block for any dispatchables.
**/
maximumWeight: Weight & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
- * Not strictly enforced, but used for weight estimation.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
/**
@@ -233,6 +245,64 @@
**/
[key: string]: Codec;
};
+ unique: {
+ /**
+ * Maximum admins per collection.
+ **/
+ collectionAdminsLimit: u32 & AugmentedConst<ApiType>;
+ /**
+ * Default FT collection limit.
+ **/
+ ftDefaultCollectionLimits: UpDataStructsCollectionLimits & AugmentedConst<ApiType>;
+ /**
+ * Maximal length of a collection description.
+ **/
+ maxCollectionDescriptionLength: u32 & AugmentedConst<ApiType>;
+ /**
+ * Maximal length of a collection name.
+ **/
+ maxCollectionNameLength: u32 & AugmentedConst<ApiType>;
+ /**
+ * Maximum size for all collection properties.
+ **/
+ maxCollectionPropertiesSize: u32 & AugmentedConst<ApiType>;
+ /**
+ * A maximum number of token properties.
+ **/
+ maxPropertiesPerItem: u32 & AugmentedConst<ApiType>;
+ /**
+ * Maximal length of a property key.
+ **/
+ maxPropertyKeyLength: u32 & AugmentedConst<ApiType>;
+ /**
+ * Maximal length of a property value.
+ **/
+ maxPropertyValueLength: u32 & AugmentedConst<ApiType>;
+ /**
+ * Maximal length of a token prefix.
+ **/
+ maxTokenPrefixLength: u32 & AugmentedConst<ApiType>;
+ /**
+ * Maximum size of all token properties.
+ **/
+ maxTokenPropertiesSize: u32 & AugmentedConst<ApiType>;
+ /**
+ * A maximum number of levels of depth in the token nesting tree.
+ **/
+ nestingBudget: u32 & AugmentedConst<ApiType>;
+ /**
+ * Default NFT collection limit.
+ **/
+ nftDefaultCollectionLimits: UpDataStructsCollectionLimits & AugmentedConst<ApiType>;
+ /**
+ * Default RFT collection limit.
+ **/
+ rftDefaultCollectionLimits: UpDataStructsCollectionLimits & AugmentedConst<ApiType>;
+ /**
+ * Generic const
+ **/
+ [key: string]: Codec;
+ };
vesting: {
/**
* The minimum amount transferred to call `vested_transfer`.
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -265,6 +265,14 @@
**/
FeeOverflow: AugmentedError<ApiType>;
/**
+ * Gas limit is too high.
+ **/
+ GasLimitTooHigh: AugmentedError<ApiType>;
+ /**
+ * Gas limit is too low.
+ **/
+ GasLimitTooLow: AugmentedError<ApiType>;
+ /**
* Gas price is too low.
**/
GasPriceTooLow: AugmentedError<ApiType>;
@@ -277,6 +285,14 @@
**/
PaymentOverflow: AugmentedError<ApiType>;
/**
+ * EVM reentrancy
+ **/
+ Reentrancy: AugmentedError<ApiType>;
+ /**
+ * Undefined error.
+ **/
+ Undefined: AugmentedError<ApiType>;
+ /**
* Withdraw fee failed
**/
WithdrawFailed: AugmentedError<ApiType>;
@@ -321,6 +337,10 @@
**/
AccountNotEmpty: AugmentedError<ApiType>;
/**
+ * Failed to decode event bytes
+ **/
+ BadEvent: AugmentedError<ApiType>;
+ /**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
@@ -644,22 +664,38 @@
};
scheduler: {
/**
+ * There is no place for a new task in the agenda
+ **/
+ AgendaIsExhausted: AugmentedError<ApiType>;
+ /**
* Failed to schedule a call
**/
FailedToSchedule: AugmentedError<ApiType>;
/**
+ * Attempt to use a non-named function on a named task.
+ **/
+ Named: AugmentedError<ApiType>;
+ /**
* Cannot find the scheduled call.
**/
NotFound: AugmentedError<ApiType>;
/**
- * Reschedule failed because it does not change scheduled time.
+ * Scheduled call preimage is not found
+ **/
+ PreimageNotFound: AugmentedError<ApiType>;
+ /**
+ * Scheduled call is corrupted
**/
- RescheduleNoChange: AugmentedError<ApiType>;
+ ScheduledCallCorrupted: AugmentedError<ApiType>;
/**
* Given target block number is in the past.
**/
TargetBlockNumberInPast: AugmentedError<ApiType>;
/**
+ * Scheduled call is too big
+ **/
+ TooBigScheduledCall: AugmentedError<ApiType>;
+ /**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
tests/src/interfaces/augment-api-events.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-events.ts
+++ b/tests/src/interfaces/augment-api-events.ts
@@ -6,10 +6,10 @@
import '@polkadot/api-base/types/events';
import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
-import type { Bytes, Null, Option, Result, U256, U8aFixed, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
+import type { Bytes, Null, Option, Result, U8aFixed, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H160, H256, Weight } from '@polkadot/types/interfaces/runtime';
-import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportDispatchDispatchInfo, FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, RmrkTraitsNftAccountIdOrCollectionNftTuple, SpRuntimeDispatchError, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetMultiAssets, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
+import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, RmrkTraitsNftAccountIdOrCollectionNftTuple, SpRuntimeDispatchError, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetMultiAssets, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
@@ -204,9 +204,9 @@
};
ethereum: {
/**
- * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason]
+ * An ethereum transaction was successfully executed.
**/
- Executed: AugmentedEvent<ApiType, [H160, H160, H256, EvmCoreErrorExitReason]>;
+ Executed: AugmentedEvent<ApiType, [from: H160, to: H160, transactionHash: H256, exitReason: EvmCoreErrorExitReason], { from: H160, to: H160, transactionHash: H256, exitReason: EvmCoreErrorExitReason }>;
/**
* Generic event
**/
@@ -214,33 +214,25 @@
};
evm: {
/**
- * A deposit has been made at a given address. \[sender, address, value\]
- **/
- BalanceDeposit: AugmentedEvent<ApiType, [AccountId32, H160, U256]>;
- /**
- * A withdrawal has been made from a given address. \[sender, address, value\]
- **/
- BalanceWithdraw: AugmentedEvent<ApiType, [AccountId32, H160, U256]>;
- /**
- * A contract has been created at given \[address\].
+ * A contract has been created at given address.
**/
- Created: AugmentedEvent<ApiType, [H160]>;
+ Created: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;
/**
- * A \[contract\] was attempted to be created, but the execution failed.
+ * A contract was attempted to be created, but the execution failed.
**/
- CreatedFailed: AugmentedEvent<ApiType, [H160]>;
+ CreatedFailed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;
/**
- * A \[contract\] has been executed successfully with states applied.
+ * A contract has been executed successfully with states applied.
**/
- Executed: AugmentedEvent<ApiType, [H160]>;
+ Executed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;
/**
- * A \[contract\] has been executed with errors. States are reverted with only gas fees applied.
+ * A contract has been executed with errors. States are reverted with only gas fees applied.
**/
- ExecutedFailed: AugmentedEvent<ApiType, [H160]>;
+ ExecutedFailed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;
/**
* Ethereum events from contracts.
**/
- Log: AugmentedEvent<ApiType, [EthereumLog]>;
+ Log: AugmentedEvent<ApiType, [log: EthereumLog], { log: EthereumLog }>;
/**
* Generic event
**/
@@ -264,6 +256,16 @@
**/
[key: string]: AugmentedEvent<ApiType>;
};
+ evmMigration: {
+ /**
+ * This event is used in benchmarking and can be used for tests
+ **/
+ TestEvent: AugmentedEvent<ApiType, []>;
+ /**
+ * Generic event
+ **/
+ [key: string]: AugmentedEvent<ApiType>;
+ };
foreignAssets: {
/**
* The asset registered.
@@ -479,7 +481,7 @@
/**
* The call for the provided hash was not found so the task has been aborted.
**/
- CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, error: FrameSupportScheduleLookupError }>;
+ CallUnavailable: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
/**
* Canceled some task.
**/
@@ -489,9 +491,13 @@
**/
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;
/**
+ * The given task can never be executed since it is overweight.
+ **/
+ PermanentlyOverweight: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
+ /**
* Scheduled task's priority has changed
**/
- PriorityChanged: AugmentedEvent<ApiType, [when: u32, index: u32, priority: u8], { when: u32, index: u32, priority: u8 }>;
+ PriorityChanged: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, priority: u8], { task: ITuple<[u32, u32]>, priority: u8 }>;
/**
* Scheduled some task.
**/
@@ -560,6 +566,7 @@
[key: string]: AugmentedEvent<ApiType>;
};
testUtils: {
+ BatchCompleted: AugmentedEvent<ApiType, []>;
ShouldRollback: AugmentedEvent<ApiType, []>;
ValueIsSet: AugmentedEvent<ApiType, []>;
/**
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -9,7 +9,7 @@
import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H160, H256, Weight } from '@polkadot/types/interfaces/runtime';
-import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensReserveData, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerScheduledV3, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, XcmV1MultiLocation } from '@polkadot/types/lookup';
+import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensReserveData, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerV2BlockAgenda, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, XcmV1MultiLocation } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -681,9 +681,14 @@
/**
* Items to be executed, indexed by the block number that they should be executed on.
**/
- agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletUniqueSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
+ agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PalletUniqueSchedulerV2BlockAgenda>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
- * Lookup from identity to the block number and index of the task.
+ * It contains the block number from which we should service tasks.
+ * It's used for delaying the servicing of future blocks' agendas if we had overweight tasks.
+ **/
+ incompleteSince: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
+ /**
+ * Lookup from a name to the block number and index of the task.
**/
lookup: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
/**
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -9,7 +9,7 @@
import type { Bytes, Compact, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H160, H256, MultiAddress, Perbill, Permill, Weight } from '@polkadot/types/interfaces/runtime';
-import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, FrameSupportScheduleMaybeHashed, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsPartEquippableList, RmrkTraitsPartPartType, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAsset, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumLog, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsPartEquippableList, RmrkTraitsPartPartType, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAsset, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -295,6 +295,14 @@
**/
finish: AugmentedSubmittable<(address: H160 | string | Uint8Array, code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Bytes]>;
/**
+ * Create ethereum events attached to the fake transaction
+ **/
+ insertEthLogs: AugmentedSubmittable<(logs: Vec<EthereumLog> | (EthereumLog | { address?: any; topics?: any; data?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<EthereumLog>]>;
+ /**
+ * Create substrate events
+ **/
+ insertEvents: AugmentedSubmittable<(events: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Bytes>]>;
+ /**
* Insert items into contract storage, this method can be called
* multiple times
**/
@@ -831,22 +839,56 @@
};
scheduler: {
/**
+ * Cancel an anonymously scheduled task.
+ *
+ * The `T::OriginPrivilegeCmp` decides whether the given origin is allowed to cancel the task or not.
+ **/
+ cancel: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
+ /**
* Cancel a named scheduled task.
+ *
+ * The `T::OriginPrivilegeCmp` decides whether the given origin is allowed to cancel the task or not.
**/
cancelNamed: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed]>;
+ /**
+ * Change a named task's priority.
+ *
+ * Only the `T::PrioritySetOrigin` is allowed to change the task's priority.
+ **/
changeNamedPriority: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed, u8]>;
/**
+ * Anonymously schedule a task.
+ *
+ * Only `T::ScheduleOrigin` is allowed to schedule a task.
+ * Only `T::PrioritySetOrigin` is allowed to set the task's priority.
+ **/
+ schedule: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: Option<u8> | null | Uint8Array | u8 | AnyNumber, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, Option<u8>, Call]>;
+ /**
+ * Anonymously schedule a task after a delay.
+ *
+ * # <weight>
+ * Same as [`schedule`].
+ * # </weight>
+ **/
+ scheduleAfter: AugmentedSubmittable<(after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: Option<u8> | null | Uint8Array | u8 | AnyNumber, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, Option<u8>, Call]>;
+ /**
* Schedule a named task.
+ *
+ * Only `T::ScheduleOrigin` is allowed to schedule a task.
+ * Only `T::PrioritySetOrigin` is allowed to set the task's priority.
**/
- scheduleNamed: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array, when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: Option<u8> | null | Uint8Array | u8 | AnyNumber, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed, u32, Option<ITuple<[u32, u32]>>, Option<u8>, FrameSupportScheduleMaybeHashed]>;
+ scheduleNamed: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array, when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: Option<u8> | null | Uint8Array | u8 | AnyNumber, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed, u32, Option<ITuple<[u32, u32]>>, Option<u8>, Call]>;
/**
* Schedule a named task after a delay.
*
+ * Only `T::ScheduleOrigin` is allowed to schedule a task.
+ * Only `T::PrioritySetOrigin` is allowed to set the task's priority.
+ *
* # <weight>
* Same as [`schedule_named`](Self::schedule_named).
* # </weight>
**/
- scheduleNamedAfter: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array, after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: Option<u8> | null | Uint8Array | u8 | AnyNumber, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed, u32, Option<ITuple<[u32, u32]>>, Option<u8>, FrameSupportScheduleMaybeHashed]>;
+ scheduleNamedAfter: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array, after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: Option<u8> | null | Uint8Array | u8 | AnyNumber, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed, u32, Option<ITuple<[u32, u32]>>, Option<u8>, Call]>;
/**
* Generic tx
**/
@@ -986,6 +1028,7 @@
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
testUtils: {
+ batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
enable: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
incTestValue: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
justTakeFee: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
tests/src/interfaces/augment-types.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -5,7 +5,7 @@
// this is required to allow for ambient/previous definitions
import '@polkadot/types/types/registry';
-import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, 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, FrameSupportDispatchDispatchClass, FrameSupportDispatchDispatchInfo, FrameSupportDispatchPays, FrameSupportDispatchPerDispatchClassU32, FrameSupportDispatchPerDispatchClassWeight, FrameSupportDispatchPerDispatchClassWeightsPerClass, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensModuleCall, OrmlTokensModuleError, OrmlTokensModuleEvent, OrmlTokensReserveData, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, OrmlXtokensModuleCall, OrmlXtokensModuleError, OrmlXtokensModuleEvent, PalletAppPromotionCall, PalletAppPromotionError, PalletAppPromotionEvent, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletConfigurationCall, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersEvent, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletForeignAssetsModuleCall, PalletForeignAssetsModuleError, PalletForeignAssetsModuleEvent, PalletForeignAssetsNativeCurrency, PalletFungibleError, PalletInflationCall, PalletMaintenanceCall, PalletMaintenanceError, PalletMaintenanceEvent, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTestUtilsCall, PalletTestUtilsError, PalletTestUtilsEvent, PalletTimestampCall, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerCall, PalletUniqueSchedulerError, PalletUniqueSchedulerEvent, PalletUniqueSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExMultipleOwners, UpDataStructsCreateRefungibleExSingleOwner, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsRpcCollection, UpDataStructsRpcCollectionFlags, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipStateAccountId32, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, UpDataStructsTokenData, 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, XcmVersionedMultiAsset, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './default';
+import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, 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, FrameSupportDispatchDispatchClass, FrameSupportDispatchDispatchInfo, FrameSupportDispatchPays, FrameSupportDispatchPerDispatchClassU32, FrameSupportDispatchPerDispatchClassWeight, FrameSupportDispatchPerDispatchClassWeightsPerClass, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensModuleCall, OrmlTokensModuleError, OrmlTokensModuleEvent, OrmlTokensReserveData, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, OrmlXtokensModuleCall, OrmlXtokensModuleError, OrmlXtokensModuleEvent, PalletAppPromotionCall, PalletAppPromotionError, PalletAppPromotionEvent, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletConfigurationCall, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersEvent, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletEvmMigrationEvent, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletForeignAssetsModuleCall, PalletForeignAssetsModuleError, PalletForeignAssetsModuleEvent, PalletForeignAssetsNativeCurrency, PalletFungibleError, PalletInflationCall, PalletMaintenanceCall, PalletMaintenanceError, PalletMaintenanceEvent, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTestUtilsCall, PalletTestUtilsError, PalletTestUtilsEvent, PalletTimestampCall, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerV2BlockAgenda, PalletUniqueSchedulerV2Call, PalletUniqueSchedulerV2Error, PalletUniqueSchedulerV2Event, PalletUniqueSchedulerV2Scheduled, PalletUniqueSchedulerV2ScheduledCall, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExMultipleOwners, UpDataStructsCreateRefungibleExSingleOwner, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsRpcCollection, UpDataStructsRpcCollectionFlags, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipStateAccountId32, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, UpDataStructsTokenData, 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, XcmVersionedMultiAsset, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './default';
import type { Data, StorageKey } from '@polkadot/types';
import type { BitVec, Bool, Bytes, F32, F64, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, f32, f64, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
@@ -526,8 +526,6 @@
FrameSupportDispatchPerDispatchClassWeightsPerClass: FrameSupportDispatchPerDispatchClassWeightsPerClass;
FrameSupportDispatchRawOrigin: FrameSupportDispatchRawOrigin;
FrameSupportPalletId: FrameSupportPalletId;
- FrameSupportScheduleLookupError: FrameSupportScheduleLookupError;
- FrameSupportScheduleMaybeHashed: FrameSupportScheduleMaybeHashed;
FrameSupportTokensMiscBalanceStatus: FrameSupportTokensMiscBalanceStatus;
FrameSystemAccountInfo: FrameSystemAccountInfo;
FrameSystemCall: FrameSystemCall;
@@ -854,6 +852,7 @@
PalletEvmEvent: PalletEvmEvent;
PalletEvmMigrationCall: PalletEvmMigrationCall;
PalletEvmMigrationError: PalletEvmMigrationError;
+ PalletEvmMigrationEvent: PalletEvmMigrationEvent;
PalletForeignAssetsAssetIds: PalletForeignAssetsAssetIds;
PalletForeignAssetsModuleAssetMetadata: PalletForeignAssetsModuleAssetMetadata;
PalletForeignAssetsModuleCall: PalletForeignAssetsModuleCall;
@@ -902,10 +901,12 @@
PalletUniqueCall: PalletUniqueCall;
PalletUniqueError: PalletUniqueError;
PalletUniqueRawEvent: PalletUniqueRawEvent;
- PalletUniqueSchedulerCall: PalletUniqueSchedulerCall;
- PalletUniqueSchedulerError: PalletUniqueSchedulerError;
- PalletUniqueSchedulerEvent: PalletUniqueSchedulerEvent;
- PalletUniqueSchedulerScheduledV3: PalletUniqueSchedulerScheduledV3;
+ PalletUniqueSchedulerV2BlockAgenda: PalletUniqueSchedulerV2BlockAgenda;
+ PalletUniqueSchedulerV2Call: PalletUniqueSchedulerV2Call;
+ PalletUniqueSchedulerV2Error: PalletUniqueSchedulerV2Error;
+ PalletUniqueSchedulerV2Event: PalletUniqueSchedulerV2Event;
+ PalletUniqueSchedulerV2Scheduled: PalletUniqueSchedulerV2Scheduled;
+ PalletUniqueSchedulerV2ScheduledCall: PalletUniqueSchedulerV2ScheduledCall;
PalletVersion: PalletVersion;
PalletXcmCall: PalletXcmCall;
PalletXcmError: PalletXcmError;
tests/src/interfaces/default/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -556,22 +556,6 @@
/** @name FrameSupportPalletId */
export interface FrameSupportPalletId extends U8aFixed {}
-/** @name FrameSupportScheduleLookupError */
-export interface FrameSupportScheduleLookupError extends Enum {
- readonly isUnknown: boolean;
- readonly isBadFormat: boolean;
- readonly type: 'Unknown' | 'BadFormat';
-}
-
-/** @name FrameSupportScheduleMaybeHashed */
-export interface FrameSupportScheduleMaybeHashed extends Enum {
- readonly isValue: boolean;
- readonly asValue: Call;
- readonly isHash: boolean;
- readonly asHash: H256;
- readonly type: 'Value' | 'Hash';
-}
-
/** @name FrameSupportTokensMiscBalanceStatus */
export interface FrameSupportTokensMiscBalanceStatus extends Enum {
readonly isFree: boolean;
@@ -1347,7 +1331,12 @@
/** @name PalletEthereumEvent */
export interface PalletEthereumEvent extends Enum {
readonly isExecuted: boolean;
- readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;
+ readonly asExecuted: {
+ readonly from: H160;
+ readonly to: H160;
+ readonly transactionHash: H256;
+ readonly exitReason: EvmCoreErrorExitReason;
+ } & Struct;
readonly type: 'Executed';
}
@@ -1457,26 +1446,36 @@
readonly isWithdrawFailed: boolean;
readonly isGasPriceTooLow: boolean;
readonly isInvalidNonce: boolean;
- readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce';
+ readonly isGasLimitTooLow: boolean;
+ readonly isGasLimitTooHigh: boolean;
+ readonly isUndefined: boolean;
+ readonly isReentrancy: boolean;
+ readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce' | 'GasLimitTooLow' | 'GasLimitTooHigh' | 'Undefined' | 'Reentrancy';
}
/** @name PalletEvmEvent */
export interface PalletEvmEvent extends Enum {
readonly isLog: boolean;
- readonly asLog: EthereumLog;
+ readonly asLog: {
+ readonly log: EthereumLog;
+ } & Struct;
readonly isCreated: boolean;
- readonly asCreated: H160;
+ readonly asCreated: {
+ readonly address: H160;
+ } & Struct;
readonly isCreatedFailed: boolean;
- readonly asCreatedFailed: H160;
+ readonly asCreatedFailed: {
+ readonly address: H160;
+ } & Struct;
readonly isExecuted: boolean;
- readonly asExecuted: H160;
+ readonly asExecuted: {
+ readonly address: H160;
+ } & Struct;
readonly isExecutedFailed: boolean;
- readonly asExecutedFailed: H160;
- readonly isBalanceDeposit: boolean;
- readonly asBalanceDeposit: ITuple<[AccountId32, H160, U256]>;
- readonly isBalanceWithdraw: boolean;
- readonly asBalanceWithdraw: ITuple<[AccountId32, H160, U256]>;
- readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';
+ readonly asExecutedFailed: {
+ readonly address: H160;
+ } & Struct;
+ readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed';
}
/** @name PalletEvmMigrationCall */
@@ -1495,16 +1494,31 @@
readonly address: H160;
readonly code: Bytes;
} & Struct;
- readonly type: 'Begin' | 'SetData' | 'Finish';
+ readonly isInsertEthLogs: boolean;
+ readonly asInsertEthLogs: {
+ readonly logs: Vec<EthereumLog>;
+ } & Struct;
+ readonly isInsertEvents: boolean;
+ readonly asInsertEvents: {
+ readonly events: Vec<Bytes>;
+ } & Struct;
+ readonly type: 'Begin' | 'SetData' | 'Finish' | 'InsertEthLogs' | 'InsertEvents';
}
/** @name PalletEvmMigrationError */
export interface PalletEvmMigrationError extends Enum {
readonly isAccountNotEmpty: boolean;
readonly isAccountIsNotMigrating: boolean;
- readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating';
+ readonly isBadEvent: boolean;
+ readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating' | 'BadEvent';
}
+/** @name PalletEvmMigrationEvent */
+export interface PalletEvmMigrationEvent extends Enum {
+ readonly isTestEvent: boolean;
+ readonly type: 'TestEvent';
+}
+
/** @name PalletForeignAssetsAssetIds */
export interface PalletForeignAssetsAssetIds extends Enum {
readonly isForeignAssetId: boolean;
@@ -2004,7 +2018,11 @@
readonly maxTestValue: u32;
} & Struct;
readonly isJustTakeFee: boolean;
- readonly type: 'Enable' | 'SetTestValue' | 'SetTestValueAndRollback' | 'IncTestValue' | 'SelfCancelingInc' | 'JustTakeFee';
+ readonly isBatchAll: boolean;
+ readonly asBatchAll: {
+ readonly calls: Vec<Call>;
+ } & Struct;
+ readonly type: 'Enable' | 'SetTestValue' | 'SetTestValueAndRollback' | 'IncTestValue' | 'SelfCancelingInc' | 'JustTakeFee' | 'BatchAll';
}
/** @name PalletTestUtilsError */
@@ -2018,7 +2036,8 @@
export interface PalletTestUtilsEvent extends Enum {
readonly isValueIsSet: boolean;
readonly isShouldRollback: boolean;
- readonly type: 'ValueIsSet' | 'ShouldRollback';
+ readonly isBatchCompleted: boolean;
+ readonly type: 'ValueIsSet' | 'ShouldRollback' | 'BatchCompleted';
}
/** @name PalletTimestampCall */
@@ -2327,47 +2346,76 @@
readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';
}
-/** @name PalletUniqueSchedulerCall */
-export interface PalletUniqueSchedulerCall extends Enum {
+/** @name PalletUniqueSchedulerV2BlockAgenda */
+export interface PalletUniqueSchedulerV2BlockAgenda extends Struct {
+ readonly agenda: Vec<Option<PalletUniqueSchedulerV2Scheduled>>;
+ readonly freePlaces: u32;
+}
+
+/** @name PalletUniqueSchedulerV2Call */
+export interface PalletUniqueSchedulerV2Call extends Enum {
+ readonly isSchedule: boolean;
+ readonly asSchedule: {
+ readonly when: u32;
+ readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
+ readonly priority: Option<u8>;
+ readonly call: Call;
+ } & Struct;
+ readonly isCancel: boolean;
+ readonly asCancel: {
+ readonly when: u32;
+ readonly index: u32;
+ } & Struct;
readonly isScheduleNamed: boolean;
readonly asScheduleNamed: {
readonly id: U8aFixed;
readonly when: u32;
readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
readonly priority: Option<u8>;
- readonly call: FrameSupportScheduleMaybeHashed;
+ readonly call: Call;
} & Struct;
readonly isCancelNamed: boolean;
readonly asCancelNamed: {
readonly id: U8aFixed;
} & Struct;
+ readonly isScheduleAfter: boolean;
+ readonly asScheduleAfter: {
+ readonly after: u32;
+ readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
+ readonly priority: Option<u8>;
+ readonly call: Call;
+ } & Struct;
readonly isScheduleNamedAfter: boolean;
readonly asScheduleNamedAfter: {
readonly id: U8aFixed;
readonly after: u32;
readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
readonly priority: Option<u8>;
- readonly call: FrameSupportScheduleMaybeHashed;
+ readonly call: Call;
} & Struct;
readonly isChangeNamedPriority: boolean;
readonly asChangeNamedPriority: {
readonly id: U8aFixed;
readonly priority: u8;
} & Struct;
- readonly type: 'ScheduleNamed' | 'CancelNamed' | 'ScheduleNamedAfter' | 'ChangeNamedPriority';
+ readonly type: 'Schedule' | 'Cancel' | 'ScheduleNamed' | 'CancelNamed' | 'ScheduleAfter' | 'ScheduleNamedAfter' | 'ChangeNamedPriority';
}
-/** @name PalletUniqueSchedulerError */
-export interface PalletUniqueSchedulerError extends Enum {
+/** @name PalletUniqueSchedulerV2Error */
+export interface PalletUniqueSchedulerV2Error extends Enum {
readonly isFailedToSchedule: boolean;
+ readonly isAgendaIsExhausted: boolean;
+ readonly isScheduledCallCorrupted: boolean;
+ readonly isPreimageNotFound: boolean;
+ readonly isTooBigScheduledCall: boolean;
readonly isNotFound: boolean;
readonly isTargetBlockNumberInPast: boolean;
- readonly isRescheduleNoChange: boolean;
- readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange';
+ readonly isNamed: boolean;
+ readonly type: 'FailedToSchedule' | 'AgendaIsExhausted' | 'ScheduledCallCorrupted' | 'PreimageNotFound' | 'TooBigScheduledCall' | 'NotFound' | 'TargetBlockNumberInPast' | 'Named';
}
-/** @name PalletUniqueSchedulerEvent */
-export interface PalletUniqueSchedulerEvent extends Enum {
+/** @name PalletUniqueSchedulerV2Event */
+export interface PalletUniqueSchedulerV2Event extends Enum {
readonly isScheduled: boolean;
readonly asScheduled: {
readonly when: u32;
@@ -2378,36 +2426,51 @@
readonly when: u32;
readonly index: u32;
} & Struct;
+ readonly isDispatched: boolean;
+ readonly asDispatched: {
+ readonly task: ITuple<[u32, u32]>;
+ readonly id: Option<U8aFixed>;
+ readonly result: Result<Null, SpRuntimeDispatchError>;
+ } & Struct;
readonly isPriorityChanged: boolean;
readonly asPriorityChanged: {
- readonly when: u32;
- readonly index: u32;
+ readonly task: ITuple<[u32, u32]>;
readonly priority: u8;
} & Struct;
- readonly isDispatched: boolean;
- readonly asDispatched: {
+ readonly isCallUnavailable: boolean;
+ readonly asCallUnavailable: {
readonly task: ITuple<[u32, u32]>;
readonly id: Option<U8aFixed>;
- readonly result: Result<Null, SpRuntimeDispatchError>;
} & Struct;
- readonly isCallLookupFailed: boolean;
- readonly asCallLookupFailed: {
+ readonly isPermanentlyOverweight: boolean;
+ readonly asPermanentlyOverweight: {
readonly task: ITuple<[u32, u32]>;
readonly id: Option<U8aFixed>;
- readonly error: FrameSupportScheduleLookupError;
} & Struct;
- readonly type: 'Scheduled' | 'Canceled' | 'PriorityChanged' | 'Dispatched' | 'CallLookupFailed';
+ readonly type: 'Scheduled' | 'Canceled' | 'Dispatched' | 'PriorityChanged' | 'CallUnavailable' | 'PermanentlyOverweight';
}
-/** @name PalletUniqueSchedulerScheduledV3 */
-export interface PalletUniqueSchedulerScheduledV3 extends Struct {
+/** @name PalletUniqueSchedulerV2Scheduled */
+export interface PalletUniqueSchedulerV2Scheduled extends Struct {
readonly maybeId: Option<U8aFixed>;
readonly priority: u8;
- readonly call: FrameSupportScheduleMaybeHashed;
+ readonly call: PalletUniqueSchedulerV2ScheduledCall;
readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
readonly origin: OpalRuntimeOriginCaller;
}
+/** @name PalletUniqueSchedulerV2ScheduledCall */
+export interface PalletUniqueSchedulerV2ScheduledCall extends Enum {
+ readonly isInline: boolean;
+ readonly asInline: Bytes;
+ readonly isPreimageLookup: boolean;
+ readonly asPreimageLookup: {
+ readonly hash_: H256;
+ readonly unboundedLen: u32;
+ } & Struct;
+ readonly type: 'Inline' | 'PreimageLookup';
+}
+
/** @name PalletXcmCall */
export interface PalletXcmCall extends Enum {
readonly isSend: boolean;
tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -1004,9 +1004,9 @@
}
},
/**
- * Lookup93: pallet_unique_scheduler::pallet::Event<T>
+ * Lookup93: pallet_unique_scheduler_v2::pallet::Event<T>
**/
- PalletUniqueSchedulerEvent: {
+ PalletUniqueSchedulerV2Event: {
_enum: {
Scheduled: {
when: 'u32',
@@ -1016,31 +1016,27 @@
when: 'u32',
index: 'u32',
},
+ Dispatched: {
+ task: '(u32,u32)',
+ id: 'Option<[u8;32]>',
+ result: 'Result<Null, SpRuntimeDispatchError>',
+ },
PriorityChanged: {
- when: 'u32',
- index: 'u32',
+ task: '(u32,u32)',
priority: 'u8',
},
- Dispatched: {
+ CallUnavailable: {
task: '(u32,u32)',
- id: 'Option<[u8;16]>',
- result: 'Result<Null, SpRuntimeDispatchError>',
+ id: 'Option<[u8;32]>',
},
- CallLookupFailed: {
+ PermanentlyOverweight: {
task: '(u32,u32)',
- id: 'Option<[u8;16]>',
- error: 'FrameSupportScheduleLookupError'
+ id: 'Option<[u8;32]>'
}
}
},
/**
- * Lookup96: frame_support::traits::schedule::LookupError
- **/
- FrameSupportScheduleLookupError: {
- _enum: ['Unknown', 'BadFormat']
- },
- /**
- * Lookup97: pallet_common::pallet::Event<T>
+ * Lookup96: pallet_common::pallet::Event<T>
**/
PalletCommonEvent: {
_enum: {
@@ -1058,7 +1054,7 @@
}
},
/**
- * Lookup100: pallet_structure::pallet::Event<T>
+ * Lookup99: pallet_structure::pallet::Event<T>
**/
PalletStructureEvent: {
_enum: {
@@ -1066,7 +1062,7 @@
}
},
/**
- * Lookup101: pallet_rmrk_core::pallet::Event<T>
+ * Lookup100: pallet_rmrk_core::pallet::Event<T>
**/
PalletRmrkCoreEvent: {
_enum: {
@@ -1143,7 +1139,7 @@
}
},
/**
- * Lookup102: rmrk_traits::nft::AccountIdOrCollectionNftTuple<sp_core::crypto::AccountId32>
+ * Lookup101: rmrk_traits::nft::AccountIdOrCollectionNftTuple<sp_core::crypto::AccountId32>
**/
RmrkTraitsNftAccountIdOrCollectionNftTuple: {
_enum: {
@@ -1152,7 +1148,7 @@
}
},
/**
- * Lookup107: pallet_rmrk_equip::pallet::Event<T>
+ * Lookup106: pallet_rmrk_equip::pallet::Event<T>
**/
PalletRmrkEquipEvent: {
_enum: {
@@ -1167,7 +1163,7 @@
}
},
/**
- * Lookup108: pallet_app_promotion::pallet::Event<T>
+ * Lookup107: pallet_app_promotion::pallet::Event<T>
**/
PalletAppPromotionEvent: {
_enum: {
@@ -1178,7 +1174,7 @@
}
},
/**
- * Lookup109: pallet_foreign_assets::module::Event<T>
+ * Lookup108: pallet_foreign_assets::module::Event<T>
**/
PalletForeignAssetsModuleEvent: {
_enum: {
@@ -1203,7 +1199,7 @@
}
},
/**
- * Lookup110: pallet_foreign_assets::module::AssetMetadata<Balance>
+ * Lookup109: pallet_foreign_assets::module::AssetMetadata<Balance>
**/
PalletForeignAssetsModuleAssetMetadata: {
name: 'Bytes',
@@ -1212,21 +1208,29 @@
minimalBalance: 'u128'
},
/**
- * Lookup111: pallet_evm::pallet::Event<T>
+ * Lookup110: pallet_evm::pallet::Event<T>
**/
PalletEvmEvent: {
_enum: {
- Log: 'EthereumLog',
- Created: 'H160',
- CreatedFailed: 'H160',
- Executed: 'H160',
- ExecutedFailed: 'H160',
- BalanceDeposit: '(AccountId32,H160,U256)',
- BalanceWithdraw: '(AccountId32,H160,U256)'
+ Log: {
+ log: 'EthereumLog',
+ },
+ Created: {
+ address: 'H160',
+ },
+ CreatedFailed: {
+ address: 'H160',
+ },
+ Executed: {
+ address: 'H160',
+ },
+ ExecutedFailed: {
+ address: 'H160'
+ }
}
},
/**
- * Lookup112: ethereum::log::Log
+ * Lookup111: ethereum::log::Log
**/
EthereumLog: {
address: 'H160',
@@ -1234,15 +1238,20 @@
data: 'Bytes'
},
/**
- * Lookup116: pallet_ethereum::pallet::Event
+ * Lookup113: pallet_ethereum::pallet::Event
**/
PalletEthereumEvent: {
_enum: {
- Executed: '(H160,H160,H256,EvmCoreErrorExitReason)'
+ Executed: {
+ from: 'H160',
+ to: 'H160',
+ transactionHash: 'H256',
+ exitReason: 'EvmCoreErrorExitReason'
+ }
}
},
/**
- * Lookup117: evm_core::error::ExitReason
+ * Lookup114: evm_core::error::ExitReason
**/
EvmCoreErrorExitReason: {
_enum: {
@@ -1253,13 +1262,13 @@
}
},
/**
- * Lookup118: evm_core::error::ExitSucceed
+ * Lookup115: evm_core::error::ExitSucceed
**/
EvmCoreErrorExitSucceed: {
_enum: ['Stopped', 'Returned', 'Suicided']
},
/**
- * Lookup119: evm_core::error::ExitError
+ * Lookup116: evm_core::error::ExitError
**/
EvmCoreErrorExitError: {
_enum: {
@@ -1281,13 +1290,13 @@
}
},
/**
- * Lookup122: evm_core::error::ExitRevert
+ * Lookup119: evm_core::error::ExitRevert
**/
EvmCoreErrorExitRevert: {
_enum: ['Reverted']
},
/**
- * Lookup123: evm_core::error::ExitFatal
+ * Lookup120: evm_core::error::ExitFatal
**/
EvmCoreErrorExitFatal: {
_enum: {
@@ -1298,7 +1307,7 @@
}
},
/**
- * Lookup124: pallet_evm_contract_helpers::pallet::Event<T>
+ * Lookup121: pallet_evm_contract_helpers::pallet::Event<T>
**/
PalletEvmContractHelpersEvent: {
_enum: {
@@ -1308,19 +1317,25 @@
}
},
/**
- * Lookup125: pallet_maintenance::pallet::Event<T>
+ * Lookup122: pallet_evm_migration::pallet::Event<T>
+ **/
+ PalletEvmMigrationEvent: {
+ _enum: ['TestEvent']
+ },
+ /**
+ * Lookup123: pallet_maintenance::pallet::Event<T>
**/
PalletMaintenanceEvent: {
_enum: ['MaintenanceEnabled', 'MaintenanceDisabled']
},
/**
- * Lookup126: pallet_test_utils::pallet::Event<T>
+ * Lookup124: pallet_test_utils::pallet::Event<T>
**/
PalletTestUtilsEvent: {
- _enum: ['ValueIsSet', 'ShouldRollback']
+ _enum: ['ValueIsSet', 'ShouldRollback', 'BatchCompleted']
},
/**
- * Lookup127: frame_system::Phase
+ * Lookup125: frame_system::Phase
**/
FrameSystemPhase: {
_enum: {
@@ -1330,14 +1345,14 @@
}
},
/**
- * Lookup129: frame_system::LastRuntimeUpgradeInfo
+ * Lookup127: frame_system::LastRuntimeUpgradeInfo
**/
FrameSystemLastRuntimeUpgradeInfo: {
specVersion: 'Compact<u32>',
specName: 'Text'
},
/**
- * Lookup130: frame_system::pallet::Call<T>
+ * Lookup128: frame_system::pallet::Call<T>
**/
FrameSystemCall: {
_enum: {
@@ -1375,7 +1390,7 @@
}
},
/**
- * Lookup135: frame_system::limits::BlockWeights
+ * Lookup133: frame_system::limits::BlockWeights
**/
FrameSystemLimitsBlockWeights: {
baseBlock: 'Weight',
@@ -1383,7 +1398,7 @@
perClass: 'FrameSupportDispatchPerDispatchClassWeightsPerClass'
},
/**
- * Lookup136: frame_support::dispatch::PerDispatchClass<frame_system::limits::WeightsPerClass>
+ * Lookup134: frame_support::dispatch::PerDispatchClass<frame_system::limits::WeightsPerClass>
**/
FrameSupportDispatchPerDispatchClassWeightsPerClass: {
normal: 'FrameSystemLimitsWeightsPerClass',
@@ -1391,7 +1406,7 @@
mandatory: 'FrameSystemLimitsWeightsPerClass'
},
/**
- * Lookup137: frame_system::limits::WeightsPerClass
+ * Lookup135: frame_system::limits::WeightsPerClass
**/
FrameSystemLimitsWeightsPerClass: {
baseExtrinsic: 'Weight',
@@ -1400,13 +1415,13 @@
reserved: 'Option<Weight>'
},
/**
- * Lookup139: frame_system::limits::BlockLength
+ * Lookup137: frame_system::limits::BlockLength
**/
FrameSystemLimitsBlockLength: {
max: 'FrameSupportDispatchPerDispatchClassU32'
},
/**
- * Lookup140: frame_support::dispatch::PerDispatchClass<T>
+ * Lookup138: frame_support::dispatch::PerDispatchClass<T>
**/
FrameSupportDispatchPerDispatchClassU32: {
normal: 'u32',
@@ -1414,14 +1429,14 @@
mandatory: 'u32'
},
/**
- * Lookup141: sp_weights::RuntimeDbWeight
+ * Lookup139: sp_weights::RuntimeDbWeight
**/
SpWeightsRuntimeDbWeight: {
read: 'u64',
write: 'u64'
},
/**
- * Lookup142: sp_version::RuntimeVersion
+ * Lookup140: sp_version::RuntimeVersion
**/
SpVersionRuntimeVersion: {
specName: 'Text',
@@ -1434,13 +1449,13 @@
stateVersion: 'u8'
},
/**
- * Lookup147: frame_system::pallet::Error<T>
+ * Lookup145: frame_system::pallet::Error<T>
**/
FrameSystemError: {
_enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']
},
/**
- * Lookup148: polkadot_primitives::v2::PersistedValidationData<primitive_types::H256, N>
+ * Lookup146: polkadot_primitives::v2::PersistedValidationData<primitive_types::H256, N>
**/
PolkadotPrimitivesV2PersistedValidationData: {
parentHead: 'Bytes',
@@ -1449,19 +1464,19 @@
maxPovSize: 'u32'
},
/**
- * Lookup151: polkadot_primitives::v2::UpgradeRestriction
+ * Lookup149: polkadot_primitives::v2::UpgradeRestriction
**/
PolkadotPrimitivesV2UpgradeRestriction: {
_enum: ['Present']
},
/**
- * Lookup152: sp_trie::storage_proof::StorageProof
+ * Lookup150: sp_trie::storage_proof::StorageProof
**/
SpTrieStorageProof: {
trieNodes: 'BTreeSet<Bytes>'
},
/**
- * Lookup154: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot
+ * Lookup152: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot
**/
CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: {
dmqMqcHead: 'H256',
@@ -1470,7 +1485,7 @@
egressChannels: 'Vec<(u32,PolkadotPrimitivesV2AbridgedHrmpChannel)>'
},
/**
- * Lookup157: polkadot_primitives::v2::AbridgedHrmpChannel
+ * Lookup155: polkadot_primitives::v2::AbridgedHrmpChannel
**/
PolkadotPrimitivesV2AbridgedHrmpChannel: {
maxCapacity: 'u32',
@@ -1481,7 +1496,7 @@
mqcHead: 'Option<H256>'
},
/**
- * Lookup158: polkadot_primitives::v2::AbridgedHostConfiguration
+ * Lookup156: polkadot_primitives::v2::AbridgedHostConfiguration
**/
PolkadotPrimitivesV2AbridgedHostConfiguration: {
maxCodeSize: 'u32',
@@ -1495,14 +1510,14 @@
validationUpgradeDelay: 'u32'
},
/**
- * Lookup164: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
+ * Lookup162: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
**/
PolkadotCorePrimitivesOutboundHrmpMessage: {
recipient: 'u32',
data: 'Bytes'
},
/**
- * Lookup165: cumulus_pallet_parachain_system::pallet::Call<T>
+ * Lookup163: cumulus_pallet_parachain_system::pallet::Call<T>
**/
CumulusPalletParachainSystemCall: {
_enum: {
@@ -1521,7 +1536,7 @@
}
},
/**
- * Lookup166: cumulus_primitives_parachain_inherent::ParachainInherentData
+ * Lookup164: cumulus_primitives_parachain_inherent::ParachainInherentData
**/
CumulusPrimitivesParachainInherentParachainInherentData: {
validationData: 'PolkadotPrimitivesV2PersistedValidationData',
@@ -1530,27 +1545,27 @@
horizontalMessages: 'BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>'
},
/**
- * Lookup168: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
+ * Lookup166: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundDownwardMessage: {
sentAt: 'u32',
msg: 'Bytes'
},
/**
- * Lookup171: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
+ * Lookup169: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundHrmpMessage: {
sentAt: 'u32',
data: 'Bytes'
},
/**
- * Lookup174: cumulus_pallet_parachain_system::pallet::Error<T>
+ * Lookup172: cumulus_pallet_parachain_system::pallet::Error<T>
**/
CumulusPalletParachainSystemError: {
_enum: ['OverlappingUpgrades', 'ProhibitedByPolkadot', 'TooBig', 'ValidationDataNotAvailable', 'HostConfigurationNotAvailable', 'NotScheduled', 'NothingAuthorized', 'Unauthorized']
},
/**
- * Lookup176: pallet_balances::BalanceLock<Balance>
+ * Lookup174: pallet_balances::BalanceLock<Balance>
**/
PalletBalancesBalanceLock: {
id: '[u8;8]',
@@ -1558,26 +1573,26 @@
reasons: 'PalletBalancesReasons'
},
/**
- * Lookup177: pallet_balances::Reasons
+ * Lookup175: pallet_balances::Reasons
**/
PalletBalancesReasons: {
_enum: ['Fee', 'Misc', 'All']
},
/**
- * Lookup180: pallet_balances::ReserveData<ReserveIdentifier, Balance>
+ * Lookup178: pallet_balances::ReserveData<ReserveIdentifier, Balance>
**/
PalletBalancesReserveData: {
id: '[u8;16]',
amount: 'u128'
},
/**
- * Lookup182: pallet_balances::Releases
+ * Lookup180: pallet_balances::Releases
**/
PalletBalancesReleases: {
_enum: ['V1_0_0', 'V2_0_0']
},
/**
- * Lookup183: pallet_balances::pallet::Call<T, I>
+ * Lookup181: pallet_balances::pallet::Call<T, I>
**/
PalletBalancesCall: {
_enum: {
@@ -1610,13 +1625,13 @@
}
},
/**
- * Lookup186: pallet_balances::pallet::Error<T, I>
+ * Lookup184: pallet_balances::pallet::Error<T, I>
**/
PalletBalancesError: {
_enum: ['VestingBalance', 'LiquidityRestrictions', 'InsufficientBalance', 'ExistentialDeposit', 'KeepAlive', 'ExistingVestingSchedule', 'DeadAccount', 'TooManyReserves']
},
/**
- * Lookup188: pallet_timestamp::pallet::Call<T>
+ * Lookup186: pallet_timestamp::pallet::Call<T>
**/
PalletTimestampCall: {
_enum: {
@@ -1626,13 +1641,13 @@
}
},
/**
- * Lookup190: pallet_transaction_payment::Releases
+ * Lookup188: pallet_transaction_payment::Releases
**/
PalletTransactionPaymentReleases: {
_enum: ['V1Ancient', 'V2']
},
/**
- * Lookup191: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>
+ * Lookup189: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>
**/
PalletTreasuryProposal: {
proposer: 'AccountId32',
@@ -1641,7 +1656,7 @@
bond: 'u128'
},
/**
- * Lookup194: pallet_treasury::pallet::Call<T, I>
+ * Lookup192: pallet_treasury::pallet::Call<T, I>
**/
PalletTreasuryCall: {
_enum: {
@@ -1665,17 +1680,17 @@
}
},
/**
- * Lookup197: frame_support::PalletId
+ * Lookup195: frame_support::PalletId
**/
FrameSupportPalletId: '[u8;8]',
/**
- * Lookup198: pallet_treasury::pallet::Error<T, I>
+ * Lookup196: pallet_treasury::pallet::Error<T, I>
**/
PalletTreasuryError: {
_enum: ['InsufficientProposersBalance', 'InvalidIndex', 'TooManyApprovals', 'InsufficientPermission', 'ProposalNotApproved']
},
/**
- * Lookup199: pallet_sudo::pallet::Call<T>
+ * Lookup197: pallet_sudo::pallet::Call<T>
**/
PalletSudoCall: {
_enum: {
@@ -1699,7 +1714,7 @@
}
},
/**
- * Lookup201: orml_vesting::module::Call<T>
+ * Lookup199: orml_vesting::module::Call<T>
**/
OrmlVestingModuleCall: {
_enum: {
@@ -1718,7 +1733,7 @@
}
},
/**
- * Lookup203: orml_xtokens::module::Call<T>
+ * Lookup201: orml_xtokens::module::Call<T>
**/
OrmlXtokensModuleCall: {
_enum: {
@@ -1761,7 +1776,7 @@
}
},
/**
- * Lookup204: xcm::VersionedMultiAsset
+ * Lookup202: xcm::VersionedMultiAsset
**/
XcmVersionedMultiAsset: {
_enum: {
@@ -1770,7 +1785,7 @@
}
},
/**
- * Lookup207: orml_tokens::module::Call<T>
+ * Lookup205: orml_tokens::module::Call<T>
**/
OrmlTokensModuleCall: {
_enum: {
@@ -1804,7 +1819,7 @@
}
},
/**
- * Lookup208: cumulus_pallet_xcmp_queue::pallet::Call<T>
+ * Lookup206: cumulus_pallet_xcmp_queue::pallet::Call<T>
**/
CumulusPalletXcmpQueueCall: {
_enum: {
@@ -1853,7 +1868,7 @@
}
},
/**
- * Lookup209: pallet_xcm::pallet::Call<T>
+ * Lookup207: pallet_xcm::pallet::Call<T>
**/
PalletXcmCall: {
_enum: {
@@ -1907,7 +1922,7 @@
}
},
/**
- * Lookup210: xcm::VersionedXcm<RuntimeCall>
+ * Lookup208: xcm::VersionedXcm<RuntimeCall>
**/
XcmVersionedXcm: {
_enum: {
@@ -1917,7 +1932,7 @@
}
},
/**
- * Lookup211: xcm::v0::Xcm<RuntimeCall>
+ * Lookup209: xcm::v0::Xcm<RuntimeCall>
**/
XcmV0Xcm: {
_enum: {
@@ -1971,7 +1986,7 @@
}
},
/**
- * Lookup213: xcm::v0::order::Order<RuntimeCall>
+ * Lookup211: xcm::v0::order::Order<RuntimeCall>
**/
XcmV0Order: {
_enum: {
@@ -2014,7 +2029,7 @@
}
},
/**
- * Lookup215: xcm::v0::Response
+ * Lookup213: xcm::v0::Response
**/
XcmV0Response: {
_enum: {
@@ -2022,7 +2037,7 @@
}
},
/**
- * Lookup216: xcm::v1::Xcm<RuntimeCall>
+ * Lookup214: xcm::v1::Xcm<RuntimeCall>
**/
XcmV1Xcm: {
_enum: {
@@ -2081,7 +2096,7 @@
}
},
/**
- * Lookup218: xcm::v1::order::Order<RuntimeCall>
+ * Lookup216: xcm::v1::order::Order<RuntimeCall>
**/
XcmV1Order: {
_enum: {
@@ -2126,7 +2141,7 @@
}
},
/**
- * Lookup220: xcm::v1::Response
+ * Lookup218: xcm::v1::Response
**/
XcmV1Response: {
_enum: {
@@ -2135,11 +2150,11 @@
}
},
/**
- * Lookup234: cumulus_pallet_xcm::pallet::Call<T>
+ * Lookup232: cumulus_pallet_xcm::pallet::Call<T>
**/
CumulusPalletXcmCall: 'Null',
/**
- * Lookup235: cumulus_pallet_dmp_queue::pallet::Call<T>
+ * Lookup233: cumulus_pallet_dmp_queue::pallet::Call<T>
**/
CumulusPalletDmpQueueCall: {
_enum: {
@@ -2150,7 +2165,7 @@
}
},
/**
- * Lookup236: pallet_inflation::pallet::Call<T>
+ * Lookup234: pallet_inflation::pallet::Call<T>
**/
PalletInflationCall: {
_enum: {
@@ -2160,7 +2175,7 @@
}
},
/**
- * Lookup237: pallet_unique::Call<T>
+ * Lookup235: pallet_unique::Call<T>
**/
PalletUniqueCall: {
_enum: {
@@ -2292,7 +2307,7 @@
}
},
/**
- * Lookup242: up_data_structs::CollectionMode
+ * Lookup240: up_data_structs::CollectionMode
**/
UpDataStructsCollectionMode: {
_enum: {
@@ -2302,7 +2317,7 @@
}
},
/**
- * Lookup243: up_data_structs::CreateCollectionData<sp_core::crypto::AccountId32>
+ * Lookup241: up_data_structs::CreateCollectionData<sp_core::crypto::AccountId32>
**/
UpDataStructsCreateCollectionData: {
mode: 'UpDataStructsCollectionMode',
@@ -2317,13 +2332,13 @@
properties: 'Vec<UpDataStructsProperty>'
},
/**
- * Lookup245: up_data_structs::AccessMode
+ * Lookup243: up_data_structs::AccessMode
**/
UpDataStructsAccessMode: {
_enum: ['Normal', 'AllowList']
},
/**
- * Lookup247: up_data_structs::CollectionLimits
+ * Lookup245: up_data_structs::CollectionLimits
**/
UpDataStructsCollectionLimits: {
accountTokenOwnershipLimit: 'Option<u32>',
@@ -2337,7 +2352,7 @@
transfersEnabled: 'Option<bool>'
},
/**
- * Lookup249: up_data_structs::SponsoringRateLimit
+ * Lookup247: up_data_structs::SponsoringRateLimit
**/
UpDataStructsSponsoringRateLimit: {
_enum: {
@@ -2346,7 +2361,7 @@
}
},
/**
- * Lookup252: up_data_structs::CollectionPermissions
+ * Lookup250: up_data_structs::CollectionPermissions
**/
UpDataStructsCollectionPermissions: {
access: 'Option<UpDataStructsAccessMode>',
@@ -2354,7 +2369,7 @@
nesting: 'Option<UpDataStructsNestingPermissions>'
},
/**
- * Lookup254: up_data_structs::NestingPermissions
+ * Lookup252: up_data_structs::NestingPermissions
**/
UpDataStructsNestingPermissions: {
tokenOwner: 'bool',
@@ -2362,18 +2377,18 @@
restricted: 'Option<UpDataStructsOwnerRestrictedSet>'
},
/**
- * Lookup256: up_data_structs::OwnerRestrictedSet
+ * Lookup254: up_data_structs::OwnerRestrictedSet
**/
UpDataStructsOwnerRestrictedSet: 'BTreeSet<u32>',
/**
- * Lookup261: up_data_structs::PropertyKeyPermission
+ * Lookup259: up_data_structs::PropertyKeyPermission
**/
UpDataStructsPropertyKeyPermission: {
key: 'Bytes',
permission: 'UpDataStructsPropertyPermission'
},
/**
- * Lookup262: up_data_structs::PropertyPermission
+ * Lookup260: up_data_structs::PropertyPermission
**/
UpDataStructsPropertyPermission: {
mutable: 'bool',
@@ -2381,14 +2396,14 @@
tokenOwner: 'bool'
},
/**
- * Lookup265: up_data_structs::Property
+ * Lookup263: up_data_structs::Property
**/
UpDataStructsProperty: {
key: 'Bytes',
value: 'Bytes'
},
/**
- * Lookup268: up_data_structs::CreateItemData
+ * Lookup266: up_data_structs::CreateItemData
**/
UpDataStructsCreateItemData: {
_enum: {
@@ -2398,26 +2413,26 @@
}
},
/**
- * Lookup269: up_data_structs::CreateNftData
+ * Lookup267: up_data_structs::CreateNftData
**/
UpDataStructsCreateNftData: {
properties: 'Vec<UpDataStructsProperty>'
},
/**
- * Lookup270: up_data_structs::CreateFungibleData
+ * Lookup268: up_data_structs::CreateFungibleData
**/
UpDataStructsCreateFungibleData: {
value: 'u128'
},
/**
- * Lookup271: up_data_structs::CreateReFungibleData
+ * Lookup269: up_data_structs::CreateReFungibleData
**/
UpDataStructsCreateReFungibleData: {
pieces: 'u128',
properties: 'Vec<UpDataStructsProperty>'
},
/**
- * Lookup274: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup272: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsCreateItemExData: {
_enum: {
@@ -2428,14 +2443,14 @@
}
},
/**
- * Lookup276: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup274: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsCreateNftExData: {
properties: 'Vec<UpDataStructsProperty>',
owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
},
/**
- * Lookup283: up_data_structs::CreateRefungibleExSingleOwner<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup281: up_data_structs::CreateRefungibleExSingleOwner<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsCreateRefungibleExSingleOwner: {
user: 'PalletEvmAccountBasicCrossAccountIdRepr',
@@ -2443,51 +2458,58 @@
properties: 'Vec<UpDataStructsProperty>'
},
/**
- * Lookup285: up_data_structs::CreateRefungibleExMultipleOwners<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup283: up_data_structs::CreateRefungibleExMultipleOwners<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsCreateRefungibleExMultipleOwners: {
users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',
properties: 'Vec<UpDataStructsProperty>'
},
/**
- * Lookup286: pallet_unique_scheduler::pallet::Call<T>
+ * Lookup284: pallet_unique_scheduler_v2::pallet::Call<T>
**/
- PalletUniqueSchedulerCall: {
+ PalletUniqueSchedulerV2Call: {
_enum: {
+ schedule: {
+ when: 'u32',
+ maybePeriodic: 'Option<(u32,u32)>',
+ priority: 'Option<u8>',
+ call: 'Call',
+ },
+ cancel: {
+ when: 'u32',
+ index: 'u32',
+ },
schedule_named: {
- id: '[u8;16]',
+ id: '[u8;32]',
when: 'u32',
maybePeriodic: 'Option<(u32,u32)>',
priority: 'Option<u8>',
- call: 'FrameSupportScheduleMaybeHashed',
+ call: 'Call',
},
cancel_named: {
- id: '[u8;16]',
+ id: '[u8;32]',
},
+ schedule_after: {
+ after: 'u32',
+ maybePeriodic: 'Option<(u32,u32)>',
+ priority: 'Option<u8>',
+ call: 'Call',
+ },
schedule_named_after: {
- id: '[u8;16]',
+ id: '[u8;32]',
after: 'u32',
maybePeriodic: 'Option<(u32,u32)>',
priority: 'Option<u8>',
- call: 'FrameSupportScheduleMaybeHashed',
+ call: 'Call',
},
change_named_priority: {
- id: '[u8;16]',
+ id: '[u8;32]',
priority: 'u8'
}
}
},
/**
- * Lookup289: frame_support::traits::schedule::MaybeHashed<opal_runtime::RuntimeCall, primitive_types::H256>
- **/
- FrameSupportScheduleMaybeHashed: {
- _enum: {
- Value: 'Call',
- Hash: 'H256'
- }
- },
- /**
- * Lookup290: pallet_configuration::pallet::Call<T>
+ * Lookup287: pallet_configuration::pallet::Call<T>
**/
PalletConfigurationCall: {
_enum: {
@@ -2500,15 +2522,15 @@
}
},
/**
- * Lookup292: pallet_template_transaction_payment::Call<T>
+ * Lookup289: pallet_template_transaction_payment::Call<T>
**/
PalletTemplateTransactionPaymentCall: 'Null',
/**
- * Lookup293: pallet_structure::pallet::Call<T>
+ * Lookup290: pallet_structure::pallet::Call<T>
**/
PalletStructureCall: 'Null',
/**
- * Lookup294: pallet_rmrk_core::pallet::Call<T>
+ * Lookup291: pallet_rmrk_core::pallet::Call<T>
**/
PalletRmrkCoreCall: {
_enum: {
@@ -2599,7 +2621,7 @@
}
},
/**
- * Lookup300: rmrk_traits::resource::ResourceTypes<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup297: rmrk_traits::resource::ResourceTypes<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsResourceResourceTypes: {
_enum: {
@@ -2609,7 +2631,7 @@
}
},
/**
- * Lookup302: rmrk_traits::resource::BasicResource<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup299: rmrk_traits::resource::BasicResource<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsResourceBasicResource: {
src: 'Option<Bytes>',
@@ -2618,7 +2640,7 @@
thumb: 'Option<Bytes>'
},
/**
- * Lookup304: rmrk_traits::resource::ComposableResource<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup301: rmrk_traits::resource::ComposableResource<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsResourceComposableResource: {
parts: 'Vec<u32>',
@@ -2629,7 +2651,7 @@
thumb: 'Option<Bytes>'
},
/**
- * Lookup305: rmrk_traits::resource::SlotResource<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup302: rmrk_traits::resource::SlotResource<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsResourceSlotResource: {
base: 'u32',
@@ -2640,7 +2662,7 @@
thumb: 'Option<Bytes>'
},
/**
- * Lookup308: pallet_rmrk_equip::pallet::Call<T>
+ * Lookup305: pallet_rmrk_equip::pallet::Call<T>
**/
PalletRmrkEquipCall: {
_enum: {
@@ -2661,7 +2683,7 @@
}
},
/**
- * Lookup311: rmrk_traits::part::PartType<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup308: rmrk_traits::part::PartType<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsPartPartType: {
_enum: {
@@ -2670,7 +2692,7 @@
}
},
/**
- * Lookup313: rmrk_traits::part::FixedPart<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup310: rmrk_traits::part::FixedPart<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsPartFixedPart: {
id: 'u32',
@@ -2678,7 +2700,7 @@
src: 'Bytes'
},
/**
- * Lookup314: rmrk_traits::part::SlotPart<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup311: rmrk_traits::part::SlotPart<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsPartSlotPart: {
id: 'u32',
@@ -2687,7 +2709,7 @@
z: 'u32'
},
/**
- * Lookup315: rmrk_traits::part::EquippableList<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup312: rmrk_traits::part::EquippableList<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsPartEquippableList: {
_enum: {
@@ -2697,7 +2719,7 @@
}
},
/**
- * Lookup317: rmrk_traits::theme::Theme<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<rmrk_traits::theme::ThemeProperty<sp_core::bounded::bounded_vec::BoundedVec<T, S>>, S>>
+ * Lookup314: rmrk_traits::theme::Theme<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<rmrk_traits::theme::ThemeProperty<sp_core::bounded::bounded_vec::BoundedVec<T, S>>, S>>
**/
RmrkTraitsTheme: {
name: 'Bytes',
@@ -2705,14 +2727,14 @@
inherit: 'bool'
},
/**
- * Lookup319: rmrk_traits::theme::ThemeProperty<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup316: rmrk_traits::theme::ThemeProperty<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsThemeThemeProperty: {
key: 'Bytes',
value: 'Bytes'
},
/**
- * Lookup321: pallet_app_promotion::pallet::Call<T>
+ * Lookup318: pallet_app_promotion::pallet::Call<T>
**/
PalletAppPromotionCall: {
_enum: {
@@ -2741,7 +2763,7 @@
}
},
/**
- * Lookup322: pallet_foreign_assets::module::Call<T>
+ * Lookup319: pallet_foreign_assets::module::Call<T>
**/
PalletForeignAssetsModuleCall: {
_enum: {
@@ -2758,7 +2780,7 @@
}
},
/**
- * Lookup323: pallet_evm::pallet::Call<T>
+ * Lookup320: pallet_evm::pallet::Call<T>
**/
PalletEvmCall: {
_enum: {
@@ -2801,7 +2823,7 @@
}
},
/**
- * Lookup327: pallet_ethereum::pallet::Call<T>
+ * Lookup326: pallet_ethereum::pallet::Call<T>
**/
PalletEthereumCall: {
_enum: {
@@ -2811,7 +2833,7 @@
}
},
/**
- * Lookup328: ethereum::transaction::TransactionV2
+ * Lookup327: ethereum::transaction::TransactionV2
**/
EthereumTransactionTransactionV2: {
_enum: {
@@ -2821,7 +2843,7 @@
}
},
/**
- * Lookup329: ethereum::transaction::LegacyTransaction
+ * Lookup328: ethereum::transaction::LegacyTransaction
**/
EthereumTransactionLegacyTransaction: {
nonce: 'U256',
@@ -2833,7 +2855,7 @@
signature: 'EthereumTransactionTransactionSignature'
},
/**
- * Lookup330: ethereum::transaction::TransactionAction
+ * Lookup329: ethereum::transaction::TransactionAction
**/
EthereumTransactionTransactionAction: {
_enum: {
@@ -2842,7 +2864,7 @@
}
},
/**
- * Lookup331: ethereum::transaction::TransactionSignature
+ * Lookup330: ethereum::transaction::TransactionSignature
**/
EthereumTransactionTransactionSignature: {
v: 'u64',
@@ -2850,7 +2872,7 @@
s: 'H256'
},
/**
- * Lookup333: ethereum::transaction::EIP2930Transaction
+ * Lookup332: ethereum::transaction::EIP2930Transaction
**/
EthereumTransactionEip2930Transaction: {
chainId: 'u64',
@@ -2866,14 +2888,14 @@
s: 'H256'
},
/**
- * Lookup335: ethereum::transaction::AccessListItem
+ * Lookup334: ethereum::transaction::AccessListItem
**/
EthereumTransactionAccessListItem: {
address: 'H160',
storageKeys: 'Vec<H256>'
},
/**
- * Lookup336: ethereum::transaction::EIP1559Transaction
+ * Lookup335: ethereum::transaction::EIP1559Transaction
**/
EthereumTransactionEip1559Transaction: {
chainId: 'u64',
@@ -2890,7 +2912,7 @@
s: 'H256'
},
/**
- * Lookup337: pallet_evm_migration::pallet::Call<T>
+ * Lookup336: pallet_evm_migration::pallet::Call<T>
**/
PalletEvmMigrationCall: {
_enum: {
@@ -2903,7 +2925,13 @@
},
finish: {
address: 'H160',
- code: 'Bytes'
+ code: 'Bytes',
+ },
+ insert_eth_logs: {
+ logs: 'Vec<EthereumLog>',
+ },
+ insert_events: {
+ events: 'Vec<Bytes>'
}
}
},
@@ -2927,39 +2955,42 @@
},
inc_test_value: 'Null',
self_canceling_inc: {
- id: '[u8;16]',
+ id: '[u8;32]',
maxTestValue: 'u32',
},
- just_take_fee: 'Null'
+ just_take_fee: 'Null',
+ batch_all: {
+ calls: 'Vec<Call>'
+ }
}
},
/**
- * Lookup342: pallet_sudo::pallet::Error<T>
+ * Lookup343: pallet_sudo::pallet::Error<T>
**/
PalletSudoError: {
_enum: ['RequireSudo']
},
/**
- * Lookup344: orml_vesting::module::Error<T>
+ * Lookup345: orml_vesting::module::Error<T>
**/
OrmlVestingModuleError: {
_enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']
},
/**
- * Lookup345: orml_xtokens::module::Error<T>
+ * Lookup346: orml_xtokens::module::Error<T>
**/
OrmlXtokensModuleError: {
_enum: ['AssetHasNoReserve', 'NotCrossChainTransfer', 'InvalidDest', 'NotCrossChainTransferableCurrency', 'UnweighableMessage', 'XcmExecutionFailed', 'CannotReanchor', 'InvalidAncestry', 'InvalidAsset', 'DestinationNotInvertible', 'BadVersion', 'DistinctReserveForAssetAndFee', 'ZeroFee', 'ZeroAmount', 'TooManyAssetsBeingSent', 'AssetIndexNonExistent', 'FeeNotEnough', 'NotSupportedMultiLocation', 'MinXcmFeeNotDefined']
},
/**
- * Lookup348: orml_tokens::BalanceLock<Balance>
+ * Lookup349: orml_tokens::BalanceLock<Balance>
**/
OrmlTokensBalanceLock: {
id: '[u8;8]',
amount: 'u128'
},
/**
- * Lookup350: orml_tokens::AccountData<Balance>
+ * Lookup351: orml_tokens::AccountData<Balance>
**/
OrmlTokensAccountData: {
free: 'u128',
@@ -2967,20 +2998,20 @@
frozen: 'u128'
},
/**
- * Lookup352: orml_tokens::ReserveData<ReserveIdentifier, Balance>
+ * Lookup353: orml_tokens::ReserveData<ReserveIdentifier, Balance>
**/
OrmlTokensReserveData: {
id: 'Null',
amount: 'u128'
},
/**
- * Lookup354: orml_tokens::module::Error<T>
+ * Lookup355: orml_tokens::module::Error<T>
**/
OrmlTokensModuleError: {
_enum: ['BalanceTooLow', 'AmountIntoBalanceFailed', 'LiquidityRestrictions', 'MaxLocksExceeded', 'KeepAlive', 'ExistentialDeposit', 'DeadAccount', 'TooManyReserves']
},
/**
- * Lookup356: cumulus_pallet_xcmp_queue::InboundChannelDetails
+ * Lookup357: cumulus_pallet_xcmp_queue::InboundChannelDetails
**/
CumulusPalletXcmpQueueInboundChannelDetails: {
sender: 'u32',
@@ -2988,19 +3019,19 @@
messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'
},
/**
- * Lookup357: cumulus_pallet_xcmp_queue::InboundState
+ * Lookup358: cumulus_pallet_xcmp_queue::InboundState
**/
CumulusPalletXcmpQueueInboundState: {
_enum: ['Ok', 'Suspended']
},
/**
- * Lookup360: polkadot_parachain::primitives::XcmpMessageFormat
+ * Lookup361: polkadot_parachain::primitives::XcmpMessageFormat
**/
PolkadotParachainPrimitivesXcmpMessageFormat: {
_enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']
},
/**
- * Lookup363: cumulus_pallet_xcmp_queue::OutboundChannelDetails
+ * Lookup364: cumulus_pallet_xcmp_queue::OutboundChannelDetails
**/
CumulusPalletXcmpQueueOutboundChannelDetails: {
recipient: 'u32',
@@ -3010,13 +3041,13 @@
lastIndex: 'u16'
},
/**
- * Lookup364: cumulus_pallet_xcmp_queue::OutboundState
+ * Lookup365: cumulus_pallet_xcmp_queue::OutboundState
**/
CumulusPalletXcmpQueueOutboundState: {
_enum: ['Ok', 'Suspended']
},
/**
- * Lookup366: cumulus_pallet_xcmp_queue::QueueConfigData
+ * Lookup367: cumulus_pallet_xcmp_queue::QueueConfigData
**/
CumulusPalletXcmpQueueQueueConfigData: {
suspendThreshold: 'u32',
@@ -3027,29 +3058,29 @@
xcmpMaxIndividualWeight: 'Weight'
},
/**
- * Lookup368: cumulus_pallet_xcmp_queue::pallet::Error<T>
+ * Lookup369: cumulus_pallet_xcmp_queue::pallet::Error<T>
**/
CumulusPalletXcmpQueueError: {
_enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']
},
/**
- * Lookup369: pallet_xcm::pallet::Error<T>
+ * Lookup370: pallet_xcm::pallet::Error<T>
**/
PalletXcmError: {
_enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed']
},
/**
- * Lookup370: cumulus_pallet_xcm::pallet::Error<T>
+ * Lookup371: cumulus_pallet_xcm::pallet::Error<T>
**/
CumulusPalletXcmError: 'Null',
/**
- * Lookup371: cumulus_pallet_dmp_queue::ConfigData
+ * Lookup372: cumulus_pallet_dmp_queue::ConfigData
**/
CumulusPalletDmpQueueConfigData: {
maxIndividual: 'Weight'
},
/**
- * Lookup372: cumulus_pallet_dmp_queue::PageIndexData
+ * Lookup373: cumulus_pallet_dmp_queue::PageIndexData
**/
CumulusPalletDmpQueuePageIndexData: {
beginUsed: 'u32',
@@ -3057,30 +3088,52 @@
overweightCount: 'u64'
},
/**
- * Lookup375: cumulus_pallet_dmp_queue::pallet::Error<T>
+ * Lookup376: cumulus_pallet_dmp_queue::pallet::Error<T>
**/
CumulusPalletDmpQueueError: {
_enum: ['Unknown', 'OverLimit']
},
/**
- * Lookup379: pallet_unique::Error<T>
+ * Lookup380: pallet_unique::Error<T>
**/
PalletUniqueError: {
_enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument', 'RepartitionCalledOnNonRefungibleCollection']
},
/**
- * Lookup382: pallet_unique_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::RuntimeCall, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>
+ * Lookup381: pallet_unique_scheduler_v2::BlockAgenda<T>
+ **/
+ PalletUniqueSchedulerV2BlockAgenda: {
+ agenda: 'Vec<Option<PalletUniqueSchedulerV2Scheduled>>',
+ freePlaces: 'u32'
+ },
+ /**
+ * Lookup384: pallet_unique_scheduler_v2::Scheduled<Name, pallet_unique_scheduler_v2::ScheduledCall<T>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>
**/
- PalletUniqueSchedulerScheduledV3: {
- maybeId: 'Option<[u8;16]>',
+ PalletUniqueSchedulerV2Scheduled: {
+ maybeId: 'Option<[u8;32]>',
priority: 'u8',
- call: 'FrameSupportScheduleMaybeHashed',
+ call: 'PalletUniqueSchedulerV2ScheduledCall',
maybePeriodic: 'Option<(u32,u32)>',
origin: 'OpalRuntimeOriginCaller'
},
/**
- * Lookup383: opal_runtime::OriginCaller
+ * Lookup385: pallet_unique_scheduler_v2::ScheduledCall<T>
**/
+ PalletUniqueSchedulerV2ScheduledCall: {
+ _enum: {
+ Inline: 'Bytes',
+ PreimageLookup: {
+ _alias: {
+ hash_: 'hash',
+ },
+ hash_: 'H256',
+ unboundedLen: 'u32'
+ }
+ }
+ },
+ /**
+ * Lookup387: opal_runtime::OriginCaller
+ **/
OpalRuntimeOriginCaller: {
_enum: {
system: 'FrameSupportDispatchRawOrigin',
@@ -3188,7 +3241,7 @@
}
},
/**
- * Lookup384: frame_support::dispatch::RawOrigin<sp_core::crypto::AccountId32>
+ * Lookup388: frame_support::dispatch::RawOrigin<sp_core::crypto::AccountId32>
**/
FrameSupportDispatchRawOrigin: {
_enum: {
@@ -3198,7 +3251,7 @@
}
},
/**
- * Lookup385: pallet_xcm::pallet::Origin
+ * Lookup389: pallet_xcm::pallet::Origin
**/
PalletXcmOrigin: {
_enum: {
@@ -3207,7 +3260,7 @@
}
},
/**
- * Lookup386: cumulus_pallet_xcm::pallet::Origin
+ * Lookup390: cumulus_pallet_xcm::pallet::Origin
**/
CumulusPalletXcmOrigin: {
_enum: {
@@ -3216,7 +3269,7 @@
}
},
/**
- * Lookup387: pallet_ethereum::RawOrigin
+ * Lookup391: pallet_ethereum::RawOrigin
**/
PalletEthereumRawOrigin: {
_enum: {
@@ -3224,17 +3277,17 @@
}
},
/**
- * Lookup388: sp_core::Void
+ * Lookup392: sp_core::Void
**/
SpCoreVoid: 'Null',
/**
- * Lookup389: pallet_unique_scheduler::pallet::Error<T>
+ * Lookup394: pallet_unique_scheduler_v2::pallet::Error<T>
**/
- PalletUniqueSchedulerError: {
- _enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange']
+ PalletUniqueSchedulerV2Error: {
+ _enum: ['FailedToSchedule', 'AgendaIsExhausted', 'ScheduledCallCorrupted', 'PreimageNotFound', 'TooBigScheduledCall', 'NotFound', 'TargetBlockNumberInPast', 'Named']
},
/**
- * Lookup390: up_data_structs::Collection<sp_core::crypto::AccountId32>
+ * Lookup395: up_data_structs::Collection<sp_core::crypto::AccountId32>
**/
UpDataStructsCollection: {
owner: 'AccountId32',
@@ -3248,7 +3301,7 @@
flags: '[u8;1]'
},
/**
- * Lookup391: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
+ * Lookup396: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
**/
UpDataStructsSponsorshipStateAccountId32: {
_enum: {
@@ -3258,7 +3311,7 @@
}
},
/**
- * Lookup393: up_data_structs::Properties
+ * Lookup398: up_data_structs::Properties
**/
UpDataStructsProperties: {
map: 'UpDataStructsPropertiesMapBoundedVec',
@@ -3266,15 +3319,15 @@
spaceLimit: 'u32'
},
/**
- * Lookup394: up_data_structs::PropertiesMap<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup399: up_data_structs::PropertiesMap<sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',
/**
- * Lookup399: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>
+ * Lookup404: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>
**/
UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',
/**
- * Lookup406: up_data_structs::CollectionStats
+ * Lookup411: up_data_structs::CollectionStats
**/
UpDataStructsCollectionStats: {
created: 'u32',
@@ -3282,18 +3335,18 @@
alive: 'u32'
},
/**
- * Lookup407: up_data_structs::TokenChild
+ * Lookup412: up_data_structs::TokenChild
**/
UpDataStructsTokenChild: {
token: 'u32',
collection: 'u32'
},
/**
- * Lookup408: PhantomType::up_data_structs<T>
+ * Lookup413: PhantomType::up_data_structs<T>
**/
PhantomTypeUpDataStructs: '[(UpDataStructsTokenData,UpDataStructsRpcCollection,RmrkTraitsCollectionCollectionInfo,RmrkTraitsNftNftInfo,RmrkTraitsResourceResourceInfo,RmrkTraitsPropertyPropertyInfo,RmrkTraitsBaseBaseInfo,RmrkTraitsPartPartType,RmrkTraitsTheme,RmrkTraitsNftNftChild);0]',
/**
- * Lookup410: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup415: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsTokenData: {
properties: 'Vec<UpDataStructsProperty>',
@@ -3301,7 +3354,7 @@
pieces: 'u128'
},
/**
- * Lookup412: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>
+ * Lookup417: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>
**/
UpDataStructsRpcCollection: {
owner: 'AccountId32',
@@ -3318,14 +3371,14 @@
flags: 'UpDataStructsRpcCollectionFlags'
},
/**
- * Lookup413: up_data_structs::RpcCollectionFlags
+ * Lookup418: up_data_structs::RpcCollectionFlags
**/
UpDataStructsRpcCollectionFlags: {
foreign: 'bool',
erc721metadata: 'bool'
},
/**
- * Lookup414: rmrk_traits::collection::CollectionInfo<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>
+ * Lookup419: rmrk_traits::collection::CollectionInfo<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>
**/
RmrkTraitsCollectionCollectionInfo: {
issuer: 'AccountId32',
@@ -3335,7 +3388,7 @@
nftsCount: 'u32'
},
/**
- * Lookup415: rmrk_traits::nft::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup420: rmrk_traits::nft::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsNftNftInfo: {
owner: 'RmrkTraitsNftAccountIdOrCollectionNftTuple',
@@ -3345,14 +3398,14 @@
pending: 'bool'
},
/**
- * Lookup417: rmrk_traits::nft::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>
+ * Lookup422: rmrk_traits::nft::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>
**/
RmrkTraitsNftRoyaltyInfo: {
recipient: 'AccountId32',
amount: 'Permill'
},
/**
- * Lookup418: rmrk_traits::resource::ResourceInfo<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup423: rmrk_traits::resource::ResourceInfo<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsResourceResourceInfo: {
id: 'u32',
@@ -3361,14 +3414,14 @@
pendingRemoval: 'bool'
},
/**
- * Lookup419: rmrk_traits::property::PropertyInfo<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup424: rmrk_traits::property::PropertyInfo<sp_core::bounded::bounded_vec::BoundedVec<T, S>, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsPropertyPropertyInfo: {
key: 'Bytes',
value: 'Bytes'
},
/**
- * Lookup420: rmrk_traits::base::BaseInfo<sp_core::crypto::AccountId32, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup425: rmrk_traits::base::BaseInfo<sp_core::crypto::AccountId32, sp_core::bounded::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsBaseBaseInfo: {
issuer: 'AccountId32',
@@ -3376,92 +3429,92 @@
symbol: 'Bytes'
},
/**
- * Lookup421: rmrk_traits::nft::NftChild
+ * Lookup426: rmrk_traits::nft::NftChild
**/
RmrkTraitsNftNftChild: {
collectionId: 'u32',
nftId: 'u32'
},
/**
- * Lookup423: pallet_common::pallet::Error<T>
+ * Lookup428: pallet_common::pallet::Error<T>
**/
PalletCommonError: {
_enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'CantDestroyNotEmptyCollection', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'UserIsNotAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal']
},
/**
- * Lookup425: pallet_fungible::pallet::Error<T>
+ * Lookup430: pallet_fungible::pallet::Error<T>
**/
PalletFungibleError: {
_enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed']
},
/**
- * Lookup426: pallet_refungible::ItemData
+ * Lookup431: pallet_refungible::ItemData
**/
PalletRefungibleItemData: {
constData: 'Bytes'
},
/**
- * Lookup431: pallet_refungible::pallet::Error<T>
+ * Lookup436: pallet_refungible::pallet::Error<T>
**/
PalletRefungibleError: {
_enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RepartitionWhileNotOwningAllPieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']
},
/**
- * Lookup432: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup437: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
PalletNonfungibleItemData: {
owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
},
/**
- * Lookup434: up_data_structs::PropertyScope
+ * Lookup439: up_data_structs::PropertyScope
**/
UpDataStructsPropertyScope: {
_enum: ['None', 'Rmrk']
},
/**
- * Lookup436: pallet_nonfungible::pallet::Error<T>
+ * Lookup441: pallet_nonfungible::pallet::Error<T>
**/
PalletNonfungibleError: {
_enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount', 'CantBurnNftWithChildren']
},
/**
- * Lookup437: pallet_structure::pallet::Error<T>
+ * Lookup442: pallet_structure::pallet::Error<T>
**/
PalletStructureError: {
_enum: ['OuroborosDetected', 'DepthLimit', 'BreadthLimit', 'TokenNotFound']
},
/**
- * Lookup438: pallet_rmrk_core::pallet::Error<T>
+ * Lookup443: pallet_rmrk_core::pallet::Error<T>
**/
PalletRmrkCoreError: {
_enum: ['CorruptedCollectionType', 'RmrkPropertyKeyIsTooLong', 'RmrkPropertyValueIsTooLong', 'RmrkPropertyIsNotFound', 'UnableToDecodeRmrkData', 'CollectionNotEmpty', 'NoAvailableCollectionId', 'NoAvailableNftId', 'CollectionUnknown', 'NoPermission', 'NonTransferable', 'CollectionFullOrLocked', 'ResourceDoesntExist', 'CannotSendToDescendentOrSelf', 'CannotAcceptNonOwnedNft', 'CannotRejectNonOwnedNft', 'CannotRejectNonPendingNft', 'ResourceNotPending', 'NoAvailableResourceId']
},
/**
- * Lookup440: pallet_rmrk_equip::pallet::Error<T>
+ * Lookup445: pallet_rmrk_equip::pallet::Error<T>
**/
PalletRmrkEquipError: {
_enum: ['PermissionError', 'NoAvailableBaseId', 'NoAvailablePartId', 'BaseDoesntExist', 'NeedsDefaultThemeFirst', 'PartDoesntExist', 'NoEquippableOnFixedPart']
},
/**
- * Lookup446: pallet_app_promotion::pallet::Error<T>
+ * Lookup451: pallet_app_promotion::pallet::Error<T>
**/
PalletAppPromotionError: {
_enum: ['AdminNotSet', 'NoPermission', 'NotSufficientFunds', 'PendingForBlockOverflow', 'SponsorNotSet', 'IncorrectLockedBalanceOperation']
},
/**
- * Lookup447: pallet_foreign_assets::module::Error<T>
+ * Lookup452: pallet_foreign_assets::module::Error<T>
**/
PalletForeignAssetsModuleError: {
_enum: ['BadLocation', 'MultiLocationExisted', 'AssetIdNotExists', 'AssetIdExisted']
},
/**
- * Lookup450: pallet_evm::pallet::Error<T>
+ * Lookup454: pallet_evm::pallet::Error<T>
**/
PalletEvmError: {
- _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce']
+ _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce', 'GasLimitTooLow', 'GasLimitTooHigh', 'Undefined', 'Reentrancy']
},
/**
- * Lookup453: fp_rpc::TransactionStatus
+ * Lookup457: fp_rpc::TransactionStatus
**/
FpRpcTransactionStatus: {
transactionHash: 'H256',
@@ -3473,11 +3526,11 @@
logsBloom: 'EthbloomBloom'
},
/**
- * Lookup455: ethbloom::Bloom
+ * Lookup459: ethbloom::Bloom
**/
EthbloomBloom: '[u8;256]',
/**
- * Lookup457: ethereum::receipt::ReceiptV3
+ * Lookup461: ethereum::receipt::ReceiptV3
**/
EthereumReceiptReceiptV3: {
_enum: {
@@ -3487,7 +3540,7 @@
}
},
/**
- * Lookup458: ethereum::receipt::EIP658ReceiptData
+ * Lookup462: ethereum::receipt::EIP658ReceiptData
**/
EthereumReceiptEip658ReceiptData: {
statusCode: 'u8',
@@ -3496,7 +3549,7 @@
logs: 'Vec<EthereumLog>'
},
/**
- * Lookup459: ethereum::block::Block<ethereum::transaction::TransactionV2>
+ * Lookup463: ethereum::block::Block<ethereum::transaction::TransactionV2>
**/
EthereumBlock: {
header: 'EthereumHeader',
@@ -3504,7 +3557,7 @@
ommers: 'Vec<EthereumHeader>'
},
/**
- * Lookup460: ethereum::header::Header
+ * Lookup464: ethereum::header::Header
**/
EthereumHeader: {
parentHash: 'H256',
@@ -3524,23 +3577,23 @@
nonce: 'EthereumTypesHashH64'
},
/**
- * Lookup461: ethereum_types::hash::H64
+ * Lookup465: ethereum_types::hash::H64
**/
EthereumTypesHashH64: '[u8;8]',
/**
- * Lookup466: pallet_ethereum::pallet::Error<T>
+ * Lookup470: pallet_ethereum::pallet::Error<T>
**/
PalletEthereumError: {
_enum: ['InvalidSignature', 'PreLogExists']
},
/**
- * Lookup467: pallet_evm_coder_substrate::pallet::Error<T>
+ * Lookup471: pallet_evm_coder_substrate::pallet::Error<T>
**/
PalletEvmCoderSubstrateError: {
_enum: ['OutOfGas', 'OutOfFund']
},
/**
- * Lookup468: up_data_structs::SponsorshipState<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup472: up_data_structs::SponsorshipState<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsSponsorshipStateBasicCrossAccountIdRepr: {
_enum: {
@@ -3550,35 +3603,35 @@
}
},
/**
- * Lookup469: pallet_evm_contract_helpers::SponsoringModeT
+ * Lookup473: pallet_evm_contract_helpers::SponsoringModeT
**/
PalletEvmContractHelpersSponsoringModeT: {
_enum: ['Disabled', 'Allowlisted', 'Generous']
},
/**
- * Lookup475: pallet_evm_contract_helpers::pallet::Error<T>
+ * Lookup479: pallet_evm_contract_helpers::pallet::Error<T>
**/
PalletEvmContractHelpersError: {
_enum: ['NoPermission', 'NoPendingSponsor', 'TooManyMethodsHaveSponsoredLimit']
},
/**
- * Lookup476: pallet_evm_migration::pallet::Error<T>
+ * Lookup480: pallet_evm_migration::pallet::Error<T>
**/
PalletEvmMigrationError: {
- _enum: ['AccountNotEmpty', 'AccountIsNotMigrating']
+ _enum: ['AccountNotEmpty', 'AccountIsNotMigrating', 'BadEvent']
},
/**
- * Lookup477: pallet_maintenance::pallet::Error<T>
+ * Lookup481: pallet_maintenance::pallet::Error<T>
**/
PalletMaintenanceError: 'Null',
/**
- * Lookup478: pallet_test_utils::pallet::Error<T>
+ * Lookup482: pallet_test_utils::pallet::Error<T>
**/
PalletTestUtilsError: {
_enum: ['TestPalletDisabled', 'TriggerRollback']
},
/**
- * Lookup480: sp_runtime::MultiSignature
+ * Lookup484: sp_runtime::MultiSignature
**/
SpRuntimeMultiSignature: {
_enum: {
@@ -3588,51 +3641,51 @@
}
},
/**
- * Lookup481: sp_core::ed25519::Signature
+ * Lookup485: sp_core::ed25519::Signature
**/
SpCoreEd25519Signature: '[u8;64]',
/**
- * Lookup483: sp_core::sr25519::Signature
+ * Lookup487: sp_core::sr25519::Signature
**/
SpCoreSr25519Signature: '[u8;64]',
/**
- * Lookup484: sp_core::ecdsa::Signature
+ * Lookup488: sp_core::ecdsa::Signature
**/
SpCoreEcdsaSignature: '[u8;65]',
/**
- * Lookup487: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
+ * Lookup491: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
**/
FrameSystemExtensionsCheckSpecVersion: 'Null',
/**
- * Lookup488: frame_system::extensions::check_tx_version::CheckTxVersion<T>
+ * Lookup492: frame_system::extensions::check_tx_version::CheckTxVersion<T>
**/
FrameSystemExtensionsCheckTxVersion: 'Null',
/**
- * Lookup489: frame_system::extensions::check_genesis::CheckGenesis<T>
+ * Lookup493: frame_system::extensions::check_genesis::CheckGenesis<T>
**/
FrameSystemExtensionsCheckGenesis: 'Null',
/**
- * Lookup492: frame_system::extensions::check_nonce::CheckNonce<T>
+ * Lookup496: frame_system::extensions::check_nonce::CheckNonce<T>
**/
FrameSystemExtensionsCheckNonce: 'Compact<u32>',
/**
- * Lookup493: frame_system::extensions::check_weight::CheckWeight<T>
+ * Lookup497: frame_system::extensions::check_weight::CheckWeight<T>
**/
FrameSystemExtensionsCheckWeight: 'Null',
/**
- * Lookup494: opal_runtime::runtime_common::maintenance::CheckMaintenance
+ * Lookup498: opal_runtime::runtime_common::maintenance::CheckMaintenance
**/
OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance: 'Null',
/**
- * Lookup495: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>
+ * Lookup499: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>
**/
PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
/**
- * Lookup496: opal_runtime::Runtime
+ * Lookup500: opal_runtime::Runtime
**/
OpalRuntimeRuntime: 'Null',
/**
- * Lookup497: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>
+ * Lookup501: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>
**/
PalletEthereumFakeTransactionFinalizer: 'Null'
};
tests/src/interfaces/registry.tsdiffbeforeafterboth--- a/tests/src/interfaces/registry.ts
+++ b/tests/src/interfaces/registry.ts
@@ -5,7 +5,7 @@
// this is required to allow for ambient/previous definitions
import '@polkadot/types/types/registry';
-import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, 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, FrameSupportDispatchDispatchClass, FrameSupportDispatchDispatchInfo, FrameSupportDispatchPays, FrameSupportDispatchPerDispatchClassU32, FrameSupportDispatchPerDispatchClassWeight, FrameSupportDispatchPerDispatchClassWeightsPerClass, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensModuleCall, OrmlTokensModuleError, OrmlTokensModuleEvent, OrmlTokensReserveData, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, OrmlXtokensModuleCall, OrmlXtokensModuleError, OrmlXtokensModuleEvent, PalletAppPromotionCall, PalletAppPromotionError, PalletAppPromotionEvent, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletConfigurationCall, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersEvent, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletForeignAssetsModuleCall, PalletForeignAssetsModuleError, PalletForeignAssetsModuleEvent, PalletForeignAssetsNativeCurrency, PalletFungibleError, PalletInflationCall, PalletMaintenanceCall, PalletMaintenanceError, PalletMaintenanceEvent, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTestUtilsCall, PalletTestUtilsError, PalletTestUtilsEvent, PalletTimestampCall, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerCall, PalletUniqueSchedulerError, PalletUniqueSchedulerEvent, PalletUniqueSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExMultipleOwners, UpDataStructsCreateRefungibleExSingleOwner, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsRpcCollection, UpDataStructsRpcCollectionFlags, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipStateAccountId32, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, UpDataStructsTokenData, 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, XcmVersionedMultiAsset, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, 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, FrameSupportDispatchDispatchClass, FrameSupportDispatchDispatchInfo, FrameSupportDispatchPays, FrameSupportDispatchPerDispatchClassU32, FrameSupportDispatchPerDispatchClassWeight, FrameSupportDispatchPerDispatchClassWeightsPerClass, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensModuleCall, OrmlTokensModuleError, OrmlTokensModuleEvent, OrmlTokensReserveData, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, OrmlXtokensModuleCall, OrmlXtokensModuleError, OrmlXtokensModuleEvent, PalletAppPromotionCall, PalletAppPromotionError, PalletAppPromotionEvent, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletConfigurationCall, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersEvent, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletEvmMigrationEvent, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletForeignAssetsModuleCall, PalletForeignAssetsModuleError, PalletForeignAssetsModuleEvent, PalletForeignAssetsNativeCurrency, PalletFungibleError, PalletInflationCall, PalletMaintenanceCall, PalletMaintenanceError, PalletMaintenanceEvent, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTestUtilsCall, PalletTestUtilsError, PalletTestUtilsEvent, PalletTimestampCall, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerV2BlockAgenda, PalletUniqueSchedulerV2Call, PalletUniqueSchedulerV2Error, PalletUniqueSchedulerV2Event, PalletUniqueSchedulerV2Scheduled, PalletUniqueSchedulerV2ScheduledCall, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExMultipleOwners, UpDataStructsCreateRefungibleExSingleOwner, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsRpcCollection, UpDataStructsRpcCollectionFlags, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipStateAccountId32, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, UpDataStructsTokenData, 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, XcmVersionedMultiAsset, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
declare module '@polkadot/types/types/registry' {
interface InterfaceTypes {
@@ -59,8 +59,6 @@
FrameSupportDispatchPerDispatchClassWeightsPerClass: FrameSupportDispatchPerDispatchClassWeightsPerClass;
FrameSupportDispatchRawOrigin: FrameSupportDispatchRawOrigin;
FrameSupportPalletId: FrameSupportPalletId;
- FrameSupportScheduleLookupError: FrameSupportScheduleLookupError;
- FrameSupportScheduleMaybeHashed: FrameSupportScheduleMaybeHashed;
FrameSupportTokensMiscBalanceStatus: FrameSupportTokensMiscBalanceStatus;
FrameSystemAccountInfo: FrameSystemAccountInfo;
FrameSystemCall: FrameSystemCall;
@@ -122,6 +120,7 @@
PalletEvmEvent: PalletEvmEvent;
PalletEvmMigrationCall: PalletEvmMigrationCall;
PalletEvmMigrationError: PalletEvmMigrationError;
+ PalletEvmMigrationEvent: PalletEvmMigrationEvent;
PalletForeignAssetsAssetIds: PalletForeignAssetsAssetIds;
PalletForeignAssetsModuleAssetMetadata: PalletForeignAssetsModuleAssetMetadata;
PalletForeignAssetsModuleCall: PalletForeignAssetsModuleCall;
@@ -164,10 +163,12 @@
PalletUniqueCall: PalletUniqueCall;
PalletUniqueError: PalletUniqueError;
PalletUniqueRawEvent: PalletUniqueRawEvent;
- PalletUniqueSchedulerCall: PalletUniqueSchedulerCall;
- PalletUniqueSchedulerError: PalletUniqueSchedulerError;
- PalletUniqueSchedulerEvent: PalletUniqueSchedulerEvent;
- PalletUniqueSchedulerScheduledV3: PalletUniqueSchedulerScheduledV3;
+ PalletUniqueSchedulerV2BlockAgenda: PalletUniqueSchedulerV2BlockAgenda;
+ PalletUniqueSchedulerV2Call: PalletUniqueSchedulerV2Call;
+ PalletUniqueSchedulerV2Error: PalletUniqueSchedulerV2Error;
+ PalletUniqueSchedulerV2Event: PalletUniqueSchedulerV2Event;
+ PalletUniqueSchedulerV2Scheduled: PalletUniqueSchedulerV2Scheduled;
+ PalletUniqueSchedulerV2ScheduledCall: PalletUniqueSchedulerV2ScheduledCall;
PalletXcmCall: PalletXcmCall;
PalletXcmError: PalletXcmError;
PalletXcmEvent: PalletXcmEvent;
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/types/lookup';78import type { BTreeMap, BTreeSet, Bytes, Compact, Enum, Null, Option, Result, Struct, Text, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';9import type { ITuple } from '@polkadot/types-codec/types';10import type { AccountId32, Call, H160, H256, MultiAddress, Perbill, Permill, Weight } from '@polkadot/types/interfaces/runtime';11import type { Event } from '@polkadot/types/interfaces/system';1213declare module '@polkadot/types/lookup' {14 /** @name FrameSystemAccountInfo (3) */15 interface FrameSystemAccountInfo extends Struct {16 readonly nonce: u32;17 readonly consumers: u32;18 readonly providers: u32;19 readonly sufficients: u32;20 readonly data: PalletBalancesAccountData;21 }2223 /** @name PalletBalancesAccountData (5) */24 interface PalletBalancesAccountData extends Struct {25 readonly free: u128;26 readonly reserved: u128;27 readonly miscFrozen: u128;28 readonly feeFrozen: u128;29 }3031 /** @name FrameSupportDispatchPerDispatchClassWeight (7) */32 interface FrameSupportDispatchPerDispatchClassWeight extends Struct {33 readonly normal: Weight;34 readonly operational: Weight;35 readonly mandatory: Weight;36 }3738 /** @name SpRuntimeDigest (12) */39 interface SpRuntimeDigest extends Struct {40 readonly logs: Vec<SpRuntimeDigestDigestItem>;41 }4243 /** @name SpRuntimeDigestDigestItem (14) */44 interface SpRuntimeDigestDigestItem extends Enum {45 readonly isOther: boolean;46 readonly asOther: Bytes;47 readonly isConsensus: boolean;48 readonly asConsensus: ITuple<[U8aFixed, Bytes]>;49 readonly isSeal: boolean;50 readonly asSeal: ITuple<[U8aFixed, Bytes]>;51 readonly isPreRuntime: boolean;52 readonly asPreRuntime: ITuple<[U8aFixed, Bytes]>;53 readonly isRuntimeEnvironmentUpdated: boolean;54 readonly type: 'Other' | 'Consensus' | 'Seal' | 'PreRuntime' | 'RuntimeEnvironmentUpdated';55 }5657 /** @name FrameSystemEventRecord (17) */58 interface FrameSystemEventRecord extends Struct {59 readonly phase: FrameSystemPhase;60 readonly event: Event;61 readonly topics: Vec<H256>;62 }6364 /** @name FrameSystemEvent (19) */65 interface FrameSystemEvent extends Enum {66 readonly isExtrinsicSuccess: boolean;67 readonly asExtrinsicSuccess: {68 readonly dispatchInfo: FrameSupportDispatchDispatchInfo;69 } & Struct;70 readonly isExtrinsicFailed: boolean;71 readonly asExtrinsicFailed: {72 readonly dispatchError: SpRuntimeDispatchError;73 readonly dispatchInfo: FrameSupportDispatchDispatchInfo;74 } & Struct;75 readonly isCodeUpdated: boolean;76 readonly isNewAccount: boolean;77 readonly asNewAccount: {78 readonly account: AccountId32;79 } & Struct;80 readonly isKilledAccount: boolean;81 readonly asKilledAccount: {82 readonly account: AccountId32;83 } & Struct;84 readonly isRemarked: boolean;85 readonly asRemarked: {86 readonly sender: AccountId32;87 readonly hash_: H256;88 } & Struct;89 readonly type: 'ExtrinsicSuccess' | 'ExtrinsicFailed' | 'CodeUpdated' | 'NewAccount' | 'KilledAccount' | 'Remarked';90 }9192 /** @name FrameSupportDispatchDispatchInfo (20) */93 interface FrameSupportDispatchDispatchInfo extends Struct {94 readonly weight: Weight;95 readonly class: FrameSupportDispatchDispatchClass;96 readonly paysFee: FrameSupportDispatchPays;97 }9899 /** @name FrameSupportDispatchDispatchClass (21) */100 interface FrameSupportDispatchDispatchClass extends Enum {101 readonly isNormal: boolean;102 readonly isOperational: boolean;103 readonly isMandatory: boolean;104 readonly type: 'Normal' | 'Operational' | 'Mandatory';105 }106107 /** @name FrameSupportDispatchPays (22) */108 interface FrameSupportDispatchPays extends Enum {109 readonly isYes: boolean;110 readonly isNo: boolean;111 readonly type: 'Yes' | 'No';112 }113114 /** @name SpRuntimeDispatchError (23) */115 interface SpRuntimeDispatchError extends Enum {116 readonly isOther: boolean;117 readonly isCannotLookup: boolean;118 readonly isBadOrigin: boolean;119 readonly isModule: boolean;120 readonly asModule: SpRuntimeModuleError;121 readonly isConsumerRemaining: boolean;122 readonly isNoProviders: boolean;123 readonly isTooManyConsumers: boolean;124 readonly isToken: boolean;125 readonly asToken: SpRuntimeTokenError;126 readonly isArithmetic: boolean;127 readonly asArithmetic: SpRuntimeArithmeticError;128 readonly isTransactional: boolean;129 readonly asTransactional: SpRuntimeTransactionalError;130 readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional';131 }132133 /** @name SpRuntimeModuleError (24) */134 interface SpRuntimeModuleError extends Struct {135 readonly index: u8;136 readonly error: U8aFixed;137 }138139 /** @name SpRuntimeTokenError (25) */140 interface SpRuntimeTokenError extends Enum {141 readonly isNoFunds: boolean;142 readonly isWouldDie: boolean;143 readonly isBelowMinimum: boolean;144 readonly isCannotCreate: boolean;145 readonly isUnknownAsset: boolean;146 readonly isFrozen: boolean;147 readonly isUnsupported: boolean;148 readonly type: 'NoFunds' | 'WouldDie' | 'BelowMinimum' | 'CannotCreate' | 'UnknownAsset' | 'Frozen' | 'Unsupported';149 }150151 /** @name SpRuntimeArithmeticError (26) */152 interface SpRuntimeArithmeticError extends Enum {153 readonly isUnderflow: boolean;154 readonly isOverflow: boolean;155 readonly isDivisionByZero: boolean;156 readonly type: 'Underflow' | 'Overflow' | 'DivisionByZero';157 }158159 /** @name SpRuntimeTransactionalError (27) */160 interface SpRuntimeTransactionalError extends Enum {161 readonly isLimitReached: boolean;162 readonly isNoLayer: boolean;163 readonly type: 'LimitReached' | 'NoLayer';164 }165166 /** @name CumulusPalletParachainSystemEvent (28) */167 interface CumulusPalletParachainSystemEvent extends Enum {168 readonly isValidationFunctionStored: boolean;169 readonly isValidationFunctionApplied: boolean;170 readonly asValidationFunctionApplied: {171 readonly relayChainBlockNum: u32;172 } & Struct;173 readonly isValidationFunctionDiscarded: boolean;174 readonly isUpgradeAuthorized: boolean;175 readonly asUpgradeAuthorized: {176 readonly codeHash: H256;177 } & Struct;178 readonly isDownwardMessagesReceived: boolean;179 readonly asDownwardMessagesReceived: {180 readonly count: u32;181 } & Struct;182 readonly isDownwardMessagesProcessed: boolean;183 readonly asDownwardMessagesProcessed: {184 readonly weightUsed: Weight;185 readonly dmqHead: H256;186 } & Struct;187 readonly type: 'ValidationFunctionStored' | 'ValidationFunctionApplied' | 'ValidationFunctionDiscarded' | 'UpgradeAuthorized' | 'DownwardMessagesReceived' | 'DownwardMessagesProcessed';188 }189190 /** @name PalletBalancesEvent (29) */191 interface PalletBalancesEvent extends Enum {192 readonly isEndowed: boolean;193 readonly asEndowed: {194 readonly account: AccountId32;195 readonly freeBalance: u128;196 } & Struct;197 readonly isDustLost: boolean;198 readonly asDustLost: {199 readonly account: AccountId32;200 readonly amount: u128;201 } & Struct;202 readonly isTransfer: boolean;203 readonly asTransfer: {204 readonly from: AccountId32;205 readonly to: AccountId32;206 readonly amount: u128;207 } & Struct;208 readonly isBalanceSet: boolean;209 readonly asBalanceSet: {210 readonly who: AccountId32;211 readonly free: u128;212 readonly reserved: u128;213 } & Struct;214 readonly isReserved: boolean;215 readonly asReserved: {216 readonly who: AccountId32;217 readonly amount: u128;218 } & Struct;219 readonly isUnreserved: boolean;220 readonly asUnreserved: {221 readonly who: AccountId32;222 readonly amount: u128;223 } & Struct;224 readonly isReserveRepatriated: boolean;225 readonly asReserveRepatriated: {226 readonly from: AccountId32;227 readonly to: AccountId32;228 readonly amount: u128;229 readonly destinationStatus: FrameSupportTokensMiscBalanceStatus;230 } & Struct;231 readonly isDeposit: boolean;232 readonly asDeposit: {233 readonly who: AccountId32;234 readonly amount: u128;235 } & Struct;236 readonly isWithdraw: boolean;237 readonly asWithdraw: {238 readonly who: AccountId32;239 readonly amount: u128;240 } & Struct;241 readonly isSlashed: boolean;242 readonly asSlashed: {243 readonly who: AccountId32;244 readonly amount: u128;245 } & Struct;246 readonly type: 'Endowed' | 'DustLost' | 'Transfer' | 'BalanceSet' | 'Reserved' | 'Unreserved' | 'ReserveRepatriated' | 'Deposit' | 'Withdraw' | 'Slashed';247 }248249 /** @name FrameSupportTokensMiscBalanceStatus (30) */250 interface FrameSupportTokensMiscBalanceStatus extends Enum {251 readonly isFree: boolean;252 readonly isReserved: boolean;253 readonly type: 'Free' | 'Reserved';254 }255256 /** @name PalletTransactionPaymentEvent (31) */257 interface PalletTransactionPaymentEvent extends Enum {258 readonly isTransactionFeePaid: boolean;259 readonly asTransactionFeePaid: {260 readonly who: AccountId32;261 readonly actualFee: u128;262 readonly tip: u128;263 } & Struct;264 readonly type: 'TransactionFeePaid';265 }266267 /** @name PalletTreasuryEvent (32) */268 interface PalletTreasuryEvent extends Enum {269 readonly isProposed: boolean;270 readonly asProposed: {271 readonly proposalIndex: u32;272 } & Struct;273 readonly isSpending: boolean;274 readonly asSpending: {275 readonly budgetRemaining: u128;276 } & Struct;277 readonly isAwarded: boolean;278 readonly asAwarded: {279 readonly proposalIndex: u32;280 readonly award: u128;281 readonly account: AccountId32;282 } & Struct;283 readonly isRejected: boolean;284 readonly asRejected: {285 readonly proposalIndex: u32;286 readonly slashed: u128;287 } & Struct;288 readonly isBurnt: boolean;289 readonly asBurnt: {290 readonly burntFunds: u128;291 } & Struct;292 readonly isRollover: boolean;293 readonly asRollover: {294 readonly rolloverBalance: u128;295 } & Struct;296 readonly isDeposit: boolean;297 readonly asDeposit: {298 readonly value: u128;299 } & Struct;300 readonly isSpendApproved: boolean;301 readonly asSpendApproved: {302 readonly proposalIndex: u32;303 readonly amount: u128;304 readonly beneficiary: AccountId32;305 } & Struct;306 readonly type: 'Proposed' | 'Spending' | 'Awarded' | 'Rejected' | 'Burnt' | 'Rollover' | 'Deposit' | 'SpendApproved';307 }308309 /** @name PalletSudoEvent (33) */310 interface PalletSudoEvent extends Enum {311 readonly isSudid: boolean;312 readonly asSudid: {313 readonly sudoResult: Result<Null, SpRuntimeDispatchError>;314 } & Struct;315 readonly isKeyChanged: boolean;316 readonly asKeyChanged: {317 readonly oldSudoer: Option<AccountId32>;318 } & Struct;319 readonly isSudoAsDone: boolean;320 readonly asSudoAsDone: {321 readonly sudoResult: Result<Null, SpRuntimeDispatchError>;322 } & Struct;323 readonly type: 'Sudid' | 'KeyChanged' | 'SudoAsDone';324 }325326 /** @name OrmlVestingModuleEvent (37) */327 interface OrmlVestingModuleEvent extends Enum {328 readonly isVestingScheduleAdded: boolean;329 readonly asVestingScheduleAdded: {330 readonly from: AccountId32;331 readonly to: AccountId32;332 readonly vestingSchedule: OrmlVestingVestingSchedule;333 } & Struct;334 readonly isClaimed: boolean;335 readonly asClaimed: {336 readonly who: AccountId32;337 readonly amount: u128;338 } & Struct;339 readonly isVestingSchedulesUpdated: boolean;340 readonly asVestingSchedulesUpdated: {341 readonly who: AccountId32;342 } & Struct;343 readonly type: 'VestingScheduleAdded' | 'Claimed' | 'VestingSchedulesUpdated';344 }345346 /** @name OrmlVestingVestingSchedule (38) */347 interface OrmlVestingVestingSchedule extends Struct {348 readonly start: u32;349 readonly period: u32;350 readonly periodCount: u32;351 readonly perPeriod: Compact<u128>;352 }353354 /** @name OrmlXtokensModuleEvent (40) */355 interface OrmlXtokensModuleEvent extends Enum {356 readonly isTransferredMultiAssets: boolean;357 readonly asTransferredMultiAssets: {358 readonly sender: AccountId32;359 readonly assets: XcmV1MultiassetMultiAssets;360 readonly fee: XcmV1MultiAsset;361 readonly dest: XcmV1MultiLocation;362 } & Struct;363 readonly type: 'TransferredMultiAssets';364 }365366 /** @name XcmV1MultiassetMultiAssets (41) */367 interface XcmV1MultiassetMultiAssets extends Vec<XcmV1MultiAsset> {}368369 /** @name XcmV1MultiAsset (43) */370 interface XcmV1MultiAsset extends Struct {371 readonly id: XcmV1MultiassetAssetId;372 readonly fun: XcmV1MultiassetFungibility;373 }374375 /** @name XcmV1MultiassetAssetId (44) */376 interface XcmV1MultiassetAssetId extends Enum {377 readonly isConcrete: boolean;378 readonly asConcrete: XcmV1MultiLocation;379 readonly isAbstract: boolean;380 readonly asAbstract: Bytes;381 readonly type: 'Concrete' | 'Abstract';382 }383384 /** @name XcmV1MultiLocation (45) */385 interface XcmV1MultiLocation extends Struct {386 readonly parents: u8;387 readonly interior: XcmV1MultilocationJunctions;388 }389390 /** @name XcmV1MultilocationJunctions (46) */391 interface XcmV1MultilocationJunctions extends Enum {392 readonly isHere: boolean;393 readonly isX1: boolean;394 readonly asX1: XcmV1Junction;395 readonly isX2: boolean;396 readonly asX2: ITuple<[XcmV1Junction, XcmV1Junction]>;397 readonly isX3: boolean;398 readonly asX3: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction]>;399 readonly isX4: boolean;400 readonly asX4: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;401 readonly isX5: boolean;402 readonly asX5: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;403 readonly isX6: boolean;404 readonly asX6: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;405 readonly isX7: boolean;406 readonly asX7: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;407 readonly isX8: boolean;408 readonly asX8: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;409 readonly type: 'Here' | 'X1' | 'X2' | 'X3' | 'X4' | 'X5' | 'X6' | 'X7' | 'X8';410 }411412 /** @name XcmV1Junction (47) */413 interface XcmV1Junction extends Enum {414 readonly isParachain: boolean;415 readonly asParachain: Compact<u32>;416 readonly isAccountId32: boolean;417 readonly asAccountId32: {418 readonly network: XcmV0JunctionNetworkId;419 readonly id: U8aFixed;420 } & Struct;421 readonly isAccountIndex64: boolean;422 readonly asAccountIndex64: {423 readonly network: XcmV0JunctionNetworkId;424 readonly index: Compact<u64>;425 } & Struct;426 readonly isAccountKey20: boolean;427 readonly asAccountKey20: {428 readonly network: XcmV0JunctionNetworkId;429 readonly key: U8aFixed;430 } & Struct;431 readonly isPalletInstance: boolean;432 readonly asPalletInstance: u8;433 readonly isGeneralIndex: boolean;434 readonly asGeneralIndex: Compact<u128>;435 readonly isGeneralKey: boolean;436 readonly asGeneralKey: Bytes;437 readonly isOnlyChild: boolean;438 readonly isPlurality: boolean;439 readonly asPlurality: {440 readonly id: XcmV0JunctionBodyId;441 readonly part: XcmV0JunctionBodyPart;442 } & Struct;443 readonly type: 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality';444 }445446 /** @name XcmV0JunctionNetworkId (49) */447 interface XcmV0JunctionNetworkId extends Enum {448 readonly isAny: boolean;449 readonly isNamed: boolean;450 readonly asNamed: Bytes;451 readonly isPolkadot: boolean;452 readonly isKusama: boolean;453 readonly type: 'Any' | 'Named' | 'Polkadot' | 'Kusama';454 }455456 /** @name XcmV0JunctionBodyId (53) */457 interface XcmV0JunctionBodyId extends Enum {458 readonly isUnit: boolean;459 readonly isNamed: boolean;460 readonly asNamed: Bytes;461 readonly isIndex: boolean;462 readonly asIndex: Compact<u32>;463 readonly isExecutive: boolean;464 readonly isTechnical: boolean;465 readonly isLegislative: boolean;466 readonly isJudicial: boolean;467 readonly type: 'Unit' | 'Named' | 'Index' | 'Executive' | 'Technical' | 'Legislative' | 'Judicial';468 }469470 /** @name XcmV0JunctionBodyPart (54) */471 interface XcmV0JunctionBodyPart extends Enum {472 readonly isVoice: boolean;473 readonly isMembers: boolean;474 readonly asMembers: {475 readonly count: Compact<u32>;476 } & Struct;477 readonly isFraction: boolean;478 readonly asFraction: {479 readonly nom: Compact<u32>;480 readonly denom: Compact<u32>;481 } & Struct;482 readonly isAtLeastProportion: boolean;483 readonly asAtLeastProportion: {484 readonly nom: Compact<u32>;485 readonly denom: Compact<u32>;486 } & Struct;487 readonly isMoreThanProportion: boolean;488 readonly asMoreThanProportion: {489 readonly nom: Compact<u32>;490 readonly denom: Compact<u32>;491 } & Struct;492 readonly type: 'Voice' | 'Members' | 'Fraction' | 'AtLeastProportion' | 'MoreThanProportion';493 }494495 /** @name XcmV1MultiassetFungibility (55) */496 interface XcmV1MultiassetFungibility extends Enum {497 readonly isFungible: boolean;498 readonly asFungible: Compact<u128>;499 readonly isNonFungible: boolean;500 readonly asNonFungible: XcmV1MultiassetAssetInstance;501 readonly type: 'Fungible' | 'NonFungible';502 }503504 /** @name XcmV1MultiassetAssetInstance (56) */505 interface XcmV1MultiassetAssetInstance extends Enum {506 readonly isUndefined: boolean;507 readonly isIndex: boolean;508 readonly asIndex: Compact<u128>;509 readonly isArray4: boolean;510 readonly asArray4: U8aFixed;511 readonly isArray8: boolean;512 readonly asArray8: U8aFixed;513 readonly isArray16: boolean;514 readonly asArray16: U8aFixed;515 readonly isArray32: boolean;516 readonly asArray32: U8aFixed;517 readonly isBlob: boolean;518 readonly asBlob: Bytes;519 readonly type: 'Undefined' | 'Index' | 'Array4' | 'Array8' | 'Array16' | 'Array32' | 'Blob';520 }521522 /** @name OrmlTokensModuleEvent (59) */523 interface OrmlTokensModuleEvent extends Enum {524 readonly isEndowed: boolean;525 readonly asEndowed: {526 readonly currencyId: PalletForeignAssetsAssetIds;527 readonly who: AccountId32;528 readonly amount: u128;529 } & Struct;530 readonly isDustLost: boolean;531 readonly asDustLost: {532 readonly currencyId: PalletForeignAssetsAssetIds;533 readonly who: AccountId32;534 readonly amount: u128;535 } & Struct;536 readonly isTransfer: boolean;537 readonly asTransfer: {538 readonly currencyId: PalletForeignAssetsAssetIds;539 readonly from: AccountId32;540 readonly to: AccountId32;541 readonly amount: u128;542 } & Struct;543 readonly isReserved: boolean;544 readonly asReserved: {545 readonly currencyId: PalletForeignAssetsAssetIds;546 readonly who: AccountId32;547 readonly amount: u128;548 } & Struct;549 readonly isUnreserved: boolean;550 readonly asUnreserved: {551 readonly currencyId: PalletForeignAssetsAssetIds;552 readonly who: AccountId32;553 readonly amount: u128;554 } & Struct;555 readonly isReserveRepatriated: boolean;556 readonly asReserveRepatriated: {557 readonly currencyId: PalletForeignAssetsAssetIds;558 readonly from: AccountId32;559 readonly to: AccountId32;560 readonly amount: u128;561 readonly status: FrameSupportTokensMiscBalanceStatus;562 } & Struct;563 readonly isBalanceSet: boolean;564 readonly asBalanceSet: {565 readonly currencyId: PalletForeignAssetsAssetIds;566 readonly who: AccountId32;567 readonly free: u128;568 readonly reserved: u128;569 } & Struct;570 readonly isTotalIssuanceSet: boolean;571 readonly asTotalIssuanceSet: {572 readonly currencyId: PalletForeignAssetsAssetIds;573 readonly amount: u128;574 } & Struct;575 readonly isWithdrawn: boolean;576 readonly asWithdrawn: {577 readonly currencyId: PalletForeignAssetsAssetIds;578 readonly who: AccountId32;579 readonly amount: u128;580 } & Struct;581 readonly isSlashed: boolean;582 readonly asSlashed: {583 readonly currencyId: PalletForeignAssetsAssetIds;584 readonly who: AccountId32;585 readonly freeAmount: u128;586 readonly reservedAmount: u128;587 } & Struct;588 readonly isDeposited: boolean;589 readonly asDeposited: {590 readonly currencyId: PalletForeignAssetsAssetIds;591 readonly who: AccountId32;592 readonly amount: u128;593 } & Struct;594 readonly isLockSet: boolean;595 readonly asLockSet: {596 readonly lockId: U8aFixed;597 readonly currencyId: PalletForeignAssetsAssetIds;598 readonly who: AccountId32;599 readonly amount: u128;600 } & Struct;601 readonly isLockRemoved: boolean;602 readonly asLockRemoved: {603 readonly lockId: U8aFixed;604 readonly currencyId: PalletForeignAssetsAssetIds;605 readonly who: AccountId32;606 } & Struct;607 readonly type: 'Endowed' | 'DustLost' | 'Transfer' | 'Reserved' | 'Unreserved' | 'ReserveRepatriated' | 'BalanceSet' | 'TotalIssuanceSet' | 'Withdrawn' | 'Slashed' | 'Deposited' | 'LockSet' | 'LockRemoved';608 }609610 /** @name PalletForeignAssetsAssetIds (60) */611 interface PalletForeignAssetsAssetIds extends Enum {612 readonly isForeignAssetId: boolean;613 readonly asForeignAssetId: u32;614 readonly isNativeAssetId: boolean;615 readonly asNativeAssetId: PalletForeignAssetsNativeCurrency;616 readonly type: 'ForeignAssetId' | 'NativeAssetId';617 }618619 /** @name PalletForeignAssetsNativeCurrency (61) */620 interface PalletForeignAssetsNativeCurrency extends Enum {621 readonly isHere: boolean;622 readonly isParent: boolean;623 readonly type: 'Here' | 'Parent';624 }625626 /** @name CumulusPalletXcmpQueueEvent (62) */627 interface CumulusPalletXcmpQueueEvent extends Enum {628 readonly isSuccess: boolean;629 readonly asSuccess: {630 readonly messageHash: Option<H256>;631 readonly weight: Weight;632 } & Struct;633 readonly isFail: boolean;634 readonly asFail: {635 readonly messageHash: Option<H256>;636 readonly error: XcmV2TraitsError;637 readonly weight: Weight;638 } & Struct;639 readonly isBadVersion: boolean;640 readonly asBadVersion: {641 readonly messageHash: Option<H256>;642 } & Struct;643 readonly isBadFormat: boolean;644 readonly asBadFormat: {645 readonly messageHash: Option<H256>;646 } & Struct;647 readonly isUpwardMessageSent: boolean;648 readonly asUpwardMessageSent: {649 readonly messageHash: Option<H256>;650 } & Struct;651 readonly isXcmpMessageSent: boolean;652 readonly asXcmpMessageSent: {653 readonly messageHash: Option<H256>;654 } & Struct;655 readonly isOverweightEnqueued: boolean;656 readonly asOverweightEnqueued: {657 readonly sender: u32;658 readonly sentAt: u32;659 readonly index: u64;660 readonly required: Weight;661 } & Struct;662 readonly isOverweightServiced: boolean;663 readonly asOverweightServiced: {664 readonly index: u64;665 readonly used: Weight;666 } & Struct;667 readonly type: 'Success' | 'Fail' | 'BadVersion' | 'BadFormat' | 'UpwardMessageSent' | 'XcmpMessageSent' | 'OverweightEnqueued' | 'OverweightServiced';668 }669670 /** @name XcmV2TraitsError (64) */671 interface XcmV2TraitsError extends Enum {672 readonly isOverflow: boolean;673 readonly isUnimplemented: boolean;674 readonly isUntrustedReserveLocation: boolean;675 readonly isUntrustedTeleportLocation: boolean;676 readonly isMultiLocationFull: boolean;677 readonly isMultiLocationNotInvertible: boolean;678 readonly isBadOrigin: boolean;679 readonly isInvalidLocation: boolean;680 readonly isAssetNotFound: boolean;681 readonly isFailedToTransactAsset: boolean;682 readonly isNotWithdrawable: boolean;683 readonly isLocationCannotHold: boolean;684 readonly isExceedsMaxMessageSize: boolean;685 readonly isDestinationUnsupported: boolean;686 readonly isTransport: boolean;687 readonly isUnroutable: boolean;688 readonly isUnknownClaim: boolean;689 readonly isFailedToDecode: boolean;690 readonly isMaxWeightInvalid: boolean;691 readonly isNotHoldingFees: boolean;692 readonly isTooExpensive: boolean;693 readonly isTrap: boolean;694 readonly asTrap: u64;695 readonly isUnhandledXcmVersion: boolean;696 readonly isWeightLimitReached: boolean;697 readonly asWeightLimitReached: u64;698 readonly isBarrier: boolean;699 readonly isWeightNotComputable: boolean;700 readonly type: 'Overflow' | 'Unimplemented' | 'UntrustedReserveLocation' | 'UntrustedTeleportLocation' | 'MultiLocationFull' | 'MultiLocationNotInvertible' | 'BadOrigin' | 'InvalidLocation' | 'AssetNotFound' | 'FailedToTransactAsset' | 'NotWithdrawable' | 'LocationCannotHold' | 'ExceedsMaxMessageSize' | 'DestinationUnsupported' | 'Transport' | 'Unroutable' | 'UnknownClaim' | 'FailedToDecode' | 'MaxWeightInvalid' | 'NotHoldingFees' | 'TooExpensive' | 'Trap' | 'UnhandledXcmVersion' | 'WeightLimitReached' | 'Barrier' | 'WeightNotComputable';701 }702703 /** @name PalletXcmEvent (66) */704 interface PalletXcmEvent extends Enum {705 readonly isAttempted: boolean;706 readonly asAttempted: XcmV2TraitsOutcome;707 readonly isSent: boolean;708 readonly asSent: ITuple<[XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;709 readonly isUnexpectedResponse: boolean;710 readonly asUnexpectedResponse: ITuple<[XcmV1MultiLocation, u64]>;711 readonly isResponseReady: boolean;712 readonly asResponseReady: ITuple<[u64, XcmV2Response]>;713 readonly isNotified: boolean;714 readonly asNotified: ITuple<[u64, u8, u8]>;715 readonly isNotifyOverweight: boolean;716 readonly asNotifyOverweight: ITuple<[u64, u8, u8, Weight, Weight]>;717 readonly isNotifyDispatchError: boolean;718 readonly asNotifyDispatchError: ITuple<[u64, u8, u8]>;719 readonly isNotifyDecodeFailed: boolean;720 readonly asNotifyDecodeFailed: ITuple<[u64, u8, u8]>;721 readonly isInvalidResponder: boolean;722 readonly asInvalidResponder: ITuple<[XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;723 readonly isInvalidResponderVersion: boolean;724 readonly asInvalidResponderVersion: ITuple<[XcmV1MultiLocation, u64]>;725 readonly isResponseTaken: boolean;726 readonly asResponseTaken: u64;727 readonly isAssetsTrapped: boolean;728 readonly asAssetsTrapped: ITuple<[H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;729 readonly isVersionChangeNotified: boolean;730 readonly asVersionChangeNotified: ITuple<[XcmV1MultiLocation, u32]>;731 readonly isSupportedVersionChanged: boolean;732 readonly asSupportedVersionChanged: ITuple<[XcmV1MultiLocation, u32]>;733 readonly isNotifyTargetSendFail: boolean;734 readonly asNotifyTargetSendFail: ITuple<[XcmV1MultiLocation, u64, XcmV2TraitsError]>;735 readonly isNotifyTargetMigrationFail: boolean;736 readonly asNotifyTargetMigrationFail: ITuple<[XcmVersionedMultiLocation, u64]>;737 readonly type: 'Attempted' | 'Sent' | 'UnexpectedResponse' | 'ResponseReady' | 'Notified' | 'NotifyOverweight' | 'NotifyDispatchError' | 'NotifyDecodeFailed' | 'InvalidResponder' | 'InvalidResponderVersion' | 'ResponseTaken' | 'AssetsTrapped' | 'VersionChangeNotified' | 'SupportedVersionChanged' | 'NotifyTargetSendFail' | 'NotifyTargetMigrationFail';738 }739740 /** @name XcmV2TraitsOutcome (67) */741 interface XcmV2TraitsOutcome extends Enum {742 readonly isComplete: boolean;743 readonly asComplete: u64;744 readonly isIncomplete: boolean;745 readonly asIncomplete: ITuple<[u64, XcmV2TraitsError]>;746 readonly isError: boolean;747 readonly asError: XcmV2TraitsError;748 readonly type: 'Complete' | 'Incomplete' | 'Error';749 }750751 /** @name XcmV2Xcm (68) */752 interface XcmV2Xcm extends Vec<XcmV2Instruction> {}753754 /** @name XcmV2Instruction (70) */755 interface XcmV2Instruction extends Enum {756 readonly isWithdrawAsset: boolean;757 readonly asWithdrawAsset: XcmV1MultiassetMultiAssets;758 readonly isReserveAssetDeposited: boolean;759 readonly asReserveAssetDeposited: XcmV1MultiassetMultiAssets;760 readonly isReceiveTeleportedAsset: boolean;761 readonly asReceiveTeleportedAsset: XcmV1MultiassetMultiAssets;762 readonly isQueryResponse: boolean;763 readonly asQueryResponse: {764 readonly queryId: Compact<u64>;765 readonly response: XcmV2Response;766 readonly maxWeight: Compact<u64>;767 } & Struct;768 readonly isTransferAsset: boolean;769 readonly asTransferAsset: {770 readonly assets: XcmV1MultiassetMultiAssets;771 readonly beneficiary: XcmV1MultiLocation;772 } & Struct;773 readonly isTransferReserveAsset: boolean;774 readonly asTransferReserveAsset: {775 readonly assets: XcmV1MultiassetMultiAssets;776 readonly dest: XcmV1MultiLocation;777 readonly xcm: XcmV2Xcm;778 } & Struct;779 readonly isTransact: boolean;780 readonly asTransact: {781 readonly originType: XcmV0OriginKind;782 readonly requireWeightAtMost: Compact<u64>;783 readonly call: XcmDoubleEncoded;784 } & Struct;785 readonly isHrmpNewChannelOpenRequest: boolean;786 readonly asHrmpNewChannelOpenRequest: {787 readonly sender: Compact<u32>;788 readonly maxMessageSize: Compact<u32>;789 readonly maxCapacity: Compact<u32>;790 } & Struct;791 readonly isHrmpChannelAccepted: boolean;792 readonly asHrmpChannelAccepted: {793 readonly recipient: Compact<u32>;794 } & Struct;795 readonly isHrmpChannelClosing: boolean;796 readonly asHrmpChannelClosing: {797 readonly initiator: Compact<u32>;798 readonly sender: Compact<u32>;799 readonly recipient: Compact<u32>;800 } & Struct;801 readonly isClearOrigin: boolean;802 readonly isDescendOrigin: boolean;803 readonly asDescendOrigin: XcmV1MultilocationJunctions;804 readonly isReportError: boolean;805 readonly asReportError: {806 readonly queryId: Compact<u64>;807 readonly dest: XcmV1MultiLocation;808 readonly maxResponseWeight: Compact<u64>;809 } & Struct;810 readonly isDepositAsset: boolean;811 readonly asDepositAsset: {812 readonly assets: XcmV1MultiassetMultiAssetFilter;813 readonly maxAssets: Compact<u32>;814 readonly beneficiary: XcmV1MultiLocation;815 } & Struct;816 readonly isDepositReserveAsset: boolean;817 readonly asDepositReserveAsset: {818 readonly assets: XcmV1MultiassetMultiAssetFilter;819 readonly maxAssets: Compact<u32>;820 readonly dest: XcmV1MultiLocation;821 readonly xcm: XcmV2Xcm;822 } & Struct;823 readonly isExchangeAsset: boolean;824 readonly asExchangeAsset: {825 readonly give: XcmV1MultiassetMultiAssetFilter;826 readonly receive: XcmV1MultiassetMultiAssets;827 } & Struct;828 readonly isInitiateReserveWithdraw: boolean;829 readonly asInitiateReserveWithdraw: {830 readonly assets: XcmV1MultiassetMultiAssetFilter;831 readonly reserve: XcmV1MultiLocation;832 readonly xcm: XcmV2Xcm;833 } & Struct;834 readonly isInitiateTeleport: boolean;835 readonly asInitiateTeleport: {836 readonly assets: XcmV1MultiassetMultiAssetFilter;837 readonly dest: XcmV1MultiLocation;838 readonly xcm: XcmV2Xcm;839 } & Struct;840 readonly isQueryHolding: boolean;841 readonly asQueryHolding: {842 readonly queryId: Compact<u64>;843 readonly dest: XcmV1MultiLocation;844 readonly assets: XcmV1MultiassetMultiAssetFilter;845 readonly maxResponseWeight: Compact<u64>;846 } & Struct;847 readonly isBuyExecution: boolean;848 readonly asBuyExecution: {849 readonly fees: XcmV1MultiAsset;850 readonly weightLimit: XcmV2WeightLimit;851 } & Struct;852 readonly isRefundSurplus: boolean;853 readonly isSetErrorHandler: boolean;854 readonly asSetErrorHandler: XcmV2Xcm;855 readonly isSetAppendix: boolean;856 readonly asSetAppendix: XcmV2Xcm;857 readonly isClearError: boolean;858 readonly isClaimAsset: boolean;859 readonly asClaimAsset: {860 readonly assets: XcmV1MultiassetMultiAssets;861 readonly ticket: XcmV1MultiLocation;862 } & Struct;863 readonly isTrap: boolean;864 readonly asTrap: Compact<u64>;865 readonly isSubscribeVersion: boolean;866 readonly asSubscribeVersion: {867 readonly queryId: Compact<u64>;868 readonly maxResponseWeight: Compact<u64>;869 } & Struct;870 readonly isUnsubscribeVersion: boolean;871 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'ClearOrigin' | 'DescendOrigin' | 'ReportError' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution' | 'RefundSurplus' | 'SetErrorHandler' | 'SetAppendix' | 'ClearError' | 'ClaimAsset' | 'Trap' | 'SubscribeVersion' | 'UnsubscribeVersion';872 }873874 /** @name XcmV2Response (71) */875 interface XcmV2Response extends Enum {876 readonly isNull: boolean;877 readonly isAssets: boolean;878 readonly asAssets: XcmV1MultiassetMultiAssets;879 readonly isExecutionResult: boolean;880 readonly asExecutionResult: Option<ITuple<[u32, XcmV2TraitsError]>>;881 readonly isVersion: boolean;882 readonly asVersion: u32;883 readonly type: 'Null' | 'Assets' | 'ExecutionResult' | 'Version';884 }885886 /** @name XcmV0OriginKind (74) */887 interface XcmV0OriginKind extends Enum {888 readonly isNative: boolean;889 readonly isSovereignAccount: boolean;890 readonly isSuperuser: boolean;891 readonly isXcm: boolean;892 readonly type: 'Native' | 'SovereignAccount' | 'Superuser' | 'Xcm';893 }894895 /** @name XcmDoubleEncoded (75) */896 interface XcmDoubleEncoded extends Struct {897 readonly encoded: Bytes;898 }899900 /** @name XcmV1MultiassetMultiAssetFilter (76) */901 interface XcmV1MultiassetMultiAssetFilter extends Enum {902 readonly isDefinite: boolean;903 readonly asDefinite: XcmV1MultiassetMultiAssets;904 readonly isWild: boolean;905 readonly asWild: XcmV1MultiassetWildMultiAsset;906 readonly type: 'Definite' | 'Wild';907 }908909 /** @name XcmV1MultiassetWildMultiAsset (77) */910 interface XcmV1MultiassetWildMultiAsset extends Enum {911 readonly isAll: boolean;912 readonly isAllOf: boolean;913 readonly asAllOf: {914 readonly id: XcmV1MultiassetAssetId;915 readonly fun: XcmV1MultiassetWildFungibility;916 } & Struct;917 readonly type: 'All' | 'AllOf';918 }919920 /** @name XcmV1MultiassetWildFungibility (78) */921 interface XcmV1MultiassetWildFungibility extends Enum {922 readonly isFungible: boolean;923 readonly isNonFungible: boolean;924 readonly type: 'Fungible' | 'NonFungible';925 }926927 /** @name XcmV2WeightLimit (79) */928 interface XcmV2WeightLimit extends Enum {929 readonly isUnlimited: boolean;930 readonly isLimited: boolean;931 readonly asLimited: Compact<u64>;932 readonly type: 'Unlimited' | 'Limited';933 }934935 /** @name XcmVersionedMultiAssets (81) */936 interface XcmVersionedMultiAssets extends Enum {937 readonly isV0: boolean;938 readonly asV0: Vec<XcmV0MultiAsset>;939 readonly isV1: boolean;940 readonly asV1: XcmV1MultiassetMultiAssets;941 readonly type: 'V0' | 'V1';942 }943944 /** @name XcmV0MultiAsset (83) */945 interface XcmV0MultiAsset extends Enum {946 readonly isNone: boolean;947 readonly isAll: boolean;948 readonly isAllFungible: boolean;949 readonly isAllNonFungible: boolean;950 readonly isAllAbstractFungible: boolean;951 readonly asAllAbstractFungible: {952 readonly id: Bytes;953 } & Struct;954 readonly isAllAbstractNonFungible: boolean;955 readonly asAllAbstractNonFungible: {956 readonly class: Bytes;957 } & Struct;958 readonly isAllConcreteFungible: boolean;959 readonly asAllConcreteFungible: {960 readonly id: XcmV0MultiLocation;961 } & Struct;962 readonly isAllConcreteNonFungible: boolean;963 readonly asAllConcreteNonFungible: {964 readonly class: XcmV0MultiLocation;965 } & Struct;966 readonly isAbstractFungible: boolean;967 readonly asAbstractFungible: {968 readonly id: Bytes;969 readonly amount: Compact<u128>;970 } & Struct;971 readonly isAbstractNonFungible: boolean;972 readonly asAbstractNonFungible: {973 readonly class: Bytes;974 readonly instance: XcmV1MultiassetAssetInstance;975 } & Struct;976 readonly isConcreteFungible: boolean;977 readonly asConcreteFungible: {978 readonly id: XcmV0MultiLocation;979 readonly amount: Compact<u128>;980 } & Struct;981 readonly isConcreteNonFungible: boolean;982 readonly asConcreteNonFungible: {983 readonly class: XcmV0MultiLocation;984 readonly instance: XcmV1MultiassetAssetInstance;985 } & Struct;986 readonly type: 'None' | 'All' | 'AllFungible' | 'AllNonFungible' | 'AllAbstractFungible' | 'AllAbstractNonFungible' | 'AllConcreteFungible' | 'AllConcreteNonFungible' | 'AbstractFungible' | 'AbstractNonFungible' | 'ConcreteFungible' | 'ConcreteNonFungible';987 }988989 /** @name XcmV0MultiLocation (84) */990 interface XcmV0MultiLocation extends Enum {991 readonly isNull: boolean;992 readonly isX1: boolean;993 readonly asX1: XcmV0Junction;994 readonly isX2: boolean;995 readonly asX2: ITuple<[XcmV0Junction, XcmV0Junction]>;996 readonly isX3: boolean;997 readonly asX3: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction]>;998 readonly isX4: boolean;999 readonly asX4: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1000 readonly isX5: boolean;1001 readonly asX5: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1002 readonly isX6: boolean;1003 readonly asX6: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1004 readonly isX7: boolean;1005 readonly asX7: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1006 readonly isX8: boolean;1007 readonly asX8: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1008 readonly type: 'Null' | 'X1' | 'X2' | 'X3' | 'X4' | 'X5' | 'X6' | 'X7' | 'X8';1009 }10101011 /** @name XcmV0Junction (85) */1012 interface XcmV0Junction extends Enum {1013 readonly isParent: boolean;1014 readonly isParachain: boolean;1015 readonly asParachain: Compact<u32>;1016 readonly isAccountId32: boolean;1017 readonly asAccountId32: {1018 readonly network: XcmV0JunctionNetworkId;1019 readonly id: U8aFixed;1020 } & Struct;1021 readonly isAccountIndex64: boolean;1022 readonly asAccountIndex64: {1023 readonly network: XcmV0JunctionNetworkId;1024 readonly index: Compact<u64>;1025 } & Struct;1026 readonly isAccountKey20: boolean;1027 readonly asAccountKey20: {1028 readonly network: XcmV0JunctionNetworkId;1029 readonly key: U8aFixed;1030 } & Struct;1031 readonly isPalletInstance: boolean;1032 readonly asPalletInstance: u8;1033 readonly isGeneralIndex: boolean;1034 readonly asGeneralIndex: Compact<u128>;1035 readonly isGeneralKey: boolean;1036 readonly asGeneralKey: Bytes;1037 readonly isOnlyChild: boolean;1038 readonly isPlurality: boolean;1039 readonly asPlurality: {1040 readonly id: XcmV0JunctionBodyId;1041 readonly part: XcmV0JunctionBodyPart;1042 } & Struct;1043 readonly type: 'Parent' | 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality';1044 }10451046 /** @name XcmVersionedMultiLocation (86) */1047 interface XcmVersionedMultiLocation extends Enum {1048 readonly isV0: boolean;1049 readonly asV0: XcmV0MultiLocation;1050 readonly isV1: boolean;1051 readonly asV1: XcmV1MultiLocation;1052 readonly type: 'V0' | 'V1';1053 }10541055 /** @name CumulusPalletXcmEvent (87) */1056 interface CumulusPalletXcmEvent extends Enum {1057 readonly isInvalidFormat: boolean;1058 readonly asInvalidFormat: U8aFixed;1059 readonly isUnsupportedVersion: boolean;1060 readonly asUnsupportedVersion: U8aFixed;1061 readonly isExecutedDownward: boolean;1062 readonly asExecutedDownward: ITuple<[U8aFixed, XcmV2TraitsOutcome]>;1063 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward';1064 }10651066 /** @name CumulusPalletDmpQueueEvent (88) */1067 interface CumulusPalletDmpQueueEvent extends Enum {1068 readonly isInvalidFormat: boolean;1069 readonly asInvalidFormat: {1070 readonly messageId: U8aFixed;1071 } & Struct;1072 readonly isUnsupportedVersion: boolean;1073 readonly asUnsupportedVersion: {1074 readonly messageId: U8aFixed;1075 } & Struct;1076 readonly isExecutedDownward: boolean;1077 readonly asExecutedDownward: {1078 readonly messageId: U8aFixed;1079 readonly outcome: XcmV2TraitsOutcome;1080 } & Struct;1081 readonly isWeightExhausted: boolean;1082 readonly asWeightExhausted: {1083 readonly messageId: U8aFixed;1084 readonly remainingWeight: Weight;1085 readonly requiredWeight: Weight;1086 } & Struct;1087 readonly isOverweightEnqueued: boolean;1088 readonly asOverweightEnqueued: {1089 readonly messageId: U8aFixed;1090 readonly overweightIndex: u64;1091 readonly requiredWeight: Weight;1092 } & Struct;1093 readonly isOverweightServiced: boolean;1094 readonly asOverweightServiced: {1095 readonly overweightIndex: u64;1096 readonly weightUsed: Weight;1097 } & Struct;1098 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward' | 'WeightExhausted' | 'OverweightEnqueued' | 'OverweightServiced';1099 }11001101 /** @name PalletUniqueRawEvent (89) */1102 interface PalletUniqueRawEvent extends Enum {1103 readonly isCollectionSponsorRemoved: boolean;1104 readonly asCollectionSponsorRemoved: u32;1105 readonly isCollectionAdminAdded: boolean;1106 readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1107 readonly isCollectionOwnedChanged: boolean;1108 readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>;1109 readonly isCollectionSponsorSet: boolean;1110 readonly asCollectionSponsorSet: ITuple<[u32, AccountId32]>;1111 readonly isSponsorshipConfirmed: boolean;1112 readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;1113 readonly isCollectionAdminRemoved: boolean;1114 readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1115 readonly isAllowListAddressRemoved: boolean;1116 readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1117 readonly isAllowListAddressAdded: boolean;1118 readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1119 readonly isCollectionLimitSet: boolean;1120 readonly asCollectionLimitSet: u32;1121 readonly isCollectionPermissionSet: boolean;1122 readonly asCollectionPermissionSet: u32;1123 readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';1124 }11251126 /** @name PalletEvmAccountBasicCrossAccountIdRepr (90) */1127 interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {1128 readonly isSubstrate: boolean;1129 readonly asSubstrate: AccountId32;1130 readonly isEthereum: boolean;1131 readonly asEthereum: H160;1132 readonly type: 'Substrate' | 'Ethereum';1133 }11341135 /** @name PalletUniqueSchedulerEvent (93) */1136 interface PalletUniqueSchedulerEvent extends Enum {1137 readonly isScheduled: boolean;1138 readonly asScheduled: {1139 readonly when: u32;1140 readonly index: u32;1141 } & Struct;1142 readonly isCanceled: boolean;1143 readonly asCanceled: {1144 readonly when: u32;1145 readonly index: u32;1146 } & Struct;1147 readonly isPriorityChanged: boolean;1148 readonly asPriorityChanged: {1149 readonly when: u32;1150 readonly index: u32;1151 readonly priority: u8;1152 } & Struct;1153 readonly isDispatched: boolean;1154 readonly asDispatched: {1155 readonly task: ITuple<[u32, u32]>;1156 readonly id: Option<U8aFixed>;1157 readonly result: Result<Null, SpRuntimeDispatchError>;1158 } & Struct;1159 readonly isCallLookupFailed: boolean;1160 readonly asCallLookupFailed: {1161 readonly task: ITuple<[u32, u32]>;1162 readonly id: Option<U8aFixed>;1163 readonly error: FrameSupportScheduleLookupError;1164 } & Struct;1165 readonly type: 'Scheduled' | 'Canceled' | 'PriorityChanged' | 'Dispatched' | 'CallLookupFailed';1166 }11671168 /** @name FrameSupportScheduleLookupError (96) */1169 interface FrameSupportScheduleLookupError extends Enum {1170 readonly isUnknown: boolean;1171 readonly isBadFormat: boolean;1172 readonly type: 'Unknown' | 'BadFormat';1173 }11741175 /** @name PalletCommonEvent (97) */1176 interface PalletCommonEvent extends Enum {1177 readonly isCollectionCreated: boolean;1178 readonly asCollectionCreated: ITuple<[u32, u8, AccountId32]>;1179 readonly isCollectionDestroyed: boolean;1180 readonly asCollectionDestroyed: u32;1181 readonly isItemCreated: boolean;1182 readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1183 readonly isItemDestroyed: boolean;1184 readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1185 readonly isTransfer: boolean;1186 readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1187 readonly isApproved: boolean;1188 readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1189 readonly isCollectionPropertySet: boolean;1190 readonly asCollectionPropertySet: ITuple<[u32, Bytes]>;1191 readonly isCollectionPropertyDeleted: boolean;1192 readonly asCollectionPropertyDeleted: ITuple<[u32, Bytes]>;1193 readonly isTokenPropertySet: boolean;1194 readonly asTokenPropertySet: ITuple<[u32, u32, Bytes]>;1195 readonly isTokenPropertyDeleted: boolean;1196 readonly asTokenPropertyDeleted: ITuple<[u32, u32, Bytes]>;1197 readonly isPropertyPermissionSet: boolean;1198 readonly asPropertyPermissionSet: ITuple<[u32, Bytes]>;1199 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved' | 'CollectionPropertySet' | 'CollectionPropertyDeleted' | 'TokenPropertySet' | 'TokenPropertyDeleted' | 'PropertyPermissionSet';1200 }12011202 /** @name PalletStructureEvent (100) */1203 interface PalletStructureEvent extends Enum {1204 readonly isExecuted: boolean;1205 readonly asExecuted: Result<Null, SpRuntimeDispatchError>;1206 readonly type: 'Executed';1207 }12081209 /** @name PalletRmrkCoreEvent (101) */1210 interface PalletRmrkCoreEvent extends Enum {1211 readonly isCollectionCreated: boolean;1212 readonly asCollectionCreated: {1213 readonly issuer: AccountId32;1214 readonly collectionId: u32;1215 } & Struct;1216 readonly isCollectionDestroyed: boolean;1217 readonly asCollectionDestroyed: {1218 readonly issuer: AccountId32;1219 readonly collectionId: u32;1220 } & Struct;1221 readonly isIssuerChanged: boolean;1222 readonly asIssuerChanged: {1223 readonly oldIssuer: AccountId32;1224 readonly newIssuer: AccountId32;1225 readonly collectionId: u32;1226 } & Struct;1227 readonly isCollectionLocked: boolean;1228 readonly asCollectionLocked: {1229 readonly issuer: AccountId32;1230 readonly collectionId: u32;1231 } & Struct;1232 readonly isNftMinted: boolean;1233 readonly asNftMinted: {1234 readonly owner: AccountId32;1235 readonly collectionId: u32;1236 readonly nftId: u32;1237 } & Struct;1238 readonly isNftBurned: boolean;1239 readonly asNftBurned: {1240 readonly owner: AccountId32;1241 readonly nftId: u32;1242 } & Struct;1243 readonly isNftSent: boolean;1244 readonly asNftSent: {1245 readonly sender: AccountId32;1246 readonly recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple;1247 readonly collectionId: u32;1248 readonly nftId: u32;1249 readonly approvalRequired: bool;1250 } & Struct;1251 readonly isNftAccepted: boolean;1252 readonly asNftAccepted: {1253 readonly sender: AccountId32;1254 readonly recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple;1255 readonly collectionId: u32;1256 readonly nftId: u32;1257 } & Struct;1258 readonly isNftRejected: boolean;1259 readonly asNftRejected: {1260 readonly sender: AccountId32;1261 readonly collectionId: u32;1262 readonly nftId: u32;1263 } & Struct;1264 readonly isPropertySet: boolean;1265 readonly asPropertySet: {1266 readonly collectionId: u32;1267 readonly maybeNftId: Option<u32>;1268 readonly key: Bytes;1269 readonly value: Bytes;1270 } & Struct;1271 readonly isResourceAdded: boolean;1272 readonly asResourceAdded: {1273 readonly nftId: u32;1274 readonly resourceId: u32;1275 } & Struct;1276 readonly isResourceRemoval: boolean;1277 readonly asResourceRemoval: {1278 readonly nftId: u32;1279 readonly resourceId: u32;1280 } & Struct;1281 readonly isResourceAccepted: boolean;1282 readonly asResourceAccepted: {1283 readonly nftId: u32;1284 readonly resourceId: u32;1285 } & Struct;1286 readonly isResourceRemovalAccepted: boolean;1287 readonly asResourceRemovalAccepted: {1288 readonly nftId: u32;1289 readonly resourceId: u32;1290 } & Struct;1291 readonly isPrioritySet: boolean;1292 readonly asPrioritySet: {1293 readonly collectionId: u32;1294 readonly nftId: u32;1295 } & Struct;1296 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'IssuerChanged' | 'CollectionLocked' | 'NftMinted' | 'NftBurned' | 'NftSent' | 'NftAccepted' | 'NftRejected' | 'PropertySet' | 'ResourceAdded' | 'ResourceRemoval' | 'ResourceAccepted' | 'ResourceRemovalAccepted' | 'PrioritySet';1297 }12981299 /** @name RmrkTraitsNftAccountIdOrCollectionNftTuple (102) */1300 interface RmrkTraitsNftAccountIdOrCollectionNftTuple extends Enum {1301 readonly isAccountId: boolean;1302 readonly asAccountId: AccountId32;1303 readonly isCollectionAndNftTuple: boolean;1304 readonly asCollectionAndNftTuple: ITuple<[u32, u32]>;1305 readonly type: 'AccountId' | 'CollectionAndNftTuple';1306 }13071308 /** @name PalletRmrkEquipEvent (107) */1309 interface PalletRmrkEquipEvent extends Enum {1310 readonly isBaseCreated: boolean;1311 readonly asBaseCreated: {1312 readonly issuer: AccountId32;1313 readonly baseId: u32;1314 } & Struct;1315 readonly isEquippablesUpdated: boolean;1316 readonly asEquippablesUpdated: {1317 readonly baseId: u32;1318 readonly slotId: u32;1319 } & Struct;1320 readonly type: 'BaseCreated' | 'EquippablesUpdated';1321 }13221323 /** @name PalletAppPromotionEvent (108) */1324 interface PalletAppPromotionEvent extends Enum {1325 readonly isStakingRecalculation: boolean;1326 readonly asStakingRecalculation: ITuple<[AccountId32, u128, u128]>;1327 readonly isStake: boolean;1328 readonly asStake: ITuple<[AccountId32, u128]>;1329 readonly isUnstake: boolean;1330 readonly asUnstake: ITuple<[AccountId32, u128]>;1331 readonly isSetAdmin: boolean;1332 readonly asSetAdmin: AccountId32;1333 readonly type: 'StakingRecalculation' | 'Stake' | 'Unstake' | 'SetAdmin';1334 }13351336 /** @name PalletForeignAssetsModuleEvent (109) */1337 interface PalletForeignAssetsModuleEvent extends Enum {1338 readonly isForeignAssetRegistered: boolean;1339 readonly asForeignAssetRegistered: {1340 readonly assetId: u32;1341 readonly assetAddress: XcmV1MultiLocation;1342 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1343 } & Struct;1344 readonly isForeignAssetUpdated: boolean;1345 readonly asForeignAssetUpdated: {1346 readonly assetId: u32;1347 readonly assetAddress: XcmV1MultiLocation;1348 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1349 } & Struct;1350 readonly isAssetRegistered: boolean;1351 readonly asAssetRegistered: {1352 readonly assetId: PalletForeignAssetsAssetIds;1353 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1354 } & Struct;1355 readonly isAssetUpdated: boolean;1356 readonly asAssetUpdated: {1357 readonly assetId: PalletForeignAssetsAssetIds;1358 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1359 } & Struct;1360 readonly type: 'ForeignAssetRegistered' | 'ForeignAssetUpdated' | 'AssetRegistered' | 'AssetUpdated';1361 }13621363 /** @name PalletForeignAssetsModuleAssetMetadata (110) */1364 interface PalletForeignAssetsModuleAssetMetadata extends Struct {1365 readonly name: Bytes;1366 readonly symbol: Bytes;1367 readonly decimals: u8;1368 readonly minimalBalance: u128;1369 }13701371 /** @name PalletEvmEvent (111) */1372 interface PalletEvmEvent extends Enum {1373 readonly isLog: boolean;1374 readonly asLog: EthereumLog;1375 readonly isCreated: boolean;1376 readonly asCreated: H160;1377 readonly isCreatedFailed: boolean;1378 readonly asCreatedFailed: H160;1379 readonly isExecuted: boolean;1380 readonly asExecuted: H160;1381 readonly isExecutedFailed: boolean;1382 readonly asExecutedFailed: H160;1383 readonly isBalanceDeposit: boolean;1384 readonly asBalanceDeposit: ITuple<[AccountId32, H160, U256]>;1385 readonly isBalanceWithdraw: boolean;1386 readonly asBalanceWithdraw: ITuple<[AccountId32, H160, U256]>;1387 readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';1388 }13891390 /** @name EthereumLog (112) */1391 interface EthereumLog extends Struct {1392 readonly address: H160;1393 readonly topics: Vec<H256>;1394 readonly data: Bytes;1395 }13961397 /** @name PalletEthereumEvent (116) */1398 interface PalletEthereumEvent extends Enum {1399 readonly isExecuted: boolean;1400 readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;1401 readonly type: 'Executed';1402 }14031404 /** @name EvmCoreErrorExitReason (117) */1405 interface EvmCoreErrorExitReason extends Enum {1406 readonly isSucceed: boolean;1407 readonly asSucceed: EvmCoreErrorExitSucceed;1408 readonly isError: boolean;1409 readonly asError: EvmCoreErrorExitError;1410 readonly isRevert: boolean;1411 readonly asRevert: EvmCoreErrorExitRevert;1412 readonly isFatal: boolean;1413 readonly asFatal: EvmCoreErrorExitFatal;1414 readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';1415 }14161417 /** @name EvmCoreErrorExitSucceed (118) */1418 interface EvmCoreErrorExitSucceed extends Enum {1419 readonly isStopped: boolean;1420 readonly isReturned: boolean;1421 readonly isSuicided: boolean;1422 readonly type: 'Stopped' | 'Returned' | 'Suicided';1423 }14241425 /** @name EvmCoreErrorExitError (119) */1426 interface EvmCoreErrorExitError extends Enum {1427 readonly isStackUnderflow: boolean;1428 readonly isStackOverflow: boolean;1429 readonly isInvalidJump: boolean;1430 readonly isInvalidRange: boolean;1431 readonly isDesignatedInvalid: boolean;1432 readonly isCallTooDeep: boolean;1433 readonly isCreateCollision: boolean;1434 readonly isCreateContractLimit: boolean;1435 readonly isOutOfOffset: boolean;1436 readonly isOutOfGas: boolean;1437 readonly isOutOfFund: boolean;1438 readonly isPcUnderflow: boolean;1439 readonly isCreateEmpty: boolean;1440 readonly isOther: boolean;1441 readonly asOther: Text;1442 readonly isInvalidCode: boolean;1443 readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';1444 }14451446 /** @name EvmCoreErrorExitRevert (122) */1447 interface EvmCoreErrorExitRevert extends Enum {1448 readonly isReverted: boolean;1449 readonly type: 'Reverted';1450 }14511452 /** @name EvmCoreErrorExitFatal (123) */1453 interface EvmCoreErrorExitFatal extends Enum {1454 readonly isNotSupported: boolean;1455 readonly isUnhandledInterrupt: boolean;1456 readonly isCallErrorAsFatal: boolean;1457 readonly asCallErrorAsFatal: EvmCoreErrorExitError;1458 readonly isOther: boolean;1459 readonly asOther: Text;1460 readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';1461 }14621463 /** @name PalletEvmContractHelpersEvent (124) */1464 interface PalletEvmContractHelpersEvent extends Enum {1465 readonly isContractSponsorSet: boolean;1466 readonly asContractSponsorSet: ITuple<[H160, AccountId32]>;1467 readonly isContractSponsorshipConfirmed: boolean;1468 readonly asContractSponsorshipConfirmed: ITuple<[H160, AccountId32]>;1469 readonly isContractSponsorRemoved: boolean;1470 readonly asContractSponsorRemoved: H160;1471 readonly type: 'ContractSponsorSet' | 'ContractSponsorshipConfirmed' | 'ContractSponsorRemoved';1472 }14731474 /** @name PalletMaintenanceEvent (125) */1475 interface PalletMaintenanceEvent extends Enum {1476 readonly isMaintenanceEnabled: boolean;1477 readonly isMaintenanceDisabled: boolean;1478 readonly type: 'MaintenanceEnabled' | 'MaintenanceDisabled';1479 }14801481 /** @name PalletTestUtilsEvent (126) */1482 interface PalletTestUtilsEvent extends Enum {1483 readonly isValueIsSet: boolean;1484 readonly isShouldRollback: boolean;1485 readonly type: 'ValueIsSet' | 'ShouldRollback';1486 }14871488 /** @name FrameSystemPhase (127) */1489 interface FrameSystemPhase extends Enum {1490 readonly isApplyExtrinsic: boolean;1491 readonly asApplyExtrinsic: u32;1492 readonly isFinalization: boolean;1493 readonly isInitialization: boolean;1494 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';1495 }14961497 /** @name FrameSystemLastRuntimeUpgradeInfo (129) */1498 interface FrameSystemLastRuntimeUpgradeInfo extends Struct {1499 readonly specVersion: Compact<u32>;1500 readonly specName: Text;1501 }15021503 /** @name FrameSystemCall (130) */1504 interface FrameSystemCall extends Enum {1505 readonly isFillBlock: boolean;1506 readonly asFillBlock: {1507 readonly ratio: Perbill;1508 } & Struct;1509 readonly isRemark: boolean;1510 readonly asRemark: {1511 readonly remark: Bytes;1512 } & Struct;1513 readonly isSetHeapPages: boolean;1514 readonly asSetHeapPages: {1515 readonly pages: u64;1516 } & Struct;1517 readonly isSetCode: boolean;1518 readonly asSetCode: {1519 readonly code: Bytes;1520 } & Struct;1521 readonly isSetCodeWithoutChecks: boolean;1522 readonly asSetCodeWithoutChecks: {1523 readonly code: Bytes;1524 } & Struct;1525 readonly isSetStorage: boolean;1526 readonly asSetStorage: {1527 readonly items: Vec<ITuple<[Bytes, Bytes]>>;1528 } & Struct;1529 readonly isKillStorage: boolean;1530 readonly asKillStorage: {1531 readonly keys_: Vec<Bytes>;1532 } & Struct;1533 readonly isKillPrefix: boolean;1534 readonly asKillPrefix: {1535 readonly prefix: Bytes;1536 readonly subkeys: u32;1537 } & Struct;1538 readonly isRemarkWithEvent: boolean;1539 readonly asRemarkWithEvent: {1540 readonly remark: Bytes;1541 } & Struct;1542 readonly type: 'FillBlock' | 'Remark' | 'SetHeapPages' | 'SetCode' | 'SetCodeWithoutChecks' | 'SetStorage' | 'KillStorage' | 'KillPrefix' | 'RemarkWithEvent';1543 }15441545 /** @name FrameSystemLimitsBlockWeights (135) */1546 interface FrameSystemLimitsBlockWeights extends Struct {1547 readonly baseBlock: Weight;1548 readonly maxBlock: Weight;1549 readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass;1550 }15511552 /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (136) */1553 interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct {1554 readonly normal: FrameSystemLimitsWeightsPerClass;1555 readonly operational: FrameSystemLimitsWeightsPerClass;1556 readonly mandatory: FrameSystemLimitsWeightsPerClass;1557 }15581559 /** @name FrameSystemLimitsWeightsPerClass (137) */1560 interface FrameSystemLimitsWeightsPerClass extends Struct {1561 readonly baseExtrinsic: Weight;1562 readonly maxExtrinsic: Option<Weight>;1563 readonly maxTotal: Option<Weight>;1564 readonly reserved: Option<Weight>;1565 }15661567 /** @name FrameSystemLimitsBlockLength (139) */1568 interface FrameSystemLimitsBlockLength extends Struct {1569 readonly max: FrameSupportDispatchPerDispatchClassU32;1570 }15711572 /** @name FrameSupportDispatchPerDispatchClassU32 (140) */1573 interface FrameSupportDispatchPerDispatchClassU32 extends Struct {1574 readonly normal: u32;1575 readonly operational: u32;1576 readonly mandatory: u32;1577 }15781579 /** @name SpWeightsRuntimeDbWeight (141) */1580 interface SpWeightsRuntimeDbWeight extends Struct {1581 readonly read: u64;1582 readonly write: u64;1583 }15841585 /** @name SpVersionRuntimeVersion (142) */1586 interface SpVersionRuntimeVersion extends Struct {1587 readonly specName: Text;1588 readonly implName: Text;1589 readonly authoringVersion: u32;1590 readonly specVersion: u32;1591 readonly implVersion: u32;1592 readonly apis: Vec<ITuple<[U8aFixed, u32]>>;1593 readonly transactionVersion: u32;1594 readonly stateVersion: u8;1595 }15961597 /** @name FrameSystemError (147) */1598 interface FrameSystemError extends Enum {1599 readonly isInvalidSpecName: boolean;1600 readonly isSpecVersionNeedsToIncrease: boolean;1601 readonly isFailedToExtractRuntimeVersion: boolean;1602 readonly isNonDefaultComposite: boolean;1603 readonly isNonZeroRefCount: boolean;1604 readonly isCallFiltered: boolean;1605 readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';1606 }16071608 /** @name PolkadotPrimitivesV2PersistedValidationData (148) */1609 interface PolkadotPrimitivesV2PersistedValidationData extends Struct {1610 readonly parentHead: Bytes;1611 readonly relayParentNumber: u32;1612 readonly relayParentStorageRoot: H256;1613 readonly maxPovSize: u32;1614 }16151616 /** @name PolkadotPrimitivesV2UpgradeRestriction (151) */1617 interface PolkadotPrimitivesV2UpgradeRestriction extends Enum {1618 readonly isPresent: boolean;1619 readonly type: 'Present';1620 }16211622 /** @name SpTrieStorageProof (152) */1623 interface SpTrieStorageProof extends Struct {1624 readonly trieNodes: BTreeSet<Bytes>;1625 }16261627 /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (154) */1628 interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct {1629 readonly dmqMqcHead: H256;1630 readonly relayDispatchQueueSize: ITuple<[u32, u32]>;1631 readonly ingressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;1632 readonly egressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;1633 }16341635 /** @name PolkadotPrimitivesV2AbridgedHrmpChannel (157) */1636 interface PolkadotPrimitivesV2AbridgedHrmpChannel extends Struct {1637 readonly maxCapacity: u32;1638 readonly maxTotalSize: u32;1639 readonly maxMessageSize: u32;1640 readonly msgCount: u32;1641 readonly totalSize: u32;1642 readonly mqcHead: Option<H256>;1643 }16441645 /** @name PolkadotPrimitivesV2AbridgedHostConfiguration (158) */1646 interface PolkadotPrimitivesV2AbridgedHostConfiguration extends Struct {1647 readonly maxCodeSize: u32;1648 readonly maxHeadDataSize: u32;1649 readonly maxUpwardQueueCount: u32;1650 readonly maxUpwardQueueSize: u32;1651 readonly maxUpwardMessageSize: u32;1652 readonly maxUpwardMessageNumPerCandidate: u32;1653 readonly hrmpMaxMessageNumPerCandidate: u32;1654 readonly validationUpgradeCooldown: u32;1655 readonly validationUpgradeDelay: u32;1656 }16571658 /** @name PolkadotCorePrimitivesOutboundHrmpMessage (164) */1659 interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {1660 readonly recipient: u32;1661 readonly data: Bytes;1662 }16631664 /** @name CumulusPalletParachainSystemCall (165) */1665 interface CumulusPalletParachainSystemCall extends Enum {1666 readonly isSetValidationData: boolean;1667 readonly asSetValidationData: {1668 readonly data: CumulusPrimitivesParachainInherentParachainInherentData;1669 } & Struct;1670 readonly isSudoSendUpwardMessage: boolean;1671 readonly asSudoSendUpwardMessage: {1672 readonly message: Bytes;1673 } & Struct;1674 readonly isAuthorizeUpgrade: boolean;1675 readonly asAuthorizeUpgrade: {1676 readonly codeHash: H256;1677 } & Struct;1678 readonly isEnactAuthorizedUpgrade: boolean;1679 readonly asEnactAuthorizedUpgrade: {1680 readonly code: Bytes;1681 } & Struct;1682 readonly type: 'SetValidationData' | 'SudoSendUpwardMessage' | 'AuthorizeUpgrade' | 'EnactAuthorizedUpgrade';1683 }16841685 /** @name CumulusPrimitivesParachainInherentParachainInherentData (166) */1686 interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct {1687 readonly validationData: PolkadotPrimitivesV2PersistedValidationData;1688 readonly relayChainState: SpTrieStorageProof;1689 readonly downwardMessages: Vec<PolkadotCorePrimitivesInboundDownwardMessage>;1690 readonly horizontalMessages: BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>;1691 }16921693 /** @name PolkadotCorePrimitivesInboundDownwardMessage (168) */1694 interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {1695 readonly sentAt: u32;1696 readonly msg: Bytes;1697 }16981699 /** @name PolkadotCorePrimitivesInboundHrmpMessage (171) */1700 interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {1701 readonly sentAt: u32;1702 readonly data: Bytes;1703 }17041705 /** @name CumulusPalletParachainSystemError (174) */1706 interface CumulusPalletParachainSystemError extends Enum {1707 readonly isOverlappingUpgrades: boolean;1708 readonly isProhibitedByPolkadot: boolean;1709 readonly isTooBig: boolean;1710 readonly isValidationDataNotAvailable: boolean;1711 readonly isHostConfigurationNotAvailable: boolean;1712 readonly isNotScheduled: boolean;1713 readonly isNothingAuthorized: boolean;1714 readonly isUnauthorized: boolean;1715 readonly type: 'OverlappingUpgrades' | 'ProhibitedByPolkadot' | 'TooBig' | 'ValidationDataNotAvailable' | 'HostConfigurationNotAvailable' | 'NotScheduled' | 'NothingAuthorized' | 'Unauthorized';1716 }17171718 /** @name PalletBalancesBalanceLock (176) */1719 interface PalletBalancesBalanceLock extends Struct {1720 readonly id: U8aFixed;1721 readonly amount: u128;1722 readonly reasons: PalletBalancesReasons;1723 }17241725 /** @name PalletBalancesReasons (177) */1726 interface PalletBalancesReasons extends Enum {1727 readonly isFee: boolean;1728 readonly isMisc: boolean;1729 readonly isAll: boolean;1730 readonly type: 'Fee' | 'Misc' | 'All';1731 }17321733 /** @name PalletBalancesReserveData (180) */1734 interface PalletBalancesReserveData extends Struct {1735 readonly id: U8aFixed;1736 readonly amount: u128;1737 }17381739 /** @name PalletBalancesReleases (182) */1740 interface PalletBalancesReleases extends Enum {1741 readonly isV100: boolean;1742 readonly isV200: boolean;1743 readonly type: 'V100' | 'V200';1744 }17451746 /** @name PalletBalancesCall (183) */1747 interface PalletBalancesCall extends Enum {1748 readonly isTransfer: boolean;1749 readonly asTransfer: {1750 readonly dest: MultiAddress;1751 readonly value: Compact<u128>;1752 } & Struct;1753 readonly isSetBalance: boolean;1754 readonly asSetBalance: {1755 readonly who: MultiAddress;1756 readonly newFree: Compact<u128>;1757 readonly newReserved: Compact<u128>;1758 } & Struct;1759 readonly isForceTransfer: boolean;1760 readonly asForceTransfer: {1761 readonly source: MultiAddress;1762 readonly dest: MultiAddress;1763 readonly value: Compact<u128>;1764 } & Struct;1765 readonly isTransferKeepAlive: boolean;1766 readonly asTransferKeepAlive: {1767 readonly dest: MultiAddress;1768 readonly value: Compact<u128>;1769 } & Struct;1770 readonly isTransferAll: boolean;1771 readonly asTransferAll: {1772 readonly dest: MultiAddress;1773 readonly keepAlive: bool;1774 } & Struct;1775 readonly isForceUnreserve: boolean;1776 readonly asForceUnreserve: {1777 readonly who: MultiAddress;1778 readonly amount: u128;1779 } & Struct;1780 readonly type: 'Transfer' | 'SetBalance' | 'ForceTransfer' | 'TransferKeepAlive' | 'TransferAll' | 'ForceUnreserve';1781 }17821783 /** @name PalletBalancesError (186) */1784 interface PalletBalancesError extends Enum {1785 readonly isVestingBalance: boolean;1786 readonly isLiquidityRestrictions: boolean;1787 readonly isInsufficientBalance: boolean;1788 readonly isExistentialDeposit: boolean;1789 readonly isKeepAlive: boolean;1790 readonly isExistingVestingSchedule: boolean;1791 readonly isDeadAccount: boolean;1792 readonly isTooManyReserves: boolean;1793 readonly type: 'VestingBalance' | 'LiquidityRestrictions' | 'InsufficientBalance' | 'ExistentialDeposit' | 'KeepAlive' | 'ExistingVestingSchedule' | 'DeadAccount' | 'TooManyReserves';1794 }17951796 /** @name PalletTimestampCall (188) */1797 interface PalletTimestampCall extends Enum {1798 readonly isSet: boolean;1799 readonly asSet: {1800 readonly now: Compact<u64>;1801 } & Struct;1802 readonly type: 'Set';1803 }18041805 /** @name PalletTransactionPaymentReleases (190) */1806 interface PalletTransactionPaymentReleases extends Enum {1807 readonly isV1Ancient: boolean;1808 readonly isV2: boolean;1809 readonly type: 'V1Ancient' | 'V2';1810 }18111812 /** @name PalletTreasuryProposal (191) */1813 interface PalletTreasuryProposal extends Struct {1814 readonly proposer: AccountId32;1815 readonly value: u128;1816 readonly beneficiary: AccountId32;1817 readonly bond: u128;1818 }18191820 /** @name PalletTreasuryCall (194) */1821 interface PalletTreasuryCall extends Enum {1822 readonly isProposeSpend: boolean;1823 readonly asProposeSpend: {1824 readonly value: Compact<u128>;1825 readonly beneficiary: MultiAddress;1826 } & Struct;1827 readonly isRejectProposal: boolean;1828 readonly asRejectProposal: {1829 readonly proposalId: Compact<u32>;1830 } & Struct;1831 readonly isApproveProposal: boolean;1832 readonly asApproveProposal: {1833 readonly proposalId: Compact<u32>;1834 } & Struct;1835 readonly isSpend: boolean;1836 readonly asSpend: {1837 readonly amount: Compact<u128>;1838 readonly beneficiary: MultiAddress;1839 } & Struct;1840 readonly isRemoveApproval: boolean;1841 readonly asRemoveApproval: {1842 readonly proposalId: Compact<u32>;1843 } & Struct;1844 readonly type: 'ProposeSpend' | 'RejectProposal' | 'ApproveProposal' | 'Spend' | 'RemoveApproval';1845 }18461847 /** @name FrameSupportPalletId (197) */1848 interface FrameSupportPalletId extends U8aFixed {}18491850 /** @name PalletTreasuryError (198) */1851 interface PalletTreasuryError extends Enum {1852 readonly isInsufficientProposersBalance: boolean;1853 readonly isInvalidIndex: boolean;1854 readonly isTooManyApprovals: boolean;1855 readonly isInsufficientPermission: boolean;1856 readonly isProposalNotApproved: boolean;1857 readonly type: 'InsufficientProposersBalance' | 'InvalidIndex' | 'TooManyApprovals' | 'InsufficientPermission' | 'ProposalNotApproved';1858 }18591860 /** @name PalletSudoCall (199) */1861 interface PalletSudoCall extends Enum {1862 readonly isSudo: boolean;1863 readonly asSudo: {1864 readonly call: Call;1865 } & Struct;1866 readonly isSudoUncheckedWeight: boolean;1867 readonly asSudoUncheckedWeight: {1868 readonly call: Call;1869 readonly weight: Weight;1870 } & Struct;1871 readonly isSetKey: boolean;1872 readonly asSetKey: {1873 readonly new_: MultiAddress;1874 } & Struct;1875 readonly isSudoAs: boolean;1876 readonly asSudoAs: {1877 readonly who: MultiAddress;1878 readonly call: Call;1879 } & Struct;1880 readonly type: 'Sudo' | 'SudoUncheckedWeight' | 'SetKey' | 'SudoAs';1881 }18821883 /** @name OrmlVestingModuleCall (201) */1884 interface OrmlVestingModuleCall extends Enum {1885 readonly isClaim: boolean;1886 readonly isVestedTransfer: boolean;1887 readonly asVestedTransfer: {1888 readonly dest: MultiAddress;1889 readonly schedule: OrmlVestingVestingSchedule;1890 } & Struct;1891 readonly isUpdateVestingSchedules: boolean;1892 readonly asUpdateVestingSchedules: {1893 readonly who: MultiAddress;1894 readonly vestingSchedules: Vec<OrmlVestingVestingSchedule>;1895 } & Struct;1896 readonly isClaimFor: boolean;1897 readonly asClaimFor: {1898 readonly dest: MultiAddress;1899 } & Struct;1900 readonly type: 'Claim' | 'VestedTransfer' | 'UpdateVestingSchedules' | 'ClaimFor';1901 }19021903 /** @name OrmlXtokensModuleCall (203) */1904 interface OrmlXtokensModuleCall extends Enum {1905 readonly isTransfer: boolean;1906 readonly asTransfer: {1907 readonly currencyId: PalletForeignAssetsAssetIds;1908 readonly amount: u128;1909 readonly dest: XcmVersionedMultiLocation;1910 readonly destWeight: u64;1911 } & Struct;1912 readonly isTransferMultiasset: boolean;1913 readonly asTransferMultiasset: {1914 readonly asset: XcmVersionedMultiAsset;1915 readonly dest: XcmVersionedMultiLocation;1916 readonly destWeight: u64;1917 } & Struct;1918 readonly isTransferWithFee: boolean;1919 readonly asTransferWithFee: {1920 readonly currencyId: PalletForeignAssetsAssetIds;1921 readonly amount: u128;1922 readonly fee: u128;1923 readonly dest: XcmVersionedMultiLocation;1924 readonly destWeight: u64;1925 } & Struct;1926 readonly isTransferMultiassetWithFee: boolean;1927 readonly asTransferMultiassetWithFee: {1928 readonly asset: XcmVersionedMultiAsset;1929 readonly fee: XcmVersionedMultiAsset;1930 readonly dest: XcmVersionedMultiLocation;1931 readonly destWeight: u64;1932 } & Struct;1933 readonly isTransferMulticurrencies: boolean;1934 readonly asTransferMulticurrencies: {1935 readonly currencies: Vec<ITuple<[PalletForeignAssetsAssetIds, u128]>>;1936 readonly feeItem: u32;1937 readonly dest: XcmVersionedMultiLocation;1938 readonly destWeight: u64;1939 } & Struct;1940 readonly isTransferMultiassets: boolean;1941 readonly asTransferMultiassets: {1942 readonly assets: XcmVersionedMultiAssets;1943 readonly feeItem: u32;1944 readonly dest: XcmVersionedMultiLocation;1945 readonly destWeight: u64;1946 } & Struct;1947 readonly type: 'Transfer' | 'TransferMultiasset' | 'TransferWithFee' | 'TransferMultiassetWithFee' | 'TransferMulticurrencies' | 'TransferMultiassets';1948 }19491950 /** @name XcmVersionedMultiAsset (204) */1951 interface XcmVersionedMultiAsset extends Enum {1952 readonly isV0: boolean;1953 readonly asV0: XcmV0MultiAsset;1954 readonly isV1: boolean;1955 readonly asV1: XcmV1MultiAsset;1956 readonly type: 'V0' | 'V1';1957 }19581959 /** @name OrmlTokensModuleCall (207) */1960 interface OrmlTokensModuleCall extends Enum {1961 readonly isTransfer: boolean;1962 readonly asTransfer: {1963 readonly dest: MultiAddress;1964 readonly currencyId: PalletForeignAssetsAssetIds;1965 readonly amount: Compact<u128>;1966 } & Struct;1967 readonly isTransferAll: boolean;1968 readonly asTransferAll: {1969 readonly dest: MultiAddress;1970 readonly currencyId: PalletForeignAssetsAssetIds;1971 readonly keepAlive: bool;1972 } & Struct;1973 readonly isTransferKeepAlive: boolean;1974 readonly asTransferKeepAlive: {1975 readonly dest: MultiAddress;1976 readonly currencyId: PalletForeignAssetsAssetIds;1977 readonly amount: Compact<u128>;1978 } & Struct;1979 readonly isForceTransfer: boolean;1980 readonly asForceTransfer: {1981 readonly source: MultiAddress;1982 readonly dest: MultiAddress;1983 readonly currencyId: PalletForeignAssetsAssetIds;1984 readonly amount: Compact<u128>;1985 } & Struct;1986 readonly isSetBalance: boolean;1987 readonly asSetBalance: {1988 readonly who: MultiAddress;1989 readonly currencyId: PalletForeignAssetsAssetIds;1990 readonly newFree: Compact<u128>;1991 readonly newReserved: Compact<u128>;1992 } & Struct;1993 readonly type: 'Transfer' | 'TransferAll' | 'TransferKeepAlive' | 'ForceTransfer' | 'SetBalance';1994 }19951996 /** @name CumulusPalletXcmpQueueCall (208) */1997 interface CumulusPalletXcmpQueueCall extends Enum {1998 readonly isServiceOverweight: boolean;1999 readonly asServiceOverweight: {2000 readonly index: u64;2001 readonly weightLimit: Weight;2002 } & Struct;2003 readonly isSuspendXcmExecution: boolean;2004 readonly isResumeXcmExecution: boolean;2005 readonly isUpdateSuspendThreshold: boolean;2006 readonly asUpdateSuspendThreshold: {2007 readonly new_: u32;2008 } & Struct;2009 readonly isUpdateDropThreshold: boolean;2010 readonly asUpdateDropThreshold: {2011 readonly new_: u32;2012 } & Struct;2013 readonly isUpdateResumeThreshold: boolean;2014 readonly asUpdateResumeThreshold: {2015 readonly new_: u32;2016 } & Struct;2017 readonly isUpdateThresholdWeight: boolean;2018 readonly asUpdateThresholdWeight: {2019 readonly new_: Weight;2020 } & Struct;2021 readonly isUpdateWeightRestrictDecay: boolean;2022 readonly asUpdateWeightRestrictDecay: {2023 readonly new_: Weight;2024 } & Struct;2025 readonly isUpdateXcmpMaxIndividualWeight: boolean;2026 readonly asUpdateXcmpMaxIndividualWeight: {2027 readonly new_: Weight;2028 } & Struct;2029 readonly type: 'ServiceOverweight' | 'SuspendXcmExecution' | 'ResumeXcmExecution' | 'UpdateSuspendThreshold' | 'UpdateDropThreshold' | 'UpdateResumeThreshold' | 'UpdateThresholdWeight' | 'UpdateWeightRestrictDecay' | 'UpdateXcmpMaxIndividualWeight';2030 }20312032 /** @name PalletXcmCall (209) */2033 interface PalletXcmCall extends Enum {2034 readonly isSend: boolean;2035 readonly asSend: {2036 readonly dest: XcmVersionedMultiLocation;2037 readonly message: XcmVersionedXcm;2038 } & Struct;2039 readonly isTeleportAssets: boolean;2040 readonly asTeleportAssets: {2041 readonly dest: XcmVersionedMultiLocation;2042 readonly beneficiary: XcmVersionedMultiLocation;2043 readonly assets: XcmVersionedMultiAssets;2044 readonly feeAssetItem: u32;2045 } & Struct;2046 readonly isReserveTransferAssets: boolean;2047 readonly asReserveTransferAssets: {2048 readonly dest: XcmVersionedMultiLocation;2049 readonly beneficiary: XcmVersionedMultiLocation;2050 readonly assets: XcmVersionedMultiAssets;2051 readonly feeAssetItem: u32;2052 } & Struct;2053 readonly isExecute: boolean;2054 readonly asExecute: {2055 readonly message: XcmVersionedXcm;2056 readonly maxWeight: Weight;2057 } & Struct;2058 readonly isForceXcmVersion: boolean;2059 readonly asForceXcmVersion: {2060 readonly location: XcmV1MultiLocation;2061 readonly xcmVersion: u32;2062 } & Struct;2063 readonly isForceDefaultXcmVersion: boolean;2064 readonly asForceDefaultXcmVersion: {2065 readonly maybeXcmVersion: Option<u32>;2066 } & Struct;2067 readonly isForceSubscribeVersionNotify: boolean;2068 readonly asForceSubscribeVersionNotify: {2069 readonly location: XcmVersionedMultiLocation;2070 } & Struct;2071 readonly isForceUnsubscribeVersionNotify: boolean;2072 readonly asForceUnsubscribeVersionNotify: {2073 readonly location: XcmVersionedMultiLocation;2074 } & Struct;2075 readonly isLimitedReserveTransferAssets: boolean;2076 readonly asLimitedReserveTransferAssets: {2077 readonly dest: XcmVersionedMultiLocation;2078 readonly beneficiary: XcmVersionedMultiLocation;2079 readonly assets: XcmVersionedMultiAssets;2080 readonly feeAssetItem: u32;2081 readonly weightLimit: XcmV2WeightLimit;2082 } & Struct;2083 readonly isLimitedTeleportAssets: boolean;2084 readonly asLimitedTeleportAssets: {2085 readonly dest: XcmVersionedMultiLocation;2086 readonly beneficiary: XcmVersionedMultiLocation;2087 readonly assets: XcmVersionedMultiAssets;2088 readonly feeAssetItem: u32;2089 readonly weightLimit: XcmV2WeightLimit;2090 } & Struct;2091 readonly type: 'Send' | 'TeleportAssets' | 'ReserveTransferAssets' | 'Execute' | 'ForceXcmVersion' | 'ForceDefaultXcmVersion' | 'ForceSubscribeVersionNotify' | 'ForceUnsubscribeVersionNotify' | 'LimitedReserveTransferAssets' | 'LimitedTeleportAssets';2092 }20932094 /** @name XcmVersionedXcm (210) */2095 interface XcmVersionedXcm extends Enum {2096 readonly isV0: boolean;2097 readonly asV0: XcmV0Xcm;2098 readonly isV1: boolean;2099 readonly asV1: XcmV1Xcm;2100 readonly isV2: boolean;2101 readonly asV2: XcmV2Xcm;2102 readonly type: 'V0' | 'V1' | 'V2';2103 }21042105 /** @name XcmV0Xcm (211) */2106 interface XcmV0Xcm extends Enum {2107 readonly isWithdrawAsset: boolean;2108 readonly asWithdrawAsset: {2109 readonly assets: Vec<XcmV0MultiAsset>;2110 readonly effects: Vec<XcmV0Order>;2111 } & Struct;2112 readonly isReserveAssetDeposit: boolean;2113 readonly asReserveAssetDeposit: {2114 readonly assets: Vec<XcmV0MultiAsset>;2115 readonly effects: Vec<XcmV0Order>;2116 } & Struct;2117 readonly isTeleportAsset: boolean;2118 readonly asTeleportAsset: {2119 readonly assets: Vec<XcmV0MultiAsset>;2120 readonly effects: Vec<XcmV0Order>;2121 } & Struct;2122 readonly isQueryResponse: boolean;2123 readonly asQueryResponse: {2124 readonly queryId: Compact<u64>;2125 readonly response: XcmV0Response;2126 } & Struct;2127 readonly isTransferAsset: boolean;2128 readonly asTransferAsset: {2129 readonly assets: Vec<XcmV0MultiAsset>;2130 readonly dest: XcmV0MultiLocation;2131 } & Struct;2132 readonly isTransferReserveAsset: boolean;2133 readonly asTransferReserveAsset: {2134 readonly assets: Vec<XcmV0MultiAsset>;2135 readonly dest: XcmV0MultiLocation;2136 readonly effects: Vec<XcmV0Order>;2137 } & Struct;2138 readonly isTransact: boolean;2139 readonly asTransact: {2140 readonly originType: XcmV0OriginKind;2141 readonly requireWeightAtMost: u64;2142 readonly call: XcmDoubleEncoded;2143 } & Struct;2144 readonly isHrmpNewChannelOpenRequest: boolean;2145 readonly asHrmpNewChannelOpenRequest: {2146 readonly sender: Compact<u32>;2147 readonly maxMessageSize: Compact<u32>;2148 readonly maxCapacity: Compact<u32>;2149 } & Struct;2150 readonly isHrmpChannelAccepted: boolean;2151 readonly asHrmpChannelAccepted: {2152 readonly recipient: Compact<u32>;2153 } & Struct;2154 readonly isHrmpChannelClosing: boolean;2155 readonly asHrmpChannelClosing: {2156 readonly initiator: Compact<u32>;2157 readonly sender: Compact<u32>;2158 readonly recipient: Compact<u32>;2159 } & Struct;2160 readonly isRelayedFrom: boolean;2161 readonly asRelayedFrom: {2162 readonly who: XcmV0MultiLocation;2163 readonly message: XcmV0Xcm;2164 } & Struct;2165 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposit' | 'TeleportAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom';2166 }21672168 /** @name XcmV0Order (213) */2169 interface XcmV0Order extends Enum {2170 readonly isNull: boolean;2171 readonly isDepositAsset: boolean;2172 readonly asDepositAsset: {2173 readonly assets: Vec<XcmV0MultiAsset>;2174 readonly dest: XcmV0MultiLocation;2175 } & Struct;2176 readonly isDepositReserveAsset: boolean;2177 readonly asDepositReserveAsset: {2178 readonly assets: Vec<XcmV0MultiAsset>;2179 readonly dest: XcmV0MultiLocation;2180 readonly effects: Vec<XcmV0Order>;2181 } & Struct;2182 readonly isExchangeAsset: boolean;2183 readonly asExchangeAsset: {2184 readonly give: Vec<XcmV0MultiAsset>;2185 readonly receive: Vec<XcmV0MultiAsset>;2186 } & Struct;2187 readonly isInitiateReserveWithdraw: boolean;2188 readonly asInitiateReserveWithdraw: {2189 readonly assets: Vec<XcmV0MultiAsset>;2190 readonly reserve: XcmV0MultiLocation;2191 readonly effects: Vec<XcmV0Order>;2192 } & Struct;2193 readonly isInitiateTeleport: boolean;2194 readonly asInitiateTeleport: {2195 readonly assets: Vec<XcmV0MultiAsset>;2196 readonly dest: XcmV0MultiLocation;2197 readonly effects: Vec<XcmV0Order>;2198 } & Struct;2199 readonly isQueryHolding: boolean;2200 readonly asQueryHolding: {2201 readonly queryId: Compact<u64>;2202 readonly dest: XcmV0MultiLocation;2203 readonly assets: Vec<XcmV0MultiAsset>;2204 } & Struct;2205 readonly isBuyExecution: boolean;2206 readonly asBuyExecution: {2207 readonly fees: XcmV0MultiAsset;2208 readonly weight: u64;2209 readonly debt: u64;2210 readonly haltOnError: bool;2211 readonly xcm: Vec<XcmV0Xcm>;2212 } & Struct;2213 readonly type: 'Null' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';2214 }22152216 /** @name XcmV0Response (215) */2217 interface XcmV0Response extends Enum {2218 readonly isAssets: boolean;2219 readonly asAssets: Vec<XcmV0MultiAsset>;2220 readonly type: 'Assets';2221 }22222223 /** @name XcmV1Xcm (216) */2224 interface XcmV1Xcm extends Enum {2225 readonly isWithdrawAsset: boolean;2226 readonly asWithdrawAsset: {2227 readonly assets: XcmV1MultiassetMultiAssets;2228 readonly effects: Vec<XcmV1Order>;2229 } & Struct;2230 readonly isReserveAssetDeposited: boolean;2231 readonly asReserveAssetDeposited: {2232 readonly assets: XcmV1MultiassetMultiAssets;2233 readonly effects: Vec<XcmV1Order>;2234 } & Struct;2235 readonly isReceiveTeleportedAsset: boolean;2236 readonly asReceiveTeleportedAsset: {2237 readonly assets: XcmV1MultiassetMultiAssets;2238 readonly effects: Vec<XcmV1Order>;2239 } & Struct;2240 readonly isQueryResponse: boolean;2241 readonly asQueryResponse: {2242 readonly queryId: Compact<u64>;2243 readonly response: XcmV1Response;2244 } & Struct;2245 readonly isTransferAsset: boolean;2246 readonly asTransferAsset: {2247 readonly assets: XcmV1MultiassetMultiAssets;2248 readonly beneficiary: XcmV1MultiLocation;2249 } & Struct;2250 readonly isTransferReserveAsset: boolean;2251 readonly asTransferReserveAsset: {2252 readonly assets: XcmV1MultiassetMultiAssets;2253 readonly dest: XcmV1MultiLocation;2254 readonly effects: Vec<XcmV1Order>;2255 } & Struct;2256 readonly isTransact: boolean;2257 readonly asTransact: {2258 readonly originType: XcmV0OriginKind;2259 readonly requireWeightAtMost: u64;2260 readonly call: XcmDoubleEncoded;2261 } & Struct;2262 readonly isHrmpNewChannelOpenRequest: boolean;2263 readonly asHrmpNewChannelOpenRequest: {2264 readonly sender: Compact<u32>;2265 readonly maxMessageSize: Compact<u32>;2266 readonly maxCapacity: Compact<u32>;2267 } & Struct;2268 readonly isHrmpChannelAccepted: boolean;2269 readonly asHrmpChannelAccepted: {2270 readonly recipient: Compact<u32>;2271 } & Struct;2272 readonly isHrmpChannelClosing: boolean;2273 readonly asHrmpChannelClosing: {2274 readonly initiator: Compact<u32>;2275 readonly sender: Compact<u32>;2276 readonly recipient: Compact<u32>;2277 } & Struct;2278 readonly isRelayedFrom: boolean;2279 readonly asRelayedFrom: {2280 readonly who: XcmV1MultilocationJunctions;2281 readonly message: XcmV1Xcm;2282 } & Struct;2283 readonly isSubscribeVersion: boolean;2284 readonly asSubscribeVersion: {2285 readonly queryId: Compact<u64>;2286 readonly maxResponseWeight: Compact<u64>;2287 } & Struct;2288 readonly isUnsubscribeVersion: boolean;2289 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom' | 'SubscribeVersion' | 'UnsubscribeVersion';2290 }22912292 /** @name XcmV1Order (218) */2293 interface XcmV1Order extends Enum {2294 readonly isNoop: boolean;2295 readonly isDepositAsset: boolean;2296 readonly asDepositAsset: {2297 readonly assets: XcmV1MultiassetMultiAssetFilter;2298 readonly maxAssets: u32;2299 readonly beneficiary: XcmV1MultiLocation;2300 } & Struct;2301 readonly isDepositReserveAsset: boolean;2302 readonly asDepositReserveAsset: {2303 readonly assets: XcmV1MultiassetMultiAssetFilter;2304 readonly maxAssets: u32;2305 readonly dest: XcmV1MultiLocation;2306 readonly effects: Vec<XcmV1Order>;2307 } & Struct;2308 readonly isExchangeAsset: boolean;2309 readonly asExchangeAsset: {2310 readonly give: XcmV1MultiassetMultiAssetFilter;2311 readonly receive: XcmV1MultiassetMultiAssets;2312 } & Struct;2313 readonly isInitiateReserveWithdraw: boolean;2314 readonly asInitiateReserveWithdraw: {2315 readonly assets: XcmV1MultiassetMultiAssetFilter;2316 readonly reserve: XcmV1MultiLocation;2317 readonly effects: Vec<XcmV1Order>;2318 } & Struct;2319 readonly isInitiateTeleport: boolean;2320 readonly asInitiateTeleport: {2321 readonly assets: XcmV1MultiassetMultiAssetFilter;2322 readonly dest: XcmV1MultiLocation;2323 readonly effects: Vec<XcmV1Order>;2324 } & Struct;2325 readonly isQueryHolding: boolean;2326 readonly asQueryHolding: {2327 readonly queryId: Compact<u64>;2328 readonly dest: XcmV1MultiLocation;2329 readonly assets: XcmV1MultiassetMultiAssetFilter;2330 } & Struct;2331 readonly isBuyExecution: boolean;2332 readonly asBuyExecution: {2333 readonly fees: XcmV1MultiAsset;2334 readonly weight: u64;2335 readonly debt: u64;2336 readonly haltOnError: bool;2337 readonly instructions: Vec<XcmV1Xcm>;2338 } & Struct;2339 readonly type: 'Noop' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';2340 }23412342 /** @name XcmV1Response (220) */2343 interface XcmV1Response extends Enum {2344 readonly isAssets: boolean;2345 readonly asAssets: XcmV1MultiassetMultiAssets;2346 readonly isVersion: boolean;2347 readonly asVersion: u32;2348 readonly type: 'Assets' | 'Version';2349 }23502351 /** @name CumulusPalletXcmCall (234) */2352 type CumulusPalletXcmCall = Null;23532354 /** @name CumulusPalletDmpQueueCall (235) */2355 interface CumulusPalletDmpQueueCall extends Enum {2356 readonly isServiceOverweight: boolean;2357 readonly asServiceOverweight: {2358 readonly index: u64;2359 readonly weightLimit: Weight;2360 } & Struct;2361 readonly type: 'ServiceOverweight';2362 }23632364 /** @name PalletInflationCall (236) */2365 interface PalletInflationCall extends Enum {2366 readonly isStartInflation: boolean;2367 readonly asStartInflation: {2368 readonly inflationStartRelayBlock: u32;2369 } & Struct;2370 readonly type: 'StartInflation';2371 }23722373 /** @name PalletUniqueCall (237) */2374 interface PalletUniqueCall extends Enum {2375 readonly isCreateCollection: boolean;2376 readonly asCreateCollection: {2377 readonly collectionName: Vec<u16>;2378 readonly collectionDescription: Vec<u16>;2379 readonly tokenPrefix: Bytes;2380 readonly mode: UpDataStructsCollectionMode;2381 } & Struct;2382 readonly isCreateCollectionEx: boolean;2383 readonly asCreateCollectionEx: {2384 readonly data: UpDataStructsCreateCollectionData;2385 } & Struct;2386 readonly isDestroyCollection: boolean;2387 readonly asDestroyCollection: {2388 readonly collectionId: u32;2389 } & Struct;2390 readonly isAddToAllowList: boolean;2391 readonly asAddToAllowList: {2392 readonly collectionId: u32;2393 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;2394 } & Struct;2395 readonly isRemoveFromAllowList: boolean;2396 readonly asRemoveFromAllowList: {2397 readonly collectionId: u32;2398 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;2399 } & Struct;2400 readonly isChangeCollectionOwner: boolean;2401 readonly asChangeCollectionOwner: {2402 readonly collectionId: u32;2403 readonly newOwner: AccountId32;2404 } & Struct;2405 readonly isAddCollectionAdmin: boolean;2406 readonly asAddCollectionAdmin: {2407 readonly collectionId: u32;2408 readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;2409 } & Struct;2410 readonly isRemoveCollectionAdmin: boolean;2411 readonly asRemoveCollectionAdmin: {2412 readonly collectionId: u32;2413 readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr;2414 } & Struct;2415 readonly isSetCollectionSponsor: boolean;2416 readonly asSetCollectionSponsor: {2417 readonly collectionId: u32;2418 readonly newSponsor: AccountId32;2419 } & Struct;2420 readonly isConfirmSponsorship: boolean;2421 readonly asConfirmSponsorship: {2422 readonly collectionId: u32;2423 } & Struct;2424 readonly isRemoveCollectionSponsor: boolean;2425 readonly asRemoveCollectionSponsor: {2426 readonly collectionId: u32;2427 } & Struct;2428 readonly isCreateItem: boolean;2429 readonly asCreateItem: {2430 readonly collectionId: u32;2431 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2432 readonly data: UpDataStructsCreateItemData;2433 } & Struct;2434 readonly isCreateMultipleItems: boolean;2435 readonly asCreateMultipleItems: {2436 readonly collectionId: u32;2437 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2438 readonly itemsData: Vec<UpDataStructsCreateItemData>;2439 } & Struct;2440 readonly isSetCollectionProperties: boolean;2441 readonly asSetCollectionProperties: {2442 readonly collectionId: u32;2443 readonly properties: Vec<UpDataStructsProperty>;2444 } & Struct;2445 readonly isDeleteCollectionProperties: boolean;2446 readonly asDeleteCollectionProperties: {2447 readonly collectionId: u32;2448 readonly propertyKeys: Vec<Bytes>;2449 } & Struct;2450 readonly isSetTokenProperties: boolean;2451 readonly asSetTokenProperties: {2452 readonly collectionId: u32;2453 readonly tokenId: u32;2454 readonly properties: Vec<UpDataStructsProperty>;2455 } & Struct;2456 readonly isDeleteTokenProperties: boolean;2457 readonly asDeleteTokenProperties: {2458 readonly collectionId: u32;2459 readonly tokenId: u32;2460 readonly propertyKeys: Vec<Bytes>;2461 } & Struct;2462 readonly isSetTokenPropertyPermissions: boolean;2463 readonly asSetTokenPropertyPermissions: {2464 readonly collectionId: u32;2465 readonly propertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;2466 } & Struct;2467 readonly isCreateMultipleItemsEx: boolean;2468 readonly asCreateMultipleItemsEx: {2469 readonly collectionId: u32;2470 readonly data: UpDataStructsCreateItemExData;2471 } & Struct;2472 readonly isSetTransfersEnabledFlag: boolean;2473 readonly asSetTransfersEnabledFlag: {2474 readonly collectionId: u32;2475 readonly value: bool;2476 } & Struct;2477 readonly isBurnItem: boolean;2478 readonly asBurnItem: {2479 readonly collectionId: u32;2480 readonly itemId: u32;2481 readonly value: u128;2482 } & Struct;2483 readonly isBurnFrom: boolean;2484 readonly asBurnFrom: {2485 readonly collectionId: u32;2486 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;2487 readonly itemId: u32;2488 readonly value: u128;2489 } & Struct;2490 readonly isTransfer: boolean;2491 readonly asTransfer: {2492 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;2493 readonly collectionId: u32;2494 readonly itemId: u32;2495 readonly value: u128;2496 } & Struct;2497 readonly isApprove: boolean;2498 readonly asApprove: {2499 readonly spender: PalletEvmAccountBasicCrossAccountIdRepr;2500 readonly collectionId: u32;2501 readonly itemId: u32;2502 readonly amount: u128;2503 } & Struct;2504 readonly isTransferFrom: boolean;2505 readonly asTransferFrom: {2506 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;2507 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;2508 readonly collectionId: u32;2509 readonly itemId: u32;2510 readonly value: u128;2511 } & Struct;2512 readonly isSetCollectionLimits: boolean;2513 readonly asSetCollectionLimits: {2514 readonly collectionId: u32;2515 readonly newLimit: UpDataStructsCollectionLimits;2516 } & Struct;2517 readonly isSetCollectionPermissions: boolean;2518 readonly asSetCollectionPermissions: {2519 readonly collectionId: u32;2520 readonly newPermission: UpDataStructsCollectionPermissions;2521 } & Struct;2522 readonly isRepartition: boolean;2523 readonly asRepartition: {2524 readonly collectionId: u32;2525 readonly tokenId: u32;2526 readonly amount: u128;2527 } & Struct;2528 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';2529 }25302531 /** @name UpDataStructsCollectionMode (242) */2532 interface UpDataStructsCollectionMode extends Enum {2533 readonly isNft: boolean;2534 readonly isFungible: boolean;2535 readonly asFungible: u8;2536 readonly isReFungible: boolean;2537 readonly type: 'Nft' | 'Fungible' | 'ReFungible';2538 }25392540 /** @name UpDataStructsCreateCollectionData (243) */2541 interface UpDataStructsCreateCollectionData extends Struct {2542 readonly mode: UpDataStructsCollectionMode;2543 readonly access: Option<UpDataStructsAccessMode>;2544 readonly name: Vec<u16>;2545 readonly description: Vec<u16>;2546 readonly tokenPrefix: Bytes;2547 readonly pendingSponsor: Option<AccountId32>;2548 readonly limits: Option<UpDataStructsCollectionLimits>;2549 readonly permissions: Option<UpDataStructsCollectionPermissions>;2550 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;2551 readonly properties: Vec<UpDataStructsProperty>;2552 }25532554 /** @name UpDataStructsAccessMode (245) */2555 interface UpDataStructsAccessMode extends Enum {2556 readonly isNormal: boolean;2557 readonly isAllowList: boolean;2558 readonly type: 'Normal' | 'AllowList';2559 }25602561 /** @name UpDataStructsCollectionLimits (247) */2562 interface UpDataStructsCollectionLimits extends Struct {2563 readonly accountTokenOwnershipLimit: Option<u32>;2564 readonly sponsoredDataSize: Option<u32>;2565 readonly sponsoredDataRateLimit: Option<UpDataStructsSponsoringRateLimit>;2566 readonly tokenLimit: Option<u32>;2567 readonly sponsorTransferTimeout: Option<u32>;2568 readonly sponsorApproveTimeout: Option<u32>;2569 readonly ownerCanTransfer: Option<bool>;2570 readonly ownerCanDestroy: Option<bool>;2571 readonly transfersEnabled: Option<bool>;2572 }25732574 /** @name UpDataStructsSponsoringRateLimit (249) */2575 interface UpDataStructsSponsoringRateLimit extends Enum {2576 readonly isSponsoringDisabled: boolean;2577 readonly isBlocks: boolean;2578 readonly asBlocks: u32;2579 readonly type: 'SponsoringDisabled' | 'Blocks';2580 }25812582 /** @name UpDataStructsCollectionPermissions (252) */2583 interface UpDataStructsCollectionPermissions extends Struct {2584 readonly access: Option<UpDataStructsAccessMode>;2585 readonly mintMode: Option<bool>;2586 readonly nesting: Option<UpDataStructsNestingPermissions>;2587 }25882589 /** @name UpDataStructsNestingPermissions (254) */2590 interface UpDataStructsNestingPermissions extends Struct {2591 readonly tokenOwner: bool;2592 readonly collectionAdmin: bool;2593 readonly restricted: Option<UpDataStructsOwnerRestrictedSet>;2594 }25952596 /** @name UpDataStructsOwnerRestrictedSet (256) */2597 interface UpDataStructsOwnerRestrictedSet extends BTreeSet<u32> {}25982599 /** @name UpDataStructsPropertyKeyPermission (261) */2600 interface UpDataStructsPropertyKeyPermission extends Struct {2601 readonly key: Bytes;2602 readonly permission: UpDataStructsPropertyPermission;2603 }26042605 /** @name UpDataStructsPropertyPermission (262) */2606 interface UpDataStructsPropertyPermission extends Struct {2607 readonly mutable: bool;2608 readonly collectionAdmin: bool;2609 readonly tokenOwner: bool;2610 }26112612 /** @name UpDataStructsProperty (265) */2613 interface UpDataStructsProperty extends Struct {2614 readonly key: Bytes;2615 readonly value: Bytes;2616 }26172618 /** @name UpDataStructsCreateItemData (268) */2619 interface UpDataStructsCreateItemData extends Enum {2620 readonly isNft: boolean;2621 readonly asNft: UpDataStructsCreateNftData;2622 readonly isFungible: boolean;2623 readonly asFungible: UpDataStructsCreateFungibleData;2624 readonly isReFungible: boolean;2625 readonly asReFungible: UpDataStructsCreateReFungibleData;2626 readonly type: 'Nft' | 'Fungible' | 'ReFungible';2627 }26282629 /** @name UpDataStructsCreateNftData (269) */2630 interface UpDataStructsCreateNftData extends Struct {2631 readonly properties: Vec<UpDataStructsProperty>;2632 }26332634 /** @name UpDataStructsCreateFungibleData (270) */2635 interface UpDataStructsCreateFungibleData extends Struct {2636 readonly value: u128;2637 }26382639 /** @name UpDataStructsCreateReFungibleData (271) */2640 interface UpDataStructsCreateReFungibleData extends Struct {2641 readonly pieces: u128;2642 readonly properties: Vec<UpDataStructsProperty>;2643 }26442645 /** @name UpDataStructsCreateItemExData (274) */2646 interface UpDataStructsCreateItemExData extends Enum {2647 readonly isNft: boolean;2648 readonly asNft: Vec<UpDataStructsCreateNftExData>;2649 readonly isFungible: boolean;2650 readonly asFungible: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;2651 readonly isRefungibleMultipleItems: boolean;2652 readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExSingleOwner>;2653 readonly isRefungibleMultipleOwners: boolean;2654 readonly asRefungibleMultipleOwners: UpDataStructsCreateRefungibleExMultipleOwners;2655 readonly type: 'Nft' | 'Fungible' | 'RefungibleMultipleItems' | 'RefungibleMultipleOwners';2656 }26572658 /** @name UpDataStructsCreateNftExData (276) */2659 interface UpDataStructsCreateNftExData extends Struct {2660 readonly properties: Vec<UpDataStructsProperty>;2661 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2662 }26632664 /** @name UpDataStructsCreateRefungibleExSingleOwner (283) */2665 interface UpDataStructsCreateRefungibleExSingleOwner extends Struct {2666 readonly user: PalletEvmAccountBasicCrossAccountIdRepr;2667 readonly pieces: u128;2668 readonly properties: Vec<UpDataStructsProperty>;2669 }26702671 /** @name UpDataStructsCreateRefungibleExMultipleOwners (285) */2672 interface UpDataStructsCreateRefungibleExMultipleOwners extends Struct {2673 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;2674 readonly properties: Vec<UpDataStructsProperty>;2675 }26762677 /** @name PalletUniqueSchedulerCall (286) */2678 interface PalletUniqueSchedulerCall extends Enum {2679 readonly isScheduleNamed: boolean;2680 readonly asScheduleNamed: {2681 readonly id: U8aFixed;2682 readonly when: u32;2683 readonly maybePeriodic: Option<ITuple<[u32, u32]>>;2684 readonly priority: Option<u8>;2685 readonly call: FrameSupportScheduleMaybeHashed;2686 } & Struct;2687 readonly isCancelNamed: boolean;2688 readonly asCancelNamed: {2689 readonly id: U8aFixed;2690 } & Struct;2691 readonly isScheduleNamedAfter: boolean;2692 readonly asScheduleNamedAfter: {2693 readonly id: U8aFixed;2694 readonly after: u32;2695 readonly maybePeriodic: Option<ITuple<[u32, u32]>>;2696 readonly priority: Option<u8>;2697 readonly call: FrameSupportScheduleMaybeHashed;2698 } & Struct;2699 readonly isChangeNamedPriority: boolean;2700 readonly asChangeNamedPriority: {2701 readonly id: U8aFixed;2702 readonly priority: u8;2703 } & Struct;2704 readonly type: 'ScheduleNamed' | 'CancelNamed' | 'ScheduleNamedAfter' | 'ChangeNamedPriority';2705 }27062707 /** @name FrameSupportScheduleMaybeHashed (289) */2708 interface FrameSupportScheduleMaybeHashed extends Enum {2709 readonly isValue: boolean;2710 readonly asValue: Call;2711 readonly isHash: boolean;2712 readonly asHash: H256;2713 readonly type: 'Value' | 'Hash';2714 }27152716 /** @name PalletConfigurationCall (290) */2717 interface PalletConfigurationCall extends Enum {2718 readonly isSetWeightToFeeCoefficientOverride: boolean;2719 readonly asSetWeightToFeeCoefficientOverride: {2720 readonly coeff: Option<u32>;2721 } & Struct;2722 readonly isSetMinGasPriceOverride: boolean;2723 readonly asSetMinGasPriceOverride: {2724 readonly coeff: Option<u64>;2725 } & Struct;2726 readonly type: 'SetWeightToFeeCoefficientOverride' | 'SetMinGasPriceOverride';2727 }27282729 /** @name PalletTemplateTransactionPaymentCall (292) */2730 type PalletTemplateTransactionPaymentCall = Null;27312732 /** @name PalletStructureCall (293) */2733 type PalletStructureCall = Null;27342735 /** @name PalletRmrkCoreCall (294) */2736 interface PalletRmrkCoreCall extends Enum {2737 readonly isCreateCollection: boolean;2738 readonly asCreateCollection: {2739 readonly metadata: Bytes;2740 readonly max: Option<u32>;2741 readonly symbol: Bytes;2742 } & Struct;2743 readonly isDestroyCollection: boolean;2744 readonly asDestroyCollection: {2745 readonly collectionId: u32;2746 } & Struct;2747 readonly isChangeCollectionIssuer: boolean;2748 readonly asChangeCollectionIssuer: {2749 readonly collectionId: u32;2750 readonly newIssuer: MultiAddress;2751 } & Struct;2752 readonly isLockCollection: boolean;2753 readonly asLockCollection: {2754 readonly collectionId: u32;2755 } & Struct;2756 readonly isMintNft: boolean;2757 readonly asMintNft: {2758 readonly owner: Option<AccountId32>;2759 readonly collectionId: u32;2760 readonly recipient: Option<AccountId32>;2761 readonly royaltyAmount: Option<Permill>;2762 readonly metadata: Bytes;2763 readonly transferable: bool;2764 readonly resources: Option<Vec<RmrkTraitsResourceResourceTypes>>;2765 } & Struct;2766 readonly isBurnNft: boolean;2767 readonly asBurnNft: {2768 readonly collectionId: u32;2769 readonly nftId: u32;2770 readonly maxBurns: u32;2771 } & Struct;2772 readonly isSend: boolean;2773 readonly asSend: {2774 readonly rmrkCollectionId: u32;2775 readonly rmrkNftId: u32;2776 readonly newOwner: RmrkTraitsNftAccountIdOrCollectionNftTuple;2777 } & Struct;2778 readonly isAcceptNft: boolean;2779 readonly asAcceptNft: {2780 readonly rmrkCollectionId: u32;2781 readonly rmrkNftId: u32;2782 readonly newOwner: RmrkTraitsNftAccountIdOrCollectionNftTuple;2783 } & Struct;2784 readonly isRejectNft: boolean;2785 readonly asRejectNft: {2786 readonly rmrkCollectionId: u32;2787 readonly rmrkNftId: u32;2788 } & Struct;2789 readonly isAcceptResource: boolean;2790 readonly asAcceptResource: {2791 readonly rmrkCollectionId: u32;2792 readonly rmrkNftId: u32;2793 readonly resourceId: u32;2794 } & Struct;2795 readonly isAcceptResourceRemoval: boolean;2796 readonly asAcceptResourceRemoval: {2797 readonly rmrkCollectionId: u32;2798 readonly rmrkNftId: u32;2799 readonly resourceId: u32;2800 } & Struct;2801 readonly isSetProperty: boolean;2802 readonly asSetProperty: {2803 readonly rmrkCollectionId: Compact<u32>;2804 readonly maybeNftId: Option<u32>;2805 readonly key: Bytes;2806 readonly value: Bytes;2807 } & Struct;2808 readonly isSetPriority: boolean;2809 readonly asSetPriority: {2810 readonly rmrkCollectionId: u32;2811 readonly rmrkNftId: u32;2812 readonly priorities: Vec<u32>;2813 } & Struct;2814 readonly isAddBasicResource: boolean;2815 readonly asAddBasicResource: {2816 readonly rmrkCollectionId: u32;2817 readonly nftId: u32;2818 readonly resource: RmrkTraitsResourceBasicResource;2819 } & Struct;2820 readonly isAddComposableResource: boolean;2821 readonly asAddComposableResource: {2822 readonly rmrkCollectionId: u32;2823 readonly nftId: u32;2824 readonly resource: RmrkTraitsResourceComposableResource;2825 } & Struct;2826 readonly isAddSlotResource: boolean;2827 readonly asAddSlotResource: {2828 readonly rmrkCollectionId: u32;2829 readonly nftId: u32;2830 readonly resource: RmrkTraitsResourceSlotResource;2831 } & Struct;2832 readonly isRemoveResource: boolean;2833 readonly asRemoveResource: {2834 readonly rmrkCollectionId: u32;2835 readonly nftId: u32;2836 readonly resourceId: u32;2837 } & Struct;2838 readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'Send' | 'AcceptNft' | 'RejectNft' | 'AcceptResource' | 'AcceptResourceRemoval' | 'SetProperty' | 'SetPriority' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource' | 'RemoveResource';2839 }28402841 /** @name RmrkTraitsResourceResourceTypes (300) */2842 interface RmrkTraitsResourceResourceTypes extends Enum {2843 readonly isBasic: boolean;2844 readonly asBasic: RmrkTraitsResourceBasicResource;2845 readonly isComposable: boolean;2846 readonly asComposable: RmrkTraitsResourceComposableResource;2847 readonly isSlot: boolean;2848 readonly asSlot: RmrkTraitsResourceSlotResource;2849 readonly type: 'Basic' | 'Composable' | 'Slot';2850 }28512852 /** @name RmrkTraitsResourceBasicResource (302) */2853 interface RmrkTraitsResourceBasicResource extends Struct {2854 readonly src: Option<Bytes>;2855 readonly metadata: Option<Bytes>;2856 readonly license: Option<Bytes>;2857 readonly thumb: Option<Bytes>;2858 }28592860 /** @name RmrkTraitsResourceComposableResource (304) */2861 interface RmrkTraitsResourceComposableResource extends Struct {2862 readonly parts: Vec<u32>;2863 readonly base: u32;2864 readonly src: Option<Bytes>;2865 readonly metadata: Option<Bytes>;2866 readonly license: Option<Bytes>;2867 readonly thumb: Option<Bytes>;2868 }28692870 /** @name RmrkTraitsResourceSlotResource (305) */2871 interface RmrkTraitsResourceSlotResource extends Struct {2872 readonly base: u32;2873 readonly src: Option<Bytes>;2874 readonly metadata: Option<Bytes>;2875 readonly slot: u32;2876 readonly license: Option<Bytes>;2877 readonly thumb: Option<Bytes>;2878 }28792880 /** @name PalletRmrkEquipCall (308) */2881 interface PalletRmrkEquipCall extends Enum {2882 readonly isCreateBase: boolean;2883 readonly asCreateBase: {2884 readonly baseType: Bytes;2885 readonly symbol: Bytes;2886 readonly parts: Vec<RmrkTraitsPartPartType>;2887 } & Struct;2888 readonly isThemeAdd: boolean;2889 readonly asThemeAdd: {2890 readonly baseId: u32;2891 readonly theme: RmrkTraitsTheme;2892 } & Struct;2893 readonly isEquippable: boolean;2894 readonly asEquippable: {2895 readonly baseId: u32;2896 readonly slotId: u32;2897 readonly equippables: RmrkTraitsPartEquippableList;2898 } & Struct;2899 readonly type: 'CreateBase' | 'ThemeAdd' | 'Equippable';2900 }29012902 /** @name RmrkTraitsPartPartType (311) */2903 interface RmrkTraitsPartPartType extends Enum {2904 readonly isFixedPart: boolean;2905 readonly asFixedPart: RmrkTraitsPartFixedPart;2906 readonly isSlotPart: boolean;2907 readonly asSlotPart: RmrkTraitsPartSlotPart;2908 readonly type: 'FixedPart' | 'SlotPart';2909 }29102911 /** @name RmrkTraitsPartFixedPart (313) */2912 interface RmrkTraitsPartFixedPart extends Struct {2913 readonly id: u32;2914 readonly z: u32;2915 readonly src: Bytes;2916 }29172918 /** @name RmrkTraitsPartSlotPart (314) */2919 interface RmrkTraitsPartSlotPart extends Struct {2920 readonly id: u32;2921 readonly equippable: RmrkTraitsPartEquippableList;2922 readonly src: Bytes;2923 readonly z: u32;2924 }29252926 /** @name RmrkTraitsPartEquippableList (315) */2927 interface RmrkTraitsPartEquippableList extends Enum {2928 readonly isAll: boolean;2929 readonly isEmpty: boolean;2930 readonly isCustom: boolean;2931 readonly asCustom: Vec<u32>;2932 readonly type: 'All' | 'Empty' | 'Custom';2933 }29342935 /** @name RmrkTraitsTheme (317) */2936 interface RmrkTraitsTheme extends Struct {2937 readonly name: Bytes;2938 readonly properties: Vec<RmrkTraitsThemeThemeProperty>;2939 readonly inherit: bool;2940 }29412942 /** @name RmrkTraitsThemeThemeProperty (319) */2943 interface RmrkTraitsThemeThemeProperty extends Struct {2944 readonly key: Bytes;2945 readonly value: Bytes;2946 }29472948 /** @name PalletAppPromotionCall (321) */2949 interface PalletAppPromotionCall extends Enum {2950 readonly isSetAdminAddress: boolean;2951 readonly asSetAdminAddress: {2952 readonly admin: PalletEvmAccountBasicCrossAccountIdRepr;2953 } & Struct;2954 readonly isStake: boolean;2955 readonly asStake: {2956 readonly amount: u128;2957 } & Struct;2958 readonly isUnstake: boolean;2959 readonly isSponsorCollection: boolean;2960 readonly asSponsorCollection: {2961 readonly collectionId: u32;2962 } & Struct;2963 readonly isStopSponsoringCollection: boolean;2964 readonly asStopSponsoringCollection: {2965 readonly collectionId: u32;2966 } & Struct;2967 readonly isSponsorContract: boolean;2968 readonly asSponsorContract: {2969 readonly contractId: H160;2970 } & Struct;2971 readonly isStopSponsoringContract: boolean;2972 readonly asStopSponsoringContract: {2973 readonly contractId: H160;2974 } & Struct;2975 readonly isPayoutStakers: boolean;2976 readonly asPayoutStakers: {2977 readonly stakersNumber: Option<u8>;2978 } & Struct;2979 readonly type: 'SetAdminAddress' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsoringCollection' | 'SponsorContract' | 'StopSponsoringContract' | 'PayoutStakers';2980 }29812982 /** @name PalletForeignAssetsModuleCall (322) */2983 interface PalletForeignAssetsModuleCall extends Enum {2984 readonly isRegisterForeignAsset: boolean;2985 readonly asRegisterForeignAsset: {2986 readonly owner: AccountId32;2987 readonly location: XcmVersionedMultiLocation;2988 readonly metadata: PalletForeignAssetsModuleAssetMetadata;2989 } & Struct;2990 readonly isUpdateForeignAsset: boolean;2991 readonly asUpdateForeignAsset: {2992 readonly foreignAssetId: u32;2993 readonly location: XcmVersionedMultiLocation;2994 readonly metadata: PalletForeignAssetsModuleAssetMetadata;2995 } & Struct;2996 readonly type: 'RegisterForeignAsset' | 'UpdateForeignAsset';2997 }29982999 /** @name PalletEvmCall (323) */3000 interface PalletEvmCall extends Enum {3001 readonly isWithdraw: boolean;3002 readonly asWithdraw: {3003 readonly address: H160;3004 readonly value: u128;3005 } & Struct;3006 readonly isCall: boolean;3007 readonly asCall: {3008 readonly source: H160;3009 readonly target: H160;3010 readonly input: Bytes;3011 readonly value: U256;3012 readonly gasLimit: u64;3013 readonly maxFeePerGas: U256;3014 readonly maxPriorityFeePerGas: Option<U256>;3015 readonly nonce: Option<U256>;3016 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;3017 } & Struct;3018 readonly isCreate: boolean;3019 readonly asCreate: {3020 readonly source: H160;3021 readonly init: Bytes;3022 readonly value: U256;3023 readonly gasLimit: u64;3024 readonly maxFeePerGas: U256;3025 readonly maxPriorityFeePerGas: Option<U256>;3026 readonly nonce: Option<U256>;3027 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;3028 } & Struct;3029 readonly isCreate2: boolean;3030 readonly asCreate2: {3031 readonly source: H160;3032 readonly init: Bytes;3033 readonly salt: H256;3034 readonly value: U256;3035 readonly gasLimit: u64;3036 readonly maxFeePerGas: U256;3037 readonly maxPriorityFeePerGas: Option<U256>;3038 readonly nonce: Option<U256>;3039 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;3040 } & Struct;3041 readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';3042 }30433044 /** @name PalletEthereumCall (327) */3045 interface PalletEthereumCall extends Enum {3046 readonly isTransact: boolean;3047 readonly asTransact: {3048 readonly transaction: EthereumTransactionTransactionV2;3049 } & Struct;3050 readonly type: 'Transact';3051 }30523053 /** @name EthereumTransactionTransactionV2 (328) */3054 interface EthereumTransactionTransactionV2 extends Enum {3055 readonly isLegacy: boolean;3056 readonly asLegacy: EthereumTransactionLegacyTransaction;3057 readonly isEip2930: boolean;3058 readonly asEip2930: EthereumTransactionEip2930Transaction;3059 readonly isEip1559: boolean;3060 readonly asEip1559: EthereumTransactionEip1559Transaction;3061 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';3062 }30633064 /** @name EthereumTransactionLegacyTransaction (329) */3065 interface EthereumTransactionLegacyTransaction extends Struct {3066 readonly nonce: U256;3067 readonly gasPrice: U256;3068 readonly gasLimit: U256;3069 readonly action: EthereumTransactionTransactionAction;3070 readonly value: U256;3071 readonly input: Bytes;3072 readonly signature: EthereumTransactionTransactionSignature;3073 }30743075 /** @name EthereumTransactionTransactionAction (330) */3076 interface EthereumTransactionTransactionAction extends Enum {3077 readonly isCall: boolean;3078 readonly asCall: H160;3079 readonly isCreate: boolean;3080 readonly type: 'Call' | 'Create';3081 }30823083 /** @name EthereumTransactionTransactionSignature (331) */3084 interface EthereumTransactionTransactionSignature extends Struct {3085 readonly v: u64;3086 readonly r: H256;3087 readonly s: H256;3088 }30893090 /** @name EthereumTransactionEip2930Transaction (333) */3091 interface EthereumTransactionEip2930Transaction extends Struct {3092 readonly chainId: u64;3093 readonly nonce: U256;3094 readonly gasPrice: U256;3095 readonly gasLimit: U256;3096 readonly action: EthereumTransactionTransactionAction;3097 readonly value: U256;3098 readonly input: Bytes;3099 readonly accessList: Vec<EthereumTransactionAccessListItem>;3100 readonly oddYParity: bool;3101 readonly r: H256;3102 readonly s: H256;3103 }31043105 /** @name EthereumTransactionAccessListItem (335) */3106 interface EthereumTransactionAccessListItem extends Struct {3107 readonly address: H160;3108 readonly storageKeys: Vec<H256>;3109 }31103111 /** @name EthereumTransactionEip1559Transaction (336) */3112 interface EthereumTransactionEip1559Transaction extends Struct {3113 readonly chainId: u64;3114 readonly nonce: U256;3115 readonly maxPriorityFeePerGas: U256;3116 readonly maxFeePerGas: U256;3117 readonly gasLimit: U256;3118 readonly action: EthereumTransactionTransactionAction;3119 readonly value: U256;3120 readonly input: Bytes;3121 readonly accessList: Vec<EthereumTransactionAccessListItem>;3122 readonly oddYParity: bool;3123 readonly r: H256;3124 readonly s: H256;3125 }31263127 /** @name PalletEvmMigrationCall (337) */3128 interface PalletEvmMigrationCall extends Enum {3129 readonly isBegin: boolean;3130 readonly asBegin: {3131 readonly address: H160;3132 } & Struct;3133 readonly isSetData: boolean;3134 readonly asSetData: {3135 readonly address: H160;3136 readonly data: Vec<ITuple<[H256, H256]>>;3137 } & Struct;3138 readonly isFinish: boolean;3139 readonly asFinish: {3140 readonly address: H160;3141 readonly code: Bytes;3142 } & Struct;3143 readonly type: 'Begin' | 'SetData' | 'Finish';3144 }31453146 /** @name PalletMaintenanceCall (340) */3147 interface PalletMaintenanceCall extends Enum {3148 readonly isEnable: boolean;3149 readonly isDisable: boolean;3150 readonly type: 'Enable' | 'Disable';3151 }31523153 /** @name PalletTestUtilsCall (341) */3154 interface PalletTestUtilsCall extends Enum {3155 readonly isEnable: boolean;3156 readonly isSetTestValue: boolean;3157 readonly asSetTestValue: {3158 readonly value: u32;3159 } & Struct;3160 readonly isSetTestValueAndRollback: boolean;3161 readonly asSetTestValueAndRollback: {3162 readonly value: u32;3163 } & Struct;3164 readonly isIncTestValue: boolean;3165 readonly isSelfCancelingInc: boolean;3166 readonly asSelfCancelingInc: {3167 readonly id: U8aFixed;3168 readonly maxTestValue: u32;3169 } & Struct;3170 readonly isJustTakeFee: boolean;3171 readonly type: 'Enable' | 'SetTestValue' | 'SetTestValueAndRollback' | 'IncTestValue' | 'SelfCancelingInc' | 'JustTakeFee';3172 }31733174 /** @name PalletSudoError (342) */3175 interface PalletSudoError extends Enum {3176 readonly isRequireSudo: boolean;3177 readonly type: 'RequireSudo';3178 }31793180 /** @name OrmlVestingModuleError (344) */3181 interface OrmlVestingModuleError extends Enum {3182 readonly isZeroVestingPeriod: boolean;3183 readonly isZeroVestingPeriodCount: boolean;3184 readonly isInsufficientBalanceToLock: boolean;3185 readonly isTooManyVestingSchedules: boolean;3186 readonly isAmountLow: boolean;3187 readonly isMaxVestingSchedulesExceeded: boolean;3188 readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';3189 }31903191 /** @name OrmlXtokensModuleError (345) */3192 interface OrmlXtokensModuleError extends Enum {3193 readonly isAssetHasNoReserve: boolean;3194 readonly isNotCrossChainTransfer: boolean;3195 readonly isInvalidDest: boolean;3196 readonly isNotCrossChainTransferableCurrency: boolean;3197 readonly isUnweighableMessage: boolean;3198 readonly isXcmExecutionFailed: boolean;3199 readonly isCannotReanchor: boolean;3200 readonly isInvalidAncestry: boolean;3201 readonly isInvalidAsset: boolean;3202 readonly isDestinationNotInvertible: boolean;3203 readonly isBadVersion: boolean;3204 readonly isDistinctReserveForAssetAndFee: boolean;3205 readonly isZeroFee: boolean;3206 readonly isZeroAmount: boolean;3207 readonly isTooManyAssetsBeingSent: boolean;3208 readonly isAssetIndexNonExistent: boolean;3209 readonly isFeeNotEnough: boolean;3210 readonly isNotSupportedMultiLocation: boolean;3211 readonly isMinXcmFeeNotDefined: boolean;3212 readonly type: 'AssetHasNoReserve' | 'NotCrossChainTransfer' | 'InvalidDest' | 'NotCrossChainTransferableCurrency' | 'UnweighableMessage' | 'XcmExecutionFailed' | 'CannotReanchor' | 'InvalidAncestry' | 'InvalidAsset' | 'DestinationNotInvertible' | 'BadVersion' | 'DistinctReserveForAssetAndFee' | 'ZeroFee' | 'ZeroAmount' | 'TooManyAssetsBeingSent' | 'AssetIndexNonExistent' | 'FeeNotEnough' | 'NotSupportedMultiLocation' | 'MinXcmFeeNotDefined';3213 }32143215 /** @name OrmlTokensBalanceLock (348) */3216 interface OrmlTokensBalanceLock extends Struct {3217 readonly id: U8aFixed;3218 readonly amount: u128;3219 }32203221 /** @name OrmlTokensAccountData (350) */3222 interface OrmlTokensAccountData extends Struct {3223 readonly free: u128;3224 readonly reserved: u128;3225 readonly frozen: u128;3226 }32273228 /** @name OrmlTokensReserveData (352) */3229 interface OrmlTokensReserveData extends Struct {3230 readonly id: Null;3231 readonly amount: u128;3232 }32333234 /** @name OrmlTokensModuleError (354) */3235 interface OrmlTokensModuleError extends Enum {3236 readonly isBalanceTooLow: boolean;3237 readonly isAmountIntoBalanceFailed: boolean;3238 readonly isLiquidityRestrictions: boolean;3239 readonly isMaxLocksExceeded: boolean;3240 readonly isKeepAlive: boolean;3241 readonly isExistentialDeposit: boolean;3242 readonly isDeadAccount: boolean;3243 readonly isTooManyReserves: boolean;3244 readonly type: 'BalanceTooLow' | 'AmountIntoBalanceFailed' | 'LiquidityRestrictions' | 'MaxLocksExceeded' | 'KeepAlive' | 'ExistentialDeposit' | 'DeadAccount' | 'TooManyReserves';3245 }32463247 /** @name CumulusPalletXcmpQueueInboundChannelDetails (356) */3248 interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {3249 readonly sender: u32;3250 readonly state: CumulusPalletXcmpQueueInboundState;3251 readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;3252 }32533254 /** @name CumulusPalletXcmpQueueInboundState (357) */3255 interface CumulusPalletXcmpQueueInboundState extends Enum {3256 readonly isOk: boolean;3257 readonly isSuspended: boolean;3258 readonly type: 'Ok' | 'Suspended';3259 }32603261 /** @name PolkadotParachainPrimitivesXcmpMessageFormat (360) */3262 interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {3263 readonly isConcatenatedVersionedXcm: boolean;3264 readonly isConcatenatedEncodedBlob: boolean;3265 readonly isSignals: boolean;3266 readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';3267 }32683269 /** @name CumulusPalletXcmpQueueOutboundChannelDetails (363) */3270 interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {3271 readonly recipient: u32;3272 readonly state: CumulusPalletXcmpQueueOutboundState;3273 readonly signalsExist: bool;3274 readonly firstIndex: u16;3275 readonly lastIndex: u16;3276 }32773278 /** @name CumulusPalletXcmpQueueOutboundState (364) */3279 interface CumulusPalletXcmpQueueOutboundState extends Enum {3280 readonly isOk: boolean;3281 readonly isSuspended: boolean;3282 readonly type: 'Ok' | 'Suspended';3283 }32843285 /** @name CumulusPalletXcmpQueueQueueConfigData (366) */3286 interface CumulusPalletXcmpQueueQueueConfigData extends Struct {3287 readonly suspendThreshold: u32;3288 readonly dropThreshold: u32;3289 readonly resumeThreshold: u32;3290 readonly thresholdWeight: Weight;3291 readonly weightRestrictDecay: Weight;3292 readonly xcmpMaxIndividualWeight: Weight;3293 }32943295 /** @name CumulusPalletXcmpQueueError (368) */3296 interface CumulusPalletXcmpQueueError extends Enum {3297 readonly isFailedToSend: boolean;3298 readonly isBadXcmOrigin: boolean;3299 readonly isBadXcm: boolean;3300 readonly isBadOverweightIndex: boolean;3301 readonly isWeightOverLimit: boolean;3302 readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';3303 }33043305 /** @name PalletXcmError (369) */3306 interface PalletXcmError extends Enum {3307 readonly isUnreachable: boolean;3308 readonly isSendFailure: boolean;3309 readonly isFiltered: boolean;3310 readonly isUnweighableMessage: boolean;3311 readonly isDestinationNotInvertible: boolean;3312 readonly isEmpty: boolean;3313 readonly isCannotReanchor: boolean;3314 readonly isTooManyAssets: boolean;3315 readonly isInvalidOrigin: boolean;3316 readonly isBadVersion: boolean;3317 readonly isBadLocation: boolean;3318 readonly isNoSubscription: boolean;3319 readonly isAlreadySubscribed: boolean;3320 readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';3321 }33223323 /** @name CumulusPalletXcmError (370) */3324 type CumulusPalletXcmError = Null;33253326 /** @name CumulusPalletDmpQueueConfigData (371) */3327 interface CumulusPalletDmpQueueConfigData extends Struct {3328 readonly maxIndividual: Weight;3329 }33303331 /** @name CumulusPalletDmpQueuePageIndexData (372) */3332 interface CumulusPalletDmpQueuePageIndexData extends Struct {3333 readonly beginUsed: u32;3334 readonly endUsed: u32;3335 readonly overweightCount: u64;3336 }33373338 /** @name CumulusPalletDmpQueueError (375) */3339 interface CumulusPalletDmpQueueError extends Enum {3340 readonly isUnknown: boolean;3341 readonly isOverLimit: boolean;3342 readonly type: 'Unknown' | 'OverLimit';3343 }33443345 /** @name PalletUniqueError (379) */3346 interface PalletUniqueError extends Enum {3347 readonly isCollectionDecimalPointLimitExceeded: boolean;3348 readonly isConfirmUnsetSponsorFail: boolean;3349 readonly isEmptyArgument: boolean;3350 readonly isRepartitionCalledOnNonRefungibleCollection: boolean;3351 readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument' | 'RepartitionCalledOnNonRefungibleCollection';3352 }33533354 /** @name PalletUniqueSchedulerScheduledV3 (382) */3355 interface PalletUniqueSchedulerScheduledV3 extends Struct {3356 readonly maybeId: Option<U8aFixed>;3357 readonly priority: u8;3358 readonly call: FrameSupportScheduleMaybeHashed;3359 readonly maybePeriodic: Option<ITuple<[u32, u32]>>;3360 readonly origin: OpalRuntimeOriginCaller;3361 }33623363 /** @name OpalRuntimeOriginCaller (383) */3364 interface OpalRuntimeOriginCaller extends Enum {3365 readonly isSystem: boolean;3366 readonly asSystem: FrameSupportDispatchRawOrigin;3367 readonly isVoid: boolean;3368 readonly isPolkadotXcm: boolean;3369 readonly asPolkadotXcm: PalletXcmOrigin;3370 readonly isCumulusXcm: boolean;3371 readonly asCumulusXcm: CumulusPalletXcmOrigin;3372 readonly isEthereum: boolean;3373 readonly asEthereum: PalletEthereumRawOrigin;3374 readonly type: 'System' | 'Void' | 'PolkadotXcm' | 'CumulusXcm' | 'Ethereum';3375 }33763377 /** @name FrameSupportDispatchRawOrigin (384) */3378 interface FrameSupportDispatchRawOrigin extends Enum {3379 readonly isRoot: boolean;3380 readonly isSigned: boolean;3381 readonly asSigned: AccountId32;3382 readonly isNone: boolean;3383 readonly type: 'Root' | 'Signed' | 'None';3384 }33853386 /** @name PalletXcmOrigin (385) */3387 interface PalletXcmOrigin extends Enum {3388 readonly isXcm: boolean;3389 readonly asXcm: XcmV1MultiLocation;3390 readonly isResponse: boolean;3391 readonly asResponse: XcmV1MultiLocation;3392 readonly type: 'Xcm' | 'Response';3393 }33943395 /** @name CumulusPalletXcmOrigin (386) */3396 interface CumulusPalletXcmOrigin extends Enum {3397 readonly isRelay: boolean;3398 readonly isSiblingParachain: boolean;3399 readonly asSiblingParachain: u32;3400 readonly type: 'Relay' | 'SiblingParachain';3401 }34023403 /** @name PalletEthereumRawOrigin (387) */3404 interface PalletEthereumRawOrigin extends Enum {3405 readonly isEthereumTransaction: boolean;3406 readonly asEthereumTransaction: H160;3407 readonly type: 'EthereumTransaction';3408 }34093410 /** @name SpCoreVoid (388) */3411 type SpCoreVoid = Null;34123413 /** @name PalletUniqueSchedulerError (389) */3414 interface PalletUniqueSchedulerError extends Enum {3415 readonly isFailedToSchedule: boolean;3416 readonly isNotFound: boolean;3417 readonly isTargetBlockNumberInPast: boolean;3418 readonly isRescheduleNoChange: boolean;3419 readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange';3420 }34213422 /** @name UpDataStructsCollection (390) */3423 interface UpDataStructsCollection extends Struct {3424 readonly owner: AccountId32;3425 readonly mode: UpDataStructsCollectionMode;3426 readonly name: Vec<u16>;3427 readonly description: Vec<u16>;3428 readonly tokenPrefix: Bytes;3429 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;3430 readonly limits: UpDataStructsCollectionLimits;3431 readonly permissions: UpDataStructsCollectionPermissions;3432 readonly flags: U8aFixed;3433 }34343435 /** @name UpDataStructsSponsorshipStateAccountId32 (391) */3436 interface UpDataStructsSponsorshipStateAccountId32 extends Enum {3437 readonly isDisabled: boolean;3438 readonly isUnconfirmed: boolean;3439 readonly asUnconfirmed: AccountId32;3440 readonly isConfirmed: boolean;3441 readonly asConfirmed: AccountId32;3442 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';3443 }34443445 /** @name UpDataStructsProperties (393) */3446 interface UpDataStructsProperties extends Struct {3447 readonly map: UpDataStructsPropertiesMapBoundedVec;3448 readonly consumedSpace: u32;3449 readonly spaceLimit: u32;3450 }34513452 /** @name UpDataStructsPropertiesMapBoundedVec (394) */3453 interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}34543455 /** @name UpDataStructsPropertiesMapPropertyPermission (399) */3456 interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}34573458 /** @name UpDataStructsCollectionStats (406) */3459 interface UpDataStructsCollectionStats extends Struct {3460 readonly created: u32;3461 readonly destroyed: u32;3462 readonly alive: u32;3463 }34643465 /** @name UpDataStructsTokenChild (407) */3466 interface UpDataStructsTokenChild extends Struct {3467 readonly token: u32;3468 readonly collection: u32;3469 }34703471 /** @name PhantomTypeUpDataStructs (408) */3472 interface PhantomTypeUpDataStructs extends Vec<ITuple<[UpDataStructsTokenData, UpDataStructsRpcCollection, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsPropertyPropertyInfo, RmrkTraitsBaseBaseInfo, RmrkTraitsPartPartType, RmrkTraitsTheme, RmrkTraitsNftNftChild]>> {}34733474 /** @name UpDataStructsTokenData (410) */3475 interface UpDataStructsTokenData extends Struct {3476 readonly properties: Vec<UpDataStructsProperty>;3477 readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;3478 readonly pieces: u128;3479 }34803481 /** @name UpDataStructsRpcCollection (412) */3482 interface UpDataStructsRpcCollection extends Struct {3483 readonly owner: AccountId32;3484 readonly mode: UpDataStructsCollectionMode;3485 readonly name: Vec<u16>;3486 readonly description: Vec<u16>;3487 readonly tokenPrefix: Bytes;3488 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;3489 readonly limits: UpDataStructsCollectionLimits;3490 readonly permissions: UpDataStructsCollectionPermissions;3491 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;3492 readonly properties: Vec<UpDataStructsProperty>;3493 readonly readOnly: bool;3494 readonly flags: UpDataStructsRpcCollectionFlags;3495 }34963497 /** @name UpDataStructsRpcCollectionFlags (413) */3498 interface UpDataStructsRpcCollectionFlags extends Struct {3499 readonly foreign: bool;3500 readonly erc721metadata: bool;3501 }35023503 /** @name RmrkTraitsCollectionCollectionInfo (414) */3504 interface RmrkTraitsCollectionCollectionInfo extends Struct {3505 readonly issuer: AccountId32;3506 readonly metadata: Bytes;3507 readonly max: Option<u32>;3508 readonly symbol: Bytes;3509 readonly nftsCount: u32;3510 }35113512 /** @name RmrkTraitsNftNftInfo (415) */3513 interface RmrkTraitsNftNftInfo extends Struct {3514 readonly owner: RmrkTraitsNftAccountIdOrCollectionNftTuple;3515 readonly royalty: Option<RmrkTraitsNftRoyaltyInfo>;3516 readonly metadata: Bytes;3517 readonly equipped: bool;3518 readonly pending: bool;3519 }35203521 /** @name RmrkTraitsNftRoyaltyInfo (417) */3522 interface RmrkTraitsNftRoyaltyInfo extends Struct {3523 readonly recipient: AccountId32;3524 readonly amount: Permill;3525 }35263527 /** @name RmrkTraitsResourceResourceInfo (418) */3528 interface RmrkTraitsResourceResourceInfo extends Struct {3529 readonly id: u32;3530 readonly resource: RmrkTraitsResourceResourceTypes;3531 readonly pending: bool;3532 readonly pendingRemoval: bool;3533 }35343535 /** @name RmrkTraitsPropertyPropertyInfo (419) */3536 interface RmrkTraitsPropertyPropertyInfo extends Struct {3537 readonly key: Bytes;3538 readonly value: Bytes;3539 }35403541 /** @name RmrkTraitsBaseBaseInfo (420) */3542 interface RmrkTraitsBaseBaseInfo extends Struct {3543 readonly issuer: AccountId32;3544 readonly baseType: Bytes;3545 readonly symbol: Bytes;3546 }35473548 /** @name RmrkTraitsNftNftChild (421) */3549 interface RmrkTraitsNftNftChild extends Struct {3550 readonly collectionId: u32;3551 readonly nftId: u32;3552 }35533554 /** @name PalletCommonError (423) */3555 interface PalletCommonError extends Enum {3556 readonly isCollectionNotFound: boolean;3557 readonly isMustBeTokenOwner: boolean;3558 readonly isNoPermission: boolean;3559 readonly isCantDestroyNotEmptyCollection: boolean;3560 readonly isPublicMintingNotAllowed: boolean;3561 readonly isAddressNotInAllowlist: boolean;3562 readonly isCollectionNameLimitExceeded: boolean;3563 readonly isCollectionDescriptionLimitExceeded: boolean;3564 readonly isCollectionTokenPrefixLimitExceeded: boolean;3565 readonly isTotalCollectionsLimitExceeded: boolean;3566 readonly isCollectionAdminCountExceeded: boolean;3567 readonly isCollectionLimitBoundsExceeded: boolean;3568 readonly isOwnerPermissionsCantBeReverted: boolean;3569 readonly isTransferNotAllowed: boolean;3570 readonly isAccountTokenLimitExceeded: boolean;3571 readonly isCollectionTokenLimitExceeded: boolean;3572 readonly isMetadataFlagFrozen: boolean;3573 readonly isTokenNotFound: boolean;3574 readonly isTokenValueTooLow: boolean;3575 readonly isApprovedValueTooLow: boolean;3576 readonly isCantApproveMoreThanOwned: boolean;3577 readonly isAddressIsZero: boolean;3578 readonly isUnsupportedOperation: boolean;3579 readonly isNotSufficientFounds: boolean;3580 readonly isUserIsNotAllowedToNest: boolean;3581 readonly isSourceCollectionIsNotAllowedToNest: boolean;3582 readonly isCollectionFieldSizeExceeded: boolean;3583 readonly isNoSpaceForProperty: boolean;3584 readonly isPropertyLimitReached: boolean;3585 readonly isPropertyKeyIsTooLong: boolean;3586 readonly isInvalidCharacterInPropertyKey: boolean;3587 readonly isEmptyPropertyKey: boolean;3588 readonly isCollectionIsExternal: boolean;3589 readonly isCollectionIsInternal: boolean;3590 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';3591 }35923593 /** @name PalletFungibleError (425) */3594 interface PalletFungibleError extends Enum {3595 readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;3596 readonly isFungibleItemsHaveNoId: boolean;3597 readonly isFungibleItemsDontHaveData: boolean;3598 readonly isFungibleDisallowsNesting: boolean;3599 readonly isSettingPropertiesNotAllowed: boolean;3600 readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';3601 }36023603 /** @name PalletRefungibleItemData (426) */3604 interface PalletRefungibleItemData extends Struct {3605 readonly constData: Bytes;3606 }36073608 /** @name PalletRefungibleError (431) */3609 interface PalletRefungibleError extends Enum {3610 readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;3611 readonly isWrongRefungiblePieces: boolean;3612 readonly isRepartitionWhileNotOwningAllPieces: boolean;3613 readonly isRefungibleDisallowsNesting: boolean;3614 readonly isSettingPropertiesNotAllowed: boolean;3615 readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RepartitionWhileNotOwningAllPieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';3616 }36173618 /** @name PalletNonfungibleItemData (432) */3619 interface PalletNonfungibleItemData extends Struct {3620 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;3621 }36223623 /** @name UpDataStructsPropertyScope (434) */3624 interface UpDataStructsPropertyScope extends Enum {3625 readonly isNone: boolean;3626 readonly isRmrk: boolean;3627 readonly type: 'None' | 'Rmrk';3628 }36293630 /** @name PalletNonfungibleError (436) */3631 interface PalletNonfungibleError extends Enum {3632 readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;3633 readonly isNonfungibleItemsHaveNoAmount: boolean;3634 readonly isCantBurnNftWithChildren: boolean;3635 readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount' | 'CantBurnNftWithChildren';3636 }36373638 /** @name PalletStructureError (437) */3639 interface PalletStructureError extends Enum {3640 readonly isOuroborosDetected: boolean;3641 readonly isDepthLimit: boolean;3642 readonly isBreadthLimit: boolean;3643 readonly isTokenNotFound: boolean;3644 readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound';3645 }36463647 /** @name PalletRmrkCoreError (438) */3648 interface PalletRmrkCoreError extends Enum {3649 readonly isCorruptedCollectionType: boolean;3650 readonly isRmrkPropertyKeyIsTooLong: boolean;3651 readonly isRmrkPropertyValueIsTooLong: boolean;3652 readonly isRmrkPropertyIsNotFound: boolean;3653 readonly isUnableToDecodeRmrkData: boolean;3654 readonly isCollectionNotEmpty: boolean;3655 readonly isNoAvailableCollectionId: boolean;3656 readonly isNoAvailableNftId: boolean;3657 readonly isCollectionUnknown: boolean;3658 readonly isNoPermission: boolean;3659 readonly isNonTransferable: boolean;3660 readonly isCollectionFullOrLocked: boolean;3661 readonly isResourceDoesntExist: boolean;3662 readonly isCannotSendToDescendentOrSelf: boolean;3663 readonly isCannotAcceptNonOwnedNft: boolean;3664 readonly isCannotRejectNonOwnedNft: boolean;3665 readonly isCannotRejectNonPendingNft: boolean;3666 readonly isResourceNotPending: boolean;3667 readonly isNoAvailableResourceId: boolean;3668 readonly type: 'CorruptedCollectionType' | 'RmrkPropertyKeyIsTooLong' | 'RmrkPropertyValueIsTooLong' | 'RmrkPropertyIsNotFound' | 'UnableToDecodeRmrkData' | 'CollectionNotEmpty' | 'NoAvailableCollectionId' | 'NoAvailableNftId' | 'CollectionUnknown' | 'NoPermission' | 'NonTransferable' | 'CollectionFullOrLocked' | 'ResourceDoesntExist' | 'CannotSendToDescendentOrSelf' | 'CannotAcceptNonOwnedNft' | 'CannotRejectNonOwnedNft' | 'CannotRejectNonPendingNft' | 'ResourceNotPending' | 'NoAvailableResourceId';3669 }36703671 /** @name PalletRmrkEquipError (440) */3672 interface PalletRmrkEquipError extends Enum {3673 readonly isPermissionError: boolean;3674 readonly isNoAvailableBaseId: boolean;3675 readonly isNoAvailablePartId: boolean;3676 readonly isBaseDoesntExist: boolean;3677 readonly isNeedsDefaultThemeFirst: boolean;3678 readonly isPartDoesntExist: boolean;3679 readonly isNoEquippableOnFixedPart: boolean;3680 readonly type: 'PermissionError' | 'NoAvailableBaseId' | 'NoAvailablePartId' | 'BaseDoesntExist' | 'NeedsDefaultThemeFirst' | 'PartDoesntExist' | 'NoEquippableOnFixedPart';3681 }36823683 /** @name PalletAppPromotionError (446) */3684 interface PalletAppPromotionError extends Enum {3685 readonly isAdminNotSet: boolean;3686 readonly isNoPermission: boolean;3687 readonly isNotSufficientFunds: boolean;3688 readonly isPendingForBlockOverflow: boolean;3689 readonly isSponsorNotSet: boolean;3690 readonly isIncorrectLockedBalanceOperation: boolean;3691 readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFunds' | 'PendingForBlockOverflow' | 'SponsorNotSet' | 'IncorrectLockedBalanceOperation';3692 }36933694 /** @name PalletForeignAssetsModuleError (447) */3695 interface PalletForeignAssetsModuleError extends Enum {3696 readonly isBadLocation: boolean;3697 readonly isMultiLocationExisted: boolean;3698 readonly isAssetIdNotExists: boolean;3699 readonly isAssetIdExisted: boolean;3700 readonly type: 'BadLocation' | 'MultiLocationExisted' | 'AssetIdNotExists' | 'AssetIdExisted';3701 }37023703 /** @name PalletEvmError (450) */3704 interface PalletEvmError extends Enum {3705 readonly isBalanceLow: boolean;3706 readonly isFeeOverflow: boolean;3707 readonly isPaymentOverflow: boolean;3708 readonly isWithdrawFailed: boolean;3709 readonly isGasPriceTooLow: boolean;3710 readonly isInvalidNonce: boolean;3711 readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce';3712 }37133714 /** @name FpRpcTransactionStatus (453) */3715 interface FpRpcTransactionStatus extends Struct {3716 readonly transactionHash: H256;3717 readonly transactionIndex: u32;3718 readonly from: H160;3719 readonly to: Option<H160>;3720 readonly contractAddress: Option<H160>;3721 readonly logs: Vec<EthereumLog>;3722 readonly logsBloom: EthbloomBloom;3723 }37243725 /** @name EthbloomBloom (455) */3726 interface EthbloomBloom extends U8aFixed {}37273728 /** @name EthereumReceiptReceiptV3 (457) */3729 interface EthereumReceiptReceiptV3 extends Enum {3730 readonly isLegacy: boolean;3731 readonly asLegacy: EthereumReceiptEip658ReceiptData;3732 readonly isEip2930: boolean;3733 readonly asEip2930: EthereumReceiptEip658ReceiptData;3734 readonly isEip1559: boolean;3735 readonly asEip1559: EthereumReceiptEip658ReceiptData;3736 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';3737 }37383739 /** @name EthereumReceiptEip658ReceiptData (458) */3740 interface EthereumReceiptEip658ReceiptData extends Struct {3741 readonly statusCode: u8;3742 readonly usedGas: U256;3743 readonly logsBloom: EthbloomBloom;3744 readonly logs: Vec<EthereumLog>;3745 }37463747 /** @name EthereumBlock (459) */3748 interface EthereumBlock extends Struct {3749 readonly header: EthereumHeader;3750 readonly transactions: Vec<EthereumTransactionTransactionV2>;3751 readonly ommers: Vec<EthereumHeader>;3752 }37533754 /** @name EthereumHeader (460) */3755 interface EthereumHeader extends Struct {3756 readonly parentHash: H256;3757 readonly ommersHash: H256;3758 readonly beneficiary: H160;3759 readonly stateRoot: H256;3760 readonly transactionsRoot: H256;3761 readonly receiptsRoot: H256;3762 readonly logsBloom: EthbloomBloom;3763 readonly difficulty: U256;3764 readonly number: U256;3765 readonly gasLimit: U256;3766 readonly gasUsed: U256;3767 readonly timestamp: u64;3768 readonly extraData: Bytes;3769 readonly mixHash: H256;3770 readonly nonce: EthereumTypesHashH64;3771 }37723773 /** @name EthereumTypesHashH64 (461) */3774 interface EthereumTypesHashH64 extends U8aFixed {}37753776 /** @name PalletEthereumError (466) */3777 interface PalletEthereumError extends Enum {3778 readonly isInvalidSignature: boolean;3779 readonly isPreLogExists: boolean;3780 readonly type: 'InvalidSignature' | 'PreLogExists';3781 }37823783 /** @name PalletEvmCoderSubstrateError (467) */3784 interface PalletEvmCoderSubstrateError extends Enum {3785 readonly isOutOfGas: boolean;3786 readonly isOutOfFund: boolean;3787 readonly type: 'OutOfGas' | 'OutOfFund';3788 }37893790 /** @name UpDataStructsSponsorshipStateBasicCrossAccountIdRepr (468) */3791 interface UpDataStructsSponsorshipStateBasicCrossAccountIdRepr extends Enum {3792 readonly isDisabled: boolean;3793 readonly isUnconfirmed: boolean;3794 readonly asUnconfirmed: PalletEvmAccountBasicCrossAccountIdRepr;3795 readonly isConfirmed: boolean;3796 readonly asConfirmed: PalletEvmAccountBasicCrossAccountIdRepr;3797 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';3798 }37993800 /** @name PalletEvmContractHelpersSponsoringModeT (469) */3801 interface PalletEvmContractHelpersSponsoringModeT extends Enum {3802 readonly isDisabled: boolean;3803 readonly isAllowlisted: boolean;3804 readonly isGenerous: boolean;3805 readonly type: 'Disabled' | 'Allowlisted' | 'Generous';3806 }38073808 /** @name PalletEvmContractHelpersError (475) */3809 interface PalletEvmContractHelpersError extends Enum {3810 readonly isNoPermission: boolean;3811 readonly isNoPendingSponsor: boolean;3812 readonly isTooManyMethodsHaveSponsoredLimit: boolean;3813 readonly type: 'NoPermission' | 'NoPendingSponsor' | 'TooManyMethodsHaveSponsoredLimit';3814 }38153816 /** @name PalletEvmMigrationError (476) */3817 interface PalletEvmMigrationError extends Enum {3818 readonly isAccountNotEmpty: boolean;3819 readonly isAccountIsNotMigrating: boolean;3820 readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating';3821 }38223823 /** @name PalletMaintenanceError (477) */3824 type PalletMaintenanceError = Null;38253826 /** @name PalletTestUtilsError (478) */3827 interface PalletTestUtilsError extends Enum {3828 readonly isTestPalletDisabled: boolean;3829 readonly isTriggerRollback: boolean;3830 readonly type: 'TestPalletDisabled' | 'TriggerRollback';3831 }38323833 /** @name SpRuntimeMultiSignature (480) */3834 interface SpRuntimeMultiSignature extends Enum {3835 readonly isEd25519: boolean;3836 readonly asEd25519: SpCoreEd25519Signature;3837 readonly isSr25519: boolean;3838 readonly asSr25519: SpCoreSr25519Signature;3839 readonly isEcdsa: boolean;3840 readonly asEcdsa: SpCoreEcdsaSignature;3841 readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';3842 }38433844 /** @name SpCoreEd25519Signature (481) */3845 interface SpCoreEd25519Signature extends U8aFixed {}38463847 /** @name SpCoreSr25519Signature (483) */3848 interface SpCoreSr25519Signature extends U8aFixed {}38493850 /** @name SpCoreEcdsaSignature (484) */3851 interface SpCoreEcdsaSignature extends U8aFixed {}38523853 /** @name FrameSystemExtensionsCheckSpecVersion (487) */3854 type FrameSystemExtensionsCheckSpecVersion = Null;38553856 /** @name FrameSystemExtensionsCheckTxVersion (488) */3857 type FrameSystemExtensionsCheckTxVersion = Null;38583859 /** @name FrameSystemExtensionsCheckGenesis (489) */3860 type FrameSystemExtensionsCheckGenesis = Null;38613862 /** @name FrameSystemExtensionsCheckNonce (492) */3863 interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}38643865 /** @name FrameSystemExtensionsCheckWeight (493) */3866 type FrameSystemExtensionsCheckWeight = Null;38673868 /** @name OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance (494) */3869 type OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance = Null;38703871 /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (495) */3872 interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}38733874 /** @name OpalRuntimeRuntime (496) */3875 type OpalRuntimeRuntime = Null;38763877 /** @name PalletEthereumFakeTransactionFinalizer (497) */3878 type PalletEthereumFakeTransactionFinalizer = Null;38793880} // declare module1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/types/lookup';78import type { BTreeMap, BTreeSet, Bytes, Compact, Enum, Null, Option, Result, Struct, Text, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';9import type { ITuple } from '@polkadot/types-codec/types';10import type { AccountId32, Call, H160, H256, MultiAddress, Perbill, Permill, Weight } from '@polkadot/types/interfaces/runtime';11import type { Event } from '@polkadot/types/interfaces/system';1213declare module '@polkadot/types/lookup' {14 /** @name FrameSystemAccountInfo (3) */15 interface FrameSystemAccountInfo extends Struct {16 readonly nonce: u32;17 readonly consumers: u32;18 readonly providers: u32;19 readonly sufficients: u32;20 readonly data: PalletBalancesAccountData;21 }2223 /** @name PalletBalancesAccountData (5) */24 interface PalletBalancesAccountData extends Struct {25 readonly free: u128;26 readonly reserved: u128;27 readonly miscFrozen: u128;28 readonly feeFrozen: u128;29 }3031 /** @name FrameSupportDispatchPerDispatchClassWeight (7) */32 interface FrameSupportDispatchPerDispatchClassWeight extends Struct {33 readonly normal: Weight;34 readonly operational: Weight;35 readonly mandatory: Weight;36 }3738 /** @name SpRuntimeDigest (12) */39 interface SpRuntimeDigest extends Struct {40 readonly logs: Vec<SpRuntimeDigestDigestItem>;41 }4243 /** @name SpRuntimeDigestDigestItem (14) */44 interface SpRuntimeDigestDigestItem extends Enum {45 readonly isOther: boolean;46 readonly asOther: Bytes;47 readonly isConsensus: boolean;48 readonly asConsensus: ITuple<[U8aFixed, Bytes]>;49 readonly isSeal: boolean;50 readonly asSeal: ITuple<[U8aFixed, Bytes]>;51 readonly isPreRuntime: boolean;52 readonly asPreRuntime: ITuple<[U8aFixed, Bytes]>;53 readonly isRuntimeEnvironmentUpdated: boolean;54 readonly type: 'Other' | 'Consensus' | 'Seal' | 'PreRuntime' | 'RuntimeEnvironmentUpdated';55 }5657 /** @name FrameSystemEventRecord (17) */58 interface FrameSystemEventRecord extends Struct {59 readonly phase: FrameSystemPhase;60 readonly event: Event;61 readonly topics: Vec<H256>;62 }6364 /** @name FrameSystemEvent (19) */65 interface FrameSystemEvent extends Enum {66 readonly isExtrinsicSuccess: boolean;67 readonly asExtrinsicSuccess: {68 readonly dispatchInfo: FrameSupportDispatchDispatchInfo;69 } & Struct;70 readonly isExtrinsicFailed: boolean;71 readonly asExtrinsicFailed: {72 readonly dispatchError: SpRuntimeDispatchError;73 readonly dispatchInfo: FrameSupportDispatchDispatchInfo;74 } & Struct;75 readonly isCodeUpdated: boolean;76 readonly isNewAccount: boolean;77 readonly asNewAccount: {78 readonly account: AccountId32;79 } & Struct;80 readonly isKilledAccount: boolean;81 readonly asKilledAccount: {82 readonly account: AccountId32;83 } & Struct;84 readonly isRemarked: boolean;85 readonly asRemarked: {86 readonly sender: AccountId32;87 readonly hash_: H256;88 } & Struct;89 readonly type: 'ExtrinsicSuccess' | 'ExtrinsicFailed' | 'CodeUpdated' | 'NewAccount' | 'KilledAccount' | 'Remarked';90 }9192 /** @name FrameSupportDispatchDispatchInfo (20) */93 interface FrameSupportDispatchDispatchInfo extends Struct {94 readonly weight: Weight;95 readonly class: FrameSupportDispatchDispatchClass;96 readonly paysFee: FrameSupportDispatchPays;97 }9899 /** @name FrameSupportDispatchDispatchClass (21) */100 interface FrameSupportDispatchDispatchClass extends Enum {101 readonly isNormal: boolean;102 readonly isOperational: boolean;103 readonly isMandatory: boolean;104 readonly type: 'Normal' | 'Operational' | 'Mandatory';105 }106107 /** @name FrameSupportDispatchPays (22) */108 interface FrameSupportDispatchPays extends Enum {109 readonly isYes: boolean;110 readonly isNo: boolean;111 readonly type: 'Yes' | 'No';112 }113114 /** @name SpRuntimeDispatchError (23) */115 interface SpRuntimeDispatchError extends Enum {116 readonly isOther: boolean;117 readonly isCannotLookup: boolean;118 readonly isBadOrigin: boolean;119 readonly isModule: boolean;120 readonly asModule: SpRuntimeModuleError;121 readonly isConsumerRemaining: boolean;122 readonly isNoProviders: boolean;123 readonly isTooManyConsumers: boolean;124 readonly isToken: boolean;125 readonly asToken: SpRuntimeTokenError;126 readonly isArithmetic: boolean;127 readonly asArithmetic: SpRuntimeArithmeticError;128 readonly isTransactional: boolean;129 readonly asTransactional: SpRuntimeTransactionalError;130 readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional';131 }132133 /** @name SpRuntimeModuleError (24) */134 interface SpRuntimeModuleError extends Struct {135 readonly index: u8;136 readonly error: U8aFixed;137 }138139 /** @name SpRuntimeTokenError (25) */140 interface SpRuntimeTokenError extends Enum {141 readonly isNoFunds: boolean;142 readonly isWouldDie: boolean;143 readonly isBelowMinimum: boolean;144 readonly isCannotCreate: boolean;145 readonly isUnknownAsset: boolean;146 readonly isFrozen: boolean;147 readonly isUnsupported: boolean;148 readonly type: 'NoFunds' | 'WouldDie' | 'BelowMinimum' | 'CannotCreate' | 'UnknownAsset' | 'Frozen' | 'Unsupported';149 }150151 /** @name SpRuntimeArithmeticError (26) */152 interface SpRuntimeArithmeticError extends Enum {153 readonly isUnderflow: boolean;154 readonly isOverflow: boolean;155 readonly isDivisionByZero: boolean;156 readonly type: 'Underflow' | 'Overflow' | 'DivisionByZero';157 }158159 /** @name SpRuntimeTransactionalError (27) */160 interface SpRuntimeTransactionalError extends Enum {161 readonly isLimitReached: boolean;162 readonly isNoLayer: boolean;163 readonly type: 'LimitReached' | 'NoLayer';164 }165166 /** @name CumulusPalletParachainSystemEvent (28) */167 interface CumulusPalletParachainSystemEvent extends Enum {168 readonly isValidationFunctionStored: boolean;169 readonly isValidationFunctionApplied: boolean;170 readonly asValidationFunctionApplied: {171 readonly relayChainBlockNum: u32;172 } & Struct;173 readonly isValidationFunctionDiscarded: boolean;174 readonly isUpgradeAuthorized: boolean;175 readonly asUpgradeAuthorized: {176 readonly codeHash: H256;177 } & Struct;178 readonly isDownwardMessagesReceived: boolean;179 readonly asDownwardMessagesReceived: {180 readonly count: u32;181 } & Struct;182 readonly isDownwardMessagesProcessed: boolean;183 readonly asDownwardMessagesProcessed: {184 readonly weightUsed: Weight;185 readonly dmqHead: H256;186 } & Struct;187 readonly type: 'ValidationFunctionStored' | 'ValidationFunctionApplied' | 'ValidationFunctionDiscarded' | 'UpgradeAuthorized' | 'DownwardMessagesReceived' | 'DownwardMessagesProcessed';188 }189190 /** @name PalletBalancesEvent (29) */191 interface PalletBalancesEvent extends Enum {192 readonly isEndowed: boolean;193 readonly asEndowed: {194 readonly account: AccountId32;195 readonly freeBalance: u128;196 } & Struct;197 readonly isDustLost: boolean;198 readonly asDustLost: {199 readonly account: AccountId32;200 readonly amount: u128;201 } & Struct;202 readonly isTransfer: boolean;203 readonly asTransfer: {204 readonly from: AccountId32;205 readonly to: AccountId32;206 readonly amount: u128;207 } & Struct;208 readonly isBalanceSet: boolean;209 readonly asBalanceSet: {210 readonly who: AccountId32;211 readonly free: u128;212 readonly reserved: u128;213 } & Struct;214 readonly isReserved: boolean;215 readonly asReserved: {216 readonly who: AccountId32;217 readonly amount: u128;218 } & Struct;219 readonly isUnreserved: boolean;220 readonly asUnreserved: {221 readonly who: AccountId32;222 readonly amount: u128;223 } & Struct;224 readonly isReserveRepatriated: boolean;225 readonly asReserveRepatriated: {226 readonly from: AccountId32;227 readonly to: AccountId32;228 readonly amount: u128;229 readonly destinationStatus: FrameSupportTokensMiscBalanceStatus;230 } & Struct;231 readonly isDeposit: boolean;232 readonly asDeposit: {233 readonly who: AccountId32;234 readonly amount: u128;235 } & Struct;236 readonly isWithdraw: boolean;237 readonly asWithdraw: {238 readonly who: AccountId32;239 readonly amount: u128;240 } & Struct;241 readonly isSlashed: boolean;242 readonly asSlashed: {243 readonly who: AccountId32;244 readonly amount: u128;245 } & Struct;246 readonly type: 'Endowed' | 'DustLost' | 'Transfer' | 'BalanceSet' | 'Reserved' | 'Unreserved' | 'ReserveRepatriated' | 'Deposit' | 'Withdraw' | 'Slashed';247 }248249 /** @name FrameSupportTokensMiscBalanceStatus (30) */250 interface FrameSupportTokensMiscBalanceStatus extends Enum {251 readonly isFree: boolean;252 readonly isReserved: boolean;253 readonly type: 'Free' | 'Reserved';254 }255256 /** @name PalletTransactionPaymentEvent (31) */257 interface PalletTransactionPaymentEvent extends Enum {258 readonly isTransactionFeePaid: boolean;259 readonly asTransactionFeePaid: {260 readonly who: AccountId32;261 readonly actualFee: u128;262 readonly tip: u128;263 } & Struct;264 readonly type: 'TransactionFeePaid';265 }266267 /** @name PalletTreasuryEvent (32) */268 interface PalletTreasuryEvent extends Enum {269 readonly isProposed: boolean;270 readonly asProposed: {271 readonly proposalIndex: u32;272 } & Struct;273 readonly isSpending: boolean;274 readonly asSpending: {275 readonly budgetRemaining: u128;276 } & Struct;277 readonly isAwarded: boolean;278 readonly asAwarded: {279 readonly proposalIndex: u32;280 readonly award: u128;281 readonly account: AccountId32;282 } & Struct;283 readonly isRejected: boolean;284 readonly asRejected: {285 readonly proposalIndex: u32;286 readonly slashed: u128;287 } & Struct;288 readonly isBurnt: boolean;289 readonly asBurnt: {290 readonly burntFunds: u128;291 } & Struct;292 readonly isRollover: boolean;293 readonly asRollover: {294 readonly rolloverBalance: u128;295 } & Struct;296 readonly isDeposit: boolean;297 readonly asDeposit: {298 readonly value: u128;299 } & Struct;300 readonly isSpendApproved: boolean;301 readonly asSpendApproved: {302 readonly proposalIndex: u32;303 readonly amount: u128;304 readonly beneficiary: AccountId32;305 } & Struct;306 readonly type: 'Proposed' | 'Spending' | 'Awarded' | 'Rejected' | 'Burnt' | 'Rollover' | 'Deposit' | 'SpendApproved';307 }308309 /** @name PalletSudoEvent (33) */310 interface PalletSudoEvent extends Enum {311 readonly isSudid: boolean;312 readonly asSudid: {313 readonly sudoResult: Result<Null, SpRuntimeDispatchError>;314 } & Struct;315 readonly isKeyChanged: boolean;316 readonly asKeyChanged: {317 readonly oldSudoer: Option<AccountId32>;318 } & Struct;319 readonly isSudoAsDone: boolean;320 readonly asSudoAsDone: {321 readonly sudoResult: Result<Null, SpRuntimeDispatchError>;322 } & Struct;323 readonly type: 'Sudid' | 'KeyChanged' | 'SudoAsDone';324 }325326 /** @name OrmlVestingModuleEvent (37) */327 interface OrmlVestingModuleEvent extends Enum {328 readonly isVestingScheduleAdded: boolean;329 readonly asVestingScheduleAdded: {330 readonly from: AccountId32;331 readonly to: AccountId32;332 readonly vestingSchedule: OrmlVestingVestingSchedule;333 } & Struct;334 readonly isClaimed: boolean;335 readonly asClaimed: {336 readonly who: AccountId32;337 readonly amount: u128;338 } & Struct;339 readonly isVestingSchedulesUpdated: boolean;340 readonly asVestingSchedulesUpdated: {341 readonly who: AccountId32;342 } & Struct;343 readonly type: 'VestingScheduleAdded' | 'Claimed' | 'VestingSchedulesUpdated';344 }345346 /** @name OrmlVestingVestingSchedule (38) */347 interface OrmlVestingVestingSchedule extends Struct {348 readonly start: u32;349 readonly period: u32;350 readonly periodCount: u32;351 readonly perPeriod: Compact<u128>;352 }353354 /** @name OrmlXtokensModuleEvent (40) */355 interface OrmlXtokensModuleEvent extends Enum {356 readonly isTransferredMultiAssets: boolean;357 readonly asTransferredMultiAssets: {358 readonly sender: AccountId32;359 readonly assets: XcmV1MultiassetMultiAssets;360 readonly fee: XcmV1MultiAsset;361 readonly dest: XcmV1MultiLocation;362 } & Struct;363 readonly type: 'TransferredMultiAssets';364 }365366 /** @name XcmV1MultiassetMultiAssets (41) */367 interface XcmV1MultiassetMultiAssets extends Vec<XcmV1MultiAsset> {}368369 /** @name XcmV1MultiAsset (43) */370 interface XcmV1MultiAsset extends Struct {371 readonly id: XcmV1MultiassetAssetId;372 readonly fun: XcmV1MultiassetFungibility;373 }374375 /** @name XcmV1MultiassetAssetId (44) */376 interface XcmV1MultiassetAssetId extends Enum {377 readonly isConcrete: boolean;378 readonly asConcrete: XcmV1MultiLocation;379 readonly isAbstract: boolean;380 readonly asAbstract: Bytes;381 readonly type: 'Concrete' | 'Abstract';382 }383384 /** @name XcmV1MultiLocation (45) */385 interface XcmV1MultiLocation extends Struct {386 readonly parents: u8;387 readonly interior: XcmV1MultilocationJunctions;388 }389390 /** @name XcmV1MultilocationJunctions (46) */391 interface XcmV1MultilocationJunctions extends Enum {392 readonly isHere: boolean;393 readonly isX1: boolean;394 readonly asX1: XcmV1Junction;395 readonly isX2: boolean;396 readonly asX2: ITuple<[XcmV1Junction, XcmV1Junction]>;397 readonly isX3: boolean;398 readonly asX3: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction]>;399 readonly isX4: boolean;400 readonly asX4: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;401 readonly isX5: boolean;402 readonly asX5: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;403 readonly isX6: boolean;404 readonly asX6: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;405 readonly isX7: boolean;406 readonly asX7: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;407 readonly isX8: boolean;408 readonly asX8: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;409 readonly type: 'Here' | 'X1' | 'X2' | 'X3' | 'X4' | 'X5' | 'X6' | 'X7' | 'X8';410 }411412 /** @name XcmV1Junction (47) */413 interface XcmV1Junction extends Enum {414 readonly isParachain: boolean;415 readonly asParachain: Compact<u32>;416 readonly isAccountId32: boolean;417 readonly asAccountId32: {418 readonly network: XcmV0JunctionNetworkId;419 readonly id: U8aFixed;420 } & Struct;421 readonly isAccountIndex64: boolean;422 readonly asAccountIndex64: {423 readonly network: XcmV0JunctionNetworkId;424 readonly index: Compact<u64>;425 } & Struct;426 readonly isAccountKey20: boolean;427 readonly asAccountKey20: {428 readonly network: XcmV0JunctionNetworkId;429 readonly key: U8aFixed;430 } & Struct;431 readonly isPalletInstance: boolean;432 readonly asPalletInstance: u8;433 readonly isGeneralIndex: boolean;434 readonly asGeneralIndex: Compact<u128>;435 readonly isGeneralKey: boolean;436 readonly asGeneralKey: Bytes;437 readonly isOnlyChild: boolean;438 readonly isPlurality: boolean;439 readonly asPlurality: {440 readonly id: XcmV0JunctionBodyId;441 readonly part: XcmV0JunctionBodyPart;442 } & Struct;443 readonly type: 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality';444 }445446 /** @name XcmV0JunctionNetworkId (49) */447 interface XcmV0JunctionNetworkId extends Enum {448 readonly isAny: boolean;449 readonly isNamed: boolean;450 readonly asNamed: Bytes;451 readonly isPolkadot: boolean;452 readonly isKusama: boolean;453 readonly type: 'Any' | 'Named' | 'Polkadot' | 'Kusama';454 }455456 /** @name XcmV0JunctionBodyId (53) */457 interface XcmV0JunctionBodyId extends Enum {458 readonly isUnit: boolean;459 readonly isNamed: boolean;460 readonly asNamed: Bytes;461 readonly isIndex: boolean;462 readonly asIndex: Compact<u32>;463 readonly isExecutive: boolean;464 readonly isTechnical: boolean;465 readonly isLegislative: boolean;466 readonly isJudicial: boolean;467 readonly type: 'Unit' | 'Named' | 'Index' | 'Executive' | 'Technical' | 'Legislative' | 'Judicial';468 }469470 /** @name XcmV0JunctionBodyPart (54) */471 interface XcmV0JunctionBodyPart extends Enum {472 readonly isVoice: boolean;473 readonly isMembers: boolean;474 readonly asMembers: {475 readonly count: Compact<u32>;476 } & Struct;477 readonly isFraction: boolean;478 readonly asFraction: {479 readonly nom: Compact<u32>;480 readonly denom: Compact<u32>;481 } & Struct;482 readonly isAtLeastProportion: boolean;483 readonly asAtLeastProportion: {484 readonly nom: Compact<u32>;485 readonly denom: Compact<u32>;486 } & Struct;487 readonly isMoreThanProportion: boolean;488 readonly asMoreThanProportion: {489 readonly nom: Compact<u32>;490 readonly denom: Compact<u32>;491 } & Struct;492 readonly type: 'Voice' | 'Members' | 'Fraction' | 'AtLeastProportion' | 'MoreThanProportion';493 }494495 /** @name XcmV1MultiassetFungibility (55) */496 interface XcmV1MultiassetFungibility extends Enum {497 readonly isFungible: boolean;498 readonly asFungible: Compact<u128>;499 readonly isNonFungible: boolean;500 readonly asNonFungible: XcmV1MultiassetAssetInstance;501 readonly type: 'Fungible' | 'NonFungible';502 }503504 /** @name XcmV1MultiassetAssetInstance (56) */505 interface XcmV1MultiassetAssetInstance extends Enum {506 readonly isUndefined: boolean;507 readonly isIndex: boolean;508 readonly asIndex: Compact<u128>;509 readonly isArray4: boolean;510 readonly asArray4: U8aFixed;511 readonly isArray8: boolean;512 readonly asArray8: U8aFixed;513 readonly isArray16: boolean;514 readonly asArray16: U8aFixed;515 readonly isArray32: boolean;516 readonly asArray32: U8aFixed;517 readonly isBlob: boolean;518 readonly asBlob: Bytes;519 readonly type: 'Undefined' | 'Index' | 'Array4' | 'Array8' | 'Array16' | 'Array32' | 'Blob';520 }521522 /** @name OrmlTokensModuleEvent (59) */523 interface OrmlTokensModuleEvent extends Enum {524 readonly isEndowed: boolean;525 readonly asEndowed: {526 readonly currencyId: PalletForeignAssetsAssetIds;527 readonly who: AccountId32;528 readonly amount: u128;529 } & Struct;530 readonly isDustLost: boolean;531 readonly asDustLost: {532 readonly currencyId: PalletForeignAssetsAssetIds;533 readonly who: AccountId32;534 readonly amount: u128;535 } & Struct;536 readonly isTransfer: boolean;537 readonly asTransfer: {538 readonly currencyId: PalletForeignAssetsAssetIds;539 readonly from: AccountId32;540 readonly to: AccountId32;541 readonly amount: u128;542 } & Struct;543 readonly isReserved: boolean;544 readonly asReserved: {545 readonly currencyId: PalletForeignAssetsAssetIds;546 readonly who: AccountId32;547 readonly amount: u128;548 } & Struct;549 readonly isUnreserved: boolean;550 readonly asUnreserved: {551 readonly currencyId: PalletForeignAssetsAssetIds;552 readonly who: AccountId32;553 readonly amount: u128;554 } & Struct;555 readonly isReserveRepatriated: boolean;556 readonly asReserveRepatriated: {557 readonly currencyId: PalletForeignAssetsAssetIds;558 readonly from: AccountId32;559 readonly to: AccountId32;560 readonly amount: u128;561 readonly status: FrameSupportTokensMiscBalanceStatus;562 } & Struct;563 readonly isBalanceSet: boolean;564 readonly asBalanceSet: {565 readonly currencyId: PalletForeignAssetsAssetIds;566 readonly who: AccountId32;567 readonly free: u128;568 readonly reserved: u128;569 } & Struct;570 readonly isTotalIssuanceSet: boolean;571 readonly asTotalIssuanceSet: {572 readonly currencyId: PalletForeignAssetsAssetIds;573 readonly amount: u128;574 } & Struct;575 readonly isWithdrawn: boolean;576 readonly asWithdrawn: {577 readonly currencyId: PalletForeignAssetsAssetIds;578 readonly who: AccountId32;579 readonly amount: u128;580 } & Struct;581 readonly isSlashed: boolean;582 readonly asSlashed: {583 readonly currencyId: PalletForeignAssetsAssetIds;584 readonly who: AccountId32;585 readonly freeAmount: u128;586 readonly reservedAmount: u128;587 } & Struct;588 readonly isDeposited: boolean;589 readonly asDeposited: {590 readonly currencyId: PalletForeignAssetsAssetIds;591 readonly who: AccountId32;592 readonly amount: u128;593 } & Struct;594 readonly isLockSet: boolean;595 readonly asLockSet: {596 readonly lockId: U8aFixed;597 readonly currencyId: PalletForeignAssetsAssetIds;598 readonly who: AccountId32;599 readonly amount: u128;600 } & Struct;601 readonly isLockRemoved: boolean;602 readonly asLockRemoved: {603 readonly lockId: U8aFixed;604 readonly currencyId: PalletForeignAssetsAssetIds;605 readonly who: AccountId32;606 } & Struct;607 readonly type: 'Endowed' | 'DustLost' | 'Transfer' | 'Reserved' | 'Unreserved' | 'ReserveRepatriated' | 'BalanceSet' | 'TotalIssuanceSet' | 'Withdrawn' | 'Slashed' | 'Deposited' | 'LockSet' | 'LockRemoved';608 }609610 /** @name PalletForeignAssetsAssetIds (60) */611 interface PalletForeignAssetsAssetIds extends Enum {612 readonly isForeignAssetId: boolean;613 readonly asForeignAssetId: u32;614 readonly isNativeAssetId: boolean;615 readonly asNativeAssetId: PalletForeignAssetsNativeCurrency;616 readonly type: 'ForeignAssetId' | 'NativeAssetId';617 }618619 /** @name PalletForeignAssetsNativeCurrency (61) */620 interface PalletForeignAssetsNativeCurrency extends Enum {621 readonly isHere: boolean;622 readonly isParent: boolean;623 readonly type: 'Here' | 'Parent';624 }625626 /** @name CumulusPalletXcmpQueueEvent (62) */627 interface CumulusPalletXcmpQueueEvent extends Enum {628 readonly isSuccess: boolean;629 readonly asSuccess: {630 readonly messageHash: Option<H256>;631 readonly weight: Weight;632 } & Struct;633 readonly isFail: boolean;634 readonly asFail: {635 readonly messageHash: Option<H256>;636 readonly error: XcmV2TraitsError;637 readonly weight: Weight;638 } & Struct;639 readonly isBadVersion: boolean;640 readonly asBadVersion: {641 readonly messageHash: Option<H256>;642 } & Struct;643 readonly isBadFormat: boolean;644 readonly asBadFormat: {645 readonly messageHash: Option<H256>;646 } & Struct;647 readonly isUpwardMessageSent: boolean;648 readonly asUpwardMessageSent: {649 readonly messageHash: Option<H256>;650 } & Struct;651 readonly isXcmpMessageSent: boolean;652 readonly asXcmpMessageSent: {653 readonly messageHash: Option<H256>;654 } & Struct;655 readonly isOverweightEnqueued: boolean;656 readonly asOverweightEnqueued: {657 readonly sender: u32;658 readonly sentAt: u32;659 readonly index: u64;660 readonly required: Weight;661 } & Struct;662 readonly isOverweightServiced: boolean;663 readonly asOverweightServiced: {664 readonly index: u64;665 readonly used: Weight;666 } & Struct;667 readonly type: 'Success' | 'Fail' | 'BadVersion' | 'BadFormat' | 'UpwardMessageSent' | 'XcmpMessageSent' | 'OverweightEnqueued' | 'OverweightServiced';668 }669670 /** @name XcmV2TraitsError (64) */671 interface XcmV2TraitsError extends Enum {672 readonly isOverflow: boolean;673 readonly isUnimplemented: boolean;674 readonly isUntrustedReserveLocation: boolean;675 readonly isUntrustedTeleportLocation: boolean;676 readonly isMultiLocationFull: boolean;677 readonly isMultiLocationNotInvertible: boolean;678 readonly isBadOrigin: boolean;679 readonly isInvalidLocation: boolean;680 readonly isAssetNotFound: boolean;681 readonly isFailedToTransactAsset: boolean;682 readonly isNotWithdrawable: boolean;683 readonly isLocationCannotHold: boolean;684 readonly isExceedsMaxMessageSize: boolean;685 readonly isDestinationUnsupported: boolean;686 readonly isTransport: boolean;687 readonly isUnroutable: boolean;688 readonly isUnknownClaim: boolean;689 readonly isFailedToDecode: boolean;690 readonly isMaxWeightInvalid: boolean;691 readonly isNotHoldingFees: boolean;692 readonly isTooExpensive: boolean;693 readonly isTrap: boolean;694 readonly asTrap: u64;695 readonly isUnhandledXcmVersion: boolean;696 readonly isWeightLimitReached: boolean;697 readonly asWeightLimitReached: u64;698 readonly isBarrier: boolean;699 readonly isWeightNotComputable: boolean;700 readonly type: 'Overflow' | 'Unimplemented' | 'UntrustedReserveLocation' | 'UntrustedTeleportLocation' | 'MultiLocationFull' | 'MultiLocationNotInvertible' | 'BadOrigin' | 'InvalidLocation' | 'AssetNotFound' | 'FailedToTransactAsset' | 'NotWithdrawable' | 'LocationCannotHold' | 'ExceedsMaxMessageSize' | 'DestinationUnsupported' | 'Transport' | 'Unroutable' | 'UnknownClaim' | 'FailedToDecode' | 'MaxWeightInvalid' | 'NotHoldingFees' | 'TooExpensive' | 'Trap' | 'UnhandledXcmVersion' | 'WeightLimitReached' | 'Barrier' | 'WeightNotComputable';701 }702703 /** @name PalletXcmEvent (66) */704 interface PalletXcmEvent extends Enum {705 readonly isAttempted: boolean;706 readonly asAttempted: XcmV2TraitsOutcome;707 readonly isSent: boolean;708 readonly asSent: ITuple<[XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;709 readonly isUnexpectedResponse: boolean;710 readonly asUnexpectedResponse: ITuple<[XcmV1MultiLocation, u64]>;711 readonly isResponseReady: boolean;712 readonly asResponseReady: ITuple<[u64, XcmV2Response]>;713 readonly isNotified: boolean;714 readonly asNotified: ITuple<[u64, u8, u8]>;715 readonly isNotifyOverweight: boolean;716 readonly asNotifyOverweight: ITuple<[u64, u8, u8, Weight, Weight]>;717 readonly isNotifyDispatchError: boolean;718 readonly asNotifyDispatchError: ITuple<[u64, u8, u8]>;719 readonly isNotifyDecodeFailed: boolean;720 readonly asNotifyDecodeFailed: ITuple<[u64, u8, u8]>;721 readonly isInvalidResponder: boolean;722 readonly asInvalidResponder: ITuple<[XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;723 readonly isInvalidResponderVersion: boolean;724 readonly asInvalidResponderVersion: ITuple<[XcmV1MultiLocation, u64]>;725 readonly isResponseTaken: boolean;726 readonly asResponseTaken: u64;727 readonly isAssetsTrapped: boolean;728 readonly asAssetsTrapped: ITuple<[H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;729 readonly isVersionChangeNotified: boolean;730 readonly asVersionChangeNotified: ITuple<[XcmV1MultiLocation, u32]>;731 readonly isSupportedVersionChanged: boolean;732 readonly asSupportedVersionChanged: ITuple<[XcmV1MultiLocation, u32]>;733 readonly isNotifyTargetSendFail: boolean;734 readonly asNotifyTargetSendFail: ITuple<[XcmV1MultiLocation, u64, XcmV2TraitsError]>;735 readonly isNotifyTargetMigrationFail: boolean;736 readonly asNotifyTargetMigrationFail: ITuple<[XcmVersionedMultiLocation, u64]>;737 readonly type: 'Attempted' | 'Sent' | 'UnexpectedResponse' | 'ResponseReady' | 'Notified' | 'NotifyOverweight' | 'NotifyDispatchError' | 'NotifyDecodeFailed' | 'InvalidResponder' | 'InvalidResponderVersion' | 'ResponseTaken' | 'AssetsTrapped' | 'VersionChangeNotified' | 'SupportedVersionChanged' | 'NotifyTargetSendFail' | 'NotifyTargetMigrationFail';738 }739740 /** @name XcmV2TraitsOutcome (67) */741 interface XcmV2TraitsOutcome extends Enum {742 readonly isComplete: boolean;743 readonly asComplete: u64;744 readonly isIncomplete: boolean;745 readonly asIncomplete: ITuple<[u64, XcmV2TraitsError]>;746 readonly isError: boolean;747 readonly asError: XcmV2TraitsError;748 readonly type: 'Complete' | 'Incomplete' | 'Error';749 }750751 /** @name XcmV2Xcm (68) */752 interface XcmV2Xcm extends Vec<XcmV2Instruction> {}753754 /** @name XcmV2Instruction (70) */755 interface XcmV2Instruction extends Enum {756 readonly isWithdrawAsset: boolean;757 readonly asWithdrawAsset: XcmV1MultiassetMultiAssets;758 readonly isReserveAssetDeposited: boolean;759 readonly asReserveAssetDeposited: XcmV1MultiassetMultiAssets;760 readonly isReceiveTeleportedAsset: boolean;761 readonly asReceiveTeleportedAsset: XcmV1MultiassetMultiAssets;762 readonly isQueryResponse: boolean;763 readonly asQueryResponse: {764 readonly queryId: Compact<u64>;765 readonly response: XcmV2Response;766 readonly maxWeight: Compact<u64>;767 } & Struct;768 readonly isTransferAsset: boolean;769 readonly asTransferAsset: {770 readonly assets: XcmV1MultiassetMultiAssets;771 readonly beneficiary: XcmV1MultiLocation;772 } & Struct;773 readonly isTransferReserveAsset: boolean;774 readonly asTransferReserveAsset: {775 readonly assets: XcmV1MultiassetMultiAssets;776 readonly dest: XcmV1MultiLocation;777 readonly xcm: XcmV2Xcm;778 } & Struct;779 readonly isTransact: boolean;780 readonly asTransact: {781 readonly originType: XcmV0OriginKind;782 readonly requireWeightAtMost: Compact<u64>;783 readonly call: XcmDoubleEncoded;784 } & Struct;785 readonly isHrmpNewChannelOpenRequest: boolean;786 readonly asHrmpNewChannelOpenRequest: {787 readonly sender: Compact<u32>;788 readonly maxMessageSize: Compact<u32>;789 readonly maxCapacity: Compact<u32>;790 } & Struct;791 readonly isHrmpChannelAccepted: boolean;792 readonly asHrmpChannelAccepted: {793 readonly recipient: Compact<u32>;794 } & Struct;795 readonly isHrmpChannelClosing: boolean;796 readonly asHrmpChannelClosing: {797 readonly initiator: Compact<u32>;798 readonly sender: Compact<u32>;799 readonly recipient: Compact<u32>;800 } & Struct;801 readonly isClearOrigin: boolean;802 readonly isDescendOrigin: boolean;803 readonly asDescendOrigin: XcmV1MultilocationJunctions;804 readonly isReportError: boolean;805 readonly asReportError: {806 readonly queryId: Compact<u64>;807 readonly dest: XcmV1MultiLocation;808 readonly maxResponseWeight: Compact<u64>;809 } & Struct;810 readonly isDepositAsset: boolean;811 readonly asDepositAsset: {812 readonly assets: XcmV1MultiassetMultiAssetFilter;813 readonly maxAssets: Compact<u32>;814 readonly beneficiary: XcmV1MultiLocation;815 } & Struct;816 readonly isDepositReserveAsset: boolean;817 readonly asDepositReserveAsset: {818 readonly assets: XcmV1MultiassetMultiAssetFilter;819 readonly maxAssets: Compact<u32>;820 readonly dest: XcmV1MultiLocation;821 readonly xcm: XcmV2Xcm;822 } & Struct;823 readonly isExchangeAsset: boolean;824 readonly asExchangeAsset: {825 readonly give: XcmV1MultiassetMultiAssetFilter;826 readonly receive: XcmV1MultiassetMultiAssets;827 } & Struct;828 readonly isInitiateReserveWithdraw: boolean;829 readonly asInitiateReserveWithdraw: {830 readonly assets: XcmV1MultiassetMultiAssetFilter;831 readonly reserve: XcmV1MultiLocation;832 readonly xcm: XcmV2Xcm;833 } & Struct;834 readonly isInitiateTeleport: boolean;835 readonly asInitiateTeleport: {836 readonly assets: XcmV1MultiassetMultiAssetFilter;837 readonly dest: XcmV1MultiLocation;838 readonly xcm: XcmV2Xcm;839 } & Struct;840 readonly isQueryHolding: boolean;841 readonly asQueryHolding: {842 readonly queryId: Compact<u64>;843 readonly dest: XcmV1MultiLocation;844 readonly assets: XcmV1MultiassetMultiAssetFilter;845 readonly maxResponseWeight: Compact<u64>;846 } & Struct;847 readonly isBuyExecution: boolean;848 readonly asBuyExecution: {849 readonly fees: XcmV1MultiAsset;850 readonly weightLimit: XcmV2WeightLimit;851 } & Struct;852 readonly isRefundSurplus: boolean;853 readonly isSetErrorHandler: boolean;854 readonly asSetErrorHandler: XcmV2Xcm;855 readonly isSetAppendix: boolean;856 readonly asSetAppendix: XcmV2Xcm;857 readonly isClearError: boolean;858 readonly isClaimAsset: boolean;859 readonly asClaimAsset: {860 readonly assets: XcmV1MultiassetMultiAssets;861 readonly ticket: XcmV1MultiLocation;862 } & Struct;863 readonly isTrap: boolean;864 readonly asTrap: Compact<u64>;865 readonly isSubscribeVersion: boolean;866 readonly asSubscribeVersion: {867 readonly queryId: Compact<u64>;868 readonly maxResponseWeight: Compact<u64>;869 } & Struct;870 readonly isUnsubscribeVersion: boolean;871 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'ClearOrigin' | 'DescendOrigin' | 'ReportError' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution' | 'RefundSurplus' | 'SetErrorHandler' | 'SetAppendix' | 'ClearError' | 'ClaimAsset' | 'Trap' | 'SubscribeVersion' | 'UnsubscribeVersion';872 }873874 /** @name XcmV2Response (71) */875 interface XcmV2Response extends Enum {876 readonly isNull: boolean;877 readonly isAssets: boolean;878 readonly asAssets: XcmV1MultiassetMultiAssets;879 readonly isExecutionResult: boolean;880 readonly asExecutionResult: Option<ITuple<[u32, XcmV2TraitsError]>>;881 readonly isVersion: boolean;882 readonly asVersion: u32;883 readonly type: 'Null' | 'Assets' | 'ExecutionResult' | 'Version';884 }885886 /** @name XcmV0OriginKind (74) */887 interface XcmV0OriginKind extends Enum {888 readonly isNative: boolean;889 readonly isSovereignAccount: boolean;890 readonly isSuperuser: boolean;891 readonly isXcm: boolean;892 readonly type: 'Native' | 'SovereignAccount' | 'Superuser' | 'Xcm';893 }894895 /** @name XcmDoubleEncoded (75) */896 interface XcmDoubleEncoded extends Struct {897 readonly encoded: Bytes;898 }899900 /** @name XcmV1MultiassetMultiAssetFilter (76) */901 interface XcmV1MultiassetMultiAssetFilter extends Enum {902 readonly isDefinite: boolean;903 readonly asDefinite: XcmV1MultiassetMultiAssets;904 readonly isWild: boolean;905 readonly asWild: XcmV1MultiassetWildMultiAsset;906 readonly type: 'Definite' | 'Wild';907 }908909 /** @name XcmV1MultiassetWildMultiAsset (77) */910 interface XcmV1MultiassetWildMultiAsset extends Enum {911 readonly isAll: boolean;912 readonly isAllOf: boolean;913 readonly asAllOf: {914 readonly id: XcmV1MultiassetAssetId;915 readonly fun: XcmV1MultiassetWildFungibility;916 } & Struct;917 readonly type: 'All' | 'AllOf';918 }919920 /** @name XcmV1MultiassetWildFungibility (78) */921 interface XcmV1MultiassetWildFungibility extends Enum {922 readonly isFungible: boolean;923 readonly isNonFungible: boolean;924 readonly type: 'Fungible' | 'NonFungible';925 }926927 /** @name XcmV2WeightLimit (79) */928 interface XcmV2WeightLimit extends Enum {929 readonly isUnlimited: boolean;930 readonly isLimited: boolean;931 readonly asLimited: Compact<u64>;932 readonly type: 'Unlimited' | 'Limited';933 }934935 /** @name XcmVersionedMultiAssets (81) */936 interface XcmVersionedMultiAssets extends Enum {937 readonly isV0: boolean;938 readonly asV0: Vec<XcmV0MultiAsset>;939 readonly isV1: boolean;940 readonly asV1: XcmV1MultiassetMultiAssets;941 readonly type: 'V0' | 'V1';942 }943944 /** @name XcmV0MultiAsset (83) */945 interface XcmV0MultiAsset extends Enum {946 readonly isNone: boolean;947 readonly isAll: boolean;948 readonly isAllFungible: boolean;949 readonly isAllNonFungible: boolean;950 readonly isAllAbstractFungible: boolean;951 readonly asAllAbstractFungible: {952 readonly id: Bytes;953 } & Struct;954 readonly isAllAbstractNonFungible: boolean;955 readonly asAllAbstractNonFungible: {956 readonly class: Bytes;957 } & Struct;958 readonly isAllConcreteFungible: boolean;959 readonly asAllConcreteFungible: {960 readonly id: XcmV0MultiLocation;961 } & Struct;962 readonly isAllConcreteNonFungible: boolean;963 readonly asAllConcreteNonFungible: {964 readonly class: XcmV0MultiLocation;965 } & Struct;966 readonly isAbstractFungible: boolean;967 readonly asAbstractFungible: {968 readonly id: Bytes;969 readonly amount: Compact<u128>;970 } & Struct;971 readonly isAbstractNonFungible: boolean;972 readonly asAbstractNonFungible: {973 readonly class: Bytes;974 readonly instance: XcmV1MultiassetAssetInstance;975 } & Struct;976 readonly isConcreteFungible: boolean;977 readonly asConcreteFungible: {978 readonly id: XcmV0MultiLocation;979 readonly amount: Compact<u128>;980 } & Struct;981 readonly isConcreteNonFungible: boolean;982 readonly asConcreteNonFungible: {983 readonly class: XcmV0MultiLocation;984 readonly instance: XcmV1MultiassetAssetInstance;985 } & Struct;986 readonly type: 'None' | 'All' | 'AllFungible' | 'AllNonFungible' | 'AllAbstractFungible' | 'AllAbstractNonFungible' | 'AllConcreteFungible' | 'AllConcreteNonFungible' | 'AbstractFungible' | 'AbstractNonFungible' | 'ConcreteFungible' | 'ConcreteNonFungible';987 }988989 /** @name XcmV0MultiLocation (84) */990 interface XcmV0MultiLocation extends Enum {991 readonly isNull: boolean;992 readonly isX1: boolean;993 readonly asX1: XcmV0Junction;994 readonly isX2: boolean;995 readonly asX2: ITuple<[XcmV0Junction, XcmV0Junction]>;996 readonly isX3: boolean;997 readonly asX3: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction]>;998 readonly isX4: boolean;999 readonly asX4: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1000 readonly isX5: boolean;1001 readonly asX5: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1002 readonly isX6: boolean;1003 readonly asX6: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1004 readonly isX7: boolean;1005 readonly asX7: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1006 readonly isX8: boolean;1007 readonly asX8: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;1008 readonly type: 'Null' | 'X1' | 'X2' | 'X3' | 'X4' | 'X5' | 'X6' | 'X7' | 'X8';1009 }10101011 /** @name XcmV0Junction (85) */1012 interface XcmV0Junction extends Enum {1013 readonly isParent: boolean;1014 readonly isParachain: boolean;1015 readonly asParachain: Compact<u32>;1016 readonly isAccountId32: boolean;1017 readonly asAccountId32: {1018 readonly network: XcmV0JunctionNetworkId;1019 readonly id: U8aFixed;1020 } & Struct;1021 readonly isAccountIndex64: boolean;1022 readonly asAccountIndex64: {1023 readonly network: XcmV0JunctionNetworkId;1024 readonly index: Compact<u64>;1025 } & Struct;1026 readonly isAccountKey20: boolean;1027 readonly asAccountKey20: {1028 readonly network: XcmV0JunctionNetworkId;1029 readonly key: U8aFixed;1030 } & Struct;1031 readonly isPalletInstance: boolean;1032 readonly asPalletInstance: u8;1033 readonly isGeneralIndex: boolean;1034 readonly asGeneralIndex: Compact<u128>;1035 readonly isGeneralKey: boolean;1036 readonly asGeneralKey: Bytes;1037 readonly isOnlyChild: boolean;1038 readonly isPlurality: boolean;1039 readonly asPlurality: {1040 readonly id: XcmV0JunctionBodyId;1041 readonly part: XcmV0JunctionBodyPart;1042 } & Struct;1043 readonly type: 'Parent' | 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality';1044 }10451046 /** @name XcmVersionedMultiLocation (86) */1047 interface XcmVersionedMultiLocation extends Enum {1048 readonly isV0: boolean;1049 readonly asV0: XcmV0MultiLocation;1050 readonly isV1: boolean;1051 readonly asV1: XcmV1MultiLocation;1052 readonly type: 'V0' | 'V1';1053 }10541055 /** @name CumulusPalletXcmEvent (87) */1056 interface CumulusPalletXcmEvent extends Enum {1057 readonly isInvalidFormat: boolean;1058 readonly asInvalidFormat: U8aFixed;1059 readonly isUnsupportedVersion: boolean;1060 readonly asUnsupportedVersion: U8aFixed;1061 readonly isExecutedDownward: boolean;1062 readonly asExecutedDownward: ITuple<[U8aFixed, XcmV2TraitsOutcome]>;1063 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward';1064 }10651066 /** @name CumulusPalletDmpQueueEvent (88) */1067 interface CumulusPalletDmpQueueEvent extends Enum {1068 readonly isInvalidFormat: boolean;1069 readonly asInvalidFormat: {1070 readonly messageId: U8aFixed;1071 } & Struct;1072 readonly isUnsupportedVersion: boolean;1073 readonly asUnsupportedVersion: {1074 readonly messageId: U8aFixed;1075 } & Struct;1076 readonly isExecutedDownward: boolean;1077 readonly asExecutedDownward: {1078 readonly messageId: U8aFixed;1079 readonly outcome: XcmV2TraitsOutcome;1080 } & Struct;1081 readonly isWeightExhausted: boolean;1082 readonly asWeightExhausted: {1083 readonly messageId: U8aFixed;1084 readonly remainingWeight: Weight;1085 readonly requiredWeight: Weight;1086 } & Struct;1087 readonly isOverweightEnqueued: boolean;1088 readonly asOverweightEnqueued: {1089 readonly messageId: U8aFixed;1090 readonly overweightIndex: u64;1091 readonly requiredWeight: Weight;1092 } & Struct;1093 readonly isOverweightServiced: boolean;1094 readonly asOverweightServiced: {1095 readonly overweightIndex: u64;1096 readonly weightUsed: Weight;1097 } & Struct;1098 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward' | 'WeightExhausted' | 'OverweightEnqueued' | 'OverweightServiced';1099 }11001101 /** @name PalletUniqueRawEvent (89) */1102 interface PalletUniqueRawEvent extends Enum {1103 readonly isCollectionSponsorRemoved: boolean;1104 readonly asCollectionSponsorRemoved: u32;1105 readonly isCollectionAdminAdded: boolean;1106 readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1107 readonly isCollectionOwnedChanged: boolean;1108 readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>;1109 readonly isCollectionSponsorSet: boolean;1110 readonly asCollectionSponsorSet: ITuple<[u32, AccountId32]>;1111 readonly isSponsorshipConfirmed: boolean;1112 readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;1113 readonly isCollectionAdminRemoved: boolean;1114 readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1115 readonly isAllowListAddressRemoved: boolean;1116 readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1117 readonly isAllowListAddressAdded: boolean;1118 readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1119 readonly isCollectionLimitSet: boolean;1120 readonly asCollectionLimitSet: u32;1121 readonly isCollectionPermissionSet: boolean;1122 readonly asCollectionPermissionSet: u32;1123 readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';1124 }11251126 /** @name PalletEvmAccountBasicCrossAccountIdRepr (90) */1127 interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {1128 readonly isSubstrate: boolean;1129 readonly asSubstrate: AccountId32;1130 readonly isEthereum: boolean;1131 readonly asEthereum: H160;1132 readonly type: 'Substrate' | 'Ethereum';1133 }11341135 /** @name PalletUniqueSchedulerV2Event (93) */1136 interface PalletUniqueSchedulerV2Event extends Enum {1137 readonly isScheduled: boolean;1138 readonly asScheduled: {1139 readonly when: u32;1140 readonly index: u32;1141 } & Struct;1142 readonly isCanceled: boolean;1143 readonly asCanceled: {1144 readonly when: u32;1145 readonly index: u32;1146 } & Struct;1147 readonly isDispatched: boolean;1148 readonly asDispatched: {1149 readonly task: ITuple<[u32, u32]>;1150 readonly id: Option<U8aFixed>;1151 readonly result: Result<Null, SpRuntimeDispatchError>;1152 } & Struct;1153 readonly isPriorityChanged: boolean;1154 readonly asPriorityChanged: {1155 readonly task: ITuple<[u32, u32]>;1156 readonly priority: u8;1157 } & Struct;1158 readonly isCallUnavailable: boolean;1159 readonly asCallUnavailable: {1160 readonly task: ITuple<[u32, u32]>;1161 readonly id: Option<U8aFixed>;1162 } & Struct;1163 readonly isPermanentlyOverweight: boolean;1164 readonly asPermanentlyOverweight: {1165 readonly task: ITuple<[u32, u32]>;1166 readonly id: Option<U8aFixed>;1167 } & Struct;1168 readonly type: 'Scheduled' | 'Canceled' | 'Dispatched' | 'PriorityChanged' | 'CallUnavailable' | 'PermanentlyOverweight';1169 }11701171 /** @name PalletCommonEvent (96) */1172 interface PalletCommonEvent extends Enum {1173 readonly isCollectionCreated: boolean;1174 readonly asCollectionCreated: ITuple<[u32, u8, AccountId32]>;1175 readonly isCollectionDestroyed: boolean;1176 readonly asCollectionDestroyed: u32;1177 readonly isItemCreated: boolean;1178 readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1179 readonly isItemDestroyed: boolean;1180 readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1181 readonly isTransfer: boolean;1182 readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1183 readonly isApproved: boolean;1184 readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1185 readonly isCollectionPropertySet: boolean;1186 readonly asCollectionPropertySet: ITuple<[u32, Bytes]>;1187 readonly isCollectionPropertyDeleted: boolean;1188 readonly asCollectionPropertyDeleted: ITuple<[u32, Bytes]>;1189 readonly isTokenPropertySet: boolean;1190 readonly asTokenPropertySet: ITuple<[u32, u32, Bytes]>;1191 readonly isTokenPropertyDeleted: boolean;1192 readonly asTokenPropertyDeleted: ITuple<[u32, u32, Bytes]>;1193 readonly isPropertyPermissionSet: boolean;1194 readonly asPropertyPermissionSet: ITuple<[u32, Bytes]>;1195 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved' | 'CollectionPropertySet' | 'CollectionPropertyDeleted' | 'TokenPropertySet' | 'TokenPropertyDeleted' | 'PropertyPermissionSet';1196 }11971198 /** @name PalletStructureEvent (99) */1199 interface PalletStructureEvent extends Enum {1200 readonly isExecuted: boolean;1201 readonly asExecuted: Result<Null, SpRuntimeDispatchError>;1202 readonly type: 'Executed';1203 }12041205 /** @name PalletRmrkCoreEvent (100) */1206 interface PalletRmrkCoreEvent extends Enum {1207 readonly isCollectionCreated: boolean;1208 readonly asCollectionCreated: {1209 readonly issuer: AccountId32;1210 readonly collectionId: u32;1211 } & Struct;1212 readonly isCollectionDestroyed: boolean;1213 readonly asCollectionDestroyed: {1214 readonly issuer: AccountId32;1215 readonly collectionId: u32;1216 } & Struct;1217 readonly isIssuerChanged: boolean;1218 readonly asIssuerChanged: {1219 readonly oldIssuer: AccountId32;1220 readonly newIssuer: AccountId32;1221 readonly collectionId: u32;1222 } & Struct;1223 readonly isCollectionLocked: boolean;1224 readonly asCollectionLocked: {1225 readonly issuer: AccountId32;1226 readonly collectionId: u32;1227 } & Struct;1228 readonly isNftMinted: boolean;1229 readonly asNftMinted: {1230 readonly owner: AccountId32;1231 readonly collectionId: u32;1232 readonly nftId: u32;1233 } & Struct;1234 readonly isNftBurned: boolean;1235 readonly asNftBurned: {1236 readonly owner: AccountId32;1237 readonly nftId: u32;1238 } & Struct;1239 readonly isNftSent: boolean;1240 readonly asNftSent: {1241 readonly sender: AccountId32;1242 readonly recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple;1243 readonly collectionId: u32;1244 readonly nftId: u32;1245 readonly approvalRequired: bool;1246 } & Struct;1247 readonly isNftAccepted: boolean;1248 readonly asNftAccepted: {1249 readonly sender: AccountId32;1250 readonly recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple;1251 readonly collectionId: u32;1252 readonly nftId: u32;1253 } & Struct;1254 readonly isNftRejected: boolean;1255 readonly asNftRejected: {1256 readonly sender: AccountId32;1257 readonly collectionId: u32;1258 readonly nftId: u32;1259 } & Struct;1260 readonly isPropertySet: boolean;1261 readonly asPropertySet: {1262 readonly collectionId: u32;1263 readonly maybeNftId: Option<u32>;1264 readonly key: Bytes;1265 readonly value: Bytes;1266 } & Struct;1267 readonly isResourceAdded: boolean;1268 readonly asResourceAdded: {1269 readonly nftId: u32;1270 readonly resourceId: u32;1271 } & Struct;1272 readonly isResourceRemoval: boolean;1273 readonly asResourceRemoval: {1274 readonly nftId: u32;1275 readonly resourceId: u32;1276 } & Struct;1277 readonly isResourceAccepted: boolean;1278 readonly asResourceAccepted: {1279 readonly nftId: u32;1280 readonly resourceId: u32;1281 } & Struct;1282 readonly isResourceRemovalAccepted: boolean;1283 readonly asResourceRemovalAccepted: {1284 readonly nftId: u32;1285 readonly resourceId: u32;1286 } & Struct;1287 readonly isPrioritySet: boolean;1288 readonly asPrioritySet: {1289 readonly collectionId: u32;1290 readonly nftId: u32;1291 } & Struct;1292 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'IssuerChanged' | 'CollectionLocked' | 'NftMinted' | 'NftBurned' | 'NftSent' | 'NftAccepted' | 'NftRejected' | 'PropertySet' | 'ResourceAdded' | 'ResourceRemoval' | 'ResourceAccepted' | 'ResourceRemovalAccepted' | 'PrioritySet';1293 }12941295 /** @name RmrkTraitsNftAccountIdOrCollectionNftTuple (101) */1296 interface RmrkTraitsNftAccountIdOrCollectionNftTuple extends Enum {1297 readonly isAccountId: boolean;1298 readonly asAccountId: AccountId32;1299 readonly isCollectionAndNftTuple: boolean;1300 readonly asCollectionAndNftTuple: ITuple<[u32, u32]>;1301 readonly type: 'AccountId' | 'CollectionAndNftTuple';1302 }13031304 /** @name PalletRmrkEquipEvent (106) */1305 interface PalletRmrkEquipEvent extends Enum {1306 readonly isBaseCreated: boolean;1307 readonly asBaseCreated: {1308 readonly issuer: AccountId32;1309 readonly baseId: u32;1310 } & Struct;1311 readonly isEquippablesUpdated: boolean;1312 readonly asEquippablesUpdated: {1313 readonly baseId: u32;1314 readonly slotId: u32;1315 } & Struct;1316 readonly type: 'BaseCreated' | 'EquippablesUpdated';1317 }13181319 /** @name PalletAppPromotionEvent (107) */1320 interface PalletAppPromotionEvent extends Enum {1321 readonly isStakingRecalculation: boolean;1322 readonly asStakingRecalculation: ITuple<[AccountId32, u128, u128]>;1323 readonly isStake: boolean;1324 readonly asStake: ITuple<[AccountId32, u128]>;1325 readonly isUnstake: boolean;1326 readonly asUnstake: ITuple<[AccountId32, u128]>;1327 readonly isSetAdmin: boolean;1328 readonly asSetAdmin: AccountId32;1329 readonly type: 'StakingRecalculation' | 'Stake' | 'Unstake' | 'SetAdmin';1330 }13311332 /** @name PalletForeignAssetsModuleEvent (108) */1333 interface PalletForeignAssetsModuleEvent extends Enum {1334 readonly isForeignAssetRegistered: boolean;1335 readonly asForeignAssetRegistered: {1336 readonly assetId: u32;1337 readonly assetAddress: XcmV1MultiLocation;1338 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1339 } & Struct;1340 readonly isForeignAssetUpdated: boolean;1341 readonly asForeignAssetUpdated: {1342 readonly assetId: u32;1343 readonly assetAddress: XcmV1MultiLocation;1344 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1345 } & Struct;1346 readonly isAssetRegistered: boolean;1347 readonly asAssetRegistered: {1348 readonly assetId: PalletForeignAssetsAssetIds;1349 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1350 } & Struct;1351 readonly isAssetUpdated: boolean;1352 readonly asAssetUpdated: {1353 readonly assetId: PalletForeignAssetsAssetIds;1354 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1355 } & Struct;1356 readonly type: 'ForeignAssetRegistered' | 'ForeignAssetUpdated' | 'AssetRegistered' | 'AssetUpdated';1357 }13581359 /** @name PalletForeignAssetsModuleAssetMetadata (109) */1360 interface PalletForeignAssetsModuleAssetMetadata extends Struct {1361 readonly name: Bytes;1362 readonly symbol: Bytes;1363 readonly decimals: u8;1364 readonly minimalBalance: u128;1365 }13661367 /** @name PalletEvmEvent (110) */1368 interface PalletEvmEvent extends Enum {1369 readonly isLog: boolean;1370 readonly asLog: {1371 readonly log: EthereumLog;1372 } & Struct;1373 readonly isCreated: boolean;1374 readonly asCreated: {1375 readonly address: H160;1376 } & Struct;1377 readonly isCreatedFailed: boolean;1378 readonly asCreatedFailed: {1379 readonly address: H160;1380 } & Struct;1381 readonly isExecuted: boolean;1382 readonly asExecuted: {1383 readonly address: H160;1384 } & Struct;1385 readonly isExecutedFailed: boolean;1386 readonly asExecutedFailed: {1387 readonly address: H160;1388 } & Struct;1389 readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed';1390 }13911392 /** @name EthereumLog (111) */1393 interface EthereumLog extends Struct {1394 readonly address: H160;1395 readonly topics: Vec<H256>;1396 readonly data: Bytes;1397 }13981399 /** @name PalletEthereumEvent (113) */1400 interface PalletEthereumEvent extends Enum {1401 readonly isExecuted: boolean;1402 readonly asExecuted: {1403 readonly from: H160;1404 readonly to: H160;1405 readonly transactionHash: H256;1406 readonly exitReason: EvmCoreErrorExitReason;1407 } & Struct;1408 readonly type: 'Executed';1409 }14101411 /** @name EvmCoreErrorExitReason (114) */1412 interface EvmCoreErrorExitReason extends Enum {1413 readonly isSucceed: boolean;1414 readonly asSucceed: EvmCoreErrorExitSucceed;1415 readonly isError: boolean;1416 readonly asError: EvmCoreErrorExitError;1417 readonly isRevert: boolean;1418 readonly asRevert: EvmCoreErrorExitRevert;1419 readonly isFatal: boolean;1420 readonly asFatal: EvmCoreErrorExitFatal;1421 readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';1422 }14231424 /** @name EvmCoreErrorExitSucceed (115) */1425 interface EvmCoreErrorExitSucceed extends Enum {1426 readonly isStopped: boolean;1427 readonly isReturned: boolean;1428 readonly isSuicided: boolean;1429 readonly type: 'Stopped' | 'Returned' | 'Suicided';1430 }14311432 /** @name EvmCoreErrorExitError (116) */1433 interface EvmCoreErrorExitError extends Enum {1434 readonly isStackUnderflow: boolean;1435 readonly isStackOverflow: boolean;1436 readonly isInvalidJump: boolean;1437 readonly isInvalidRange: boolean;1438 readonly isDesignatedInvalid: boolean;1439 readonly isCallTooDeep: boolean;1440 readonly isCreateCollision: boolean;1441 readonly isCreateContractLimit: boolean;1442 readonly isOutOfOffset: boolean;1443 readonly isOutOfGas: boolean;1444 readonly isOutOfFund: boolean;1445 readonly isPcUnderflow: boolean;1446 readonly isCreateEmpty: boolean;1447 readonly isOther: boolean;1448 readonly asOther: Text;1449 readonly isInvalidCode: boolean;1450 readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';1451 }14521453 /** @name EvmCoreErrorExitRevert (119) */1454 interface EvmCoreErrorExitRevert extends Enum {1455 readonly isReverted: boolean;1456 readonly type: 'Reverted';1457 }14581459 /** @name EvmCoreErrorExitFatal (120) */1460 interface EvmCoreErrorExitFatal extends Enum {1461 readonly isNotSupported: boolean;1462 readonly isUnhandledInterrupt: boolean;1463 readonly isCallErrorAsFatal: boolean;1464 readonly asCallErrorAsFatal: EvmCoreErrorExitError;1465 readonly isOther: boolean;1466 readonly asOther: Text;1467 readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';1468 }14691470 /** @name PalletEvmContractHelpersEvent (121) */1471 interface PalletEvmContractHelpersEvent extends Enum {1472 readonly isContractSponsorSet: boolean;1473 readonly asContractSponsorSet: ITuple<[H160, AccountId32]>;1474 readonly isContractSponsorshipConfirmed: boolean;1475 readonly asContractSponsorshipConfirmed: ITuple<[H160, AccountId32]>;1476 readonly isContractSponsorRemoved: boolean;1477 readonly asContractSponsorRemoved: H160;1478 readonly type: 'ContractSponsorSet' | 'ContractSponsorshipConfirmed' | 'ContractSponsorRemoved';1479 }14801481 /** @name PalletEvmMigrationEvent (122) */1482 interface PalletEvmMigrationEvent extends Enum {1483 readonly isTestEvent: boolean;1484 readonly type: 'TestEvent';1485 }14861487 /** @name PalletMaintenanceEvent (123) */1488 interface PalletMaintenanceEvent extends Enum {1489 readonly isMaintenanceEnabled: boolean;1490 readonly isMaintenanceDisabled: boolean;1491 readonly type: 'MaintenanceEnabled' | 'MaintenanceDisabled';1492 }14931494 /** @name PalletTestUtilsEvent (124) */1495 interface PalletTestUtilsEvent extends Enum {1496 readonly isValueIsSet: boolean;1497 readonly isShouldRollback: boolean;1498 readonly isBatchCompleted: boolean;1499 readonly type: 'ValueIsSet' | 'ShouldRollback' | 'BatchCompleted';1500 }15011502 /** @name FrameSystemPhase (125) */1503 interface FrameSystemPhase extends Enum {1504 readonly isApplyExtrinsic: boolean;1505 readonly asApplyExtrinsic: u32;1506 readonly isFinalization: boolean;1507 readonly isInitialization: boolean;1508 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';1509 }15101511 /** @name FrameSystemLastRuntimeUpgradeInfo (127) */1512 interface FrameSystemLastRuntimeUpgradeInfo extends Struct {1513 readonly specVersion: Compact<u32>;1514 readonly specName: Text;1515 }15161517 /** @name FrameSystemCall (128) */1518 interface FrameSystemCall extends Enum {1519 readonly isFillBlock: boolean;1520 readonly asFillBlock: {1521 readonly ratio: Perbill;1522 } & Struct;1523 readonly isRemark: boolean;1524 readonly asRemark: {1525 readonly remark: Bytes;1526 } & Struct;1527 readonly isSetHeapPages: boolean;1528 readonly asSetHeapPages: {1529 readonly pages: u64;1530 } & Struct;1531 readonly isSetCode: boolean;1532 readonly asSetCode: {1533 readonly code: Bytes;1534 } & Struct;1535 readonly isSetCodeWithoutChecks: boolean;1536 readonly asSetCodeWithoutChecks: {1537 readonly code: Bytes;1538 } & Struct;1539 readonly isSetStorage: boolean;1540 readonly asSetStorage: {1541 readonly items: Vec<ITuple<[Bytes, Bytes]>>;1542 } & Struct;1543 readonly isKillStorage: boolean;1544 readonly asKillStorage: {1545 readonly keys_: Vec<Bytes>;1546 } & Struct;1547 readonly isKillPrefix: boolean;1548 readonly asKillPrefix: {1549 readonly prefix: Bytes;1550 readonly subkeys: u32;1551 } & Struct;1552 readonly isRemarkWithEvent: boolean;1553 readonly asRemarkWithEvent: {1554 readonly remark: Bytes;1555 } & Struct;1556 readonly type: 'FillBlock' | 'Remark' | 'SetHeapPages' | 'SetCode' | 'SetCodeWithoutChecks' | 'SetStorage' | 'KillStorage' | 'KillPrefix' | 'RemarkWithEvent';1557 }15581559 /** @name FrameSystemLimitsBlockWeights (133) */1560 interface FrameSystemLimitsBlockWeights extends Struct {1561 readonly baseBlock: Weight;1562 readonly maxBlock: Weight;1563 readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass;1564 }15651566 /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (134) */1567 interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct {1568 readonly normal: FrameSystemLimitsWeightsPerClass;1569 readonly operational: FrameSystemLimitsWeightsPerClass;1570 readonly mandatory: FrameSystemLimitsWeightsPerClass;1571 }15721573 /** @name FrameSystemLimitsWeightsPerClass (135) */1574 interface FrameSystemLimitsWeightsPerClass extends Struct {1575 readonly baseExtrinsic: Weight;1576 readonly maxExtrinsic: Option<Weight>;1577 readonly maxTotal: Option<Weight>;1578 readonly reserved: Option<Weight>;1579 }15801581 /** @name FrameSystemLimitsBlockLength (137) */1582 interface FrameSystemLimitsBlockLength extends Struct {1583 readonly max: FrameSupportDispatchPerDispatchClassU32;1584 }15851586 /** @name FrameSupportDispatchPerDispatchClassU32 (138) */1587 interface FrameSupportDispatchPerDispatchClassU32 extends Struct {1588 readonly normal: u32;1589 readonly operational: u32;1590 readonly mandatory: u32;1591 }15921593 /** @name SpWeightsRuntimeDbWeight (139) */1594 interface SpWeightsRuntimeDbWeight extends Struct {1595 readonly read: u64;1596 readonly write: u64;1597 }15981599 /** @name SpVersionRuntimeVersion (140) */1600 interface SpVersionRuntimeVersion extends Struct {1601 readonly specName: Text;1602 readonly implName: Text;1603 readonly authoringVersion: u32;1604 readonly specVersion: u32;1605 readonly implVersion: u32;1606 readonly apis: Vec<ITuple<[U8aFixed, u32]>>;1607 readonly transactionVersion: u32;1608 readonly stateVersion: u8;1609 }16101611 /** @name FrameSystemError (145) */1612 interface FrameSystemError extends Enum {1613 readonly isInvalidSpecName: boolean;1614 readonly isSpecVersionNeedsToIncrease: boolean;1615 readonly isFailedToExtractRuntimeVersion: boolean;1616 readonly isNonDefaultComposite: boolean;1617 readonly isNonZeroRefCount: boolean;1618 readonly isCallFiltered: boolean;1619 readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';1620 }16211622 /** @name PolkadotPrimitivesV2PersistedValidationData (146) */1623 interface PolkadotPrimitivesV2PersistedValidationData extends Struct {1624 readonly parentHead: Bytes;1625 readonly relayParentNumber: u32;1626 readonly relayParentStorageRoot: H256;1627 readonly maxPovSize: u32;1628 }16291630 /** @name PolkadotPrimitivesV2UpgradeRestriction (149) */1631 interface PolkadotPrimitivesV2UpgradeRestriction extends Enum {1632 readonly isPresent: boolean;1633 readonly type: 'Present';1634 }16351636 /** @name SpTrieStorageProof (150) */1637 interface SpTrieStorageProof extends Struct {1638 readonly trieNodes: BTreeSet<Bytes>;1639 }16401641 /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (152) */1642 interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct {1643 readonly dmqMqcHead: H256;1644 readonly relayDispatchQueueSize: ITuple<[u32, u32]>;1645 readonly ingressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;1646 readonly egressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;1647 }16481649 /** @name PolkadotPrimitivesV2AbridgedHrmpChannel (155) */1650 interface PolkadotPrimitivesV2AbridgedHrmpChannel extends Struct {1651 readonly maxCapacity: u32;1652 readonly maxTotalSize: u32;1653 readonly maxMessageSize: u32;1654 readonly msgCount: u32;1655 readonly totalSize: u32;1656 readonly mqcHead: Option<H256>;1657 }16581659 /** @name PolkadotPrimitivesV2AbridgedHostConfiguration (156) */1660 interface PolkadotPrimitivesV2AbridgedHostConfiguration extends Struct {1661 readonly maxCodeSize: u32;1662 readonly maxHeadDataSize: u32;1663 readonly maxUpwardQueueCount: u32;1664 readonly maxUpwardQueueSize: u32;1665 readonly maxUpwardMessageSize: u32;1666 readonly maxUpwardMessageNumPerCandidate: u32;1667 readonly hrmpMaxMessageNumPerCandidate: u32;1668 readonly validationUpgradeCooldown: u32;1669 readonly validationUpgradeDelay: u32;1670 }16711672 /** @name PolkadotCorePrimitivesOutboundHrmpMessage (162) */1673 interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {1674 readonly recipient: u32;1675 readonly data: Bytes;1676 }16771678 /** @name CumulusPalletParachainSystemCall (163) */1679 interface CumulusPalletParachainSystemCall extends Enum {1680 readonly isSetValidationData: boolean;1681 readonly asSetValidationData: {1682 readonly data: CumulusPrimitivesParachainInherentParachainInherentData;1683 } & Struct;1684 readonly isSudoSendUpwardMessage: boolean;1685 readonly asSudoSendUpwardMessage: {1686 readonly message: Bytes;1687 } & Struct;1688 readonly isAuthorizeUpgrade: boolean;1689 readonly asAuthorizeUpgrade: {1690 readonly codeHash: H256;1691 } & Struct;1692 readonly isEnactAuthorizedUpgrade: boolean;1693 readonly asEnactAuthorizedUpgrade: {1694 readonly code: Bytes;1695 } & Struct;1696 readonly type: 'SetValidationData' | 'SudoSendUpwardMessage' | 'AuthorizeUpgrade' | 'EnactAuthorizedUpgrade';1697 }16981699 /** @name CumulusPrimitivesParachainInherentParachainInherentData (164) */1700 interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct {1701 readonly validationData: PolkadotPrimitivesV2PersistedValidationData;1702 readonly relayChainState: SpTrieStorageProof;1703 readonly downwardMessages: Vec<PolkadotCorePrimitivesInboundDownwardMessage>;1704 readonly horizontalMessages: BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>;1705 }17061707 /** @name PolkadotCorePrimitivesInboundDownwardMessage (166) */1708 interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {1709 readonly sentAt: u32;1710 readonly msg: Bytes;1711 }17121713 /** @name PolkadotCorePrimitivesInboundHrmpMessage (169) */1714 interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {1715 readonly sentAt: u32;1716 readonly data: Bytes;1717 }17181719 /** @name CumulusPalletParachainSystemError (172) */1720 interface CumulusPalletParachainSystemError extends Enum {1721 readonly isOverlappingUpgrades: boolean;1722 readonly isProhibitedByPolkadot: boolean;1723 readonly isTooBig: boolean;1724 readonly isValidationDataNotAvailable: boolean;1725 readonly isHostConfigurationNotAvailable: boolean;1726 readonly isNotScheduled: boolean;1727 readonly isNothingAuthorized: boolean;1728 readonly isUnauthorized: boolean;1729 readonly type: 'OverlappingUpgrades' | 'ProhibitedByPolkadot' | 'TooBig' | 'ValidationDataNotAvailable' | 'HostConfigurationNotAvailable' | 'NotScheduled' | 'NothingAuthorized' | 'Unauthorized';1730 }17311732 /** @name PalletBalancesBalanceLock (174) */1733 interface PalletBalancesBalanceLock extends Struct {1734 readonly id: U8aFixed;1735 readonly amount: u128;1736 readonly reasons: PalletBalancesReasons;1737 }17381739 /** @name PalletBalancesReasons (175) */1740 interface PalletBalancesReasons extends Enum {1741 readonly isFee: boolean;1742 readonly isMisc: boolean;1743 readonly isAll: boolean;1744 readonly type: 'Fee' | 'Misc' | 'All';1745 }17461747 /** @name PalletBalancesReserveData (178) */1748 interface PalletBalancesReserveData extends Struct {1749 readonly id: U8aFixed;1750 readonly amount: u128;1751 }17521753 /** @name PalletBalancesReleases (180) */1754 interface PalletBalancesReleases extends Enum {1755 readonly isV100: boolean;1756 readonly isV200: boolean;1757 readonly type: 'V100' | 'V200';1758 }17591760 /** @name PalletBalancesCall (181) */1761 interface PalletBalancesCall extends Enum {1762 readonly isTransfer: boolean;1763 readonly asTransfer: {1764 readonly dest: MultiAddress;1765 readonly value: Compact<u128>;1766 } & Struct;1767 readonly isSetBalance: boolean;1768 readonly asSetBalance: {1769 readonly who: MultiAddress;1770 readonly newFree: Compact<u128>;1771 readonly newReserved: Compact<u128>;1772 } & Struct;1773 readonly isForceTransfer: boolean;1774 readonly asForceTransfer: {1775 readonly source: MultiAddress;1776 readonly dest: MultiAddress;1777 readonly value: Compact<u128>;1778 } & Struct;1779 readonly isTransferKeepAlive: boolean;1780 readonly asTransferKeepAlive: {1781 readonly dest: MultiAddress;1782 readonly value: Compact<u128>;1783 } & Struct;1784 readonly isTransferAll: boolean;1785 readonly asTransferAll: {1786 readonly dest: MultiAddress;1787 readonly keepAlive: bool;1788 } & Struct;1789 readonly isForceUnreserve: boolean;1790 readonly asForceUnreserve: {1791 readonly who: MultiAddress;1792 readonly amount: u128;1793 } & Struct;1794 readonly type: 'Transfer' | 'SetBalance' | 'ForceTransfer' | 'TransferKeepAlive' | 'TransferAll' | 'ForceUnreserve';1795 }17961797 /** @name PalletBalancesError (184) */1798 interface PalletBalancesError extends Enum {1799 readonly isVestingBalance: boolean;1800 readonly isLiquidityRestrictions: boolean;1801 readonly isInsufficientBalance: boolean;1802 readonly isExistentialDeposit: boolean;1803 readonly isKeepAlive: boolean;1804 readonly isExistingVestingSchedule: boolean;1805 readonly isDeadAccount: boolean;1806 readonly isTooManyReserves: boolean;1807 readonly type: 'VestingBalance' | 'LiquidityRestrictions' | 'InsufficientBalance' | 'ExistentialDeposit' | 'KeepAlive' | 'ExistingVestingSchedule' | 'DeadAccount' | 'TooManyReserves';1808 }18091810 /** @name PalletTimestampCall (186) */1811 interface PalletTimestampCall extends Enum {1812 readonly isSet: boolean;1813 readonly asSet: {1814 readonly now: Compact<u64>;1815 } & Struct;1816 readonly type: 'Set';1817 }18181819 /** @name PalletTransactionPaymentReleases (188) */1820 interface PalletTransactionPaymentReleases extends Enum {1821 readonly isV1Ancient: boolean;1822 readonly isV2: boolean;1823 readonly type: 'V1Ancient' | 'V2';1824 }18251826 /** @name PalletTreasuryProposal (189) */1827 interface PalletTreasuryProposal extends Struct {1828 readonly proposer: AccountId32;1829 readonly value: u128;1830 readonly beneficiary: AccountId32;1831 readonly bond: u128;1832 }18331834 /** @name PalletTreasuryCall (192) */1835 interface PalletTreasuryCall extends Enum {1836 readonly isProposeSpend: boolean;1837 readonly asProposeSpend: {1838 readonly value: Compact<u128>;1839 readonly beneficiary: MultiAddress;1840 } & Struct;1841 readonly isRejectProposal: boolean;1842 readonly asRejectProposal: {1843 readonly proposalId: Compact<u32>;1844 } & Struct;1845 readonly isApproveProposal: boolean;1846 readonly asApproveProposal: {1847 readonly proposalId: Compact<u32>;1848 } & Struct;1849 readonly isSpend: boolean;1850 readonly asSpend: {1851 readonly amount: Compact<u128>;1852 readonly beneficiary: MultiAddress;1853 } & Struct;1854 readonly isRemoveApproval: boolean;1855 readonly asRemoveApproval: {1856 readonly proposalId: Compact<u32>;1857 } & Struct;1858 readonly type: 'ProposeSpend' | 'RejectProposal' | 'ApproveProposal' | 'Spend' | 'RemoveApproval';1859 }18601861 /** @name FrameSupportPalletId (195) */1862 interface FrameSupportPalletId extends U8aFixed {}18631864 /** @name PalletTreasuryError (196) */1865 interface PalletTreasuryError extends Enum {1866 readonly isInsufficientProposersBalance: boolean;1867 readonly isInvalidIndex: boolean;1868 readonly isTooManyApprovals: boolean;1869 readonly isInsufficientPermission: boolean;1870 readonly isProposalNotApproved: boolean;1871 readonly type: 'InsufficientProposersBalance' | 'InvalidIndex' | 'TooManyApprovals' | 'InsufficientPermission' | 'ProposalNotApproved';1872 }18731874 /** @name PalletSudoCall (197) */1875 interface PalletSudoCall extends Enum {1876 readonly isSudo: boolean;1877 readonly asSudo: {1878 readonly call: Call;1879 } & Struct;1880 readonly isSudoUncheckedWeight: boolean;1881 readonly asSudoUncheckedWeight: {1882 readonly call: Call;1883 readonly weight: Weight;1884 } & Struct;1885 readonly isSetKey: boolean;1886 readonly asSetKey: {1887 readonly new_: MultiAddress;1888 } & Struct;1889 readonly isSudoAs: boolean;1890 readonly asSudoAs: {1891 readonly who: MultiAddress;1892 readonly call: Call;1893 } & Struct;1894 readonly type: 'Sudo' | 'SudoUncheckedWeight' | 'SetKey' | 'SudoAs';1895 }18961897 /** @name OrmlVestingModuleCall (199) */1898 interface OrmlVestingModuleCall extends Enum {1899 readonly isClaim: boolean;1900 readonly isVestedTransfer: boolean;1901 readonly asVestedTransfer: {1902 readonly dest: MultiAddress;1903 readonly schedule: OrmlVestingVestingSchedule;1904 } & Struct;1905 readonly isUpdateVestingSchedules: boolean;1906 readonly asUpdateVestingSchedules: {1907 readonly who: MultiAddress;1908 readonly vestingSchedules: Vec<OrmlVestingVestingSchedule>;1909 } & Struct;1910 readonly isClaimFor: boolean;1911 readonly asClaimFor: {1912 readonly dest: MultiAddress;1913 } & Struct;1914 readonly type: 'Claim' | 'VestedTransfer' | 'UpdateVestingSchedules' | 'ClaimFor';1915 }19161917 /** @name OrmlXtokensModuleCall (201) */1918 interface OrmlXtokensModuleCall extends Enum {1919 readonly isTransfer: boolean;1920 readonly asTransfer: {1921 readonly currencyId: PalletForeignAssetsAssetIds;1922 readonly amount: u128;1923 readonly dest: XcmVersionedMultiLocation;1924 readonly destWeight: u64;1925 } & Struct;1926 readonly isTransferMultiasset: boolean;1927 readonly asTransferMultiasset: {1928 readonly asset: XcmVersionedMultiAsset;1929 readonly dest: XcmVersionedMultiLocation;1930 readonly destWeight: u64;1931 } & Struct;1932 readonly isTransferWithFee: boolean;1933 readonly asTransferWithFee: {1934 readonly currencyId: PalletForeignAssetsAssetIds;1935 readonly amount: u128;1936 readonly fee: u128;1937 readonly dest: XcmVersionedMultiLocation;1938 readonly destWeight: u64;1939 } & Struct;1940 readonly isTransferMultiassetWithFee: boolean;1941 readonly asTransferMultiassetWithFee: {1942 readonly asset: XcmVersionedMultiAsset;1943 readonly fee: XcmVersionedMultiAsset;1944 readonly dest: XcmVersionedMultiLocation;1945 readonly destWeight: u64;1946 } & Struct;1947 readonly isTransferMulticurrencies: boolean;1948 readonly asTransferMulticurrencies: {1949 readonly currencies: Vec<ITuple<[PalletForeignAssetsAssetIds, u128]>>;1950 readonly feeItem: u32;1951 readonly dest: XcmVersionedMultiLocation;1952 readonly destWeight: u64;1953 } & Struct;1954 readonly isTransferMultiassets: boolean;1955 readonly asTransferMultiassets: {1956 readonly assets: XcmVersionedMultiAssets;1957 readonly feeItem: u32;1958 readonly dest: XcmVersionedMultiLocation;1959 readonly destWeight: u64;1960 } & Struct;1961 readonly type: 'Transfer' | 'TransferMultiasset' | 'TransferWithFee' | 'TransferMultiassetWithFee' | 'TransferMulticurrencies' | 'TransferMultiassets';1962 }19631964 /** @name XcmVersionedMultiAsset (202) */1965 interface XcmVersionedMultiAsset extends Enum {1966 readonly isV0: boolean;1967 readonly asV0: XcmV0MultiAsset;1968 readonly isV1: boolean;1969 readonly asV1: XcmV1MultiAsset;1970 readonly type: 'V0' | 'V1';1971 }19721973 /** @name OrmlTokensModuleCall (205) */1974 interface OrmlTokensModuleCall extends Enum {1975 readonly isTransfer: boolean;1976 readonly asTransfer: {1977 readonly dest: MultiAddress;1978 readonly currencyId: PalletForeignAssetsAssetIds;1979 readonly amount: Compact<u128>;1980 } & Struct;1981 readonly isTransferAll: boolean;1982 readonly asTransferAll: {1983 readonly dest: MultiAddress;1984 readonly currencyId: PalletForeignAssetsAssetIds;1985 readonly keepAlive: bool;1986 } & Struct;1987 readonly isTransferKeepAlive: boolean;1988 readonly asTransferKeepAlive: {1989 readonly dest: MultiAddress;1990 readonly currencyId: PalletForeignAssetsAssetIds;1991 readonly amount: Compact<u128>;1992 } & Struct;1993 readonly isForceTransfer: boolean;1994 readonly asForceTransfer: {1995 readonly source: MultiAddress;1996 readonly dest: MultiAddress;1997 readonly currencyId: PalletForeignAssetsAssetIds;1998 readonly amount: Compact<u128>;1999 } & Struct;2000 readonly isSetBalance: boolean;2001 readonly asSetBalance: {2002 readonly who: MultiAddress;2003 readonly currencyId: PalletForeignAssetsAssetIds;2004 readonly newFree: Compact<u128>;2005 readonly newReserved: Compact<u128>;2006 } & Struct;2007 readonly type: 'Transfer' | 'TransferAll' | 'TransferKeepAlive' | 'ForceTransfer' | 'SetBalance';2008 }20092010 /** @name CumulusPalletXcmpQueueCall (206) */2011 interface CumulusPalletXcmpQueueCall extends Enum {2012 readonly isServiceOverweight: boolean;2013 readonly asServiceOverweight: {2014 readonly index: u64;2015 readonly weightLimit: Weight;2016 } & Struct;2017 readonly isSuspendXcmExecution: boolean;2018 readonly isResumeXcmExecution: boolean;2019 readonly isUpdateSuspendThreshold: boolean;2020 readonly asUpdateSuspendThreshold: {2021 readonly new_: u32;2022 } & Struct;2023 readonly isUpdateDropThreshold: boolean;2024 readonly asUpdateDropThreshold: {2025 readonly new_: u32;2026 } & Struct;2027 readonly isUpdateResumeThreshold: boolean;2028 readonly asUpdateResumeThreshold: {2029 readonly new_: u32;2030 } & Struct;2031 readonly isUpdateThresholdWeight: boolean;2032 readonly asUpdateThresholdWeight: {2033 readonly new_: Weight;2034 } & Struct;2035 readonly isUpdateWeightRestrictDecay: boolean;2036 readonly asUpdateWeightRestrictDecay: {2037 readonly new_: Weight;2038 } & Struct;2039 readonly isUpdateXcmpMaxIndividualWeight: boolean;2040 readonly asUpdateXcmpMaxIndividualWeight: {2041 readonly new_: Weight;2042 } & Struct;2043 readonly type: 'ServiceOverweight' | 'SuspendXcmExecution' | 'ResumeXcmExecution' | 'UpdateSuspendThreshold' | 'UpdateDropThreshold' | 'UpdateResumeThreshold' | 'UpdateThresholdWeight' | 'UpdateWeightRestrictDecay' | 'UpdateXcmpMaxIndividualWeight';2044 }20452046 /** @name PalletXcmCall (207) */2047 interface PalletXcmCall extends Enum {2048 readonly isSend: boolean;2049 readonly asSend: {2050 readonly dest: XcmVersionedMultiLocation;2051 readonly message: XcmVersionedXcm;2052 } & Struct;2053 readonly isTeleportAssets: boolean;2054 readonly asTeleportAssets: {2055 readonly dest: XcmVersionedMultiLocation;2056 readonly beneficiary: XcmVersionedMultiLocation;2057 readonly assets: XcmVersionedMultiAssets;2058 readonly feeAssetItem: u32;2059 } & Struct;2060 readonly isReserveTransferAssets: boolean;2061 readonly asReserveTransferAssets: {2062 readonly dest: XcmVersionedMultiLocation;2063 readonly beneficiary: XcmVersionedMultiLocation;2064 readonly assets: XcmVersionedMultiAssets;2065 readonly feeAssetItem: u32;2066 } & Struct;2067 readonly isExecute: boolean;2068 readonly asExecute: {2069 readonly message: XcmVersionedXcm;2070 readonly maxWeight: Weight;2071 } & Struct;2072 readonly isForceXcmVersion: boolean;2073 readonly asForceXcmVersion: {2074 readonly location: XcmV1MultiLocation;2075 readonly xcmVersion: u32;2076 } & Struct;2077 readonly isForceDefaultXcmVersion: boolean;2078 readonly asForceDefaultXcmVersion: {2079 readonly maybeXcmVersion: Option<u32>;2080 } & Struct;2081 readonly isForceSubscribeVersionNotify: boolean;2082 readonly asForceSubscribeVersionNotify: {2083 readonly location: XcmVersionedMultiLocation;2084 } & Struct;2085 readonly isForceUnsubscribeVersionNotify: boolean;2086 readonly asForceUnsubscribeVersionNotify: {2087 readonly location: XcmVersionedMultiLocation;2088 } & Struct;2089 readonly isLimitedReserveTransferAssets: boolean;2090 readonly asLimitedReserveTransferAssets: {2091 readonly dest: XcmVersionedMultiLocation;2092 readonly beneficiary: XcmVersionedMultiLocation;2093 readonly assets: XcmVersionedMultiAssets;2094 readonly feeAssetItem: u32;2095 readonly weightLimit: XcmV2WeightLimit;2096 } & Struct;2097 readonly isLimitedTeleportAssets: boolean;2098 readonly asLimitedTeleportAssets: {2099 readonly dest: XcmVersionedMultiLocation;2100 readonly beneficiary: XcmVersionedMultiLocation;2101 readonly assets: XcmVersionedMultiAssets;2102 readonly feeAssetItem: u32;2103 readonly weightLimit: XcmV2WeightLimit;2104 } & Struct;2105 readonly type: 'Send' | 'TeleportAssets' | 'ReserveTransferAssets' | 'Execute' | 'ForceXcmVersion' | 'ForceDefaultXcmVersion' | 'ForceSubscribeVersionNotify' | 'ForceUnsubscribeVersionNotify' | 'LimitedReserveTransferAssets' | 'LimitedTeleportAssets';2106 }21072108 /** @name XcmVersionedXcm (208) */2109 interface XcmVersionedXcm extends Enum {2110 readonly isV0: boolean;2111 readonly asV0: XcmV0Xcm;2112 readonly isV1: boolean;2113 readonly asV1: XcmV1Xcm;2114 readonly isV2: boolean;2115 readonly asV2: XcmV2Xcm;2116 readonly type: 'V0' | 'V1' | 'V2';2117 }21182119 /** @name XcmV0Xcm (209) */2120 interface XcmV0Xcm extends Enum {2121 readonly isWithdrawAsset: boolean;2122 readonly asWithdrawAsset: {2123 readonly assets: Vec<XcmV0MultiAsset>;2124 readonly effects: Vec<XcmV0Order>;2125 } & Struct;2126 readonly isReserveAssetDeposit: boolean;2127 readonly asReserveAssetDeposit: {2128 readonly assets: Vec<XcmV0MultiAsset>;2129 readonly effects: Vec<XcmV0Order>;2130 } & Struct;2131 readonly isTeleportAsset: boolean;2132 readonly asTeleportAsset: {2133 readonly assets: Vec<XcmV0MultiAsset>;2134 readonly effects: Vec<XcmV0Order>;2135 } & Struct;2136 readonly isQueryResponse: boolean;2137 readonly asQueryResponse: {2138 readonly queryId: Compact<u64>;2139 readonly response: XcmV0Response;2140 } & Struct;2141 readonly isTransferAsset: boolean;2142 readonly asTransferAsset: {2143 readonly assets: Vec<XcmV0MultiAsset>;2144 readonly dest: XcmV0MultiLocation;2145 } & Struct;2146 readonly isTransferReserveAsset: boolean;2147 readonly asTransferReserveAsset: {2148 readonly assets: Vec<XcmV0MultiAsset>;2149 readonly dest: XcmV0MultiLocation;2150 readonly effects: Vec<XcmV0Order>;2151 } & Struct;2152 readonly isTransact: boolean;2153 readonly asTransact: {2154 readonly originType: XcmV0OriginKind;2155 readonly requireWeightAtMost: u64;2156 readonly call: XcmDoubleEncoded;2157 } & Struct;2158 readonly isHrmpNewChannelOpenRequest: boolean;2159 readonly asHrmpNewChannelOpenRequest: {2160 readonly sender: Compact<u32>;2161 readonly maxMessageSize: Compact<u32>;2162 readonly maxCapacity: Compact<u32>;2163 } & Struct;2164 readonly isHrmpChannelAccepted: boolean;2165 readonly asHrmpChannelAccepted: {2166 readonly recipient: Compact<u32>;2167 } & Struct;2168 readonly isHrmpChannelClosing: boolean;2169 readonly asHrmpChannelClosing: {2170 readonly initiator: Compact<u32>;2171 readonly sender: Compact<u32>;2172 readonly recipient: Compact<u32>;2173 } & Struct;2174 readonly isRelayedFrom: boolean;2175 readonly asRelayedFrom: {2176 readonly who: XcmV0MultiLocation;2177 readonly message: XcmV0Xcm;2178 } & Struct;2179 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposit' | 'TeleportAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom';2180 }21812182 /** @name XcmV0Order (211) */2183 interface XcmV0Order extends Enum {2184 readonly isNull: boolean;2185 readonly isDepositAsset: boolean;2186 readonly asDepositAsset: {2187 readonly assets: Vec<XcmV0MultiAsset>;2188 readonly dest: XcmV0MultiLocation;2189 } & Struct;2190 readonly isDepositReserveAsset: boolean;2191 readonly asDepositReserveAsset: {2192 readonly assets: Vec<XcmV0MultiAsset>;2193 readonly dest: XcmV0MultiLocation;2194 readonly effects: Vec<XcmV0Order>;2195 } & Struct;2196 readonly isExchangeAsset: boolean;2197 readonly asExchangeAsset: {2198 readonly give: Vec<XcmV0MultiAsset>;2199 readonly receive: Vec<XcmV0MultiAsset>;2200 } & Struct;2201 readonly isInitiateReserveWithdraw: boolean;2202 readonly asInitiateReserveWithdraw: {2203 readonly assets: Vec<XcmV0MultiAsset>;2204 readonly reserve: XcmV0MultiLocation;2205 readonly effects: Vec<XcmV0Order>;2206 } & Struct;2207 readonly isInitiateTeleport: boolean;2208 readonly asInitiateTeleport: {2209 readonly assets: Vec<XcmV0MultiAsset>;2210 readonly dest: XcmV0MultiLocation;2211 readonly effects: Vec<XcmV0Order>;2212 } & Struct;2213 readonly isQueryHolding: boolean;2214 readonly asQueryHolding: {2215 readonly queryId: Compact<u64>;2216 readonly dest: XcmV0MultiLocation;2217 readonly assets: Vec<XcmV0MultiAsset>;2218 } & Struct;2219 readonly isBuyExecution: boolean;2220 readonly asBuyExecution: {2221 readonly fees: XcmV0MultiAsset;2222 readonly weight: u64;2223 readonly debt: u64;2224 readonly haltOnError: bool;2225 readonly xcm: Vec<XcmV0Xcm>;2226 } & Struct;2227 readonly type: 'Null' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';2228 }22292230 /** @name XcmV0Response (213) */2231 interface XcmV0Response extends Enum {2232 readonly isAssets: boolean;2233 readonly asAssets: Vec<XcmV0MultiAsset>;2234 readonly type: 'Assets';2235 }22362237 /** @name XcmV1Xcm (214) */2238 interface XcmV1Xcm extends Enum {2239 readonly isWithdrawAsset: boolean;2240 readonly asWithdrawAsset: {2241 readonly assets: XcmV1MultiassetMultiAssets;2242 readonly effects: Vec<XcmV1Order>;2243 } & Struct;2244 readonly isReserveAssetDeposited: boolean;2245 readonly asReserveAssetDeposited: {2246 readonly assets: XcmV1MultiassetMultiAssets;2247 readonly effects: Vec<XcmV1Order>;2248 } & Struct;2249 readonly isReceiveTeleportedAsset: boolean;2250 readonly asReceiveTeleportedAsset: {2251 readonly assets: XcmV1MultiassetMultiAssets;2252 readonly effects: Vec<XcmV1Order>;2253 } & Struct;2254 readonly isQueryResponse: boolean;2255 readonly asQueryResponse: {2256 readonly queryId: Compact<u64>;2257 readonly response: XcmV1Response;2258 } & Struct;2259 readonly isTransferAsset: boolean;2260 readonly asTransferAsset: {2261 readonly assets: XcmV1MultiassetMultiAssets;2262 readonly beneficiary: XcmV1MultiLocation;2263 } & Struct;2264 readonly isTransferReserveAsset: boolean;2265 readonly asTransferReserveAsset: {2266 readonly assets: XcmV1MultiassetMultiAssets;2267 readonly dest: XcmV1MultiLocation;2268 readonly effects: Vec<XcmV1Order>;2269 } & Struct;2270 readonly isTransact: boolean;2271 readonly asTransact: {2272 readonly originType: XcmV0OriginKind;2273 readonly requireWeightAtMost: u64;2274 readonly call: XcmDoubleEncoded;2275 } & Struct;2276 readonly isHrmpNewChannelOpenRequest: boolean;2277 readonly asHrmpNewChannelOpenRequest: {2278 readonly sender: Compact<u32>;2279 readonly maxMessageSize: Compact<u32>;2280 readonly maxCapacity: Compact<u32>;2281 } & Struct;2282 readonly isHrmpChannelAccepted: boolean;2283 readonly asHrmpChannelAccepted: {2284 readonly recipient: Compact<u32>;2285 } & Struct;2286 readonly isHrmpChannelClosing: boolean;2287 readonly asHrmpChannelClosing: {2288 readonly initiator: Compact<u32>;2289 readonly sender: Compact<u32>;2290 readonly recipient: Compact<u32>;2291 } & Struct;2292 readonly isRelayedFrom: boolean;2293 readonly asRelayedFrom: {2294 readonly who: XcmV1MultilocationJunctions;2295 readonly message: XcmV1Xcm;2296 } & Struct;2297 readonly isSubscribeVersion: boolean;2298 readonly asSubscribeVersion: {2299 readonly queryId: Compact<u64>;2300 readonly maxResponseWeight: Compact<u64>;2301 } & Struct;2302 readonly isUnsubscribeVersion: boolean;2303 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom' | 'SubscribeVersion' | 'UnsubscribeVersion';2304 }23052306 /** @name XcmV1Order (216) */2307 interface XcmV1Order extends Enum {2308 readonly isNoop: boolean;2309 readonly isDepositAsset: boolean;2310 readonly asDepositAsset: {2311 readonly assets: XcmV1MultiassetMultiAssetFilter;2312 readonly maxAssets: u32;2313 readonly beneficiary: XcmV1MultiLocation;2314 } & Struct;2315 readonly isDepositReserveAsset: boolean;2316 readonly asDepositReserveAsset: {2317 readonly assets: XcmV1MultiassetMultiAssetFilter;2318 readonly maxAssets: u32;2319 readonly dest: XcmV1MultiLocation;2320 readonly effects: Vec<XcmV1Order>;2321 } & Struct;2322 readonly isExchangeAsset: boolean;2323 readonly asExchangeAsset: {2324 readonly give: XcmV1MultiassetMultiAssetFilter;2325 readonly receive: XcmV1MultiassetMultiAssets;2326 } & Struct;2327 readonly isInitiateReserveWithdraw: boolean;2328 readonly asInitiateReserveWithdraw: {2329 readonly assets: XcmV1MultiassetMultiAssetFilter;2330 readonly reserve: XcmV1MultiLocation;2331 readonly effects: Vec<XcmV1Order>;2332 } & Struct;2333 readonly isInitiateTeleport: boolean;2334 readonly asInitiateTeleport: {2335 readonly assets: XcmV1MultiassetMultiAssetFilter;2336 readonly dest: XcmV1MultiLocation;2337 readonly effects: Vec<XcmV1Order>;2338 } & Struct;2339 readonly isQueryHolding: boolean;2340 readonly asQueryHolding: {2341 readonly queryId: Compact<u64>;2342 readonly dest: XcmV1MultiLocation;2343 readonly assets: XcmV1MultiassetMultiAssetFilter;2344 } & Struct;2345 readonly isBuyExecution: boolean;2346 readonly asBuyExecution: {2347 readonly fees: XcmV1MultiAsset;2348 readonly weight: u64;2349 readonly debt: u64;2350 readonly haltOnError: bool;2351 readonly instructions: Vec<XcmV1Xcm>;2352 } & Struct;2353 readonly type: 'Noop' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';2354 }23552356 /** @name XcmV1Response (218) */2357 interface XcmV1Response extends Enum {2358 readonly isAssets: boolean;2359 readonly asAssets: XcmV1MultiassetMultiAssets;2360 readonly isVersion: boolean;2361 readonly asVersion: u32;2362 readonly type: 'Assets' | 'Version';2363 }23642365 /** @name CumulusPalletXcmCall (232) */2366 type CumulusPalletXcmCall = Null;23672368 /** @name CumulusPalletDmpQueueCall (233) */2369 interface CumulusPalletDmpQueueCall extends Enum {2370 readonly isServiceOverweight: boolean;2371 readonly asServiceOverweight: {2372 readonly index: u64;2373 readonly weightLimit: Weight;2374 } & Struct;2375 readonly type: 'ServiceOverweight';2376 }23772378 /** @name PalletInflationCall (234) */2379 interface PalletInflationCall extends Enum {2380 readonly isStartInflation: boolean;2381 readonly asStartInflation: {2382 readonly inflationStartRelayBlock: u32;2383 } & Struct;2384 readonly type: 'StartInflation';2385 }23862387 /** @name PalletUniqueCall (235) */2388 interface PalletUniqueCall extends Enum {2389 readonly isCreateCollection: boolean;2390 readonly asCreateCollection: {2391 readonly collectionName: Vec<u16>;2392 readonly collectionDescription: Vec<u16>;2393 readonly tokenPrefix: Bytes;2394 readonly mode: UpDataStructsCollectionMode;2395 } & Struct;2396 readonly isCreateCollectionEx: boolean;2397 readonly asCreateCollectionEx: {2398 readonly data: UpDataStructsCreateCollectionData;2399 } & Struct;2400 readonly isDestroyCollection: boolean;2401 readonly asDestroyCollection: {2402 readonly collectionId: u32;2403 } & Struct;2404 readonly isAddToAllowList: boolean;2405 readonly asAddToAllowList: {2406 readonly collectionId: u32;2407 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;2408 } & Struct;2409 readonly isRemoveFromAllowList: boolean;2410 readonly asRemoveFromAllowList: {2411 readonly collectionId: u32;2412 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;2413 } & Struct;2414 readonly isChangeCollectionOwner: boolean;2415 readonly asChangeCollectionOwner: {2416 readonly collectionId: u32;2417 readonly newOwner: AccountId32;2418 } & Struct;2419 readonly isAddCollectionAdmin: boolean;2420 readonly asAddCollectionAdmin: {2421 readonly collectionId: u32;2422 readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;2423 } & Struct;2424 readonly isRemoveCollectionAdmin: boolean;2425 readonly asRemoveCollectionAdmin: {2426 readonly collectionId: u32;2427 readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr;2428 } & Struct;2429 readonly isSetCollectionSponsor: boolean;2430 readonly asSetCollectionSponsor: {2431 readonly collectionId: u32;2432 readonly newSponsor: AccountId32;2433 } & Struct;2434 readonly isConfirmSponsorship: boolean;2435 readonly asConfirmSponsorship: {2436 readonly collectionId: u32;2437 } & Struct;2438 readonly isRemoveCollectionSponsor: boolean;2439 readonly asRemoveCollectionSponsor: {2440 readonly collectionId: u32;2441 } & Struct;2442 readonly isCreateItem: boolean;2443 readonly asCreateItem: {2444 readonly collectionId: u32;2445 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2446 readonly data: UpDataStructsCreateItemData;2447 } & Struct;2448 readonly isCreateMultipleItems: boolean;2449 readonly asCreateMultipleItems: {2450 readonly collectionId: u32;2451 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2452 readonly itemsData: Vec<UpDataStructsCreateItemData>;2453 } & Struct;2454 readonly isSetCollectionProperties: boolean;2455 readonly asSetCollectionProperties: {2456 readonly collectionId: u32;2457 readonly properties: Vec<UpDataStructsProperty>;2458 } & Struct;2459 readonly isDeleteCollectionProperties: boolean;2460 readonly asDeleteCollectionProperties: {2461 readonly collectionId: u32;2462 readonly propertyKeys: Vec<Bytes>;2463 } & Struct;2464 readonly isSetTokenProperties: boolean;2465 readonly asSetTokenProperties: {2466 readonly collectionId: u32;2467 readonly tokenId: u32;2468 readonly properties: Vec<UpDataStructsProperty>;2469 } & Struct;2470 readonly isDeleteTokenProperties: boolean;2471 readonly asDeleteTokenProperties: {2472 readonly collectionId: u32;2473 readonly tokenId: u32;2474 readonly propertyKeys: Vec<Bytes>;2475 } & Struct;2476 readonly isSetTokenPropertyPermissions: boolean;2477 readonly asSetTokenPropertyPermissions: {2478 readonly collectionId: u32;2479 readonly propertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;2480 } & Struct;2481 readonly isCreateMultipleItemsEx: boolean;2482 readonly asCreateMultipleItemsEx: {2483 readonly collectionId: u32;2484 readonly data: UpDataStructsCreateItemExData;2485 } & Struct;2486 readonly isSetTransfersEnabledFlag: boolean;2487 readonly asSetTransfersEnabledFlag: {2488 readonly collectionId: u32;2489 readonly value: bool;2490 } & Struct;2491 readonly isBurnItem: boolean;2492 readonly asBurnItem: {2493 readonly collectionId: u32;2494 readonly itemId: u32;2495 readonly value: u128;2496 } & Struct;2497 readonly isBurnFrom: boolean;2498 readonly asBurnFrom: {2499 readonly collectionId: u32;2500 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;2501 readonly itemId: u32;2502 readonly value: u128;2503 } & Struct;2504 readonly isTransfer: boolean;2505 readonly asTransfer: {2506 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;2507 readonly collectionId: u32;2508 readonly itemId: u32;2509 readonly value: u128;2510 } & Struct;2511 readonly isApprove: boolean;2512 readonly asApprove: {2513 readonly spender: PalletEvmAccountBasicCrossAccountIdRepr;2514 readonly collectionId: u32;2515 readonly itemId: u32;2516 readonly amount: u128;2517 } & Struct;2518 readonly isTransferFrom: boolean;2519 readonly asTransferFrom: {2520 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;2521 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;2522 readonly collectionId: u32;2523 readonly itemId: u32;2524 readonly value: u128;2525 } & Struct;2526 readonly isSetCollectionLimits: boolean;2527 readonly asSetCollectionLimits: {2528 readonly collectionId: u32;2529 readonly newLimit: UpDataStructsCollectionLimits;2530 } & Struct;2531 readonly isSetCollectionPermissions: boolean;2532 readonly asSetCollectionPermissions: {2533 readonly collectionId: u32;2534 readonly newPermission: UpDataStructsCollectionPermissions;2535 } & Struct;2536 readonly isRepartition: boolean;2537 readonly asRepartition: {2538 readonly collectionId: u32;2539 readonly tokenId: u32;2540 readonly amount: u128;2541 } & Struct;2542 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';2543 }25442545 /** @name UpDataStructsCollectionMode (240) */2546 interface UpDataStructsCollectionMode extends Enum {2547 readonly isNft: boolean;2548 readonly isFungible: boolean;2549 readonly asFungible: u8;2550 readonly isReFungible: boolean;2551 readonly type: 'Nft' | 'Fungible' | 'ReFungible';2552 }25532554 /** @name UpDataStructsCreateCollectionData (241) */2555 interface UpDataStructsCreateCollectionData extends Struct {2556 readonly mode: UpDataStructsCollectionMode;2557 readonly access: Option<UpDataStructsAccessMode>;2558 readonly name: Vec<u16>;2559 readonly description: Vec<u16>;2560 readonly tokenPrefix: Bytes;2561 readonly pendingSponsor: Option<AccountId32>;2562 readonly limits: Option<UpDataStructsCollectionLimits>;2563 readonly permissions: Option<UpDataStructsCollectionPermissions>;2564 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;2565 readonly properties: Vec<UpDataStructsProperty>;2566 }25672568 /** @name UpDataStructsAccessMode (243) */2569 interface UpDataStructsAccessMode extends Enum {2570 readonly isNormal: boolean;2571 readonly isAllowList: boolean;2572 readonly type: 'Normal' | 'AllowList';2573 }25742575 /** @name UpDataStructsCollectionLimits (245) */2576 interface UpDataStructsCollectionLimits extends Struct {2577 readonly accountTokenOwnershipLimit: Option<u32>;2578 readonly sponsoredDataSize: Option<u32>;2579 readonly sponsoredDataRateLimit: Option<UpDataStructsSponsoringRateLimit>;2580 readonly tokenLimit: Option<u32>;2581 readonly sponsorTransferTimeout: Option<u32>;2582 readonly sponsorApproveTimeout: Option<u32>;2583 readonly ownerCanTransfer: Option<bool>;2584 readonly ownerCanDestroy: Option<bool>;2585 readonly transfersEnabled: Option<bool>;2586 }25872588 /** @name UpDataStructsSponsoringRateLimit (247) */2589 interface UpDataStructsSponsoringRateLimit extends Enum {2590 readonly isSponsoringDisabled: boolean;2591 readonly isBlocks: boolean;2592 readonly asBlocks: u32;2593 readonly type: 'SponsoringDisabled' | 'Blocks';2594 }25952596 /** @name UpDataStructsCollectionPermissions (250) */2597 interface UpDataStructsCollectionPermissions extends Struct {2598 readonly access: Option<UpDataStructsAccessMode>;2599 readonly mintMode: Option<bool>;2600 readonly nesting: Option<UpDataStructsNestingPermissions>;2601 }26022603 /** @name UpDataStructsNestingPermissions (252) */2604 interface UpDataStructsNestingPermissions extends Struct {2605 readonly tokenOwner: bool;2606 readonly collectionAdmin: bool;2607 readonly restricted: Option<UpDataStructsOwnerRestrictedSet>;2608 }26092610 /** @name UpDataStructsOwnerRestrictedSet (254) */2611 interface UpDataStructsOwnerRestrictedSet extends BTreeSet<u32> {}26122613 /** @name UpDataStructsPropertyKeyPermission (259) */2614 interface UpDataStructsPropertyKeyPermission extends Struct {2615 readonly key: Bytes;2616 readonly permission: UpDataStructsPropertyPermission;2617 }26182619 /** @name UpDataStructsPropertyPermission (260) */2620 interface UpDataStructsPropertyPermission extends Struct {2621 readonly mutable: bool;2622 readonly collectionAdmin: bool;2623 readonly tokenOwner: bool;2624 }26252626 /** @name UpDataStructsProperty (263) */2627 interface UpDataStructsProperty extends Struct {2628 readonly key: Bytes;2629 readonly value: Bytes;2630 }26312632 /** @name UpDataStructsCreateItemData (266) */2633 interface UpDataStructsCreateItemData extends Enum {2634 readonly isNft: boolean;2635 readonly asNft: UpDataStructsCreateNftData;2636 readonly isFungible: boolean;2637 readonly asFungible: UpDataStructsCreateFungibleData;2638 readonly isReFungible: boolean;2639 readonly asReFungible: UpDataStructsCreateReFungibleData;2640 readonly type: 'Nft' | 'Fungible' | 'ReFungible';2641 }26422643 /** @name UpDataStructsCreateNftData (267) */2644 interface UpDataStructsCreateNftData extends Struct {2645 readonly properties: Vec<UpDataStructsProperty>;2646 }26472648 /** @name UpDataStructsCreateFungibleData (268) */2649 interface UpDataStructsCreateFungibleData extends Struct {2650 readonly value: u128;2651 }26522653 /** @name UpDataStructsCreateReFungibleData (269) */2654 interface UpDataStructsCreateReFungibleData extends Struct {2655 readonly pieces: u128;2656 readonly properties: Vec<UpDataStructsProperty>;2657 }26582659 /** @name UpDataStructsCreateItemExData (272) */2660 interface UpDataStructsCreateItemExData extends Enum {2661 readonly isNft: boolean;2662 readonly asNft: Vec<UpDataStructsCreateNftExData>;2663 readonly isFungible: boolean;2664 readonly asFungible: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;2665 readonly isRefungibleMultipleItems: boolean;2666 readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExSingleOwner>;2667 readonly isRefungibleMultipleOwners: boolean;2668 readonly asRefungibleMultipleOwners: UpDataStructsCreateRefungibleExMultipleOwners;2669 readonly type: 'Nft' | 'Fungible' | 'RefungibleMultipleItems' | 'RefungibleMultipleOwners';2670 }26712672 /** @name UpDataStructsCreateNftExData (274) */2673 interface UpDataStructsCreateNftExData extends Struct {2674 readonly properties: Vec<UpDataStructsProperty>;2675 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2676 }26772678 /** @name UpDataStructsCreateRefungibleExSingleOwner (281) */2679 interface UpDataStructsCreateRefungibleExSingleOwner extends Struct {2680 readonly user: PalletEvmAccountBasicCrossAccountIdRepr;2681 readonly pieces: u128;2682 readonly properties: Vec<UpDataStructsProperty>;2683 }26842685 /** @name UpDataStructsCreateRefungibleExMultipleOwners (283) */2686 interface UpDataStructsCreateRefungibleExMultipleOwners extends Struct {2687 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;2688 readonly properties: Vec<UpDataStructsProperty>;2689 }26902691 /** @name PalletUniqueSchedulerV2Call (284) */2692 interface PalletUniqueSchedulerV2Call extends Enum {2693 readonly isSchedule: boolean;2694 readonly asSchedule: {2695 readonly when: u32;2696 readonly maybePeriodic: Option<ITuple<[u32, u32]>>;2697 readonly priority: Option<u8>;2698 readonly call: Call;2699 } & Struct;2700 readonly isCancel: boolean;2701 readonly asCancel: {2702 readonly when: u32;2703 readonly index: u32;2704 } & Struct;2705 readonly isScheduleNamed: boolean;2706 readonly asScheduleNamed: {2707 readonly id: U8aFixed;2708 readonly when: u32;2709 readonly maybePeriodic: Option<ITuple<[u32, u32]>>;2710 readonly priority: Option<u8>;2711 readonly call: Call;2712 } & Struct;2713 readonly isCancelNamed: boolean;2714 readonly asCancelNamed: {2715 readonly id: U8aFixed;2716 } & Struct;2717 readonly isScheduleAfter: boolean;2718 readonly asScheduleAfter: {2719 readonly after: u32;2720 readonly maybePeriodic: Option<ITuple<[u32, u32]>>;2721 readonly priority: Option<u8>;2722 readonly call: Call;2723 } & Struct;2724 readonly isScheduleNamedAfter: boolean;2725 readonly asScheduleNamedAfter: {2726 readonly id: U8aFixed;2727 readonly after: u32;2728 readonly maybePeriodic: Option<ITuple<[u32, u32]>>;2729 readonly priority: Option<u8>;2730 readonly call: Call;2731 } & Struct;2732 readonly isChangeNamedPriority: boolean;2733 readonly asChangeNamedPriority: {2734 readonly id: U8aFixed;2735 readonly priority: u8;2736 } & Struct;2737 readonly type: 'Schedule' | 'Cancel' | 'ScheduleNamed' | 'CancelNamed' | 'ScheduleAfter' | 'ScheduleNamedAfter' | 'ChangeNamedPriority';2738 }27392740 /** @name PalletConfigurationCall (287) */2741 interface PalletConfigurationCall extends Enum {2742 readonly isSetWeightToFeeCoefficientOverride: boolean;2743 readonly asSetWeightToFeeCoefficientOverride: {2744 readonly coeff: Option<u32>;2745 } & Struct;2746 readonly isSetMinGasPriceOverride: boolean;2747 readonly asSetMinGasPriceOverride: {2748 readonly coeff: Option<u64>;2749 } & Struct;2750 readonly type: 'SetWeightToFeeCoefficientOverride' | 'SetMinGasPriceOverride';2751 }27522753 /** @name PalletTemplateTransactionPaymentCall (289) */2754 type PalletTemplateTransactionPaymentCall = Null;27552756 /** @name PalletStructureCall (290) */2757 type PalletStructureCall = Null;27582759 /** @name PalletRmrkCoreCall (291) */2760 interface PalletRmrkCoreCall extends Enum {2761 readonly isCreateCollection: boolean;2762 readonly asCreateCollection: {2763 readonly metadata: Bytes;2764 readonly max: Option<u32>;2765 readonly symbol: Bytes;2766 } & Struct;2767 readonly isDestroyCollection: boolean;2768 readonly asDestroyCollection: {2769 readonly collectionId: u32;2770 } & Struct;2771 readonly isChangeCollectionIssuer: boolean;2772 readonly asChangeCollectionIssuer: {2773 readonly collectionId: u32;2774 readonly newIssuer: MultiAddress;2775 } & Struct;2776 readonly isLockCollection: boolean;2777 readonly asLockCollection: {2778 readonly collectionId: u32;2779 } & Struct;2780 readonly isMintNft: boolean;2781 readonly asMintNft: {2782 readonly owner: Option<AccountId32>;2783 readonly collectionId: u32;2784 readonly recipient: Option<AccountId32>;2785 readonly royaltyAmount: Option<Permill>;2786 readonly metadata: Bytes;2787 readonly transferable: bool;2788 readonly resources: Option<Vec<RmrkTraitsResourceResourceTypes>>;2789 } & Struct;2790 readonly isBurnNft: boolean;2791 readonly asBurnNft: {2792 readonly collectionId: u32;2793 readonly nftId: u32;2794 readonly maxBurns: u32;2795 } & Struct;2796 readonly isSend: boolean;2797 readonly asSend: {2798 readonly rmrkCollectionId: u32;2799 readonly rmrkNftId: u32;2800 readonly newOwner: RmrkTraitsNftAccountIdOrCollectionNftTuple;2801 } & Struct;2802 readonly isAcceptNft: boolean;2803 readonly asAcceptNft: {2804 readonly rmrkCollectionId: u32;2805 readonly rmrkNftId: u32;2806 readonly newOwner: RmrkTraitsNftAccountIdOrCollectionNftTuple;2807 } & Struct;2808 readonly isRejectNft: boolean;2809 readonly asRejectNft: {2810 readonly rmrkCollectionId: u32;2811 readonly rmrkNftId: u32;2812 } & Struct;2813 readonly isAcceptResource: boolean;2814 readonly asAcceptResource: {2815 readonly rmrkCollectionId: u32;2816 readonly rmrkNftId: u32;2817 readonly resourceId: u32;2818 } & Struct;2819 readonly isAcceptResourceRemoval: boolean;2820 readonly asAcceptResourceRemoval: {2821 readonly rmrkCollectionId: u32;2822 readonly rmrkNftId: u32;2823 readonly resourceId: u32;2824 } & Struct;2825 readonly isSetProperty: boolean;2826 readonly asSetProperty: {2827 readonly rmrkCollectionId: Compact<u32>;2828 readonly maybeNftId: Option<u32>;2829 readonly key: Bytes;2830 readonly value: Bytes;2831 } & Struct;2832 readonly isSetPriority: boolean;2833 readonly asSetPriority: {2834 readonly rmrkCollectionId: u32;2835 readonly rmrkNftId: u32;2836 readonly priorities: Vec<u32>;2837 } & Struct;2838 readonly isAddBasicResource: boolean;2839 readonly asAddBasicResource: {2840 readonly rmrkCollectionId: u32;2841 readonly nftId: u32;2842 readonly resource: RmrkTraitsResourceBasicResource;2843 } & Struct;2844 readonly isAddComposableResource: boolean;2845 readonly asAddComposableResource: {2846 readonly rmrkCollectionId: u32;2847 readonly nftId: u32;2848 readonly resource: RmrkTraitsResourceComposableResource;2849 } & Struct;2850 readonly isAddSlotResource: boolean;2851 readonly asAddSlotResource: {2852 readonly rmrkCollectionId: u32;2853 readonly nftId: u32;2854 readonly resource: RmrkTraitsResourceSlotResource;2855 } & Struct;2856 readonly isRemoveResource: boolean;2857 readonly asRemoveResource: {2858 readonly rmrkCollectionId: u32;2859 readonly nftId: u32;2860 readonly resourceId: u32;2861 } & Struct;2862 readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'Send' | 'AcceptNft' | 'RejectNft' | 'AcceptResource' | 'AcceptResourceRemoval' | 'SetProperty' | 'SetPriority' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource' | 'RemoveResource';2863 }28642865 /** @name RmrkTraitsResourceResourceTypes (297) */2866 interface RmrkTraitsResourceResourceTypes extends Enum {2867 readonly isBasic: boolean;2868 readonly asBasic: RmrkTraitsResourceBasicResource;2869 readonly isComposable: boolean;2870 readonly asComposable: RmrkTraitsResourceComposableResource;2871 readonly isSlot: boolean;2872 readonly asSlot: RmrkTraitsResourceSlotResource;2873 readonly type: 'Basic' | 'Composable' | 'Slot';2874 }28752876 /** @name RmrkTraitsResourceBasicResource (299) */2877 interface RmrkTraitsResourceBasicResource extends Struct {2878 readonly src: Option<Bytes>;2879 readonly metadata: Option<Bytes>;2880 readonly license: Option<Bytes>;2881 readonly thumb: Option<Bytes>;2882 }28832884 /** @name RmrkTraitsResourceComposableResource (301) */2885 interface RmrkTraitsResourceComposableResource extends Struct {2886 readonly parts: Vec<u32>;2887 readonly base: u32;2888 readonly src: Option<Bytes>;2889 readonly metadata: Option<Bytes>;2890 readonly license: Option<Bytes>;2891 readonly thumb: Option<Bytes>;2892 }28932894 /** @name RmrkTraitsResourceSlotResource (302) */2895 interface RmrkTraitsResourceSlotResource extends Struct {2896 readonly base: u32;2897 readonly src: Option<Bytes>;2898 readonly metadata: Option<Bytes>;2899 readonly slot: u32;2900 readonly license: Option<Bytes>;2901 readonly thumb: Option<Bytes>;2902 }29032904 /** @name PalletRmrkEquipCall (305) */2905 interface PalletRmrkEquipCall extends Enum {2906 readonly isCreateBase: boolean;2907 readonly asCreateBase: {2908 readonly baseType: Bytes;2909 readonly symbol: Bytes;2910 readonly parts: Vec<RmrkTraitsPartPartType>;2911 } & Struct;2912 readonly isThemeAdd: boolean;2913 readonly asThemeAdd: {2914 readonly baseId: u32;2915 readonly theme: RmrkTraitsTheme;2916 } & Struct;2917 readonly isEquippable: boolean;2918 readonly asEquippable: {2919 readonly baseId: u32;2920 readonly slotId: u32;2921 readonly equippables: RmrkTraitsPartEquippableList;2922 } & Struct;2923 readonly type: 'CreateBase' | 'ThemeAdd' | 'Equippable';2924 }29252926 /** @name RmrkTraitsPartPartType (308) */2927 interface RmrkTraitsPartPartType extends Enum {2928 readonly isFixedPart: boolean;2929 readonly asFixedPart: RmrkTraitsPartFixedPart;2930 readonly isSlotPart: boolean;2931 readonly asSlotPart: RmrkTraitsPartSlotPart;2932 readonly type: 'FixedPart' | 'SlotPart';2933 }29342935 /** @name RmrkTraitsPartFixedPart (310) */2936 interface RmrkTraitsPartFixedPart extends Struct {2937 readonly id: u32;2938 readonly z: u32;2939 readonly src: Bytes;2940 }29412942 /** @name RmrkTraitsPartSlotPart (311) */2943 interface RmrkTraitsPartSlotPart extends Struct {2944 readonly id: u32;2945 readonly equippable: RmrkTraitsPartEquippableList;2946 readonly src: Bytes;2947 readonly z: u32;2948 }29492950 /** @name RmrkTraitsPartEquippableList (312) */2951 interface RmrkTraitsPartEquippableList extends Enum {2952 readonly isAll: boolean;2953 readonly isEmpty: boolean;2954 readonly isCustom: boolean;2955 readonly asCustom: Vec<u32>;2956 readonly type: 'All' | 'Empty' | 'Custom';2957 }29582959 /** @name RmrkTraitsTheme (314) */2960 interface RmrkTraitsTheme extends Struct {2961 readonly name: Bytes;2962 readonly properties: Vec<RmrkTraitsThemeThemeProperty>;2963 readonly inherit: bool;2964 }29652966 /** @name RmrkTraitsThemeThemeProperty (316) */2967 interface RmrkTraitsThemeThemeProperty extends Struct {2968 readonly key: Bytes;2969 readonly value: Bytes;2970 }29712972 /** @name PalletAppPromotionCall (318) */2973 interface PalletAppPromotionCall extends Enum {2974 readonly isSetAdminAddress: boolean;2975 readonly asSetAdminAddress: {2976 readonly admin: PalletEvmAccountBasicCrossAccountIdRepr;2977 } & Struct;2978 readonly isStake: boolean;2979 readonly asStake: {2980 readonly amount: u128;2981 } & Struct;2982 readonly isUnstake: boolean;2983 readonly isSponsorCollection: boolean;2984 readonly asSponsorCollection: {2985 readonly collectionId: u32;2986 } & Struct;2987 readonly isStopSponsoringCollection: boolean;2988 readonly asStopSponsoringCollection: {2989 readonly collectionId: u32;2990 } & Struct;2991 readonly isSponsorContract: boolean;2992 readonly asSponsorContract: {2993 readonly contractId: H160;2994 } & Struct;2995 readonly isStopSponsoringContract: boolean;2996 readonly asStopSponsoringContract: {2997 readonly contractId: H160;2998 } & Struct;2999 readonly isPayoutStakers: boolean;3000 readonly asPayoutStakers: {3001 readonly stakersNumber: Option<u8>;3002 } & Struct;3003 readonly type: 'SetAdminAddress' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsoringCollection' | 'SponsorContract' | 'StopSponsoringContract' | 'PayoutStakers';3004 }30053006 /** @name PalletForeignAssetsModuleCall (319) */3007 interface PalletForeignAssetsModuleCall extends Enum {3008 readonly isRegisterForeignAsset: boolean;3009 readonly asRegisterForeignAsset: {3010 readonly owner: AccountId32;3011 readonly location: XcmVersionedMultiLocation;3012 readonly metadata: PalletForeignAssetsModuleAssetMetadata;3013 } & Struct;3014 readonly isUpdateForeignAsset: boolean;3015 readonly asUpdateForeignAsset: {3016 readonly foreignAssetId: u32;3017 readonly location: XcmVersionedMultiLocation;3018 readonly metadata: PalletForeignAssetsModuleAssetMetadata;3019 } & Struct;3020 readonly type: 'RegisterForeignAsset' | 'UpdateForeignAsset';3021 }30223023 /** @name PalletEvmCall (320) */3024 interface PalletEvmCall extends Enum {3025 readonly isWithdraw: boolean;3026 readonly asWithdraw: {3027 readonly address: H160;3028 readonly value: u128;3029 } & Struct;3030 readonly isCall: boolean;3031 readonly asCall: {3032 readonly source: H160;3033 readonly target: H160;3034 readonly input: Bytes;3035 readonly value: U256;3036 readonly gasLimit: u64;3037 readonly maxFeePerGas: U256;3038 readonly maxPriorityFeePerGas: Option<U256>;3039 readonly nonce: Option<U256>;3040 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;3041 } & Struct;3042 readonly isCreate: boolean;3043 readonly asCreate: {3044 readonly source: H160;3045 readonly init: Bytes;3046 readonly value: U256;3047 readonly gasLimit: u64;3048 readonly maxFeePerGas: U256;3049 readonly maxPriorityFeePerGas: Option<U256>;3050 readonly nonce: Option<U256>;3051 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;3052 } & Struct;3053 readonly isCreate2: boolean;3054 readonly asCreate2: {3055 readonly source: H160;3056 readonly init: Bytes;3057 readonly salt: H256;3058 readonly value: U256;3059 readonly gasLimit: u64;3060 readonly maxFeePerGas: U256;3061 readonly maxPriorityFeePerGas: Option<U256>;3062 readonly nonce: Option<U256>;3063 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;3064 } & Struct;3065 readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';3066 }30673068 /** @name PalletEthereumCall (326) */3069 interface PalletEthereumCall extends Enum {3070 readonly isTransact: boolean;3071 readonly asTransact: {3072 readonly transaction: EthereumTransactionTransactionV2;3073 } & Struct;3074 readonly type: 'Transact';3075 }30763077 /** @name EthereumTransactionTransactionV2 (327) */3078 interface EthereumTransactionTransactionV2 extends Enum {3079 readonly isLegacy: boolean;3080 readonly asLegacy: EthereumTransactionLegacyTransaction;3081 readonly isEip2930: boolean;3082 readonly asEip2930: EthereumTransactionEip2930Transaction;3083 readonly isEip1559: boolean;3084 readonly asEip1559: EthereumTransactionEip1559Transaction;3085 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';3086 }30873088 /** @name EthereumTransactionLegacyTransaction (328) */3089 interface EthereumTransactionLegacyTransaction extends Struct {3090 readonly nonce: U256;3091 readonly gasPrice: U256;3092 readonly gasLimit: U256;3093 readonly action: EthereumTransactionTransactionAction;3094 readonly value: U256;3095 readonly input: Bytes;3096 readonly signature: EthereumTransactionTransactionSignature;3097 }30983099 /** @name EthereumTransactionTransactionAction (329) */3100 interface EthereumTransactionTransactionAction extends Enum {3101 readonly isCall: boolean;3102 readonly asCall: H160;3103 readonly isCreate: boolean;3104 readonly type: 'Call' | 'Create';3105 }31063107 /** @name EthereumTransactionTransactionSignature (330) */3108 interface EthereumTransactionTransactionSignature extends Struct {3109 readonly v: u64;3110 readonly r: H256;3111 readonly s: H256;3112 }31133114 /** @name EthereumTransactionEip2930Transaction (332) */3115 interface EthereumTransactionEip2930Transaction extends Struct {3116 readonly chainId: u64;3117 readonly nonce: U256;3118 readonly gasPrice: U256;3119 readonly gasLimit: U256;3120 readonly action: EthereumTransactionTransactionAction;3121 readonly value: U256;3122 readonly input: Bytes;3123 readonly accessList: Vec<EthereumTransactionAccessListItem>;3124 readonly oddYParity: bool;3125 readonly r: H256;3126 readonly s: H256;3127 }31283129 /** @name EthereumTransactionAccessListItem (334) */3130 interface EthereumTransactionAccessListItem extends Struct {3131 readonly address: H160;3132 readonly storageKeys: Vec<H256>;3133 }31343135 /** @name EthereumTransactionEip1559Transaction (335) */3136 interface EthereumTransactionEip1559Transaction extends Struct {3137 readonly chainId: u64;3138 readonly nonce: U256;3139 readonly maxPriorityFeePerGas: U256;3140 readonly maxFeePerGas: U256;3141 readonly gasLimit: U256;3142 readonly action: EthereumTransactionTransactionAction;3143 readonly value: U256;3144 readonly input: Bytes;3145 readonly accessList: Vec<EthereumTransactionAccessListItem>;3146 readonly oddYParity: bool;3147 readonly r: H256;3148 readonly s: H256;3149 }31503151 /** @name PalletEvmMigrationCall (336) */3152 interface PalletEvmMigrationCall extends Enum {3153 readonly isBegin: boolean;3154 readonly asBegin: {3155 readonly address: H160;3156 } & Struct;3157 readonly isSetData: boolean;3158 readonly asSetData: {3159 readonly address: H160;3160 readonly data: Vec<ITuple<[H256, H256]>>;3161 } & Struct;3162 readonly isFinish: boolean;3163 readonly asFinish: {3164 readonly address: H160;3165 readonly code: Bytes;3166 } & Struct;3167 readonly isInsertEthLogs: boolean;3168 readonly asInsertEthLogs: {3169 readonly logs: Vec<EthereumLog>;3170 } & Struct;3171 readonly isInsertEvents: boolean;3172 readonly asInsertEvents: {3173 readonly events: Vec<Bytes>;3174 } & Struct;3175 readonly type: 'Begin' | 'SetData' | 'Finish' | 'InsertEthLogs' | 'InsertEvents';3176 }31773178 /** @name PalletMaintenanceCall (340) */3179 interface PalletMaintenanceCall extends Enum {3180 readonly isEnable: boolean;3181 readonly isDisable: boolean;3182 readonly type: 'Enable' | 'Disable';3183 }31843185 /** @name PalletTestUtilsCall (341) */3186 interface PalletTestUtilsCall extends Enum {3187 readonly isEnable: boolean;3188 readonly isSetTestValue: boolean;3189 readonly asSetTestValue: {3190 readonly value: u32;3191 } & Struct;3192 readonly isSetTestValueAndRollback: boolean;3193 readonly asSetTestValueAndRollback: {3194 readonly value: u32;3195 } & Struct;3196 readonly isIncTestValue: boolean;3197 readonly isSelfCancelingInc: boolean;3198 readonly asSelfCancelingInc: {3199 readonly id: U8aFixed;3200 readonly maxTestValue: u32;3201 } & Struct;3202 readonly isJustTakeFee: boolean;3203 readonly isBatchAll: boolean;3204 readonly asBatchAll: {3205 readonly calls: Vec<Call>;3206 } & Struct;3207 readonly type: 'Enable' | 'SetTestValue' | 'SetTestValueAndRollback' | 'IncTestValue' | 'SelfCancelingInc' | 'JustTakeFee' | 'BatchAll';3208 }32093210 /** @name PalletSudoError (343) */3211 interface PalletSudoError extends Enum {3212 readonly isRequireSudo: boolean;3213 readonly type: 'RequireSudo';3214 }32153216 /** @name OrmlVestingModuleError (345) */3217 interface OrmlVestingModuleError extends Enum {3218 readonly isZeroVestingPeriod: boolean;3219 readonly isZeroVestingPeriodCount: boolean;3220 readonly isInsufficientBalanceToLock: boolean;3221 readonly isTooManyVestingSchedules: boolean;3222 readonly isAmountLow: boolean;3223 readonly isMaxVestingSchedulesExceeded: boolean;3224 readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';3225 }32263227 /** @name OrmlXtokensModuleError (346) */3228 interface OrmlXtokensModuleError extends Enum {3229 readonly isAssetHasNoReserve: boolean;3230 readonly isNotCrossChainTransfer: boolean;3231 readonly isInvalidDest: boolean;3232 readonly isNotCrossChainTransferableCurrency: boolean;3233 readonly isUnweighableMessage: boolean;3234 readonly isXcmExecutionFailed: boolean;3235 readonly isCannotReanchor: boolean;3236 readonly isInvalidAncestry: boolean;3237 readonly isInvalidAsset: boolean;3238 readonly isDestinationNotInvertible: boolean;3239 readonly isBadVersion: boolean;3240 readonly isDistinctReserveForAssetAndFee: boolean;3241 readonly isZeroFee: boolean;3242 readonly isZeroAmount: boolean;3243 readonly isTooManyAssetsBeingSent: boolean;3244 readonly isAssetIndexNonExistent: boolean;3245 readonly isFeeNotEnough: boolean;3246 readonly isNotSupportedMultiLocation: boolean;3247 readonly isMinXcmFeeNotDefined: boolean;3248 readonly type: 'AssetHasNoReserve' | 'NotCrossChainTransfer' | 'InvalidDest' | 'NotCrossChainTransferableCurrency' | 'UnweighableMessage' | 'XcmExecutionFailed' | 'CannotReanchor' | 'InvalidAncestry' | 'InvalidAsset' | 'DestinationNotInvertible' | 'BadVersion' | 'DistinctReserveForAssetAndFee' | 'ZeroFee' | 'ZeroAmount' | 'TooManyAssetsBeingSent' | 'AssetIndexNonExistent' | 'FeeNotEnough' | 'NotSupportedMultiLocation' | 'MinXcmFeeNotDefined';3249 }32503251 /** @name OrmlTokensBalanceLock (349) */3252 interface OrmlTokensBalanceLock extends Struct {3253 readonly id: U8aFixed;3254 readonly amount: u128;3255 }32563257 /** @name OrmlTokensAccountData (351) */3258 interface OrmlTokensAccountData extends Struct {3259 readonly free: u128;3260 readonly reserved: u128;3261 readonly frozen: u128;3262 }32633264 /** @name OrmlTokensReserveData (353) */3265 interface OrmlTokensReserveData extends Struct {3266 readonly id: Null;3267 readonly amount: u128;3268 }32693270 /** @name OrmlTokensModuleError (355) */3271 interface OrmlTokensModuleError extends Enum {3272 readonly isBalanceTooLow: boolean;3273 readonly isAmountIntoBalanceFailed: boolean;3274 readonly isLiquidityRestrictions: boolean;3275 readonly isMaxLocksExceeded: boolean;3276 readonly isKeepAlive: boolean;3277 readonly isExistentialDeposit: boolean;3278 readonly isDeadAccount: boolean;3279 readonly isTooManyReserves: boolean;3280 readonly type: 'BalanceTooLow' | 'AmountIntoBalanceFailed' | 'LiquidityRestrictions' | 'MaxLocksExceeded' | 'KeepAlive' | 'ExistentialDeposit' | 'DeadAccount' | 'TooManyReserves';3281 }32823283 /** @name CumulusPalletXcmpQueueInboundChannelDetails (357) */3284 interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {3285 readonly sender: u32;3286 readonly state: CumulusPalletXcmpQueueInboundState;3287 readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;3288 }32893290 /** @name CumulusPalletXcmpQueueInboundState (358) */3291 interface CumulusPalletXcmpQueueInboundState extends Enum {3292 readonly isOk: boolean;3293 readonly isSuspended: boolean;3294 readonly type: 'Ok' | 'Suspended';3295 }32963297 /** @name PolkadotParachainPrimitivesXcmpMessageFormat (361) */3298 interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {3299 readonly isConcatenatedVersionedXcm: boolean;3300 readonly isConcatenatedEncodedBlob: boolean;3301 readonly isSignals: boolean;3302 readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';3303 }33043305 /** @name CumulusPalletXcmpQueueOutboundChannelDetails (364) */3306 interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {3307 readonly recipient: u32;3308 readonly state: CumulusPalletXcmpQueueOutboundState;3309 readonly signalsExist: bool;3310 readonly firstIndex: u16;3311 readonly lastIndex: u16;3312 }33133314 /** @name CumulusPalletXcmpQueueOutboundState (365) */3315 interface CumulusPalletXcmpQueueOutboundState extends Enum {3316 readonly isOk: boolean;3317 readonly isSuspended: boolean;3318 readonly type: 'Ok' | 'Suspended';3319 }33203321 /** @name CumulusPalletXcmpQueueQueueConfigData (367) */3322 interface CumulusPalletXcmpQueueQueueConfigData extends Struct {3323 readonly suspendThreshold: u32;3324 readonly dropThreshold: u32;3325 readonly resumeThreshold: u32;3326 readonly thresholdWeight: Weight;3327 readonly weightRestrictDecay: Weight;3328 readonly xcmpMaxIndividualWeight: Weight;3329 }33303331 /** @name CumulusPalletXcmpQueueError (369) */3332 interface CumulusPalletXcmpQueueError extends Enum {3333 readonly isFailedToSend: boolean;3334 readonly isBadXcmOrigin: boolean;3335 readonly isBadXcm: boolean;3336 readonly isBadOverweightIndex: boolean;3337 readonly isWeightOverLimit: boolean;3338 readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';3339 }33403341 /** @name PalletXcmError (370) */3342 interface PalletXcmError extends Enum {3343 readonly isUnreachable: boolean;3344 readonly isSendFailure: boolean;3345 readonly isFiltered: boolean;3346 readonly isUnweighableMessage: boolean;3347 readonly isDestinationNotInvertible: boolean;3348 readonly isEmpty: boolean;3349 readonly isCannotReanchor: boolean;3350 readonly isTooManyAssets: boolean;3351 readonly isInvalidOrigin: boolean;3352 readonly isBadVersion: boolean;3353 readonly isBadLocation: boolean;3354 readonly isNoSubscription: boolean;3355 readonly isAlreadySubscribed: boolean;3356 readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';3357 }33583359 /** @name CumulusPalletXcmError (371) */3360 type CumulusPalletXcmError = Null;33613362 /** @name CumulusPalletDmpQueueConfigData (372) */3363 interface CumulusPalletDmpQueueConfigData extends Struct {3364 readonly maxIndividual: Weight;3365 }33663367 /** @name CumulusPalletDmpQueuePageIndexData (373) */3368 interface CumulusPalletDmpQueuePageIndexData extends Struct {3369 readonly beginUsed: u32;3370 readonly endUsed: u32;3371 readonly overweightCount: u64;3372 }33733374 /** @name CumulusPalletDmpQueueError (376) */3375 interface CumulusPalletDmpQueueError extends Enum {3376 readonly isUnknown: boolean;3377 readonly isOverLimit: boolean;3378 readonly type: 'Unknown' | 'OverLimit';3379 }33803381 /** @name PalletUniqueError (380) */3382 interface PalletUniqueError extends Enum {3383 readonly isCollectionDecimalPointLimitExceeded: boolean;3384 readonly isConfirmUnsetSponsorFail: boolean;3385 readonly isEmptyArgument: boolean;3386 readonly isRepartitionCalledOnNonRefungibleCollection: boolean;3387 readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument' | 'RepartitionCalledOnNonRefungibleCollection';3388 }33893390 /** @name PalletUniqueSchedulerV2BlockAgenda (381) */3391 interface PalletUniqueSchedulerV2BlockAgenda extends Struct {3392 readonly agenda: Vec<Option<PalletUniqueSchedulerV2Scheduled>>;3393 readonly freePlaces: u32;3394 }33953396 /** @name PalletUniqueSchedulerV2Scheduled (384) */3397 interface PalletUniqueSchedulerV2Scheduled extends Struct {3398 readonly maybeId: Option<U8aFixed>;3399 readonly priority: u8;3400 readonly call: PalletUniqueSchedulerV2ScheduledCall;3401 readonly maybePeriodic: Option<ITuple<[u32, u32]>>;3402 readonly origin: OpalRuntimeOriginCaller;3403 }34043405 /** @name PalletUniqueSchedulerV2ScheduledCall (385) */3406 interface PalletUniqueSchedulerV2ScheduledCall extends Enum {3407 readonly isInline: boolean;3408 readonly asInline: Bytes;3409 readonly isPreimageLookup: boolean;3410 readonly asPreimageLookup: {3411 readonly hash_: H256;3412 readonly unboundedLen: u32;3413 } & Struct;3414 readonly type: 'Inline' | 'PreimageLookup';3415 }34163417 /** @name OpalRuntimeOriginCaller (387) */3418 interface OpalRuntimeOriginCaller extends Enum {3419 readonly isSystem: boolean;3420 readonly asSystem: FrameSupportDispatchRawOrigin;3421 readonly isVoid: boolean;3422 readonly isPolkadotXcm: boolean;3423 readonly asPolkadotXcm: PalletXcmOrigin;3424 readonly isCumulusXcm: boolean;3425 readonly asCumulusXcm: CumulusPalletXcmOrigin;3426 readonly isEthereum: boolean;3427 readonly asEthereum: PalletEthereumRawOrigin;3428 readonly type: 'System' | 'Void' | 'PolkadotXcm' | 'CumulusXcm' | 'Ethereum';3429 }34303431 /** @name FrameSupportDispatchRawOrigin (388) */3432 interface FrameSupportDispatchRawOrigin extends Enum {3433 readonly isRoot: boolean;3434 readonly isSigned: boolean;3435 readonly asSigned: AccountId32;3436 readonly isNone: boolean;3437 readonly type: 'Root' | 'Signed' | 'None';3438 }34393440 /** @name PalletXcmOrigin (389) */3441 interface PalletXcmOrigin extends Enum {3442 readonly isXcm: boolean;3443 readonly asXcm: XcmV1MultiLocation;3444 readonly isResponse: boolean;3445 readonly asResponse: XcmV1MultiLocation;3446 readonly type: 'Xcm' | 'Response';3447 }34483449 /** @name CumulusPalletXcmOrigin (390) */3450 interface CumulusPalletXcmOrigin extends Enum {3451 readonly isRelay: boolean;3452 readonly isSiblingParachain: boolean;3453 readonly asSiblingParachain: u32;3454 readonly type: 'Relay' | 'SiblingParachain';3455 }34563457 /** @name PalletEthereumRawOrigin (391) */3458 interface PalletEthereumRawOrigin extends Enum {3459 readonly isEthereumTransaction: boolean;3460 readonly asEthereumTransaction: H160;3461 readonly type: 'EthereumTransaction';3462 }34633464 /** @name SpCoreVoid (392) */3465 type SpCoreVoid = Null;34663467 /** @name PalletUniqueSchedulerV2Error (394) */3468 interface PalletUniqueSchedulerV2Error extends Enum {3469 readonly isFailedToSchedule: boolean;3470 readonly isAgendaIsExhausted: boolean;3471 readonly isScheduledCallCorrupted: boolean;3472 readonly isPreimageNotFound: boolean;3473 readonly isTooBigScheduledCall: boolean;3474 readonly isNotFound: boolean;3475 readonly isTargetBlockNumberInPast: boolean;3476 readonly isNamed: boolean;3477 readonly type: 'FailedToSchedule' | 'AgendaIsExhausted' | 'ScheduledCallCorrupted' | 'PreimageNotFound' | 'TooBigScheduledCall' | 'NotFound' | 'TargetBlockNumberInPast' | 'Named';3478 }34793480 /** @name UpDataStructsCollection (395) */3481 interface UpDataStructsCollection extends Struct {3482 readonly owner: AccountId32;3483 readonly mode: UpDataStructsCollectionMode;3484 readonly name: Vec<u16>;3485 readonly description: Vec<u16>;3486 readonly tokenPrefix: Bytes;3487 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;3488 readonly limits: UpDataStructsCollectionLimits;3489 readonly permissions: UpDataStructsCollectionPermissions;3490 readonly flags: U8aFixed;3491 }34923493 /** @name UpDataStructsSponsorshipStateAccountId32 (396) */3494 interface UpDataStructsSponsorshipStateAccountId32 extends Enum {3495 readonly isDisabled: boolean;3496 readonly isUnconfirmed: boolean;3497 readonly asUnconfirmed: AccountId32;3498 readonly isConfirmed: boolean;3499 readonly asConfirmed: AccountId32;3500 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';3501 }35023503 /** @name UpDataStructsProperties (398) */3504 interface UpDataStructsProperties extends Struct {3505 readonly map: UpDataStructsPropertiesMapBoundedVec;3506 readonly consumedSpace: u32;3507 readonly spaceLimit: u32;3508 }35093510 /** @name UpDataStructsPropertiesMapBoundedVec (399) */3511 interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}35123513 /** @name UpDataStructsPropertiesMapPropertyPermission (404) */3514 interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}35153516 /** @name UpDataStructsCollectionStats (411) */3517 interface UpDataStructsCollectionStats extends Struct {3518 readonly created: u32;3519 readonly destroyed: u32;3520 readonly alive: u32;3521 }35223523 /** @name UpDataStructsTokenChild (412) */3524 interface UpDataStructsTokenChild extends Struct {3525 readonly token: u32;3526 readonly collection: u32;3527 }35283529 /** @name PhantomTypeUpDataStructs (413) */3530 interface PhantomTypeUpDataStructs extends Vec<ITuple<[UpDataStructsTokenData, UpDataStructsRpcCollection, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsPropertyPropertyInfo, RmrkTraitsBaseBaseInfo, RmrkTraitsPartPartType, RmrkTraitsTheme, RmrkTraitsNftNftChild]>> {}35313532 /** @name UpDataStructsTokenData (415) */3533 interface UpDataStructsTokenData extends Struct {3534 readonly properties: Vec<UpDataStructsProperty>;3535 readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;3536 readonly pieces: u128;3537 }35383539 /** @name UpDataStructsRpcCollection (417) */3540 interface UpDataStructsRpcCollection extends Struct {3541 readonly owner: AccountId32;3542 readonly mode: UpDataStructsCollectionMode;3543 readonly name: Vec<u16>;3544 readonly description: Vec<u16>;3545 readonly tokenPrefix: Bytes;3546 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;3547 readonly limits: UpDataStructsCollectionLimits;3548 readonly permissions: UpDataStructsCollectionPermissions;3549 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;3550 readonly properties: Vec<UpDataStructsProperty>;3551 readonly readOnly: bool;3552 readonly flags: UpDataStructsRpcCollectionFlags;3553 }35543555 /** @name UpDataStructsRpcCollectionFlags (418) */3556 interface UpDataStructsRpcCollectionFlags extends Struct {3557 readonly foreign: bool;3558 readonly erc721metadata: bool;3559 }35603561 /** @name RmrkTraitsCollectionCollectionInfo (419) */3562 interface RmrkTraitsCollectionCollectionInfo extends Struct {3563 readonly issuer: AccountId32;3564 readonly metadata: Bytes;3565 readonly max: Option<u32>;3566 readonly symbol: Bytes;3567 readonly nftsCount: u32;3568 }35693570 /** @name RmrkTraitsNftNftInfo (420) */3571 interface RmrkTraitsNftNftInfo extends Struct {3572 readonly owner: RmrkTraitsNftAccountIdOrCollectionNftTuple;3573 readonly royalty: Option<RmrkTraitsNftRoyaltyInfo>;3574 readonly metadata: Bytes;3575 readonly equipped: bool;3576 readonly pending: bool;3577 }35783579 /** @name RmrkTraitsNftRoyaltyInfo (422) */3580 interface RmrkTraitsNftRoyaltyInfo extends Struct {3581 readonly recipient: AccountId32;3582 readonly amount: Permill;3583 }35843585 /** @name RmrkTraitsResourceResourceInfo (423) */3586 interface RmrkTraitsResourceResourceInfo extends Struct {3587 readonly id: u32;3588 readonly resource: RmrkTraitsResourceResourceTypes;3589 readonly pending: bool;3590 readonly pendingRemoval: bool;3591 }35923593 /** @name RmrkTraitsPropertyPropertyInfo (424) */3594 interface RmrkTraitsPropertyPropertyInfo extends Struct {3595 readonly key: Bytes;3596 readonly value: Bytes;3597 }35983599 /** @name RmrkTraitsBaseBaseInfo (425) */3600 interface RmrkTraitsBaseBaseInfo extends Struct {3601 readonly issuer: AccountId32;3602 readonly baseType: Bytes;3603 readonly symbol: Bytes;3604 }36053606 /** @name RmrkTraitsNftNftChild (426) */3607 interface RmrkTraitsNftNftChild extends Struct {3608 readonly collectionId: u32;3609 readonly nftId: u32;3610 }36113612 /** @name PalletCommonError (428) */3613 interface PalletCommonError extends Enum {3614 readonly isCollectionNotFound: boolean;3615 readonly isMustBeTokenOwner: boolean;3616 readonly isNoPermission: boolean;3617 readonly isCantDestroyNotEmptyCollection: boolean;3618 readonly isPublicMintingNotAllowed: boolean;3619 readonly isAddressNotInAllowlist: boolean;3620 readonly isCollectionNameLimitExceeded: boolean;3621 readonly isCollectionDescriptionLimitExceeded: boolean;3622 readonly isCollectionTokenPrefixLimitExceeded: boolean;3623 readonly isTotalCollectionsLimitExceeded: boolean;3624 readonly isCollectionAdminCountExceeded: boolean;3625 readonly isCollectionLimitBoundsExceeded: boolean;3626 readonly isOwnerPermissionsCantBeReverted: boolean;3627 readonly isTransferNotAllowed: boolean;3628 readonly isAccountTokenLimitExceeded: boolean;3629 readonly isCollectionTokenLimitExceeded: boolean;3630 readonly isMetadataFlagFrozen: boolean;3631 readonly isTokenNotFound: boolean;3632 readonly isTokenValueTooLow: boolean;3633 readonly isApprovedValueTooLow: boolean;3634 readonly isCantApproveMoreThanOwned: boolean;3635 readonly isAddressIsZero: boolean;3636 readonly isUnsupportedOperation: boolean;3637 readonly isNotSufficientFounds: boolean;3638 readonly isUserIsNotAllowedToNest: boolean;3639 readonly isSourceCollectionIsNotAllowedToNest: boolean;3640 readonly isCollectionFieldSizeExceeded: boolean;3641 readonly isNoSpaceForProperty: boolean;3642 readonly isPropertyLimitReached: boolean;3643 readonly isPropertyKeyIsTooLong: boolean;3644 readonly isInvalidCharacterInPropertyKey: boolean;3645 readonly isEmptyPropertyKey: boolean;3646 readonly isCollectionIsExternal: boolean;3647 readonly isCollectionIsInternal: boolean;3648 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';3649 }36503651 /** @name PalletFungibleError (430) */3652 interface PalletFungibleError extends Enum {3653 readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;3654 readonly isFungibleItemsHaveNoId: boolean;3655 readonly isFungibleItemsDontHaveData: boolean;3656 readonly isFungibleDisallowsNesting: boolean;3657 readonly isSettingPropertiesNotAllowed: boolean;3658 readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';3659 }36603661 /** @name PalletRefungibleItemData (431) */3662 interface PalletRefungibleItemData extends Struct {3663 readonly constData: Bytes;3664 }36653666 /** @name PalletRefungibleError (436) */3667 interface PalletRefungibleError extends Enum {3668 readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;3669 readonly isWrongRefungiblePieces: boolean;3670 readonly isRepartitionWhileNotOwningAllPieces: boolean;3671 readonly isRefungibleDisallowsNesting: boolean;3672 readonly isSettingPropertiesNotAllowed: boolean;3673 readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RepartitionWhileNotOwningAllPieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';3674 }36753676 /** @name PalletNonfungibleItemData (437) */3677 interface PalletNonfungibleItemData extends Struct {3678 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;3679 }36803681 /** @name UpDataStructsPropertyScope (439) */3682 interface UpDataStructsPropertyScope extends Enum {3683 readonly isNone: boolean;3684 readonly isRmrk: boolean;3685 readonly type: 'None' | 'Rmrk';3686 }36873688 /** @name PalletNonfungibleError (441) */3689 interface PalletNonfungibleError extends Enum {3690 readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;3691 readonly isNonfungibleItemsHaveNoAmount: boolean;3692 readonly isCantBurnNftWithChildren: boolean;3693 readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount' | 'CantBurnNftWithChildren';3694 }36953696 /** @name PalletStructureError (442) */3697 interface PalletStructureError extends Enum {3698 readonly isOuroborosDetected: boolean;3699 readonly isDepthLimit: boolean;3700 readonly isBreadthLimit: boolean;3701 readonly isTokenNotFound: boolean;3702 readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound';3703 }37043705 /** @name PalletRmrkCoreError (443) */3706 interface PalletRmrkCoreError extends Enum {3707 readonly isCorruptedCollectionType: boolean;3708 readonly isRmrkPropertyKeyIsTooLong: boolean;3709 readonly isRmrkPropertyValueIsTooLong: boolean;3710 readonly isRmrkPropertyIsNotFound: boolean;3711 readonly isUnableToDecodeRmrkData: boolean;3712 readonly isCollectionNotEmpty: boolean;3713 readonly isNoAvailableCollectionId: boolean;3714 readonly isNoAvailableNftId: boolean;3715 readonly isCollectionUnknown: boolean;3716 readonly isNoPermission: boolean;3717 readonly isNonTransferable: boolean;3718 readonly isCollectionFullOrLocked: boolean;3719 readonly isResourceDoesntExist: boolean;3720 readonly isCannotSendToDescendentOrSelf: boolean;3721 readonly isCannotAcceptNonOwnedNft: boolean;3722 readonly isCannotRejectNonOwnedNft: boolean;3723 readonly isCannotRejectNonPendingNft: boolean;3724 readonly isResourceNotPending: boolean;3725 readonly isNoAvailableResourceId: boolean;3726 readonly type: 'CorruptedCollectionType' | 'RmrkPropertyKeyIsTooLong' | 'RmrkPropertyValueIsTooLong' | 'RmrkPropertyIsNotFound' | 'UnableToDecodeRmrkData' | 'CollectionNotEmpty' | 'NoAvailableCollectionId' | 'NoAvailableNftId' | 'CollectionUnknown' | 'NoPermission' | 'NonTransferable' | 'CollectionFullOrLocked' | 'ResourceDoesntExist' | 'CannotSendToDescendentOrSelf' | 'CannotAcceptNonOwnedNft' | 'CannotRejectNonOwnedNft' | 'CannotRejectNonPendingNft' | 'ResourceNotPending' | 'NoAvailableResourceId';3727 }37283729 /** @name PalletRmrkEquipError (445) */3730 interface PalletRmrkEquipError extends Enum {3731 readonly isPermissionError: boolean;3732 readonly isNoAvailableBaseId: boolean;3733 readonly isNoAvailablePartId: boolean;3734 readonly isBaseDoesntExist: boolean;3735 readonly isNeedsDefaultThemeFirst: boolean;3736 readonly isPartDoesntExist: boolean;3737 readonly isNoEquippableOnFixedPart: boolean;3738 readonly type: 'PermissionError' | 'NoAvailableBaseId' | 'NoAvailablePartId' | 'BaseDoesntExist' | 'NeedsDefaultThemeFirst' | 'PartDoesntExist' | 'NoEquippableOnFixedPart';3739 }37403741 /** @name PalletAppPromotionError (451) */3742 interface PalletAppPromotionError extends Enum {3743 readonly isAdminNotSet: boolean;3744 readonly isNoPermission: boolean;3745 readonly isNotSufficientFunds: boolean;3746 readonly isPendingForBlockOverflow: boolean;3747 readonly isSponsorNotSet: boolean;3748 readonly isIncorrectLockedBalanceOperation: boolean;3749 readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFunds' | 'PendingForBlockOverflow' | 'SponsorNotSet' | 'IncorrectLockedBalanceOperation';3750 }37513752 /** @name PalletForeignAssetsModuleError (452) */3753 interface PalletForeignAssetsModuleError extends Enum {3754 readonly isBadLocation: boolean;3755 readonly isMultiLocationExisted: boolean;3756 readonly isAssetIdNotExists: boolean;3757 readonly isAssetIdExisted: boolean;3758 readonly type: 'BadLocation' | 'MultiLocationExisted' | 'AssetIdNotExists' | 'AssetIdExisted';3759 }37603761 /** @name PalletEvmError (454) */3762 interface PalletEvmError extends Enum {3763 readonly isBalanceLow: boolean;3764 readonly isFeeOverflow: boolean;3765 readonly isPaymentOverflow: boolean;3766 readonly isWithdrawFailed: boolean;3767 readonly isGasPriceTooLow: boolean;3768 readonly isInvalidNonce: boolean;3769 readonly isGasLimitTooLow: boolean;3770 readonly isGasLimitTooHigh: boolean;3771 readonly isUndefined: boolean;3772 readonly isReentrancy: boolean;3773 readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce' | 'GasLimitTooLow' | 'GasLimitTooHigh' | 'Undefined' | 'Reentrancy';3774 }37753776 /** @name FpRpcTransactionStatus (457) */3777 interface FpRpcTransactionStatus extends Struct {3778 readonly transactionHash: H256;3779 readonly transactionIndex: u32;3780 readonly from: H160;3781 readonly to: Option<H160>;3782 readonly contractAddress: Option<H160>;3783 readonly logs: Vec<EthereumLog>;3784 readonly logsBloom: EthbloomBloom;3785 }37863787 /** @name EthbloomBloom (459) */3788 interface EthbloomBloom extends U8aFixed {}37893790 /** @name EthereumReceiptReceiptV3 (461) */3791 interface EthereumReceiptReceiptV3 extends Enum {3792 readonly isLegacy: boolean;3793 readonly asLegacy: EthereumReceiptEip658ReceiptData;3794 readonly isEip2930: boolean;3795 readonly asEip2930: EthereumReceiptEip658ReceiptData;3796 readonly isEip1559: boolean;3797 readonly asEip1559: EthereumReceiptEip658ReceiptData;3798 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';3799 }38003801 /** @name EthereumReceiptEip658ReceiptData (462) */3802 interface EthereumReceiptEip658ReceiptData extends Struct {3803 readonly statusCode: u8;3804 readonly usedGas: U256;3805 readonly logsBloom: EthbloomBloom;3806 readonly logs: Vec<EthereumLog>;3807 }38083809 /** @name EthereumBlock (463) */3810 interface EthereumBlock extends Struct {3811 readonly header: EthereumHeader;3812 readonly transactions: Vec<EthereumTransactionTransactionV2>;3813 readonly ommers: Vec<EthereumHeader>;3814 }38153816 /** @name EthereumHeader (464) */3817 interface EthereumHeader extends Struct {3818 readonly parentHash: H256;3819 readonly ommersHash: H256;3820 readonly beneficiary: H160;3821 readonly stateRoot: H256;3822 readonly transactionsRoot: H256;3823 readonly receiptsRoot: H256;3824 readonly logsBloom: EthbloomBloom;3825 readonly difficulty: U256;3826 readonly number: U256;3827 readonly gasLimit: U256;3828 readonly gasUsed: U256;3829 readonly timestamp: u64;3830 readonly extraData: Bytes;3831 readonly mixHash: H256;3832 readonly nonce: EthereumTypesHashH64;3833 }38343835 /** @name EthereumTypesHashH64 (465) */3836 interface EthereumTypesHashH64 extends U8aFixed {}38373838 /** @name PalletEthereumError (470) */3839 interface PalletEthereumError extends Enum {3840 readonly isInvalidSignature: boolean;3841 readonly isPreLogExists: boolean;3842 readonly type: 'InvalidSignature' | 'PreLogExists';3843 }38443845 /** @name PalletEvmCoderSubstrateError (471) */3846 interface PalletEvmCoderSubstrateError extends Enum {3847 readonly isOutOfGas: boolean;3848 readonly isOutOfFund: boolean;3849 readonly type: 'OutOfGas' | 'OutOfFund';3850 }38513852 /** @name UpDataStructsSponsorshipStateBasicCrossAccountIdRepr (472) */3853 interface UpDataStructsSponsorshipStateBasicCrossAccountIdRepr extends Enum {3854 readonly isDisabled: boolean;3855 readonly isUnconfirmed: boolean;3856 readonly asUnconfirmed: PalletEvmAccountBasicCrossAccountIdRepr;3857 readonly isConfirmed: boolean;3858 readonly asConfirmed: PalletEvmAccountBasicCrossAccountIdRepr;3859 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';3860 }38613862 /** @name PalletEvmContractHelpersSponsoringModeT (473) */3863 interface PalletEvmContractHelpersSponsoringModeT extends Enum {3864 readonly isDisabled: boolean;3865 readonly isAllowlisted: boolean;3866 readonly isGenerous: boolean;3867 readonly type: 'Disabled' | 'Allowlisted' | 'Generous';3868 }38693870 /** @name PalletEvmContractHelpersError (479) */3871 interface PalletEvmContractHelpersError extends Enum {3872 readonly isNoPermission: boolean;3873 readonly isNoPendingSponsor: boolean;3874 readonly isTooManyMethodsHaveSponsoredLimit: boolean;3875 readonly type: 'NoPermission' | 'NoPendingSponsor' | 'TooManyMethodsHaveSponsoredLimit';3876 }38773878 /** @name PalletEvmMigrationError (480) */3879 interface PalletEvmMigrationError extends Enum {3880 readonly isAccountNotEmpty: boolean;3881 readonly isAccountIsNotMigrating: boolean;3882 readonly isBadEvent: boolean;3883 readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating' | 'BadEvent';3884 }38853886 /** @name PalletMaintenanceError (481) */3887 type PalletMaintenanceError = Null;38883889 /** @name PalletTestUtilsError (482) */3890 interface PalletTestUtilsError extends Enum {3891 readonly isTestPalletDisabled: boolean;3892 readonly isTriggerRollback: boolean;3893 readonly type: 'TestPalletDisabled' | 'TriggerRollback';3894 }38953896 /** @name SpRuntimeMultiSignature (484) */3897 interface SpRuntimeMultiSignature extends Enum {3898 readonly isEd25519: boolean;3899 readonly asEd25519: SpCoreEd25519Signature;3900 readonly isSr25519: boolean;3901 readonly asSr25519: SpCoreSr25519Signature;3902 readonly isEcdsa: boolean;3903 readonly asEcdsa: SpCoreEcdsaSignature;3904 readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';3905 }39063907 /** @name SpCoreEd25519Signature (485) */3908 interface SpCoreEd25519Signature extends U8aFixed {}39093910 /** @name SpCoreSr25519Signature (487) */3911 interface SpCoreSr25519Signature extends U8aFixed {}39123913 /** @name SpCoreEcdsaSignature (488) */3914 interface SpCoreEcdsaSignature extends U8aFixed {}39153916 /** @name FrameSystemExtensionsCheckSpecVersion (491) */3917 type FrameSystemExtensionsCheckSpecVersion = Null;39183919 /** @name FrameSystemExtensionsCheckTxVersion (492) */3920 type FrameSystemExtensionsCheckTxVersion = Null;39213922 /** @name FrameSystemExtensionsCheckGenesis (493) */3923 type FrameSystemExtensionsCheckGenesis = Null;39243925 /** @name FrameSystemExtensionsCheckNonce (496) */3926 interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}39273928 /** @name FrameSystemExtensionsCheckWeight (497) */3929 type FrameSystemExtensionsCheckWeight = Null;39303931 /** @name OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance (498) */3932 type OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance = Null;39333934 /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (499) */3935 interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}39363937 /** @name OpalRuntimeRuntime (500) */3938 type OpalRuntimeRuntime = Null;39393940 /** @name PalletEthereumFakeTransactionFinalizer (501) */3941 type PalletEthereumFakeTransactionFinalizer = Null;39423943} // declare moduletests/src/maintenanceMode.seqtest.tsdiffbeforeafterboth--- a/tests/src/maintenanceMode.seqtest.ts
+++ b/tests/src/maintenanceMode.seqtest.ts
@@ -237,7 +237,7 @@
expect(tokenId).to.be.equal('1');
await expect(contract.methods.mintWithTokenURI(receiver, 'Test URI').send())
- .to.be.rejectedWith(/submit transaction to pool failed: Pool\(InvalidTransaction\(InvalidTransaction::Call\)\)/);
+ .to.be.rejectedWith(/Returned error: unknown error/);
await expect(contract.methods.ownerOf(tokenId).call()).rejectedWith(/token not found/);
tests/src/refungible.test.tsdiffbeforeafterboth--- a/tests/src/refungible.test.ts
+++ b/tests/src/refungible.test.ts
@@ -255,3 +255,43 @@
});
});
+describe('Refungible negative tests', () => {
+ let donor: IKeyringPair;
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
+
+ before(async function() {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);
+
+ donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
+
+ itSub('Cannot transfer incorrect amount of token pieces', async ({helper}) => {
+ const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
+ const tokenAlice = await collection.mintToken(alice, 10n, {Substrate: alice.address});
+ const tokenBob = await collection.mintToken(alice, 10n, {Substrate: bob.address});
+
+ // 1. Alice cannot transfer Bob's token:
+ await expect(tokenBob.transfer(alice, {Substrate: charlie.address}, 0n)).to.be.rejectedWith('common.TokenValueTooLow');
+ await expect(tokenBob.transfer(alice, {Substrate: charlie.address}, 1n)).to.be.rejectedWith('common.TokenValueTooLow');
+ await expect(tokenBob.transfer(alice, {Substrate: charlie.address}, 10n)).to.be.rejectedWith('common.TokenValueTooLow');
+ await expect(tokenBob.transfer(alice, {Substrate: charlie.address}, 100n)).to.be.rejectedWith('common.TokenValueTooLow');
+
+ // 2. Alice cannot transfer non-existing token:
+ await expect(collection.transferToken(alice, 100, {Substrate: charlie.address}, 0n)).to.be.rejectedWith('common.TokenValueTooLow');
+ await expect(collection.transferToken(alice, 100, {Substrate: charlie.address}, 1n)).to.be.rejectedWith('common.TokenValueTooLow');
+
+ // 3. Zero transfer allowed (EIP-20):
+ await tokenAlice.transfer(alice, {Substrate: charlie.address}, 0n);
+
+ expect(await tokenAlice.getTop10Owners()).to.deep.eq([{Substrate: alice.address}]);
+ expect(await tokenBob.getTop10Owners()).to.deep.eq([{Substrate: bob.address}]);
+ expect(await tokenAlice.getBalance({Substrate: alice.address})).to.eq(10n);
+ expect(await tokenBob.getBalance({Substrate: bob.address})).to.eq(10n);
+ expect(await tokenBob.getBalance({Substrate: charlie.address})).to.eq(0n);
+ });
+});
tests/src/transfer.test.tsdiffbeforeafterboth--- a/tests/src/transfer.test.ts
+++ b/tests/src/transfer.test.ts
@@ -122,6 +122,7 @@
});
});
+
itSub('[nft] Transfer with not existed collection_id', async ({helper}) => {
const collectionId = (1 << 32) - 1;
await expect(helper.nft.transferToken(alice, collectionId, 1, {Substrate: bob.address}))
@@ -191,6 +192,25 @@
.to.be.rejectedWith(/common\.TokenValueTooLow/);
});
+ itSub('Zero transfer NFT', async ({helper}) => {
+ const collection = await helper.nft.mintCollection(alice, {name: 'Transfer-Neg-3-NFT', description: '', tokenPrefix: 'T'});
+ const tokenAlice = await collection.mintToken(alice, {Substrate: alice.address});
+ const tokenBob = await collection.mintToken(alice, {Substrate: bob.address});
+ // 1. Zero transfer of own tokens allowed:
+ await helper.executeExtrinsic(alice, 'api.tx.unique.transfer', [{Substrate: bob.address}, collection.collectionId, tokenAlice.tokenId, 0]);
+ // 2. Zero transfer of non-owned tokens not allowed:
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.transfer', [{Substrate: alice.address}, collection.collectionId, tokenBob.tokenId, 0])).to.be.rejectedWith('common.NoPermission');
+ // 3. Zero transfer of non-existing tokens not allowed:
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.transfer', [{Substrate: alice.address}, collection.collectionId, 10, 0])).to.be.rejectedWith('common.TokenNotFound');
+ expect(await tokenAlice.getOwner()).to.deep.eq({Substrate: alice.address});
+ expect(await tokenBob.getOwner()).to.deep.eq({Substrate: bob.address});
+ // 4. Storage is not corrupted:
+ await tokenAlice.transfer(alice, {Substrate: bob.address});
+ await tokenBob.transfer(bob, {Substrate: alice.address});
+ expect(await tokenAlice.getOwner()).to.deep.eq({Substrate: bob.address});
+ expect(await tokenBob.getOwner()).to.deep.eq({Substrate: alice.address});
+ });
+
itSub('[nft] Transfer with deleted item_id', async ({helper}) => {
const collection = await helper.nft.mintCollection(alice, {name: 'Transfer-Neg-3-NFT', description: '', tokenPrefix: 'T'});
const nft = await collection.mintToken(alice);
tests/src/transferFrom.test.tsdiffbeforeafterboth--- a/tests/src/transferFrom.test.ts
+++ b/tests/src/transferFrom.test.ts
@@ -349,4 +349,27 @@
{Substrate: charlie.address},
)).to.be.rejectedWith(/common\.ApprovedValueTooLow/);
});
+
+ itSub('zero transfer NFT', async ({helper}) => {
+ const collection = await helper.nft.mintCollection(alice, {name: 'Zero', description: 'Zero transfer', tokenPrefix: 'TF'});
+ const notApprovedNft = await collection.mintToken(alice, {Substrate: bob.address});
+ const approvedNft = await collection.mintToken(alice, {Substrate: bob.address});
+ await approvedNft.approve(bob, {Substrate: alice.address});
+
+ // 1. Cannot zero transferFrom (non-existing token)
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, 9999, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');
+ // 2. Cannot zero transferFrom (not approved token)
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, notApprovedNft.tokenId, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');
+ // 3. Can zero transferFrom (approved token):
+ await helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, approvedNft.tokenId, 0]);
+
+ // 4.1 approvedNft still approved:
+ expect(await approvedNft.isApproved({Substrate: alice.address})).to.be.true;
+ // 4.2 bob is still the owner:
+ expect(await approvedNft.getOwner()).to.deep.eq({Substrate: bob.address});
+ expect(await notApprovedNft.getOwner()).to.deep.eq({Substrate: bob.address});
+ // 4.3 Alice can transfer approved nft:
+ await approvedNft.transferFrom(alice, {Substrate: bob.address}, {Substrate: alice.address});
+ expect(await approvedNft.getOwner()).to.deep.eq({Substrate: alice.address});
+ });
});
tests/src/util/playgrounds/unique.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -2484,7 +2484,7 @@
* @param ethCrossAccount etherium cross account
* @returns substrate cross account id
*/
- convertCrossAccountFromEthCrossAcoount(ethCrossAccount: IEthCrossAccountId): ICrossAccountId {
+ convertCrossAccountFromEthCrossAccount(ethCrossAccount: IEthCrossAccountId): ICrossAccountId {
if (ethCrossAccount.sub === '0') {
return {Ethereum: ethCrossAccount.eth.toLocaleLowerCase()};
}