Skip to content

Commit 5715065

Browse files
committed
fix: ci
1 parent 0bb6631 commit 5715065

6 files changed

Lines changed: 13 additions & 40 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
with:
4747
cache-on-failure: true
4848
cache-all-crates: true
49+
- name: Add wasm32 target
50+
run: rustup target add wasm32-unknown-unknown
4951
- name: cargo info
5052
run: |
5153
echo "######## rustup show ########"
@@ -135,6 +137,7 @@ jobs:
135137
- name: Install ARM64 toolchain
136138
run: |
137139
rustup target add aarch64-unknown-linux-gnu
140+
rustup target add wasm32-unknown-unknown
138141
apt update
139142
apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
140143
- name: Rust Cache

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ codec = { package = "parity-scale-codec", version = "3.7.5", default-features =
1919
"derive",
2020
] }
2121
futures = "0.3.31"
22-
futures-timer = "3.0"
2322
hex-literal = { version = "0.4.1" }
2423
jsonrpsee = { version = "0.24.10", features = ["server"] }
2524
log = { version = "0.4.22", default-features = false }
@@ -138,4 +137,4 @@ cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk
138137
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", rev = "9136565addc23a552f6960a7581f13c8dfc651f1" }
139138
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", rev = "9136565addc23a552f6960a7581f13c8dfc651f1", default-features = false }
140139
parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", rev = "9136565addc23a552f6960a7581f13c8dfc651f1", package = "staging-parachain-info", default-features = false }
141-
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "9136565addc23a552f6960a7581f13c8dfc651f1", default-features = false }
140+
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "9136565addc23a552f6960a7581f13c8dfc651f1", default-features = false }

parachain-runtime/src/assets_config.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,22 @@ use frame_support::{
55
};
66
use frame_system::EnsureSigned;
77

8-
// Currency constants matching Paseo Asset Hub
98
const UNITS: Balance = 10_000_000_000;
109
const DOLLARS: Balance = UNITS;
1110
const MILLICENTS: Balance = DOLLARS / 100_000;
1211

13-
// System parachain deposit calculation matching Paseo
14-
// Paseo uses: (items * 20 * DOLLARS + bytes * 100 * MILLICENTS) / 100
12+
// System parachain deposit formula:
13+
// (items * 20 * DOLLARS + bytes * 100 * MILLICENTS) / 100
1514
const fn system_para_deposit(items: u32, bytes: u32) -> Balance {
1615
((items as Balance) * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS) / 100
1716
}
1817

1918
parameter_types! {
20-
// Matches Paseo Asset Hub: system_para_deposit(1, 190)
2119
pub const AssetDeposit: Balance = system_para_deposit(1, 190); // 2_019_000_000
22-
23-
// Matches Paseo Asset Hub: system_para_deposit(1, 16)
2420
pub const AssetAccountDeposit: Balance = system_para_deposit(1, 16); // 2_001_600_000
25-
26-
// Matches Paseo Asset Hub: ExistentialDeposit
2721
pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT; // 100_000_000
28-
2922
pub const StringLimit: u32 = 50;
30-
31-
// Matches Paseo Asset Hub: system_para_deposit(1, 68)
3223
pub const MetadataDepositBase: Balance = system_para_deposit(1, 68); // 2_006_800_000
33-
34-
// Matches Paseo Asset Hub: system_para_deposit(0, 1)
3524
pub const MetadataDepositPerByte: Balance = system_para_deposit(0, 1); // 100_000
3625
}
3726

parachain-runtime/src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ pub struct WeightToFee;
166166
impl WeightToFeePolynomial for WeightToFee {
167167
type Balance = Balance;
168168
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
169-
// in Rococo, extrinsic base weight (smallest non-zero weight) is mapped to 1 MILLICENT:
170-
// We map to 1/10 of that, or 1/10 MILLICENT
169+
// In Rococo, extrinsic base weight (smallest non-zero weight) maps to 1 MILLICENTS.
170+
// We map to 1/10 of that, or 1/10 MILLICENTS.
171171
let p = MILLICENTS / 10;
172172
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
173173
smallvec![WeightToFeeCoefficient {
@@ -239,16 +239,13 @@ pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
239239
pub const HOURS: BlockNumber = MINUTES * 60;
240240
pub const DAYS: BlockNumber = HOURS * 24;
241241

242-
// Currency constants matching Paseo Asset Hub
243-
// Based on Paseo: UNITS = 10_000_000_000 (10^10)
244242
pub const UNITS: Balance = 10_000_000_000;
245243
pub const DOLLARS: Balance = UNITS;
246244
pub const CENTS: Balance = DOLLARS / 100;
247245
pub const MILLICENTS: Balance = CENTS / 1_000;
248246
pub const MICROUNIT: Balance = CENTS / 10_000;
249247

250-
/// The existential deposit matching Paseo Asset Hub system parachain.
251-
/// Paseo Asset Hub: SYSTEM_PARA_EXISTENTIAL_DEPOSIT / 10 = CENTS
248+
/// The existential deposit for a system parachain.
252249
pub const EXISTENTIAL_DEPOSIT: Balance = CENTS; // 100_000_000
253250

254251
/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is
@@ -382,8 +379,8 @@ impl pallet_balances::Config for Runtime {
382379
}
383380

384381
parameter_types! {
385-
/// Relay Chain `TransactionByteFee` / 10
386-
pub const TransactionByteFee: Balance = 10 * MICROUNIT;
382+
/// Transaction byte fee scaled for system parachains.
383+
pub const TransactionByteFee: Balance = MILLICENTS / 2;
387384
}
388385

389386
impl pallet_transaction_payment::Config for Runtime {

runtime/src/assets_config.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,22 @@ use frame_support::{
55
};
66
use frame_system::EnsureSigned;
77

8-
// Currency constants matching Paseo Asset Hub
98
const UNITS: Balance = 10_000_000_000;
109
const DOLLARS: Balance = UNITS;
1110
const MILLICENTS: Balance = DOLLARS / 100_000;
1211

13-
// System parachain deposit calculation matching Paseo
14-
// Paseo uses: (items * 20 * DOLLARS + bytes * 100 * MILLICENTS) / 100
12+
// System parachain deposit formula:
13+
// (items * 20 * DOLLARS + bytes * 100 * MILLICENTS) / 100
1514
const fn system_para_deposit(items: u32, bytes: u32) -> Balance {
1615
((items as Balance) * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS) / 100
1716
}
1817

1918
parameter_types! {
20-
// Matches Paseo Asset Hub: system_para_deposit(1, 190)
2119
pub const AssetDeposit: Balance = system_para_deposit(1, 190); // 2_019_000_000
22-
23-
// Matches Paseo Asset Hub: system_para_deposit(1, 16)
2420
pub const AssetAccountDeposit: Balance = system_para_deposit(1, 16); // 2_001_600_000
25-
26-
// Matches Paseo Asset Hub: ExistentialDeposit
2721
pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT; // 100_000_000
28-
2922
pub const StringLimit: u32 = 50;
30-
31-
// Matches Paseo Asset Hub: system_para_deposit(1, 68)
3223
pub const MetadataDepositBase: Balance = system_para_deposit(1, 68); // 2_006_800_000
33-
34-
// Matches Paseo Asset Hub: system_para_deposit(0, 1)
3524
pub const MetadataDepositPerByte: Balance = system_para_deposit(0, 1); // 100_000
3625
}
3726

runtime/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,12 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
128128
const MAXIMUM_BLOCK_WEIGHT: Weight =
129129
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);
130130

131-
// Currency constants matching Paseo Asset Hub
132-
// Based on Paseo: UNITS = 10_000_000_000 (10^10)
133131
const UNITS: Balance = 10_000_000_000;
134132
const DOLLARS: Balance = UNITS;
135133
const CENTS: Balance = DOLLARS / 100;
136134
#[allow(dead_code)]
137135
const MILLICENTS: Balance = CENTS / 1_000;
138136

139-
// Existential deposit matching Paseo Asset Hub system parachain
140-
// Paseo Asset Hub: SYSTEM_PARA_EXISTENTIAL_DEPOSIT / 10
141137
pub const EXISTENTIAL_DEPOSIT: Balance = CENTS; // 100_000_000
142138

143139
impl pallet_insecure_randomness_collective_flip::Config for Runtime {}

0 commit comments

Comments
 (0)