pallet-contracts: Rent projection RPC (#4754)

* Initial approach

* Introduce the pallet-contracts-common crate

* Add rent::compute_rent_projection

* Wire everything together

* Fix build error.

* Rename EvictionDate → EvictionAt.

* Clean.

* Renaming and cleaning.

* Add documentation for rent_projection RPC.

* Add documentation for rent_projection runtime API.

* Refactor rent_budget.

Merge it with subsistence_treshold.

* Bump impl_version

* Constrain RPC impl with Block::Header::Number.

* Rename pallet-contracts-common into -primitives

* Add a comment for `compute_rent_projection` on the usage

* Small tidying
This commit is contained in:
Sergei Pepyakin
2020-01-31 15:22:25 +01:00
committed by GitHub
parent 3018bfe0e9
commit df6ef1780f
13 changed files with 339 additions and 114 deletions
+13
View File
@@ -3196,6 +3196,7 @@ dependencies = [
"pallet-balances 2.0.0",
"pallet-collective 2.0.0",
"pallet-contracts 2.0.0",
"pallet-contracts-primitives 2.0.0",
"pallet-contracts-rpc-runtime-api 0.8.0",
"pallet-democracy 2.0.0",
"pallet-elections-phragmen 2.0.0",
@@ -3631,6 +3632,7 @@ dependencies = [
"frame-system 2.0.0",
"hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pallet-balances 2.0.0",
"pallet-contracts-primitives 2.0.0",
"pallet-randomness-collective-flip 2.0.0",
"pallet-timestamp 2.0.0",
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3646,6 +3648,15 @@ dependencies = [
"wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pallet-contracts-primitives"
version = "2.0.0"
dependencies = [
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-runtime 2.0.0",
"sp-std 2.0.0",
]
[[package]]
name = "pallet-contracts-rpc"
version = "0.8.0"
@@ -3653,6 +3664,7 @@ dependencies = [
"jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"pallet-contracts-primitives 2.0.0",
"pallet-contracts-rpc-runtime-api 0.8.0",
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3668,6 +3680,7 @@ dependencies = [
name = "pallet-contracts-rpc-runtime-api"
version = "0.8.0"
dependencies = [
"pallet-contracts-primitives 2.0.0",
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-api 2.0.0",
"sp-runtime 2.0.0",