Skip to content

Commit

Permalink
Contracts migration logic (#803)
Browse files Browse the repository at this point in the history
* Contracts migration logic

* Remove deprecated migration code

* WIP: Migration logic for contracts

* First working version, needs testing though

* Small modifications & polish

* OnRuntimeUpgrade struct & Shibuya cleanup

* Fix all issues

* Fixes

* Comments

* Finish comment

* Fix typo

* Add call filtering

* Update comment

* Additional polish

* Integrate into Shiden
  • Loading branch information
Dinonard authored Dec 14, 2022
1 parent 58039d0 commit 1ff5366
Show file tree
Hide file tree
Showing 11 changed files with 405 additions and 43 deletions.
27 changes: 22 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ members = [
"runtime/astar",
"runtime/shiden",
"runtime/shibuya",
"runtime/contracts-migration",
]

exclude = ["vendor"]
Expand Down
2 changes: 1 addition & 1 deletion bin/collator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-collator"
version = "4.39.1"
version = "4.40.0"
authors = ["Stake Technologies <[email protected]>"]
description = "Astar collator implementation in Rust."
build = "build.rs"
Expand Down
2 changes: 1 addition & 1 deletion runtime/astar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-runtime"
version = "4.39.1"
version = "4.40.0"
authors = ["Stake Technologies <[email protected]>"]
edition = "2021"
build = "build.rs"
Expand Down
33 changes: 33 additions & 0 deletions runtime/contracts-migration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[package]
name = "pallet-contracts-migration"
version = "1.0.0"
authors = ["Stake Technologies <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
homepage = "https://astar.network"
repository = "https://github.com/AstarNetwork/Astar"
description = "FRAME pallet for managing multi-block pallet contracts storage migration"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false, features = ["unstable-interface"] }
scale-info = { version = "2.3.0", default-features = false, features = ["derive"] }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false, optional = true }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }

[features]
default = ["std"]
std = [
"codec/std",
"sp-core/std",
"scale-info/std",
"sp-std/std",
"frame-support/std",
"frame-system/std",
"pallet-contracts/std",
]
try-runtime = ["frame-support/try-runtime"]
Loading

0 comments on commit 1ff5366

Please sign in to comment.