Rename PAINT to PALETTE (#4161)

* /paint to /palette

* rename paint to palette

* rename the modules in palette to be pallets

* update Structure.adoc

* bump impl

* fix CI directory

* Update docs/Structure.adoc

Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org>
This commit is contained in:
joe petrowski
2019-11-21 01:08:25 +01:00
committed by Benjamin Kampmann
parent 512c86a72f
commit 2783b44207
206 changed files with 898 additions and 888 deletions
+10 -10
View File
@@ -12,7 +12,7 @@ babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api", default-features = false }
cfg-if = "0.1.10"
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
executive = { package = "paint-executive", path = "../../../paint/executive", default-features = false }
executive = { package = "palette-executive", path = "../../../palette/executive", default-features = false }
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents", default-features = false }
keyring = { package = "substrate-keyring", path = "../../../primitives/keyring", optional = true }
log = { version = "0.4.8", optional = true }
@@ -22,16 +22,16 @@ primitives = { package = "substrate-primitives", path = "../../../primitives/cor
rstd = { package = "sr-std", path = "../../../primitives/sr-std", default-features = false }
runtime-interface = { package = "substrate-runtime-interface", path = "../../../primitives/runtime-interface", default-features = false}
runtime_io = { package = "sr-io", path = "../../../primitives/sr-io", default-features = false }
runtime_support = { package = "paint-support", path = "../../../paint/support", default-features = false }
runtime_support = { package = "palette-support", path = "../../../palette/support", default-features = false }
runtime_version = { package = "sr-version", path = "../../../primitives/sr-version", default-features = false }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
session = { package = "substrate-session", path = "../../../primitives/session", default-features = false }
sr-api = { path = "../../../primitives/sr-api", default-features = false }
sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false }
paint-babe = { path = "../../../paint/babe", default-features = false }
paint-system = { path = "../../../paint/system", default-features = false }
paint-system-rpc-runtime-api = { path = "../../../paint/system/rpc/runtime-api", default-features = false }
paint-timestamp = { path = "../../../paint/timestamp", default-features = false }
pallet-babe = { path = "../../../palette/babe", default-features = false }
palette-system = { path = "../../../palette/system", default-features = false }
palette-system-rpc-runtime-api = { path = "../../../palette/system/rpc/runtime-api", default-features = false }
pallet-timestamp = { path = "../../../palette/timestamp", default-features = false }
substrate-client = { path = "../../../client", optional = true }
substrate-trie = { path = "../../../primitives/trie", default-features = false }
transaction-pool-api = { package = "substrate-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false }
@@ -72,10 +72,10 @@ std = [
"session/std",
"sr-api/std",
"sr-primitives/std",
"paint-babe/std",
"paint-system-rpc-runtime-api/std",
"paint-system/std",
"paint-timestamp/std",
"pallet-babe/std",
"palette-system-rpc-runtime-api/std",
"palette-system/std",
"pallet-timestamp/std",
"substrate-client",
"substrate-trie/std",
"transaction-pool-api/std",
+12 -12
View File
@@ -338,14 +338,14 @@ impl GetRuntimeBlockType for Runtime {
}
impl_outer_origin!{
pub enum Origin for Runtime where system = paint_system {}
pub enum Origin for Runtime where system = palette_system {}
}
#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug)]
pub struct Event;
impl From<paint_system::Event> for Event {
fn from(_evt: paint_system::Event) -> Self {
impl From<palette_system::Event> for Event {
fn from(_evt: palette_system::Event) -> Self {
unimplemented!("Not required in tests!")
}
}
@@ -358,7 +358,7 @@ parameter_types! {
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
}
impl paint_system::Trait for Runtime {
impl palette_system::Trait for Runtime {
type Origin = Origin;
type Call = Extrinsic;
type Index = u64;
@@ -376,7 +376,7 @@ impl paint_system::Trait for Runtime {
type Version = ();
}
impl paint_timestamp::Trait for Runtime {
impl pallet_timestamp::Trait for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = ();
@@ -388,13 +388,13 @@ parameter_types! {
pub const ExpectedBlockTime: u64 = 10_000;
}
impl paint_babe::Trait for Runtime {
impl pallet_babe::Trait for Runtime {
type EpochDuration = EpochDuration;
type ExpectedBlockTime = ExpectedBlockTime;
// there is no actual runtime in this test-runtime, so testing crates
// are manually adding the digests. normally in this situation you'd use
// paint_babe::SameAuthoritiesForever.
type EpochChangeTrigger = paint_babe::ExternalTrigger;
// pallet_babe::SameAuthoritiesForever.
type EpochChangeTrigger = pallet_babe::ExternalTrigger;
}
/// Adds one to the given input and returns the final result.
@@ -615,7 +615,7 @@ cfg_if! {
c: (3, 10),
genesis_authorities: system::authorities()
.into_iter().map(|x|(x, 1)).collect(),
randomness: <paint_babe::Module<Runtime>>::randomness(),
randomness: <pallet_babe::Module<Runtime>>::randomness(),
secondary_slots: true,
}
}
@@ -634,7 +634,7 @@ cfg_if! {
}
}
impl paint_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
impl palette_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
fn account_nonce(_account: AccountId) -> Index {
0
}
@@ -831,7 +831,7 @@ cfg_if! {
c: (3, 10),
genesis_authorities: system::authorities()
.into_iter().map(|x|(x, 1)).collect(),
randomness: <paint_babe::Module<Runtime>>::randomness(),
randomness: <pallet_babe::Module<Runtime>>::randomness(),
secondary_slots: true,
}
}
@@ -850,7 +850,7 @@ cfg_if! {
}
}
impl paint_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
impl palette_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
fn account_nonce(_account: AccountId) -> Index {
0
}
+1 -1
View File
@@ -29,7 +29,7 @@ use sr_primitives::{
transaction_validity::{TransactionValidity, ValidTransaction, InvalidTransaction},
};
use codec::{KeyedVec, Encode};
use paint_system::Trait;
use palette_system::Trait;
use crate::{
AccountId, BlockNumber, Extrinsic, Transfer, H256 as Hash, Block, Header, Digest, AuthorityId
};