Skip to content

Commit

Permalink
Moved XRT address to constant
Browse files Browse the repository at this point in the history
  • Loading branch information
akru committed Feb 17, 2025
1 parent b91c21b commit c3e8d6a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ homepage.workspace = true
repository.workspace = true

[workspace.package]
version = "3.2.0"
version = "3.3.0"
edition = "2021"
authors = ["Airalab <[email protected]>"]
license = "Apache-2.0"
Expand Down
3 changes: 3 additions & 0 deletions primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ impl IdentifyAccount for CommunityAccount {
}
}
}

/// ERC20 Robonomics Token: https://etherscan.io/token/0x7de91b204c1c737bcee6f000aaa6569cf7061cb7
pub const ERC20_XRT_ADDRESS: [u8; 20] = hex!["7de91b204c1c737bcee6f000aaa6569cf7061cb7"];
8 changes: 5 additions & 3 deletions runtime/main/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "main-runtime"
version = "3.0.0"
authors = ["Airalab <[email protected]>"]
edition = "2021"
version.workspace = true
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true
build = "build.rs"

[dependencies]
Expand Down
5 changes: 4 additions & 1 deletion runtime/main/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ use xcm_executor::{
Config, XcmExecutor,
};

// locals
use robonomics_primitives::ERC20_XRT_ADDRESS;

parameter_types! {
pub RelayNetwork: NetworkId = XcmInfo::relay_network().unwrap_or(NetworkId::Kusama);
pub const RelayLocation: MultiLocation = MultiLocation::parent();
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
pub UniversalLocation: InteriorMultiLocation =
X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into()));
pub Local: MultiLocation = Here.into_location();
pub EthereumCurrencyLocation: MultiLocation = MultiLocation::new(2, X2(GlobalConsensus(Ethereum { chain_id: 1 }), AccountKey20{ network: None, key: hex!("7de91b204c1c737bcee6f000aaa6569cf7061cb7") }));
pub EthereumCurrencyLocation: MultiLocation = MultiLocation::new(2, X2(GlobalConsensus(Ethereum { chain_id: 1 }), AccountKey20{ network: None, key: ERC20_XRT_ADDRESS }));
pub AssetsPalletLocation: MultiLocation =
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
pub DummyCheckingAccount: AccountId = PolkadotXcm::check_account();
Expand Down

0 comments on commit c3e8d6a

Please sign in to comment.