Skip to content

Conversation

@0xRVE
Copy link
Contributor

@0xRVE 0xRVE commented Nov 18, 2025

Adding tests

@0xRVE 0xRVE added the T7-smart_contracts This PR/Issue is related to smart contracts. label Nov 18, 2025
@0xRVE
Copy link
Contributor Author

0xRVE commented Nov 18, 2025

/cmd prdoc --audience runtime_dev --bump patch

github-actions bot and others added 21 commits November 18, 2025 14:39
Redoes #10225 for the
genesis block number.

It was broken again by
#10271
Fix Ethereum transaction decoding

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- And deprecate `FastUnstake` as it is unsafe 
- And use the faster solver for benchmarks to speed things up
- Remove hardcoded weights of westend.

A step to reduce the diff size in
#9925

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Improve eth-rpc tests reliability by replacing substrate-node with
revive-dev-node, fixing nonce query in runtime_api_dry_run_addr, and
running all tests in a single tokio test function

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
… specify asset for fees (#10243)

Multiple pallet-xcm calls use `u32` index as a way to specify which
asset from the `assets` (also an arg of the call) is to be used for fees
purposes. This PR brings **major API change (breaking change)** that
proposes usage of `VersionedAssetId` instead

Affected pallet-xcm calls: `teleport_assets`, `reserve_transfer_assets`,
`limited_reserve_transfer_assets`, `limited_teleport_assets`,
`transfer_assets`

This is follow-up change to the:
#9842, that aims to
remove the requirement of the client to provide sorted list of Assets to
the APIs (often a point failures). With the mentioned change sorting
happens on the runtime side and `u32` index (provided by the client) can
become invalid after sorting (this PR aims that problem)

Relevant
[dicussion](https://matrix.to/#/!nYxxyvMNMUaniRIokh:parity.io/$gAcAEznmQL6LhUlvGPHSaePUV4cZtxoco2I6ap8Cn3Q?via=parity.io&via=matrix.org&via=web3.foundation)
on XCM public element channel

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
While runing some balancer v3 tests:
paritytech/foundry-polkadot#287 (comment),
discovered we need a way to mock up the origin as well, so add hook.

---------

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Right now the default message processor is somewhat tied to specific
`AggregateMessageOrigin` from `polkadot_runtime_parachains::inclusion`.
this pr changes it so that we require a conversion from that
AggregateMessageOrigin, but nothing else, the rest stays generic.

In the longer run we can allow customizing the processor to some other
thing, but this was a sufficiently easier change

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Fix prestate diff-tracing, add missing storage diff for created
contracts

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Reenable the `interest-cache` for the `tracing-log` crate.

It was disabled in this PR
(paritytech/substrate#11854) due to this issue
(paritytech/substrate#11854).
More details
[here](#8760 (comment)).

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…exclusion list (#10300)

- Added `AllExcept` variant in `Select` enum to exclude try-runtime
checks for a given list of pallets
- Added `TryRuntimeUpgradeConfig` struct for extensible configuration of
runtime upgrade testing
- Added `Executive::try_runtime_upgrade_with_config()` for control over
which pallets' try_state hooks to execute
- Maintained backwards compatibility: existing
`Executive::try_runtime_upgrade(checks)` function continues to work
unchanged
- Updated Westend runtime to use the new config-based API to exclude
staking-related pallets (Staking, NominationPools, FastUnstake,
DelegatedStaking)
- This change is fully backwards compatible - external runtimes and
tools (like try-runtime-cli) do not need to update their code

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes #7540
Fixes #9586

We wanted to check how many smart contract calls we can include in one
block using various weights.
- We prepared [a zombienet
test](https://github.com/paritytech/polkadot-sdk/blob/0f1c2af0be3d33d7fe3965e1ed9a8734773b9782/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs#L28),
where we instantiate [a
contract](https://github.com/paritytech/polkadot-sdk/blob/0f1c2af0be3d33d7fe3965e1ed9a8734773b9782/polkadot/zombienet-sdk-tests/tests/parachains/contract.txt#L6)
with an ERC20 token and call it from different accounts: each account
mints 100 tokens per call.
- To maximize throughput, we also increased the PoV size from 5 MB to 10
MB and raised the weight limit (the maximum block fill) from 75% to 95%.
- ref_time of read/write for the current setup were taken from
[rocksdb_weights](https://github.com/paritytech/polkadot-sdk/blob/0f1c2af0be3d33d7fe3965e1ed9a8734773b9782/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/rocksdb_weights.rs#L28),
and then they were changed according to results [of updated
benchmarks](#7867).
- Block execution time was taken from
[basic_authorship](https://github.com/paritytech/polkadot-sdk/blob/0f1c2af0be3d33d7fe3965e1ed9a8734773b9782/substrate/client/basic-authorship/src/basic_authorship.rs#L574).
- Number of transaction and how block filled were taken just looking at
blocks.
- PoV size for 1033 extrinsics in current setup (25000 read/100000 write
weights, block filled to 75%) is 289 KB. I didn’t write down PoV sizes
from other cases but they’re comparable to it.
- Tests were running on Macbook Pro with M2.

| ref_time of read/write | Block execution time | Block filled |
Extrinsics in block |

|--------------------------------------|----------------------|--------------|---------------------|
| **ref_time from the current setup** | | | |
| 25000/100000 | 679 ms | 75% | 1033 |
| **ref_time from reference hardware** | | | |
| 9000/28000 | 905 ms | 94% | 2225 |
| 9000/28000 | 861 ms | 94% | 2225 |
| **ref_time from a local machine** | | | |
| 4000/13000 | 1013 ms | 94% | 2698 |
| 4000/13000 | 1077 ms | 94% | 2698 |

---------

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Re-introducing a fix, that was overwritten with one of the PR's
## Description 

While testing different XCM messages via xcm-emulator, I noticed that
the limit of 256 for `max_upward_message_size` in
`RelayStateSproofBuilder` can be reached very easily.

I suggest increasing it to `1024 * 1024` so that we can have a good
range for testing.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
This PR adds couple of improvements to the Check semver job for the
stable branches:
1. The `validate: false` option can be set now not only on the `mojor`
bumps but on the `minor` and `patch` as well, this one is useful when
for the backport cases when a desired bump does not match with the one,
that `parity-publish` semver check has predicted (like
[here](https://github.com/paritytech/polkadot-sdk/actions/runs/19135068993/job/54685184577?pr=10221))
2. Possibility to skip check, when it is really not needed but still
fails (like on the post crates release
[prs](https://github.com/paritytech/polkadot-sdk/actions/runs/18311557391/job/52141285274?pr=9951))

closes: paritytech/release-engineering#274
When running a single collator (most commonly on testnets), the block
builder task is always able to claim a slot, so we're never triggering
the pre-connect mechanism which happens for slots owned by other
authors.
Additionally I fixed some tests.

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…no_std` (#10321)

This fixes `cargo test -p cumulus-pallet-parachain-system --features
runtime-benchmarks`
…10329)

Fixes #10185

This PR is to add support for `paginationStartKey` parameter in
`archive_v1_storage` JSON RPC API for query type: `descendantsValues`
and `descendantsHashes` per [the latest
specs](https://paritytech.github.io/json-rpc-interface-spec/api/archive_v1_storage.html).

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
This renames the `SlotSchedule` runtime api to `TargetBlockRate`. It
also changes the signature to only returning the target block rate. As
discussed at the retreat, we don't need the block time returned as part
of this runtime api.
# Description
#9724

---------

Co-authored-by: Javier Viola <363911+pepoviola@users.noreply.github.com>
@0xRVE 0xRVE changed the title [pallet-revive] fix termination testing [WIP][pallet-revive] fix termination testing Nov 18, 2025
@0xRVE 0xRVE changed the title [WIP][pallet-revive] fix termination testing [pallet-revive] fix termination testing Nov 19, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

Differential Tests Results (REVM)

Specified Tests

  • simple
  • complex
  • translated_semantic_tests

Counts

  • Total Number of Test Cases: 26447
  • Total Number of Successes: 19163
  • Total Number of Failures: 17
  • Total Number of Ignores: 7267

Failures

The test specifiers seen in this section have the format 'path::case_idx::compilation_mode' and they're compatible with the revive differential tests framework and can be specified to it directly in the same way that they're provided through the --test argument of the framework.

The failures are provided in an expandable section to ensure that the PR does not get polluted with information. Please click on the section below for more information

Detailed Differential Tests Failure Information
Test Specifier Failure Reason Note
complex/create/create2_many/test.json::1::E+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
complex/create/create2_many/test.json::1::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
complex/create/create_many/test.json::1::E+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
complex/create/create_many/test.json::1::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
complex/yul_instructions/calldatasize/test_evm.json::11::E+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
complex/yul_instructions/calldatasize/test_evm.json::11::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
complex/yul_instructions/calldatasize/test_evm.json::11::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
complex/yul_instructions/calldatasize/test_evm.json::11::E- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
simple/try_catch/unbalanced_gas_limit.sol::0::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0"), CalldataItem("1"), CalldataItem("0"), CalldataItem("0")]) but got 0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
simple/try_catch/unbalanced_gas_limit.sol::0::E- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0"), CalldataItem("1"), CalldataItem("0"), CalldataItem("0")]) but got 0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
simple/try_catch/unbalanced_gas_limit.sol::0::E+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0"), CalldataItem("1"), CalldataItem("0"), CalldataItem("0")]) but got 0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
simple/try_catch/unbalanced_gas_limit.sol::0::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0"), CalldataItem("1"), CalldataItem("0"), CalldataItem("0")]) but got 0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
translated_semantic_tests/array/array_storage_index_access/test.json::0::E- Failed to execute all of the steps on the driver: Failure on step 6: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
translated_semantic_tests/array/array_storage_length_access/test.json::0::E- Failed to execute all of the steps on the driver: Failure on step 5: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
translated_semantic_tests/array/array_storage_push_empty_length_address/test.json::0::E- Failed to execute all of the steps on the driver: Failure on step 6: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
translated_semantic_tests/array/array_storage_push_pop/test.json::0::E- Failed to execute all of the steps on the driver: Failure on step 5: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
translated_semantic_tests/functionCall/gas_and_value_basic/test.json::0::E- Failed to execute all of the steps on the driver: Failure on step 2: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected false but got true. Revert reason: None

@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

Differential Tests Results (PolkaVM)

Specified Tests

  • simple
  • complex
  • translated_semantic_tests

Counts

  • Total Number of Test Cases: 26447
  • Total Number of Successes: 5796
  • Total Number of Failures: 65
  • Total Number of Ignores: 20586

Failures

The test specifiers seen in this section have the format 'path::case_idx::compilation_mode' and they're compatible with the revive differential tests framework and can be specified to it directly in the same way that they're provided through the --test argument of the framework.

The failures are provided in an expandable section to ensure that the PR does not get polluted with information. Please click on the section below for more information

Detailed Differential Tests Failure Information
Test Specifier Failure Reason Note
complex/create/create2_many/test.json::1::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("ContractTrapped")
complex/create/create_in_library/test.json::0::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("")
complex/create/create_in_library/test.json::0::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("")
complex/create/create_many/test.json::1::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("ContractTrapped")
complex/library_call_tuple/test.json::0::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("")
complex/library_call_tuple/test.json::0::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("")
complex/solidity_by_example/applications/iterable_mapping/test.json::0::Y- >=0.8.1 Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("")
complex/solidity_by_example/applications/iterable_mapping/test.json::0::Y+ >=0.8.1 Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("")
complex/try_catch/create/custom_error/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Code upload failed: Failed to execute transaction: Transaction inclusion watching timeout for 0xcb168b52c1b660fbbe34b744d003b44719183237e043b881bae07482fdc54681: transaction was not confirmed within the timeout This test case succeeded with other compilation modes: {'Y+'}
simple/function/many_arguments_2.sol::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/simple/function/many_arguments_2.sol:52:40: 52 result = result && main(i, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20) == uint256(i) * i; ^^
simple/function/many_arguments_2.sol::0::Y+ Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/simple/function/many_arguments_2.sol:52:40: 52 result = result && main(i, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20) == uint256(i) * i; ^^
simple/function/many_arguments_2_complex.sol::0::Y+ Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/simple/function/many_arguments_2_complex.sol:58:21: 58 p1, ^^
simple/internal_function_pointers/sum_oddness.sol::0::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("ContractTrapped") This test case succeeded with other compilation modes: {'Y-'}
simple/internal_function_pointers/sum_oddness.sol::1::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("ContractTrapped") This test case succeeded with other compilation modes: {'Y-'}
simple/pointer/large_offset.sol::0::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("ContractTrapped")
simple/pointer/large_offset.sol::0::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("ContractTrapped")
simple/recursion/recursion_keccak.sol::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Failed to parse resolc standard JSON output: failed to parse resolc JSON output: recursion limit exceeded at line 1 column 267625 stderr:
simple/recursion/recursion_keccak.sol::0::Y+ Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Failed to parse resolc standard JSON output: failed to parse resolc JSON output: recursion limit exceeded at line 1 column 184228 stderr:
simple/recursion_keccak.sol::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Failed to parse resolc standard JSON output: failed to parse resolc JSON output: recursion limit exceeded at line 1 column 267555 stderr:
simple/recursion_keccak.sol::0::Y+ Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Failed to parse resolc standard JSON output: failed to parse resolc JSON output: recursion limit exceeded at line 1 column 184158 stderr:
simple/try_catch/unbalanced_gas_limit.sol::0::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0"), CalldataItem("1"), CalldataItem("0"), CalldataItem("0")]) but got 0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
simple/try_catch/unbalanced_gas_limit.sol::0::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0"), CalldataItem("1"), CalldataItem("0"), CalldataItem("0")]) but got 0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
simple/yul_instructions/blockhash.sol::3::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("$BLOCK_HASH:256")]) but got 0xf482f35136020e43624a5da1df895b0fbf6ca8f040b79ae993548a61d34403c5
simple/yul_instructions/blockhash.sol::3::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("$BLOCK_HASH:256")]) but got 0xdc5504cf5c6517100390f12fcaa533b9cdcb5bad746f9c19afb653aab5e4c224
simple/yul_instructions/blockhash.sol::4::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("$BLOCK_HASH:255")]) but got 0x9b3ccccdc87e84b519e0cf6046cf0000b6973c1ba2c70f2b917df2c2dea2ee55
simple/yul_instructions/blockhash.sol::4::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("$BLOCK_HASH:255")]) but got 0x6745fe97aec02750f6721615a409dff08ca00b4071d2215df36144e778f6c796
simple/yul_instructions/returndatacopy.sol::41::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
simple/yul_instructions/returndatacopy.sol::41::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
simple/yul_instructions/revert.sol::59::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::59::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::60::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::60::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::61::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::61::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::75::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::75::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::197::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::197::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::200::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
simple/yul_instructions/revert.sol::200::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
simple/yul_instructions/revert.sol::202::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::202::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::205::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
simple/yul_instructions/revert.sol::205::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
simple/yul_instructions/revert.sol::207::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::207::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Output assertion failed - Expected Compound([CalldataItem("0xdeadbeef")]) but got 0x0000000000000000000000000000000000000000000000000000000000000000
simple/yul_instructions/revert.sol::210::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
simple/yul_instructions/revert.sol::210::Y+ Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("OutOfGas")
translated_semantic_tests/array/copying/array_nested_calldata_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/array_nested_calldata_to_storage/array_nested_calldata_to_storage.sol:2:1: 2 contract c { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/array_of_struct_calldata_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying of type struct C.S calldata[] calldata to storage is not supported in legacy (only supported by the IR pipeline). Hint: try compiling with `--via-ir` (CLI) or the equivalent `viaIR: true` (Standard JSON) --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/array_of_struct_calldata_to_storage/array_of_struct_calldata_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/array_of_struct_memory_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying of type struct C.S memory[] memory to storage is not supported in legacy (only supported by the IR pipeline). Hint: try compiling with `--via-ir` (CLI) or the equivalent `viaIR: true` (Standard JSON) --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/array_of_struct_memory_to_storage/array_of_struct_memory_to_storage.sol:1:1: 1 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/array_of_structs_containing_arrays_calldata_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying of type struct C.S calldata[] calldata to storage is not supported in legacy (only supported by the IR pipeline). Hint: try compiling with `--via-ir` (CLI) or the equivalent `viaIR: true` (Standard JSON) --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/array_of_structs_containing_arrays_calldata_to_storage/array_of_structs_containing_arrays_calldata_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/array_of_structs_containing_arrays_memory_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying of type struct C.S memory[] memory to storage is not supported in legacy (only supported by the IR pipeline). Hint: try compiling with `--via-ir` (CLI) or the equivalent `viaIR: true` (Standard JSON) --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/array_of_structs_containing_arrays_memory_to_storage/array_of_structs_containing_arrays_memory_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/calldata_array_to_mapping/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/calldata_array_to_mapping/calldata_array_to_mapping.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage/elements_of_nested_array_of_structs_calldata_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/elements_of_nested_array_of_structs_memory_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying of type struct C.S memory[1] memory to storage is not supported in legacy (only supported by the IR pipeline). Hint: try compiling with `--via-ir` (CLI) or the equivalent `viaIR: true` (Standard JSON) --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/elements_of_nested_array_of_structs_memory_to_storage/elements_of_nested_array_of_structs_memory_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/nested_array_of_structs_calldata_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/nested_array_of_structs_calldata_to_storage/nested_array_of_structs_calldata_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/nested_array_of_structs_memory_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying of type struct C.S memory[] memory to storage is not supported in legacy (only supported by the IR pipeline). Hint: try compiling with `--via-ir` (CLI) or the equivalent `viaIR: true` (Standard JSON) --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/nested_array_of_structs_memory_to_storage/nested_array_of_structs_memory_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/nested_array_of_structs_storage_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying of type struct C.S memory[1] memory to storage is not supported in legacy (only supported by the IR pipeline). Hint: try compiling with `--via-ir` (CLI) or the equivalent `viaIR: true` (Standard JSON) --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/nested_array_of_structs_storage_to_storage/nested_array_of_structs_storage_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/nested_array_of_structs_with_nested_array_from_storage_to_memory/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying of type struct C.S memory[] memory to storage is not supported in legacy (only supported by the IR pipeline). Hint: try compiling with `--via-ir` (CLI) or the equivalent `viaIR: true` (Standard JSON) --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/nested_array_of_structs_with_nested_array_from_storage_to_memory/nested_array_of_structs_with_nested_array_from_storage_to_memory.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/copying/nested_dynamic_array_element_calldata_to_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/copying/nested_dynamic_array_element_calldata_to_storage/nested_dynamic_array_element_calldata_to_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/nested_calldata_storage/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/nested_calldata_storage/nested_calldata_storage.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/array/nested_calldata_storage2/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator. --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/array/nested_calldata_storage2/nested_calldata_storage2.sol:2:1: 2 contract C { ^ (Relevant source part starts here and spans across multiple lines).
translated_semantic_tests/saltedCreate/prediction_example/test.json::0::Y- Failed to execute all of the steps on the driver: Failure on step 0: Function call step Failed: Failed to handle function call assertions: Transaction status assertion failed - Expected true but got false. Revert reason: Some("revert: Address mismatch.")
translated_semantic_tests/shanghai/evmone_support/test.json::0::Y- Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Encountered an error in the compilation: Error: LLVM IR generator: 306:17 The `EXTCODECOPY` instruction is not supported --> /__w/polkadot-sdk/polkadot-sdk/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/translated_semantic_tests/shanghai/evmone_support/evmone_support.sol

@0xRVE 0xRVE requested review from pgherveou and xermicus November 21, 2025 08:42
Comment on lines 236 to 237
let addr = H160::from_slice(&result.data[32 + 12..]);
let delegator_addr = H160::from_slice(&result.data[12..32]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we decode the results from the abi (apply else where if needed)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not find any abi_decode function for H160 specifically, figured this was just as easy

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean you can decode the return value with

let decoded = <Contract>::<method_name>Call::abi_decode_returns(&result.data).unwrap();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed it to this now:

		let decoded = TerminateCaller::delegateCallTerminateCall::abi_decode_returns(&result.data).unwrap();
		let addr = H160::from_slice(decoded._1.as_slice());

This is not much prettier, is there a better way to cast it to H160?

let delegator_addr = H160::from_slice(&result.data[12..32]);

assert_eq!(
get_balance(&DJANGO),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit could we use set_evm_balance evm_balance everywhere, make it's easier to follow the test without thinking about ed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ED is an important part of these tests so I prefer to keep it like this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's important, but it's already reflected in the calculation if we use evm_balance

Copy link
Contributor Author

@0xRVE 0xRVE Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tihnk it is better to have the ED explicit in the test

Copy link
Member

@xermicus xermicus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round: Some of the test code doesn't seem logical to me. I thought the goal is to align with EVM. Or am I missing something fundamental?

Copy link
Member

@xermicus xermicus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/19576205753
Failed job name: test-linux-stable-no-try-runtime

@pgherveou
Copy link
Contributor

We should add sol test like this one as well

to test that we can still call into a terminated contract, since the code / storage is destroyed at the end, but the balance is sent away directly.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

contract Child {
    uint256 public value;

    constructor(uint256 _value) payable {
        value = _value;
    }

    function getValue() public view returns (uint256, uint256) {
        return (value, address(this).balance);
    }

    function terminate() public {
        selfdestruct(payable(msg.sender));
    }
}

contract TerminateTest {
    Child public child;

    constructor() payable {
        child = new Child(42);
    }


    function terminate() public {
        child.terminate();
    }

    function tryCallAfterTerminate(bool redeploy) public returns (uint256, uint256) {
        if (redeploy) {
           child = new Child{value: 1 ether}(42);
        }
        child.terminate();

        try child.getValue() returns (uint256 val, uint256 bal) {
            return (val, bal);
        } catch Error(string memory reason) {
            revert(string.concat("getValue() failed: ", reason));
        } catch (bytes memory data) {
            revert(string.concat("getValue() failed with: ", string(data)));
        }
    }
}

@0xRVE 0xRVE merged commit 10d86c9 into at/fix-deposits Nov 24, 2025
251 of 254 checks passed
@0xRVE 0xRVE deleted the rve/fix-deposits branch November 24, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.