Skip to content
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

Stop using CallData in Multisig doc test #1202

Merged
merged 2 commits into from
Mar 28, 2022
Merged

Conversation

HCastano
Copy link
Contributor

The example we were providing in the add_owner documentation of the Multisig example
used CallData, which is only available in the off-chain testing engine. This meant that
if contract authors used this example vertabim in their contracts (which is totally
reasonable in this case) their contracts wouldn't compile.

I've changed the example to use things that would be available to contract authors so
in order to make the example more copy-pastable.

Closes #1197 again 😅

This is only available in the off-chain testing environment, which means
normal contracts cannot use this example directly.
@codecov-commenter
Copy link

codecov-commenter commented Mar 27, 2022

Codecov Report

Merging #1202 (498eaee) into master (2437357) will increase coverage by 17.59%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master    #1202       +/-   ##
===========================================
+ Coverage   61.71%   79.30%   +17.59%     
===========================================
  Files         228      228               
  Lines        8637     8637               
===========================================
+ Hits         5330     6850     +1520     
+ Misses       3307     1787     -1520     
Impacted Files Coverage Δ
crates/storage/src/traits/impls/prims.rs 96.92% <0.00%> (+1.53%) ⬆️
crates/lang/ir/src/ir/attrs.rs 82.27% <0.00%> (+3.87%) ⬆️
...ates/storage/src/collections/hashmap/fuzz_tests.rs 100.00% <0.00%> (+4.25%) ⬆️
crates/metadata/src/layout/mod.rs 77.01% <0.00%> (+4.59%) ⬆️
crates/lang/ir/src/ir/trait_def/item/mod.rs 90.16% <0.00%> (+4.91%) ⬆️
crates/env/src/engine/off_chain/test_api.rs 90.00% <0.00%> (+6.00%) ⬆️
crates/lang/ir/src/ir/item_impl/constructor.rs 93.84% <0.00%> (+6.15%) ⬆️
crates/env/src/engine/off_chain/impls.rs 43.03% <0.00%> (+8.22%) ⬆️
crates/lang/ir/src/ir/idents_lint.rs 71.42% <0.00%> (+9.52%) ⬆️
crates/env/src/api.rs 33.33% <0.00%> (+9.52%) ⬆️
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2437357...498eaee. Read the comment docs.

@paritytech-cicd-pr
Copy link

🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑

These are the results when building the examples/* contracts from this branch with cargo-contract 1.1.0-2b7b50f and comparing them to ink! master:

Δ Optimized Size Δ Used Gas Total Optimized Size Total Used Gas
accumulator 1.03 K
adder 2.17 K
contract-introspection 2.37 K
contract-terminate 0.94 K 214_418
contract-transfer 8.15 K 14_418
delegate-calls 2.99 K 14_950
delegator 6.37 K 46_295
dns 8.84 K 43_254
erc1155 17.23 K 86_508
erc20 8.49 K 43_254
erc721 11.81 K 115_344
flipper 1.31 K 14_418
forward-calls 2.90 K 29_536
incrementer 1.21 K 14_418
multisig 25.20 K 93_527
rand-extension 3.92 K 14_418
subber 2.19 K
trait-erc20 8.76 K 43_254
trait-flipper 1.00 K 14_418
trait-incrementer 1.19 K 28_836
upgradeable-flipper 1.55 K

Link to the run | Last update: Sun Mar 27 05:46:30 CEST 2022

@cmichi cmichi merged commit 0897dea into master Mar 28, 2022
@cmichi cmichi deleted the hc-another-multisig-update branch March 28, 2022 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken Multisig Example
4 participants