Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 1d9a139

Browse files
agryaznovathei
andauthored
[contracts] Forbid calling back to contracts after switching to runtime (#13443)
* save: compiles and tests pass * save: added global * done + test * cleanup * changelog update * cleanup * address feedback, step 1 * address feedback, step 2 * address feedback, step 3 * returned updated gas_estimation_call_runtime test * clippy fix * address feedback, step 4 * address feedback, step 5 * move data from context to inputs * docs fix * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * address feedback, step 6 --------- Co-authored-by: Alexander Theißen <alex.theissen@me.com>
1 parent 7d8aa66 commit 1d9a139

File tree

5 files changed

+287
-150
lines changed

5 files changed

+287
-150
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frame/contracts/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ In other words: Upgrading this pallet will not break pre-existing contracts.
2020

2121
### Added
2222

23+
- Forbid calling back to contracts after switching to runtime
24+
[#13443](https://github.com/paritytech/substrate/pull/13443)
25+
2326
- Allow contracts to dispatch calls into the runtime (**unstable**)
2427
[#9276](https://github.com/paritytech/substrate/pull/9276)
2528

frame/contracts/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ rand = { version = "0.8", optional = true, default-features = false }
3535
rand_pcg = { version = "0.3", optional = true }
3636

3737
# Substrate Dependencies
38+
environmental = { version = "1.1.4", default-features = false }
3839
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
3940
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
4041
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
@@ -80,6 +81,7 @@ std = [
8081
"log/std",
8182
"rand/std",
8283
"wasmparser/std",
84+
"environmental/std",
8385
]
8486
runtime-benchmarks = [
8587
"frame-benchmarking/runtime-benchmarks",

0 commit comments

Comments
 (0)