Skip to content

Commit

Permalink
refactor: ♻️ remove use of deprecated runtime strings
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmauro committed Mar 6, 2025
1 parent 90db051 commit 122dc3e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pallets/moonbeam-foreign-assets/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use precompile_utils::solidity::codec::{Address, BoundedString};
use precompile_utils::solidity::Codec;
use precompile_utils_macro::keccak256;
use sp_runtime::traits::ConstU32;
use sp_runtime::{format, DispatchError, SaturatedConversion};
use sp_runtime::{DispatchError, SaturatedConversion};
use sp_std::vec::Vec;
use xcm::latest::Error as XcmError;

Expand Down
9 changes: 6 additions & 3 deletions runtime/moonbase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ pub mod xcm_config;
mod migrations;
mod precompiles;

extern crate alloc;

use alloc::borrow::Cow;
// Re-export required by get! macro.
#[cfg(feature = "std")]
pub use fp_evm::GenesisAccount;
Expand Down Expand Up @@ -98,7 +101,7 @@ use sp_api::impl_runtime_apis;
use sp_consensus_slots::Slot;
use sp_core::{OpaqueMetadata, H160, H256, U256};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
generic, impl_opaque_keys,
traits::{
BlakeTwo256, Block as BlockT, DispatchInfoOf, Dispatchable, IdentityLookup,
PostDispatchInfoOf, UniqueSaturatedInto, Zero,
Expand Down Expand Up @@ -193,8 +196,8 @@ pub mod opaque {
/// changes which can be skipped.
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("moonbase"),
impl_name: create_runtime_str!("moonbase"),
spec_name: Cow::Borrowed("moonbase"),
impl_name: Cow::Borrowed(("moonbase"),
authoring_version: 4,
spec_version: 3600,
impl_version: 0,
Expand Down
9 changes: 6 additions & 3 deletions runtime/moonbeam/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));

extern crate alloc;

use alloc::borrow::Cow;
use account::AccountId20;
use cumulus_pallet_parachain_system::{
RelayChainStateProof, RelayStateProof, RelaychainDataProvider, ValidationData,
Expand Down Expand Up @@ -82,7 +85,7 @@ use sp_api::impl_runtime_apis;
use sp_consensus_slots::Slot;
use sp_core::{OpaqueMetadata, H160, H256, U256};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
generic, impl_opaque_keys,
traits::{
BlakeTwo256, Block as BlockT, DispatchInfoOf, Dispatchable, IdentityLookup,
PostDispatchInfoOf, UniqueSaturatedInto, Zero,
Expand Down Expand Up @@ -190,8 +193,8 @@ pub mod opaque {
/// changes which can be skipped.
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("moonbeam"),
impl_name: create_runtime_str!("moonbeam"),
spec_name: Cow::Borrowed("moonbeam"),
impl_name: Cow::Borrowed("moonbeam"),
authoring_version: 3,
spec_version: 3600,
impl_version: 0,
Expand Down
9 changes: 6 additions & 3 deletions runtime/moonriver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));

extern crate alloc;

use alloc::borrow::Cow;
use account::AccountId20;
use cumulus_pallet_parachain_system::{
RelayChainStateProof, RelayStateProof, RelaychainDataProvider, ValidationData,
Expand Down Expand Up @@ -84,7 +87,7 @@ use sp_api::impl_runtime_apis;
use sp_consensus_slots::Slot;
use sp_core::{OpaqueMetadata, H160, H256, U256};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
generic, impl_opaque_keys,
serde::{Deserialize, Serialize},
traits::{
BlakeTwo256, Block as BlockT, DispatchInfoOf, Dispatchable, IdentityLookup,
Expand Down Expand Up @@ -195,8 +198,8 @@ pub mod opaque {
/// changes which can be skipped.
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("moonriver"),
impl_name: create_runtime_str!("moonriver"),
spec_name: Cow::Borrowed("moonriver"),
impl_name: Cow::Borrowed("moonriver"),
authoring_version: 3,
spec_version: 3600,
impl_version: 0,
Expand Down

0 comments on commit 122dc3e

Please sign in to comment.