forked from paritytech/substrate
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contracts:
is_contract(address)
and caller_is_origin()
are added …
…to API (paritytech#10789) * is_contract() and caller_is_origin() added to Ext API * is_contract() exposed in wasm runtime.rs * + test for is_contract() * + seal_is_contract benchmark * caller_is_origin() exposed to wasm/runtime.rs and covered by a test * + seal_caller_is_origin benchmark * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/wasm/runtime.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/wasm/runtime.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/wasm/runtime.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * identation fix for benchmark macroses; test cosmetic improvement * benchmark fix * + is_contract() wasm test * + caller_is_origin() wasm test * Apply suggestions from code review Co-authored-by: Alexander Theißen <[email protected]> * is_contract() to borrow param instead of taking ownership * phrasing improved Co-authored-by: Hernando Castano <[email protected]> * fixed wasm tests according to @athei feedback * dead code warnings suppressed by unstable-interface attributes * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Hernando Castano <[email protected]> Co-authored-by: Parity Bot <[email protected]>
- Loading branch information
1 parent
9d2bbbf
commit d06a6a7
Showing
6 changed files
with
917 additions
and
604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.