Skip to content

Commit

Permalink
Release pango-6502 (#1331)
Browse files Browse the repository at this point in the history
* Remove old migration

* Release `pango-6502`
  • Loading branch information
AurevoirXavier authored Nov 25, 2023
1 parent 4bad6ac commit 16c1424
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion runtime/crab/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(migration::CustomOnRuntimeUpgrade, darwinia_staking::migration::v1::MigrateToV1<Runtime>),
migration::CustomOnRuntimeUpgrade,
>;

/// Darwinia proposal base fee.
Expand Down
2 changes: 1 addition & 1 deletion runtime/darwinia/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(migration::CustomOnRuntimeUpgrade, darwinia_staking::migration::v1::MigrateToV1<Runtime>),
migration::CustomOnRuntimeUpgrade,
>;

/// Darwinia proposal base fee.
Expand Down
15 changes: 1 addition & 14 deletions runtime/darwinia/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,7 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
}

fn migrate() -> frame_support::weights::Weight {
// substrate
use sp_core::H160;
use sp_std::str::FromStr;

const REVERT_BYTECODE: [u8; 5] = [0x60, 0x00, 0x60, 0x00, 0xFD];
const USDT_ADDRESS: &str = "0x0000000000000000000000000000000000000403";

if let Ok(a) = H160::from_str(USDT_ADDRESS) {
EVM::create_account(a, REVERT_BYTECODE.to_vec());
}

<Runtime as frame_system::Config>::DbWeight::get().reads_writes(5, 5)

// frame_support::weights::Weight::zero()
frame_support::weights::Weight::zero()
// RuntimeBlockWeights::get().max_block
// <Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, 1)
}
4 changes: 2 additions & 2 deletions runtime/pangolin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(migration::CustomOnRuntimeUpgrade, darwinia_staking::migration::v1::MigrateToV1<Runtime>),
migration::CustomOnRuntimeUpgrade,
>;

/// Darwinia proposal base fee.
Expand All @@ -83,7 +83,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
spec_name: sp_runtime::create_runtime_str!("Pangolin2"),
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
authoring_version: 0,
spec_version: 6_5_0_1,
spec_version: 6_5_0_2,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down
4 changes: 2 additions & 2 deletions runtime/pangoro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(migration::CustomOnRuntimeUpgrade, darwinia_staking::migration::v1::MigrateToV1<Runtime>),
migration::CustomOnRuntimeUpgrade,
>;

/// Darwinia proposal base fee.
Expand All @@ -82,7 +82,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
spec_name: sp_runtime::create_runtime_str!("Pangoro2"),
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
authoring_version: 0,
spec_version: 6_5_0_1,
spec_version: 6_5_0_2,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down

0 comments on commit 16c1424

Please sign in to comment.