Skip to content

refactor: ink sandbox crate#2659

Merged
davidsemakula merged 9 commits intomasterfrom
refactor/ink_sandbox_crate
Oct 3, 2025
Merged

refactor: ink sandbox crate#2659
davidsemakula merged 9 commits intomasterfrom
refactor/ink_sandbox_crate

Conversation

@AlexD10S
Copy link
Member

@AlexD10S AlexD10S commented Sep 29, 2025

This PR continues the work from #2657 by removing all pallet_revive dependencies, except when the sandbox feature flag is enabled.

The goal is to extract the sandbox functionality into its own crate (ink_sandbox) instead of keeping it bundled inside ink_e2e.

It changes the current behaviour from:

[dev-dependencies] ink_e2e = { version = "v6.0.0-alpha.X", feature = "sandbox" }

to

[dev-dependencies] ink_e2e = { version = "v6.0.0-alpha.X" } ink_sandbox = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.X" }

In the tests you can also see the changes needed in the code when using sandbox, instead of:

#[ink_e2e::test(backend(runtime_only(sandbox = sandbox_runtime::ContractCallerSandbox)))]

now it becomes

#[ink_sandbox::test(backend(runtime_only(  sandbox = sandbox_runtime::ContractCallerSandbox,  client = ink_sandbox::SandboxClient )))]
@github-actions
Copy link

github-actions bot commented Sep 29, 2025

🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑

These are the results when building the integration-tests/* contracts from this branch and comparing them to ink! master:

Show overview

Using the ABI denoted in the contract manifest.

Contract Upstream Size (kB) PR Size (kB) Diff (kB) Diff (%) Change
./integration-tests/all-abi/events 19.671 19.671 0 0%
./integration-tests/internal/call-builder-return-value 9.162 9.162 0 0%
./integration-tests/internal/e2e-runtime-only-backend 2.202 2.202 0 0%
./integration-tests/internal/lang-err/call-builder 8.478 8.478 0 0%
./integration-tests/internal/lang-err/call-builder-delegate 3.6 3.6 0 0%
./integration-tests/internal/lang-err/constructors-return-value 2.442 2.442 0 0%
./integration-tests/internal/lang-err/contract-ref 7.007 7.007 0 0%
./integration-tests/internal/lang-err/integration-flipper 2.059 2.059 0 0%
./integration-tests/internal/mapping 10.621 10.621 0 0%
./integration-tests/internal/misc-hostfns 2.203 2.206 0.003 0% 📈
./integration-tests/internal/mother 16.506 16.506 0 0%
./integration-tests/internal/overflow-safety 1.311 1.311 0 0%
./integration-tests/internal/sr25519-verification 0.853 0.853 0 0%
./integration-tests/internal/static-buffer 2.76 2.76 0 0%
./integration-tests/internal/storage-types 16.78 16.78 0 0%
./integration-tests/internal/system-precompile 2.229 2.229 0 0%
./integration-tests/public/bytes 4.847 4.847 0 0%
./integration-tests/public/complex-storage-structures 4.857 4.857 0 0%
./integration-tests/public/conditional-compilation 1.727 1.727 0 0%
./integration-tests/public/contract-invocation 8.293 8.293 0 0%
./integration-tests/public/contract-invocation/contract1 2.081 2.081 0 0%
./integration-tests/public/contract-invocation/contract2 1.996 1.996 0 0%
./integration-tests/public/contract-invocation/virtual_contract 4.626 4.626 0 0%
./integration-tests/public/contract-invocation/virtual_contract_ver1 1.954 1.954 0 0%
./integration-tests/public/contract-invocation/virtual_contract_ver2 1.966 1.966 0 0%
./integration-tests/public/contract-storage 7.63 7.63 0 0%
./integration-tests/public/contract-terminate 1.551 1.551 0 0%
./integration-tests/public/contract-transfer 2.738 2.738 0 0%
./integration-tests/public/cross-contract-calls 8.719 8.718 -0.001 0% 📉
./integration-tests/public/cross-contract-calls/other-contract 1.775 1.775 0 0%
./integration-tests/public/custom-allocator 3.275 3.275 0 0%
./integration-tests/public/custom-environment 3.394 3.394 0 0%
./integration-tests/public/debugging-strategies 4.445 4.445 0 0%
./integration-tests/public/dns 10.423 10.423 0 0%
./integration-tests/public/e2e-call-runtime 1.563 1.563 0 0%
./integration-tests/public/erc1155 20.98 20.979 -0.001 0% 📉
./integration-tests/public/erc20 10.899 10.899 0 0%
./integration-tests/public/erc721 12.862 12.861 -0.001 0% 📉
./integration-tests/public/events 8.873 8.871 -0.002 0% 📉
./integration-tests/public/fallible-setter 2.632 2.631 -0.001 0% 📉
./integration-tests/public/flipper 1.775 1.775 0 0%
./integration-tests/public/fuzz-testing 1.762 1.762 0 0%
./integration-tests/public/incrementer 1.288 1.288 0 0%
./integration-tests/public/lazyvec 5.725 5.725 0 0%
./integration-tests/public/multi-contract-caller 11.926 11.926 0 0%
./integration-tests/public/multi-contract-caller/accumulator 1.134 1.134 0 0%
./integration-tests/public/multi-contract-caller/adder 3.169 3.169 0 0%
./integration-tests/public/multi-contract-caller/subber 3.173 3.173 0 0%
./integration-tests/public/multisig 27.517 27.517 0 0%
./integration-tests/public/own-code-hash 3.065 3.065 0 0%
./integration-tests/public/payment-channel 7.995 7.995 0 0%
./integration-tests/public/precompile 7.628 7.628 0 0%
./integration-tests/public/runtime-call-contract 1.778 1.778 0 0%
./integration-tests/public/trait-dyn-cross-contract-calls 3.96 3.96 0 0%
./integration-tests/public/trait-dyn-cross-contract-calls/contracts/incrementer 1.799 1.799 0 0%
./integration-tests/public/trait-erc20 11.227 11.224 -0.003 0% 📉
./integration-tests/public/trait-flipper 1.728 1.728 0 0%
./integration-tests/public/trait-incrementer 1.87 1.87 0 0%
./integration-tests/public/upgradeable-contracts/delegator 6.452 6.452 0 0%
./integration-tests/public/upgradeable-contracts/delegator/delegatee 2.849 2.849 0 0%
./integration-tests/public/upgradeable-contracts/delegator/delegatee2 2.849 2.849 0 0%
./integration-tests/public/upgradeable-contracts/set-code-hash 1.723 1.723 0 0%
./integration-tests/public/upgradeable-contracts/set-code-hash-migration 1.723 1.723 0 0%
./integration-tests/public/upgradeable-contracts/set-code-hash-migration/migration 1.877 1.877 0 0%
./integration-tests/public/upgradeable-contracts/set-code-hash-migration/updated-incrementer 1.901 1.901 0 0%
./integration-tests/public/upgradeable-contracts/set-code-hash/updated-incrementer 1.675 1.675 0 0%
./integration-tests/public/wildcard-selector 2.948 2.948 0 0%
./integration-tests/solidity-abi/events 11.813 11.805 -0.008 0% 📉
./integration-tests/solidity-abi/sol-cross-contract 6.456 6.456 0 0%
./integration-tests/solidity-abi/sol-cross-contract/other-contract-sol 2.138 2.138 0 0%
./integration-tests/solidity-abi/sol-encoding 2.063 2.063 0 0%
./integration-tests/solidity-abi/solidity-calls-flipper 8.738 8.738 0 0%
./integration-tests/solidity-abi/trait-dyn-cross-contract-calls 5.673 5.673 0 0%
./integration-tests/solidity-abi/trait-dyn-cross-contract-calls/contracts/incrementer 1.651 1.651 0 0%
./integration-tests/solidity-abi/trait-flipper 1.389 1.389 0 0%
Show diagram
gantt dateFormat x axisFormat x section ./integration-tests/all-abi/events : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 19671 kb : a1, 0, 19671 pr default abi - 19671 kb : a1, 0, 19671 pr sol abi - 19671 kb : a2, 0, 19671 pr all abi - 19671 kb : a3, 0, 19671 #nbsp; : a4, 0, 0 section ./integration-tests/internal/call-builder-return-value : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 9162 kb : a1, 0, 9162 pr default abi - 9162 kb : a1, 0, 9162 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/e2e-runtime-only-backend : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2202 kb : a1, 0, 2202 pr default abi - 2202 kb : a1, 0, 2202 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/lang-err/call-builder : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 8478 kb : a1, 0, 8478 pr default abi - 8478 kb : a1, 0, 8478 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/lang-err/call-builder-delegate : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 3600 kb : a1, 0, 3600 pr default abi - 3600 kb : a1, 0, 3600 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/lang-err/constructors-return-value : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2442 kb : a1, 0, 2442 pr default abi - 2442 kb : a1, 0, 2442 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/lang-err/contract-ref : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 7007 kb : a1, 0, 7007 pr default abi - 7007 kb : a1, 0, 7007 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/lang-err/integration-flipper : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2059 kb : a1, 0, 2059 pr default abi - 2059 kb : a1, 0, 2059 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/mapping : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 10621 kb : a1, 0, 10621 pr default abi - 10621 kb : a1, 0, 10621 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/misc-hostfns : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2203 kb : a1, 0, 2203 pr default abi - 2206 kb : a1, 0, 2206 pr sol abi - 2131 kb : a2, 0, 2131 pr all abi - 2330 kb : a3, 0, 2330 #nbsp; : a4, 0, 0 section ./integration-tests/internal/mother : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 16506 kb : a1, 0, 16506 pr default abi - 16506 kb : a1, 0, 16506 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/overflow-safety : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1311 kb : a1, 0, 1311 pr default abi - 1311 kb : a1, 0, 1311 pr sol abi - 2173 kb : a2, 0, 2173 pr all abi - 2671 kb : a3, 0, 2671 #nbsp; : a4, 0, 0 section ./integration-tests/internal/sr25519-verification : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 853 kb : a1, 0, 853 pr default abi - 853 kb : a1, 0, 853 pr sol abi - 777 kb : a2, 0, 777 pr all abi - 980 kb : a3, 0, 980 #nbsp; : a4, 0, 0 section ./integration-tests/internal/static-buffer : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2760 kb : a1, 0, 2760 pr default abi - 2760 kb : a1, 0, 2760 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/storage-types : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 16780 kb : a1, 0, 16780 pr default abi - 16780 kb : a1, 0, 16780 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/internal/system-precompile : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2229 kb : a1, 0, 2229 pr default abi - 2229 kb : a1, 0, 2229 pr sol abi - 2089 kb : a2, 0, 2089 pr all abi - 2690 kb : a3, 0, 2690 #nbsp; : a4, 0, 0 section ./integration-tests/public/bytes : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 4847 kb : a1, 0, 4847 pr default abi - 4847 kb : a1, 0, 4847 pr sol abi - 4847 kb : a2, 0, 4847 pr all abi - 8361 kb : a3, 0, 8361 #nbsp; : a4, 0, 0 section ./integration-tests/public/complex-storage-structures : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 4857 kb : a1, 0, 4857 pr default abi - 4857 kb : a1, 0, 4857 pr sol abi - 7499 kb : a2, 0, 7499 pr all abi - 9140 kb : a3, 0, 9140 #nbsp; : a4, 0, 0 section ./integration-tests/public/conditional-compilation : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1727 kb : a1, 0, 1727 pr default abi - 1727 kb : a1, 0, 1727 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-invocation : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 8293 kb : a1, 0, 8293 pr default abi - 8293 kb : a1, 0, 8293 pr sol abi - 10905 kb : a2, 0, 10905 pr all abi - 12265 kb : a3, 0, 12265 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-invocation/contract1 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2081 kb : a1, 0, 2081 pr default abi - 2081 kb : a1, 0, 2081 pr sol abi - 2138 kb : a2, 0, 2138 pr all abi - 2892 kb : a3, 0, 2892 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-invocation/contract2 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1996 kb : a1, 0, 1996 pr default abi - 1996 kb : a1, 0, 1996 pr sol abi - 2102 kb : a2, 0, 2102 pr all abi - 2782 kb : a3, 0, 2782 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-invocation/virtual_contract : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 4626 kb : a1, 0, 4626 pr default abi - 4626 kb : a1, 0, 4626 pr sol abi - 7067 kb : a2, 0, 7067 pr all abi - 6771 kb : a3, 0, 6771 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-invocation/virtual_contract_ver1 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1954 kb : a1, 0, 1954 pr default abi - 1954 kb : a1, 0, 1954 pr sol abi - 2127 kb : a2, 0, 2127 pr all abi - 2521 kb : a3, 0, 2521 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-invocation/virtual_contract_ver2 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1966 kb : a1, 0, 1966 pr default abi - 1966 kb : a1, 0, 1966 pr sol abi - 2139 kb : a2, 0, 2139 pr all abi - 2547 kb : a3, 0, 2547 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-storage : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 7630 kb : a1, 0, 7630 pr default abi - 7630 kb : a1, 0, 7630 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-terminate : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1551 kb : a1, 0, 1551 pr default abi - 1551 kb : a1, 0, 1551 pr sol abi - 1517 kb : a2, 0, 1517 pr all abi - 1646 kb : a3, 0, 1646 #nbsp; : a4, 0, 0 section ./integration-tests/public/contract-transfer : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2738 kb : a1, 0, 2738 pr default abi - 2738 kb : a1, 0, 2738 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 3120 kb : a3, 0, 3120 #nbsp; : a4, 0, 0 section ./integration-tests/public/cross-contract-calls : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 8719 kb : a1, 0, 8719 pr default abi - 8718 kb : a1, 0, 8718 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/cross-contract-calls/other-contract : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1775 kb : a1, 0, 1775 pr default abi - 1775 kb : a1, 0, 1775 pr sol abi - 1550 kb : a2, 0, 1550 pr all abi - 2361 kb : a3, 0, 2361 #nbsp; : a4, 0, 0 section ./integration-tests/public/custom-allocator : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 3275 kb : a1, 0, 3275 pr default abi - 3275 kb : a1, 0, 3275 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/custom-environment : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 3394 kb : a1, 0, 3394 pr default abi - 3394 kb : a1, 0, 3394 pr sol abi - 1738 kb : a2, 0, 1738 pr all abi - 3845 kb : a3, 0, 3845 #nbsp; : a4, 0, 0 section ./integration-tests/public/debugging-strategies : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 4445 kb : a1, 0, 4445 pr default abi - 4445 kb : a1, 0, 4445 pr sol abi - 4822 kb : a2, 0, 4822 pr all abi - 5208 kb : a3, 0, 5208 #nbsp; : a4, 0, 0 section ./integration-tests/public/dns : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 10423 kb : a1, 0, 10423 pr default abi - 10423 kb : a1, 0, 10423 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/e2e-call-runtime : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1563 kb : a1, 0, 1563 pr default abi - 1563 kb : a1, 0, 1563 pr sol abi - 1436 kb : a2, 0, 1436 pr all abi - 2049 kb : a3, 0, 2049 #nbsp; : a4, 0, 0 section ./integration-tests/public/erc1155 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 20980 kb : a1, 0, 20980 pr default abi - 20979 kb : a1, 0, 20979 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/erc20 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 10899 kb : a1, 0, 10899 pr default abi - 10899 kb : a1, 0, 10899 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/erc721 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 12862 kb : a1, 0, 12862 pr default abi - 12861 kb : a1, 0, 12861 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/events : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 8873 kb : a1, 0, 8873 pr default abi - 8871 kb : a1, 0, 8871 pr sol abi - 12532 kb : a2, 0, 12532 pr all abi - 18938 kb : a3, 0, 18938 #nbsp; : a4, 0, 0 section ./integration-tests/public/fallible-setter : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2632 kb : a1, 0, 2632 pr default abi - 2631 kb : a1, 0, 2631 pr sol abi - 2631 kb : a2, 0, 2631 pr all abi - 3172 kb : a3, 0, 3172 #nbsp; : a4, 0, 0 section ./integration-tests/public/flipper : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1775 kb : a1, 0, 1775 pr default abi - 1775 kb : a1, 0, 1775 pr sol abi - 1550 kb : a2, 0, 1550 pr all abi - 2361 kb : a3, 0, 2361 #nbsp; : a4, 0, 0 section ./integration-tests/public/fuzz-testing : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1762 kb : a1, 0, 1762 pr default abi - 1762 kb : a1, 0, 1762 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/incrementer : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1288 kb : a1, 0, 1288 pr default abi - 1288 kb : a1, 0, 1288 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/lazyvec : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 5725 kb : a1, 0, 5725 pr default abi - 5725 kb : a1, 0, 5725 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/multi-contract-caller : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 11926 kb : a1, 0, 11926 pr default abi - 11926 kb : a1, 0, 11926 pr sol abi - 15904 kb : a2, 0, 15904 pr all abi - 12983 kb : a3, 0, 12983 #nbsp; : a4, 0, 0 section ./integration-tests/public/multi-contract-caller/accumulator : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1134 kb : a1, 0, 1134 pr default abi - 1134 kb : a1, 0, 1134 pr sol abi - 1455 kb : a2, 0, 1455 pr all abi - 2013 kb : a3, 0, 2013 #nbsp; : a4, 0, 0 section ./integration-tests/public/multi-contract-caller/adder : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 3169 kb : a1, 0, 3169 pr default abi - 3169 kb : a1, 0, 3169 pr sol abi - 4742 kb : a2, 0, 4742 pr all abi - 3442 kb : a3, 0, 3442 #nbsp; : a4, 0, 0 section ./integration-tests/public/multi-contract-caller/subber : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 3173 kb : a1, 0, 3173 pr default abi - 3173 kb : a1, 0, 3173 pr sol abi - 4750 kb : a2, 0, 4750 pr all abi - 3461 kb : a3, 0, 3461 #nbsp; : a4, 0, 0 section ./integration-tests/public/multisig : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 27517 kb : a1, 0, 27517 pr default abi - 27517 kb : a1, 0, 27517 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/own-code-hash : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 3065 kb : a1, 0, 3065 pr default abi - 3065 kb : a1, 0, 3065 pr sol abi - 2587 kb : a2, 0, 2587 pr all abi - 3287 kb : a3, 0, 3287 #nbsp; : a4, 0, 0 section ./integration-tests/public/payment-channel : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 7995 kb : a1, 0, 7995 pr default abi - 7995 kb : a1, 0, 7995 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/precompile : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 7628 kb : a1, 0, 7628 pr default abi - 7628 kb : a1, 0, 7628 pr sol abi - 9394 kb : a2, 0, 9394 pr all abi - 10513 kb : a3, 0, 10513 #nbsp; : a4, 0, 0 section ./integration-tests/public/runtime-call-contract : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1778 kb : a1, 0, 1778 pr default abi - 1778 kb : a1, 0, 1778 pr sol abi - 1550 kb : a2, 0, 1550 pr all abi - 2366 kb : a3, 0, 2366 #nbsp; : a4, 0, 0 section ./integration-tests/public/trait-dyn-cross-contract-calls : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 3960 kb : a1, 0, 3960 pr default abi - 3960 kb : a1, 0, 3960 pr sol abi - 5673 kb : a2, 0, 5673 pr all abi - 4386 kb : a3, 0, 4386 #nbsp; : a4, 0, 0 section ./integration-tests/public/trait-dyn-cross-contract-calls/contracts/incrementer : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1799 kb : a1, 0, 1799 pr default abi - 1799 kb : a1, 0, 1799 pr sol abi - 1651 kb : a2, 0, 1651 pr all abi - 2448 kb : a3, 0, 2448 #nbsp; : a4, 0, 0 section ./integration-tests/public/trait-erc20 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 11227 kb : a1, 0, 11227 pr default abi - 11224 kb : a1, 0, 11224 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/trait-flipper : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1728 kb : a1, 0, 1728 pr default abi - 1728 kb : a1, 0, 1728 pr sol abi - 1389 kb : a2, 0, 1389 pr all abi - 2128 kb : a3, 0, 2128 #nbsp; : a4, 0, 0 section ./integration-tests/public/trait-incrementer : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1870 kb : a1, 0, 1870 pr default abi - 1870 kb : a1, 0, 1870 pr sol abi - 1820 kb : a2, 0, 1820 pr all abi - 2702 kb : a3, 0, 2702 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/delegator : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 6452 kb : a1, 0, 6452 pr default abi - 6452 kb : a1, 0, 6452 pr sol abi - 9014 kb : a2, 0, 9014 pr all abi - 10907 kb : a3, 0, 10907 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/delegator/delegatee : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2849 kb : a1, 0, 2849 pr default abi - 2849 kb : a1, 0, 2849 pr sol abi - 2320 kb : a2, 0, 2320 pr all abi - 3141 kb : a3, 0, 3141 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/delegator/delegatee2 : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2849 kb : a1, 0, 2849 pr default abi - 2849 kb : a1, 0, 2849 pr sol abi - 2321 kb : a2, 0, 2321 pr all abi - 3140 kb : a3, 0, 3140 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/set-code-hash : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1723 kb : a1, 0, 1723 pr default abi - 1723 kb : a1, 0, 1723 pr sol abi - 2035 kb : a2, 0, 2035 pr all abi - 2642 kb : a3, 0, 2642 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/set-code-hash-migration : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1723 kb : a1, 0, 1723 pr default abi - 1723 kb : a1, 0, 1723 pr sol abi - 2035 kb : a2, 0, 2035 pr all abi - 2642 kb : a3, 0, 2642 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/set-code-hash-migration/migration : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1877 kb : a1, 0, 1877 pr default abi - 1877 kb : a1, 0, 1877 pr sol abi - 2616 kb : a2, 0, 2616 pr all abi - 2584 kb : a3, 0, 2584 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/set-code-hash-migration/updated-incrementer : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1901 kb : a1, 0, 1901 pr default abi - 1901 kb : a1, 0, 1901 pr sol abi - 2600 kb : a2, 0, 2600 pr all abi - 3098 kb : a3, 0, 3098 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/set-code-hash/updated-incrementer : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1675 kb : a1, 0, 1675 pr default abi - 1675 kb : a1, 0, 1675 pr sol abi - 2024 kb : a2, 0, 2024 pr all abi - 2581 kb : a3, 0, 2581 #nbsp; : a4, 0, 0 section ./integration-tests/public/wildcard-selector : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2948 kb : a1, 0, 2948 pr default abi - 2948 kb : a1, 0, 2948 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 5211 kb : a3, 0, 5211 #nbsp; : a4, 0, 0 section ./integration-tests/solidity-abi/events : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 11813 kb : a1, 0, 11813 pr default abi - 11805 kb : a1, 0, 11805 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/solidity-abi/sol-cross-contract : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 6456 kb : a1, 0, 6456 pr default abi - 6456 kb : a1, 0, 6456 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/solidity-abi/sol-cross-contract/other-contract-sol : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2138 kb : a1, 0, 2138 pr default abi - 2138 kb : a1, 0, 2138 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/solidity-abi/sol-encoding : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2063 kb : a1, 0, 2063 pr default abi - 2063 kb : a1, 0, 2063 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/solidity-abi/solidity-calls-flipper : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 8738 kb : a1, 0, 8738 pr default abi - 8738 kb : a1, 0, 8738 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/solidity-abi/trait-dyn-cross-contract-calls : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 5673 kb : a1, 0, 5673 pr default abi - 5673 kb : a1, 0, 5673 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/solidity-abi/trait-dyn-cross-contract-calls/contracts/incrementer : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1651 kb : a1, 0, 1651 pr default abi - 1651 kb : a1, 0, 1651 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/solidity-abi/trait-flipper : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 1389 kb : a1, 0, 1389 pr default abi - 1389 kb : a1, 0, 1389 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 
Loading
Show contract sizes: ink! vs Solidity ABI

The following table shows how the contract sizes on this branch change when choosing the Solidity ABI instead of the ink! ABI.

Contract Upstream Size (kB) PR Size (kB) Diff (kB) Diff (%) Change
./integration-tests/all-abi/events 19.671 19.671 0 0%
./integration-tests/internal/misc-hostfns 2.206 2.131 -0.075 -2% 📉
./integration-tests/internal/overflow-safety 1.311 2.173 0.862 66% 📈
./integration-tests/internal/sr25519-verification 0.853 0.777 -0.076 -8% 📉
./integration-tests/internal/system-precompile 2.229 2.089 -0.14 -5% 📉
./integration-tests/public/bytes 4.847 4.847 0 0%
./integration-tests/public/complex-storage-structures 4.857 7.499 2.642 54% 📈
./integration-tests/public/contract-invocation 8.293 10.905 2.612 31% 📈
./integration-tests/public/contract-invocation/contract1 2.081 2.138 0.057 3% 📈
./integration-tests/public/contract-invocation/contract2 1.996 2.102 0.106 5% 📈
./integration-tests/public/contract-invocation/virtual_contract 4.626 7.067 2.441 53% 📈
./integration-tests/public/contract-invocation/virtual_contract_ver1 1.954 2.127 0.173 9% 📈
./integration-tests/public/contract-invocation/virtual_contract_ver2 1.966 2.139 0.173 9% 📈
./integration-tests/public/contract-terminate 1.551 1.517 -0.034 -1% 📉
./integration-tests/public/cross-contract-calls/other-contract 1.775 1.55 -0.225 -12% 📉
./integration-tests/public/custom-environment 3.394 1.738 -1.656 -48% 📉
./integration-tests/public/debugging-strategies 4.445 4.822 0.377 8% 📈
./integration-tests/public/e2e-call-runtime 1.563 1.436 -0.127 -7% 📉
./integration-tests/public/events 8.871 12.532 3.661 41% 📈
./integration-tests/public/fallible-setter 2.631 2.631 0 0%
./integration-tests/public/flipper 1.775 1.55 -0.225 -12% 📉
./integration-tests/public/multi-contract-caller 11.926 15.904 3.978 33% 📈
./integration-tests/public/multi-contract-caller/accumulator 1.134 1.455 0.321 28% 📈
./integration-tests/public/multi-contract-caller/adder 3.169 4.742 1.573 50% 📈
./integration-tests/public/multi-contract-caller/subber 3.173 4.75 1.577 50% 📈
./integration-tests/public/own-code-hash 3.065 2.587 -0.478 -15% 📉
./integration-tests/public/precompile 7.628 9.394 1.766 23% 📈
./integration-tests/public/runtime-call-contract 1.778 1.55 -0.228 -12% 📉
./integration-tests/public/trait-dyn-cross-contract-calls 3.96 5.673 1.713 43% 📈
./integration-tests/public/trait-dyn-cross-contract-calls/contracts/incrementer 1.799 1.651 -0.148 -7% 📉
./integration-tests/public/trait-flipper 1.728 1.389 -0.339 -19% 📉
./integration-tests/public/trait-incrementer 1.87 1.82 -0.05 -2% 📉
./integration-tests/public/upgradeable-contracts/delegator 6.452 9.014 2.562 40% 📈
./integration-tests/public/upgradeable-contracts/delegator/delegatee 2.849 2.32 -0.529 -18% 📉
./integration-tests/public/upgradeable-contracts/delegator/delegatee2 2.849 2.321 -0.528 -18% 📉
./integration-tests/public/upgradeable-contracts/set-code-hash 1.723 2.035 0.312 18% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash-migration 1.723 2.035 0.312 18% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash-migration/migration 1.877 2.616 0.739 39% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash-migration/updated-incrementer 1.901 2.6 0.699 37% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash/updated-incrementer 1.675 2.024 0.349 21% 📈
Show contract sizes: ink! vs all ABI

The following table shows how the contract sizes on this branch change when choosing the all ABI instead of the ink! ABI.

Contract Upstream Size (kB) PR Size (kB) Diff (kB) Diff (%) Change
./integration-tests/all-abi/events 19.671 19.671 0 0%
./integration-tests/internal/misc-hostfns 2.206 2.33 0.124 6% 📈
./integration-tests/internal/overflow-safety 1.311 2.671 1.36 104% 📈
./integration-tests/internal/sr25519-verification 0.853 0.98 0.127 15% 📈
./integration-tests/internal/system-precompile 2.229 2.69 0.461 21% 📈
./integration-tests/public/bytes 4.847 8.361 3.514 72% 📈
./integration-tests/public/complex-storage-structures 4.857 9.14 4.283 88% 📈
./integration-tests/public/contract-invocation 8.293 12.265 3.972 48% 📈
./integration-tests/public/contract-invocation/contract1 2.081 2.892 0.811 39% 📈
./integration-tests/public/contract-invocation/contract2 1.996 2.782 0.786 39% 📈
./integration-tests/public/contract-invocation/virtual_contract 4.626 6.771 2.145 46% 📈
./integration-tests/public/contract-invocation/virtual_contract_ver1 1.954 2.521 0.567 29% 📈
./integration-tests/public/contract-invocation/virtual_contract_ver2 1.966 2.547 0.581 30% 📈
./integration-tests/public/contract-terminate 1.551 1.646 0.095 6% 📈
./integration-tests/public/contract-transfer 2.738 3.12 0.382 14% 📈
./integration-tests/public/cross-contract-calls/other-contract 1.775 2.361 0.586 33% 📈
./integration-tests/public/custom-environment 3.394 3.845 0.451 13% 📈
./integration-tests/public/debugging-strategies 4.445 5.208 0.763 17% 📈
./integration-tests/public/e2e-call-runtime 1.563 2.049 0.486 31% 📈
./integration-tests/public/events 8.871 18.938 10.067 113% 📈
./integration-tests/public/fallible-setter 2.631 3.172 0.541 21% 📈
./integration-tests/public/flipper 1.775 2.361 0.586 33% 📈
./integration-tests/public/multi-contract-caller 11.926 12.983 1.057 9% 📈
./integration-tests/public/multi-contract-caller/accumulator 1.134 2.013 0.879 78% 📈
./integration-tests/public/multi-contract-caller/adder 3.169 3.442 0.273 9% 📈
./integration-tests/public/multi-contract-caller/subber 3.173 3.461 0.288 9% 📈
./integration-tests/public/own-code-hash 3.065 3.287 0.222 7% 📈
./integration-tests/public/precompile 7.628 10.513 2.885 38% 📈
./integration-tests/public/runtime-call-contract 1.778 2.366 0.588 33% 📈
./integration-tests/public/trait-dyn-cross-contract-calls 3.96 4.386 0.426 11% 📈
./integration-tests/public/trait-dyn-cross-contract-calls/contracts/incrementer 1.799 2.448 0.649 36% 📈
./integration-tests/public/trait-flipper 1.728 2.128 0.4 23% 📈
./integration-tests/public/trait-incrementer 1.87 2.702 0.832 44% 📈
./integration-tests/public/upgradeable-contracts/delegator 6.452 10.907 4.455 69% 📈
./integration-tests/public/upgradeable-contracts/delegator/delegatee 2.849 3.141 0.292 10% 📈
./integration-tests/public/upgradeable-contracts/delegator/delegatee2 2.849 3.14 0.291 10% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash 1.723 2.642 0.919 53% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash-migration 1.723 2.642 0.919 53% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash-migration/migration 1.877 2.584 0.707 38% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash-migration/updated-incrementer 1.901 3.098 1.197 63% 📈
./integration-tests/public/upgradeable-contracts/set-code-hash/updated-incrementer 1.675 2.581 0.906 54% 📈
./integration-tests/public/wildcard-selector 2.948 5.211 2.263 77% 📈

Link to the run | Last update: Fri Oct 3 10:58:57 CEST 2025

/// testing framework with this syntax:
///
/// ```
/// ```no_compile
Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't have ink_sandbox as dependency so it doesn't compile

Copy link
Collaborator

Choose a reason for hiding this comment

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

You could make ink_sandbox a dev-dependency?

#[darling(skip)]
Default,
Sandbox(syn::Path),
pub struct RuntimeOnly {
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a bit tricky: since we don’t want to import ink_sandbox in this crate, we can’t provide it as a default. It always has to be specified explicitly by the user.

Copy link
Collaborator

@davidsemakula davidsemakula Oct 3, 2025

Choose a reason for hiding this comment

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

The ink_e2e machinery already has a good look at the manifest (or more specifically cargo metadata) to do stuff like compiling the root contract and it's contract dependencies (if any) (see here and here).
So we can do something there to bring back defaults (after this PR), while also providing user friendly errors when ink_sandbox is missing.
I'm already planning to do something similar for when the user runs cargo test (not ABI aware) instead of cargo contract test (ABI aware), so I can look at this as well while doing that.

@AlexD10S AlexD10S marked this pull request as ready for review October 1, 2025 08:33
Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this refactor! Besides this one tiny nit and adding a changelog entry it looks good to me.

I think it makes the whole testing story way clearer. Could you also take care of updating ink-docs afterwards (also the migration guide)?

@AlexD10S AlexD10S force-pushed the refactor/ink_sandbox_crate branch from 4f2df7b to 089a60e Compare October 3, 2025 07:59
Copy link
Collaborator

@davidsemakula davidsemakula left a comment

Choose a reason for hiding this comment

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

Very nice!
I think we can bring back the runtime_only defaults in a follow up (see comment)

@davidsemakula davidsemakula merged commit 7033981 into master Oct 3, 2025
36 checks passed
@davidsemakula davidsemakula deleted the refactor/ink_sandbox_crate branch October 3, 2025 10:01
@cmichi cmichi mentioned this pull request Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants