-
Notifications
You must be signed in to change notification settings - Fork 474
test: assets precompile integration test #2686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| #[ink_sandbox::test(backend(runtime_only( | ||
| sandbox = ink_sandbox::DefaultSandbox, | ||
| client = ink_sandbox::SandboxClient | ||
| )))] | ||
| async fn deployment_works<Client: E2EBackend>(mut client: Client) -> E2EResult<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a follow PR I would like to refactor some of the code so that the selected code will look like:
#[ink_runtime::test]
fn deployment_works(mut client: Client) -> E2EResult<()> {
Then it will be possible to provide a custom runtime by devs: #[ink_runtime::test(CustomSandbox)]
The sandbox terminology is complicated in my opinion and tmo we should use runtime. I could not find a reason for a custom client so that should be made the default, as well as the sandbox if the user doesn't want to add a sandbox (which will be 90% of the time because we will mimic the DefaultSandbox with the asset hub runtime)
In addition, integration tests using the runtime are not async, and can be simplified a lot.
Curious what you guys think of this @davidsemakula & @cmichi
| let mut constructor = | ||
| asset_hub_precompile::AssetHubPrecompileRef::new(asset_id); | ||
|
|
||
| let contract = client | ||
| .instantiate("assets_precompile", &ink_e2e::alice(), &mut constructor) | ||
| .value(1_000_000_000_000u128) // Transfer native tokens to contract | ||
| .submit() | ||
| .await | ||
| .expect("instantiate failed"); | ||
|
|
||
| let call_builder = | ||
| contract.call_builder::<asset_hub_precompile::AssetHubPrecompile>(); | ||
| let asset_id_call = call_builder.asset_id(); | ||
| let result = client | ||
| .call(&ink_e2e::alice(), &asset_id_call) | ||
| .dry_run() | ||
| .await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a future PR I would also like to simplify this, so much code for deploying and calling a contract, must be able to make easier.
| // Show error case with transferring too many tokens. | ||
| let transfer = call_builder.transfer(bob_address, ink::U256::from(1_000_000)); | ||
| let result = client.call(&ink_e2e::alice(), &transfer).submit().await?; | ||
| assert_eq!(result.extract_error(), Some("BalanceLow".to_string())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found out that much better error is obtained from the calltrace in stead of the data. This is a function I quickly made that extracts the calltrace error.
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑These are the results when building the Show overviewUsing the ABI denoted in the contract manifest.
Show diagramgantt
dateFormat x
axisFormat x
section
./integration-tests/all-abi/events : a5, 0, 0
v5 default abi - 0 kb : a1, 0, 0
master default abi - 18398 kb : a1, 0, 18398
pr default abi - 18398 kb : a1, 0, 18398
pr sol abi - 18398 kb : a2, 0, 18398
pr all abi - 18398 kb : a3, 0, 18398
#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 - 8191 kb : a1, 0, 8191
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 - 6732 kb : a1, 0, 6732
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 - 10624 kb : a1, 0, 10624
pr default abi - 10624 kb : a1, 0, 10624
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 - 2332 kb : a3, 0, 2332
#nbsp; : a4, 0, 0
section
./integration-tests/internal/mother : a5, 0, 0
v5 default abi - 12681 kb : a1, 0, 12681
master default abi - 15034 kb : a1, 0, 15034
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 - 4055 kb : a3, 0, 4055
#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 - 3003 kb : a1, 0, 3003
pr default abi - 3003 kb : a1, 0, 3003
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 - 16777 kb : a1, 0, 16777
pr default abi - 16777 kb : a1, 0, 16777
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 - 7952 kb : a1, 0, 7952
pr default abi - 7952 kb : a1, 0, 7952
pr sol abi - 8741 kb : a2, 0, 8741
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 - 2784 kb : a3, 0, 2784
#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 - 4406 kb : a1, 0, 4406
pr default abi - 4406 kb : a1, 0, 4406
pr sol abi - 5538 kb : a2, 0, 5538
pr all abi - 6443 kb : a3, 0, 6443
#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 - 8457 kb : a1, 0, 8457
pr default abi - 8457 kb : a1, 0, 8457
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 - 2726 kb : a1, 0, 2726
pr default abi - 2726 kb : a1, 0, 2726
pr sol abi - 1738 kb : a2, 0, 1738
pr all abi - 3168 kb : a3, 0, 3168
#nbsp; : a4, 0, 0
section
./integration-tests/public/debugging-strategies : a5, 0, 0
v5 default abi - 0 kb : a1, 0, 0
master default abi - 4441 kb : a1, 0, 4441
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 - 10094 kb : a1, 0, 10094
pr default abi - 10094 kb : a1, 0, 10094
pr sol abi - 10392 kb : a2, 0, 10392
pr all abi - 14216 kb : a3, 0, 14216
#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 - 20740 kb : a1, 0, 20740
pr default abi - 20740 kb : a1, 0, 20740
pr sol abi - 0 kb : a2, 0, 0
pr all abi - 35509 kb : a3, 0, 35509
#nbsp; : a4, 0, 0
section
./integration-tests/public/erc20 : a5, 0, 0
v5 default abi - 6993 kb : a1, 0, 6993
master default abi - 10457 kb : a1, 0, 10457
pr default abi - 10457 kb : a1, 0, 10457
pr sol abi - 12477 kb : a2, 0, 12477
pr all abi - 17292 kb : a3, 0, 17292
#nbsp; : a4, 0, 0
section
./integration-tests/public/erc721 : a5, 0, 0
v5 default abi - 9754 kb : a1, 0, 9754
master default abi - 12004 kb : a1, 0, 12004
pr default abi - 12004 kb : a1, 0, 12004
pr sol abi - 15002 kb : a2, 0, 15002
pr all abi - 20590 kb : a3, 0, 20590
#nbsp; : a4, 0, 0
section
./integration-tests/public/events : a5, 0, 0
v5 default abi - 4955 kb : a1, 0, 4955
master default abi - 8456 kb : a1, 0, 8456
pr default abi - 8456 kb : a1, 0, 8456
pr sol abi - 12532 kb : a2, 0, 12532
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 - 11768 kb : a1, 0, 11768
pr default abi - 11768 kb : a1, 0, 11768
pr sol abi - 13759 kb : a2, 0, 13759
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 - 3089 kb : a1, 0, 3089
pr default abi - 3089 kb : a1, 0, 3089
pr sol abi - 3202 kb : a2, 0, 3202
pr all abi - 3368 kb : a3, 0, 3368
#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 - 3093 kb : a1, 0, 3093
pr default abi - 3093 kb : a1, 0, 3093
pr sol abi - 3207 kb : a2, 0, 3207
pr all abi - 3380 kb : a3, 0, 3380
#nbsp; : a4, 0, 0
section
./integration-tests/public/multisig : a5, 0, 0
v5 default abi - 21135 kb : a1, 0, 21135
master default abi - 27537 kb : a1, 0, 27537
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 - 7444 kb : a1, 0, 7444
pr default abi - 7444 kb : a1, 0, 7444
pr sol abi - 11255 kb : a2, 0, 11255
pr all abi - 14880 kb : a3, 0, 14880
#nbsp; : a4, 0, 0
section
./integration-tests/public/precompile : a5, 0, 0
v5 default abi - 0 kb : a1, 0, 0
master default abi - 5529 kb : a1, 0, 5529
pr default abi - 5529 kb : a1, 0, 5529
pr sol abi - 7597 kb : a2, 0, 7597
pr all abi - 8692 kb : a3, 0, 8692
#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 - 3953 kb : a1, 0, 3953
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 - 10858 kb : a1, 0, 10858
pr default abi - 10858 kb : a1, 0, 10858
pr sol abi - 12573 kb : a2, 0, 12573
pr all abi - 17587 kb : a3, 0, 17587
#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 - 6487 kb : a1, 0, 6487
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 - 2489 kb : a2, 0, 2489
pr all abi - 3285 kb : a3, 0, 3285
#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 - 3284 kb : a3, 0, 3284
#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 - 11813 kb : a1, 0, 11813
pr default abi - 11813 kb : a1, 0, 11813
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 - 4492 kb : a1, 0, 4492
pr default abi - 4492 kb : a1, 0, 4492
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 - 7074 kb : a1, 0, 7074
pr default abi - 7074 kb : a1, 0, 7074
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
Show contract sizes: ink! vs Solidity ABIThe following table shows how the contract sizes on this branch change when choosing the Solidity ABI instead of the ink! ABI.
Show contract sizes: ink! vs all ABIThe following table shows how the contract sizes on this branch change when choosing the all ABI instead of the ink! ABI.
Link to the run | Last update: Fri Oct 24 14:56:41 CEST 2025 |
a25004b to
465351d
Compare
| "sp-io/std", | ||
| "ink_e2e_macro/std", | ||
| ] | ||
| runtime-benchmarks = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To resolve a warning in the coming from the create_sandbox macro
| /// Get a mutable reference to the underlying sandbox. | ||
| /// | ||
| /// This allows direct access to all sandbox methods and traits, making it easy to | ||
| /// interact with runtime pallets like `pallet-assets`: | ||
| pub fn sandbox(&mut self) -> &mut S { | ||
| &mut self.sandbox | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an easy solution to get access to the apis.
If we want the e2e framework to use for both backends, node or runtime, without any code change (pretty cool) then this needs a closer look, but for now this is the easiest.
|
|
||
| sandbox.dry_run(|sandbox| { | ||
| sandbox.mint_into(&actor, 100).unwrap(); | ||
| crate::api::balance_api::BalanceAPI::mint_into(sandbox, &actor, 100).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that the assets apis and balance apis are sometimes the same, see this case for example, not sure whether I should therefore change the assets api to e.g. mint_asset_into
5f3d05e to
d4851b5
Compare
| "pallet-balances/runtime-benchmarks", | ||
| "pallet-revive/runtime-benchmarks", | ||
| "pallet-timestamp/runtime-benchmarks", | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why the CI fails is that the pallet-revive/runtime-benchmarks feature brings in pallet-revive-fixtures:
$ cargo tree -i pallet-revive-fixtures --features runtime-benchmarks
pallet-revive-fixtures v0.1.0 (https://github.com/use-ink/polkadot-sdk.git?rev=cbab8ed4be1941420dd25dc81102fb79d8e2a7f0#cbab8ed4)
└── pallet-revive v0.1.0 (https://github.com/use-ink/polkadot-sdk.git?rev=cbab8ed4be1941420dd25dc81102fb79d8e2a7f0#cbab8ed4)
├── ink_sandbox v6.0.0-alpha.4 (/Users/michi/projects/ink/crates/sandbox)
└── pallet-assets-precompiles v0.1.0 (https://github.com/use-ink/polkadot-sdk.git?rev=cbab8ed4be1941420dd25dc81102fb79d8e2a7f0#cbab8ed4)
└── ink_sandbox v6.0.0-alpha.4 (/Users/michi/projects/ink/crates/sandbox)
As the CI executes cargo test --all-features this one is enabled too. I see you did it to resolve a warning, we need to find another way of getting rid of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I reproduce the warning? Tried cargo test --all-features on crates/sandbox/ and public/assets-precompile/, but couldn't see it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have a look, thanks for the help!
Description
This PR adds an integration test, with using the runtime only feature, for testing a contract that interacts with the erc20 precompile. The DefaultSandbox's runtime has been provided with the assets pallet and the precompile to allow devs to test their contract easily interacting with the precompile.
In addition, here and there some functions have been added to improve the developer experience. This is still ongoing because if you look at the integration tests they look very complicated and there is a lot of code.
Nevertheless, exciting progress!
Checklist before requesting a review
CHANGELOG.md