Skip to content

primitives: Refactor AbiEncodeWith::encode_to_slice#2676

Merged
cmichi merged 2 commits intomasterfrom
semakula/encode-to-slice
Oct 10, 2025
Merged

primitives: Refactor AbiEncodeWith::encode_to_slice#2676
cmichi merged 2 commits intomasterfrom
semakula/encode-to-slice

Conversation

@davidsemakula
Copy link
Collaborator

@davidsemakula davidsemakula commented Oct 10, 2025

Summary

Closes #_

  • [n] y/n | Does it introduce breaking changes?
  • [n] y/n | Is it dependent on a specific version of cargo-contract or pallet-revive?

Description

  • Non-allocating implementation of AbiEncodeWith::<Ink>::encode_to_slice

Checklist before requesting a review

  • I have added an entry to CHANGELOG.md
  • I have commented on my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules
@github-actions
Copy link

github-actions bot commented Oct 10, 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.673 18.413 -1.26 -5% 📉
./integration-tests/internal/call-builder-return-value 9.161 9.161 0 0%
./integration-tests/internal/e2e-runtime-only-backend 2.202 2.202 0 0%
./integration-tests/internal/lang-err/call-builder 8.474 8.191 -0.283 -2% 📉
./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 6.974 6.732 -0.242 -2% 📉
./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.204 2.204 0 0%
./integration-tests/internal/mother 16.511 15.034 -1.477 -8% 📉
./integration-tests/internal/overflow-safety 1.311 1.311 0 0%
./integration-tests/internal/own-code-hash 3.373 3.373 0 0%
./integration-tests/internal/sr25519-verification 0.853 0.853 0 0%
./integration-tests/internal/static-buffer 3.002 3.002 0 0%
./integration-tests/internal/storage-types 16.78 16.78 0 0%
./integration-tests/internal/system-precompile 2.314 2.314 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.291 7.952 -0.339 -3% 📉
./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.598 4.406 -0.192 -3% 📉
./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.736 2.736 0 0%
./integration-tests/public/cross-contract-calls 8.687 8.456 -0.231 -2% 📉
./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 2.726 -0.668 -19% 📉
./integration-tests/public/debugging-strategies 4.443 4.441 -0.002 0% 📉
./integration-tests/public/dns 10.42 10.094 -0.326 -2% 📉
./integration-tests/public/e2e-call-runtime 1.563 1.563 0 0%
./integration-tests/public/erc1155 20.962 20.74 -0.222 0% 📉
./integration-tests/public/erc20 10.898 10.458 -0.44 -3% 📉
./integration-tests/public/erc721 12.862 12.004 -0.858 -6% 📉
./integration-tests/public/events 8.873 8.456 -0.417 -4% 📉
./integration-tests/public/fallible-setter 2.631 2.631 0 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.726 5.726 0 0%
./integration-tests/public/multi-contract-caller 11.96 11.766 -0.194 -1% 📉
./integration-tests/public/multi-contract-caller/accumulator 1.134 1.134 0 0%
./integration-tests/public/multi-contract-caller/adder 3.169 3.09 -0.079 -1% 📉
./integration-tests/public/multi-contract-caller/subber 3.173 3.094 -0.079 -1% 📉
./integration-tests/public/multisig 27.499 27.537 0.038 0% 📈
./integration-tests/public/payment-channel 7.995 7.444 -0.551 -6% 📉
./integration-tests/public/precompile 7.627 7.627 0 0%
./integration-tests/public/runtime-call-contract 1.778 1.778 0 0%
./integration-tests/public/trait-dyn-cross-contract-calls 4.103 3.953 -0.15 -3% 📉
./integration-tests/public/trait-dyn-cross-contract-calls/contracts/incrementer 1.799 1.799 0 0%
./integration-tests/public/trait-erc20 11.226 10.857 -0.369 -2% 📉
./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.645 6.487 -0.158 -1% 📉
./integration-tests/public/upgradeable-contracts/delegator/delegatee 2.996 2.996 0 0%
./integration-tests/public/upgradeable-contracts/delegator/delegatee2 2.996 2.996 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.804 11.804 0 0%
./integration-tests/solidity-abi/sol-cross-contract 6.454 6.454 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.737 8.737 0 0%
./integration-tests/solidity-abi/trait-dyn-cross-contract-calls 5.672 5.672 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 - 19673 kb : a1, 0, 19673 pr default abi - 18413 kb : a1, 0, 18413 pr sol abi - 18413 kb : a2, 0, 18413 pr all abi - 18413 kb : a3, 0, 18413 #nbsp; : a4, 0, 0 section ./integration-tests/internal/call-builder-return-value : a5, 0, 0 v5 default abi - 8924 kb : a1, 0, 8924 master default abi - 9161 kb : a1, 0, 9161 pr default abi - 9161 kb : a1, 0, 9161 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 - 1925 kb : a1, 0, 1925 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 - 2612 kb : a1, 0, 2612 master default abi - 8474 kb : a1, 0, 8474 pr default abi - 8191 kb : a1, 0, 8191 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 - 2612 kb : a1, 0, 2612 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 - 2011 kb : a1, 0, 2011 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 - 5087 kb : a1, 0, 5087 master default abi - 6974 kb : a1, 0, 6974 pr default abi - 6732 kb : a1, 0, 6732 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 - 1910 kb : a1, 0, 1910 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 - 2204 kb : a1, 0, 2204 pr default abi - 2204 kb : a1, 0, 2204 pr sol abi - 2129 kb : a2, 0, 2129 pr all abi - 2333 kb : a3, 0, 2333 #nbsp; : a4, 0, 0 section ./integration-tests/internal/mother : a5, 0, 0 v5 default abi - 12681 kb : a1, 0, 12681 master default abi - 16511 kb : a1, 0, 16511 pr default abi - 15034 kb : a1, 0, 15034 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/own-code-hash : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 3373 kb : a1, 0, 3373 pr default abi - 3373 kb : a1, 0, 3373 pr sol abi - 2951 kb : a2, 0, 2951 pr all abi - 4056 kb : a3, 0, 4056 #nbsp; : a4, 0, 0 section ./integration-tests/internal/sr25519-verification : a5, 0, 0 v5 default abi - 1082 kb : a1, 0, 1082 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 - 3002 kb : a1, 0, 3002 pr default abi - 3002 kb : a1, 0, 3002 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 - 11369 kb : a1, 0, 11369 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 - 2314 kb : a1, 0, 2314 pr default abi - 2314 kb : a1, 0, 2314 pr sol abi - 2243 kb : a2, 0, 2243 pr all abi - 2772 kb : a3, 0, 2772 #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 - 7535 kb : a3, 0, 7535 #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 - 1460 kb : a1, 0, 1460 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 - 8291 kb : a1, 0, 8291 pr default abi - 7952 kb : a1, 0, 7952 pr sol abi - 10905 kb : a2, 0, 10905 pr all abi - 11825 kb : a3, 0, 11825 #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 - 4598 kb : a1, 0, 4598 pr default abi - 4406 kb : a1, 0, 4406 pr sol abi - 7068 kb : a2, 0, 7068 pr all abi - 6442 kb : a3, 0, 6442 #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 - 7459 kb : a1, 0, 7459 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 - 1314 kb : a1, 0, 1314 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 - 1520 kb : a1, 0, 1520 master default abi - 2736 kb : a1, 0, 2736 pr default abi - 2736 kb : a1, 0, 2736 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 - 7471 kb : a1, 0, 7471 master default abi - 8687 kb : a1, 0, 8687 pr default abi - 8456 kb : a1, 0, 8456 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 - 1591 kb : a1, 0, 1591 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 - 7993 kb : a1, 0, 7993 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 - 2062 kb : a1, 0, 2062 master default abi - 3394 kb : a1, 0, 3394 pr default abi - 2726 kb : a1, 0, 2726 pr sol abi - 1738 kb : a2, 0, 1738 pr all abi - 3167 kb : a3, 0, 3167 #nbsp; : a4, 0, 0 section ./integration-tests/public/debugging-strategies : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 4443 kb : a1, 0, 4443 pr default abi - 4441 kb : a1, 0, 4441 pr sol abi - 4819 kb : a2, 0, 4819 pr all abi - 5313 kb : a3, 0, 5313 #nbsp; : a4, 0, 0 section ./integration-tests/public/dns : a5, 0, 0 v5 default abi - 7142 kb : a1, 0, 7142 master default abi - 10420 kb : a1, 0, 10420 pr default abi - 10094 kb : a1, 0, 10094 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 - 1182 kb : a1, 0, 1182 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 - 14566 kb : a1, 0, 14566 master default abi - 20962 kb : a1, 0, 20962 pr default abi - 20740 kb : a1, 0, 20740 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 - 6993 kb : a1, 0, 6993 master default abi - 10898 kb : a1, 0, 10898 pr default abi - 10458 kb : a1, 0, 10458 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 - 9754 kb : a1, 0, 9754 master default abi - 12862 kb : a1, 0, 12862 pr default abi - 12004 kb : a1, 0, 12004 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 - 4955 kb : a1, 0, 4955 master default abi - 8873 kb : a1, 0, 8873 pr default abi - 8456 kb : a1, 0, 8456 pr sol abi - 12533 kb : a2, 0, 12533 pr all abi - 17686 kb : a3, 0, 17686 #nbsp; : a4, 0, 0 section ./integration-tests/public/fallible-setter : a5, 0, 0 v5 default abi - 0 kb : a1, 0, 0 master default abi - 2631 kb : a1, 0, 2631 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 - 1701 kb : a1, 0, 1701 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 - 1538 kb : a1, 0, 1538 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 - 5103 kb : a1, 0, 5103 master default abi - 5726 kb : a1, 0, 5726 pr default abi - 5726 kb : a1, 0, 5726 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 - 6420 kb : a1, 0, 6420 master default abi - 11960 kb : a1, 0, 11960 pr default abi - 11766 kb : a1, 0, 11766 pr sol abi - 15948 kb : a2, 0, 15948 pr all abi - 12819 kb : a3, 0, 12819 #nbsp; : a4, 0, 0 section ./integration-tests/public/multi-contract-caller/accumulator : a5, 0, 0 v5 default abi - 1363 kb : a1, 0, 1363 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 - 1733 kb : a1, 0, 1733 master default abi - 3169 kb : a1, 0, 3169 pr default abi - 3090 kb : a1, 0, 3090 pr sol abi - 4737 kb : a2, 0, 4737 pr all abi - 3367 kb : a3, 0, 3367 #nbsp; : a4, 0, 0 section ./integration-tests/public/multi-contract-caller/subber : a5, 0, 0 v5 default abi - 1751 kb : a1, 0, 1751 master default abi - 3173 kb : a1, 0, 3173 pr default abi - 3094 kb : a1, 0, 3094 pr sol abi - 4743 kb : a2, 0, 4743 pr all abi - 3379 kb : a3, 0, 3379 #nbsp; : a4, 0, 0 section ./integration-tests/public/multisig : a5, 0, 0 v5 default abi - 21135 kb : a1, 0, 21135 master default abi - 27499 kb : a1, 0, 27499 pr default abi - 27537 kb : a1, 0, 27537 pr sol abi - 0 kb : a2, 0, 0 pr all abi - 0 kb : a3, 0, 0 #nbsp; : a4, 0, 0 section ./integration-tests/public/payment-channel : a5, 0, 0 v5 default abi - 5720 kb : a1, 0, 5720 master default abi - 7995 kb : a1, 0, 7995 pr default abi - 7444 kb : a1, 0, 7444 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 - 7627 kb : a1, 0, 7627 pr default abi - 7627 kb : a1, 0, 7627 pr sol abi - 9393 kb : a2, 0, 9393 pr all abi - 10511 kb : a3, 0, 10511 #nbsp; : a4, 0, 0 section ./integration-tests/public/runtime-call-contract : a5, 0, 0 v5 default abi - 1592 kb : a1, 0, 1592 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 - 2808 kb : a1, 0, 2808 master default abi - 4103 kb : a1, 0, 4103 pr default abi - 3953 kb : a1, 0, 3953 pr sol abi - 5672 kb : a2, 0, 5672 pr all abi - 4380 kb : a3, 0, 4380 #nbsp; : a4, 0, 0 section ./integration-tests/public/trait-dyn-cross-contract-calls/contracts/incrementer : a5, 0, 0 v5 default abi - 1571 kb : a1, 0, 1571 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 - 7286 kb : a1, 0, 7286 master default abi - 11226 kb : a1, 0, 11226 pr default abi - 10857 kb : a1, 0, 10857 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 - 1460 kb : a1, 0, 1460 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 - 1630 kb : a1, 0, 1630 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 - 3869 kb : a1, 0, 3869 master default abi - 6645 kb : a1, 0, 6645 pr default abi - 6487 kb : a1, 0, 6487 pr sol abi - 9015 kb : a2, 0, 9015 pr all abi - 10942 kb : a3, 0, 10942 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/delegator/delegatee : a5, 0, 0 v5 default abi - 1652 kb : a1, 0, 1652 master default abi - 2996 kb : a1, 0, 2996 pr default abi - 2996 kb : a1, 0, 2996 pr sol abi - 2491 kb : a2, 0, 2491 pr all abi - 3284 kb : a3, 0, 3284 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/delegator/delegatee2 : a5, 0, 0 v5 default abi - 1652 kb : a1, 0, 1652 master default abi - 2996 kb : a1, 0, 2996 pr default abi - 2996 kb : a1, 0, 2996 pr sol abi - 2491 kb : a2, 0, 2491 pr all abi - 3285 kb : a3, 0, 3285 #nbsp; : a4, 0, 0 section ./integration-tests/public/upgradeable-contracts/set-code-hash : a5, 0, 0 v5 default abi - 1740 kb : a1, 0, 1740 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 - 1740 kb : a1, 0, 1740 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 - 1302 kb : a1, 0, 1302 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 - 1930 kb : a1, 0, 1930 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 - 1717 kb : a1, 0, 1717 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 - 3234 kb : a1, 0, 3234 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 - 11804 kb : a1, 0, 11804 pr default abi - 11804 kb : a1, 0, 11804 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 - 6454 kb : a1, 0, 6454 pr default abi - 6454 kb : a1, 0, 6454 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 - 8737 kb : a1, 0, 8737 pr default abi - 8737 kb : a1, 0, 8737 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 - 5672 kb : a1, 0, 5672 pr default abi - 5672 kb : a1, 0, 5672 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 18.413 18.413 0 0%
./integration-tests/internal/misc-hostfns 2.204 2.129 -0.075 -2% 📉
./integration-tests/internal/overflow-safety 1.311 2.173 0.862 66% 📈
./integration-tests/internal/own-code-hash 3.373 2.951 -0.422 -12% 📉
./integration-tests/internal/sr25519-verification 0.853 0.777 -0.076 -8% 📉
./integration-tests/internal/system-precompile 2.314 2.243 -0.071 -2% 📉
./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 7.952 10.905 2.953 37% 📈
./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.406 7.068 2.662 60% 📈
./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 2.726 1.738 -0.988 -35% 📉
./integration-tests/public/debugging-strategies 4.441 4.819 0.378 9% 📈
./integration-tests/public/e2e-call-runtime 1.563 1.436 -0.127 -7% 📉
./integration-tests/public/events 8.456 12.533 4.077 48% 📈
./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.766 15.948 4.182 36% 📈
./integration-tests/public/multi-contract-caller/accumulator 1.134 1.455 0.321 28% 📈
./integration-tests/public/multi-contract-caller/adder 3.09 4.737 1.647 53% 📈
./integration-tests/public/multi-contract-caller/subber 3.094 4.743 1.649 53% 📈
./integration-tests/public/precompile 7.627 9.393 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.953 5.672 1.719 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.487 9.015 2.528 39% 📈
./integration-tests/public/upgradeable-contracts/delegator/delegatee 2.996 2.491 -0.505 -16% 📉
./integration-tests/public/upgradeable-contracts/delegator/delegatee2 2.996 2.491 -0.505 -16% 📉
./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 18.413 18.413 0 0%
./integration-tests/internal/misc-hostfns 2.204 2.333 0.129 6% 📈
./integration-tests/internal/overflow-safety 1.311 2.671 1.36 104% 📈
./integration-tests/internal/own-code-hash 3.373 4.056 0.683 20% 📈
./integration-tests/internal/sr25519-verification 0.853 0.98 0.127 15% 📈
./integration-tests/internal/system-precompile 2.314 2.772 0.458 20% 📈
./integration-tests/public/bytes 4.847 7.535 2.688 55% 📈
./integration-tests/public/complex-storage-structures 4.857 9.14 4.283 88% 📈
./integration-tests/public/contract-invocation 7.952 11.825 3.873 49% 📈
./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.406 6.442 2.036 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.736 3.12 0.384 14% 📈
./integration-tests/public/cross-contract-calls/other-contract 1.775 2.361 0.586 33% 📈
./integration-tests/public/custom-environment 2.726 3.167 0.441 16% 📈
./integration-tests/public/debugging-strategies 4.441 5.313 0.872 20% 📈
./integration-tests/public/e2e-call-runtime 1.563 2.049 0.486 31% 📈
./integration-tests/public/events 8.456 17.686 9.23 109% 📈
./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.766 12.819 1.053 9% 📈
./integration-tests/public/multi-contract-caller/accumulator 1.134 2.013 0.879 78% 📈
./integration-tests/public/multi-contract-caller/adder 3.09 3.367 0.277 9% 📈
./integration-tests/public/multi-contract-caller/subber 3.094 3.379 0.285 9% 📈
./integration-tests/public/precompile 7.627 10.511 2.884 38% 📈
./integration-tests/public/runtime-call-contract 1.778 2.366 0.588 33% 📈
./integration-tests/public/trait-dyn-cross-contract-calls 3.953 4.38 0.427 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.487 10.942 4.455 69% 📈
./integration-tests/public/upgradeable-contracts/delegator/delegatee 2.996 3.284 0.288 10% 📈
./integration-tests/public/upgradeable-contracts/delegator/delegatee2 2.996 3.285 0.289 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 10 22:27:08 CEST 2025

@davidsemakula davidsemakula force-pushed the semakula/encode-to-slice branch from f2c3bbd to 7916b6e Compare October 10, 2025 19:27
@davidsemakula davidsemakula marked this pull request as ready for review October 10, 2025 20:19
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.

Nice, David! Stats also look good!

@cmichi cmichi merged commit 1f6baa0 into master Oct 10, 2025
36 checks passed
@cmichi cmichi deleted the semakula/encode-to-slice branch October 10, 2025 20:31
@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

2 participants