Rework default values used by the RelayChainCli (#189)

This reworks the default values used by the RelayChainCli for stuff like
the listen port etc.

This also renames all the contracts related stuff to `cumulus-*` to
support `.cargo/config` overrides.
This commit is contained in:
Bastian Köcher
2020-08-10 09:53:07 +02:00
committed by GitHub
parent 2efe482c40
commit 3ed6030110
13 changed files with 265 additions and 325 deletions
@@ -1,5 +1,5 @@
[package]
name = "pallet-contracts"
name = "cumulus-pallet-contracts"
version = "2.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
@@ -24,7 +24,7 @@ sp-std = { git = "https://github.com/paritytech/substrate", default-features = f
sp-sandbox = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
pallet-contracts-primitives = { path = "./common", default-features = false }
cumulus-pallet-contracts-primitives = { path = "./common", default-features = false }
[dev-dependencies]
wabt = "0.10"
@@ -49,5 +49,5 @@ std = [
"parity-wasm/std",
"pwasm-utils/std",
"wasmi-validation/std",
"pallet-contracts-primitives/std",
"cumulus-pallet-contracts-primitives/std",
]
@@ -1,5 +1,5 @@
[package]
name = "pallet-contracts-primitives"
name = "cumulus-pallet-contracts-primitives"
version = "2.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
@@ -1,5 +1,5 @@
[package]
name = "pallet-contracts-rpc"
name = "cumulus-pallet-contracts-rpc"
version = "0.8.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
@@ -22,8 +22,8 @@ sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = f
serde = { version = "1.0.101", features = ["derive"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
pallet-contracts-primitives = { path = "../common" }
pallet-contracts-rpc-runtime-api = { path = "./runtime-api" }
cumulus-pallet-contracts-primitives = { path = "../common" }
cumulus-pallet-contracts-rpc-runtime-api = { path = "./runtime-api" }
[dev-dependencies]
serde_json = "1.0.41"
@@ -1,5 +1,5 @@
[package]
name = "pallet-contracts-rpc-runtime-api"
name = "cumulus-pallet-contracts-rpc-runtime-api"
version = "0.8.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
@@ -16,7 +16,7 @@ sp-api = { git = "https://github.com/paritytech/substrate", default-features = f
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
pallet-contracts-primitives = { path = "../../common", default-features = false }
cumulus-pallet-contracts-primitives = { path = "../../common", default-features = false }
[features]
default = ["std"]
@@ -25,5 +25,5 @@ std = [
"codec/std",
"sp-std/std",
"sp-runtime/std",
"pallet-contracts-primitives/std",
"cumulus-pallet-contracts-primitives/std",
]
@@ -24,7 +24,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Codec, Decode, Encode};
use pallet_contracts_primitives::{GetStorageResult, RentProjectionResult};
use cumulus_pallet_contracts_primitives::{GetStorageResult, RentProjectionResult};
use sp_runtime::RuntimeDebug;
use sp_std::vec::Vec;
@@ -22,7 +22,7 @@ use std::sync::Arc;
use codec::Codec;
use jsonrpc_core::{Error, ErrorCode, Result};
use jsonrpc_derive::rpc;
use pallet_contracts_primitives::RentProjection;
use cumulus_pallet_contracts_primitives::RentProjection;
use serde::{Deserialize, Serialize};
use sp_api::ProvideRuntimeApi;
use sp_blockchain::HeaderBackend;
@@ -35,7 +35,7 @@ use sp_runtime::{
use std::convert::TryInto;
pub use self::gen_client::Client as ContractsClient;
pub use pallet_contracts_rpc_runtime_api::{
pub use cumulus_pallet_contracts_rpc_runtime_api::{
self as runtime_api, ContractExecResult, ContractsApi as ContractsRuntimeApi,
};
@@ -54,10 +54,10 @@ const CONTRACT_IS_A_TOMBSTONE: i64 = 3;
const GAS_PER_SECOND: u64 = 1_000_000_000_000;
/// A private newtype for converting `ContractAccessError` into an RPC error.
struct ContractAccessError(pallet_contracts_primitives::ContractAccessError);
struct ContractAccessError(cumulus_pallet_contracts_primitives::ContractAccessError);
impl From<ContractAccessError> for Error {
fn from(e: ContractAccessError) -> Error {
use pallet_contracts_primitives::ContractAccessError::*;
use cumulus_pallet_contracts_primitives::ContractAccessError::*;
match e.0 {
DoesntExist => Error {
code: ErrorCode::ServerError(CONTRACT_DOESNT_EXIST),
@@ -118,7 +118,7 @@ use frame_support::{
use frame_support::traits::{OnUnbalanced, Currency, Get, Time, Randomness};
use frame_support::weights::GetDispatchInfo;
use frame_system::{ensure_signed, RawOrigin, ensure_root};
use pallet_contracts_primitives::{RentProjection, ContractAccessError};
use cumulus_pallet_contracts_primitives::{RentProjection, ContractAccessError};
use frame_support::weights::Weight;
pub type CodeHash<T> = <T as frame_system::Trait>::Hash;
@@ -23,7 +23,7 @@ use crate::{
use frame_support::storage::unhashed as storage;
use frame_support::traits::{Currency, ExistenceRequirement, Get, OnUnbalanced, WithdrawReason};
use frame_support::StorageMap;
use pallet_contracts_primitives::{ContractAccessError, RentProjection, RentProjectionResult};
use cumulus_pallet_contracts_primitives::{ContractAccessError, RentProjection, RentProjectionResult};
use sp_runtime::traits::{Bounded, CheckedDiv, CheckedMul, SaturatedConversion, Saturating, Zero};
/// The amount to charge.