diff --git a/substrate/abi/Cargo.toml b/substrate/abi/Cargo.toml index 8212e4359..c2947aaab 100644 --- a/substrate/abi/Cargo.toml +++ b/substrate/abi/Cargo.toml @@ -33,7 +33,7 @@ frame-support = { git = "https://github.com/serai-dex/substrate", default-featur serai-primitives = { path = "../primitives", version = "0.1", default-features = false } serai-coins-primitives = { path = "../coins/primitives", version = "0.1", default-features = false } serai-validator-sets-primitives = { path = "../validator-sets/primitives", version = "0.1", default-features = false } -serai-genesis-liquidity-primitives = { path = "../genesis-liquidity/primitives", version = "0.1" } +serai-genesis-liquidity-primitives = { path = "../genesis-liquidity/primitives", version = "0.1", default-features = false } serai-in-instructions-primitives = { path = "../in-instructions/primitives", version = "0.1", default-features = false } serai-signals-primitives = { path = "../signals/primitives", version = "0.1", default-features = false } diff --git a/substrate/client/src/serai/mod.rs b/substrate/client/src/serai/mod.rs index 93060c41c..6048b6db7 100644 --- a/substrate/client/src/serai/mod.rs +++ b/substrate/client/src/serai/mod.rs @@ -204,7 +204,7 @@ impl Serai { let validators: String = self .call("state_call", ["SeraiRuntimeApi_validators".to_string(), hex::encode(network.encode())]) .await?; - let bytes = hex_decode(hash) + let bytes = hex_decode(validators) .map_err(|_| SeraiError::InvalidNode("expected hex from node wasn't hex".to_string()))?; let r = Vec::::decode(&mut bytes.as_slice()) .map_err(|e| SeraiError::ErrorInResponse(e.to_string()))?; diff --git a/substrate/genesis-liquidity/pallet/Cargo.toml b/substrate/genesis-liquidity/pallet/Cargo.toml index 5ce41383a..068902d90 100644 --- a/substrate/genesis-liquidity/pallet/Cargo.toml +++ b/substrate/genesis-liquidity/pallet/Cargo.toml @@ -56,6 +56,7 @@ std = [ "genesis-liquidity-primitives/std", "validator-sets-primitives/std", ] +try-runtime = [] # TODO fast-epoch = [] default = ["std"] diff --git a/substrate/runtime/src/abi.rs b/substrate/runtime/src/abi.rs index 45c2aa334..146ce8aec 100644 --- a/substrate/runtime/src/abi.rs +++ b/substrate/runtime/src/abi.rs @@ -7,7 +7,7 @@ use serai_abi::Call; use crate::{ Vec, primitives::{PublicKey, SeraiAddress}, - timestamp, coins, dex, + timestamp, coins, dex, genesis_liquidity, validator_sets::{self, MembershipProof}, in_instructions, signals, babe, grandpa, RuntimeCall, }; @@ -89,6 +89,17 @@ impl From for RuntimeCall { send_to: send_to.into(), }), }, + Call::GenesisLiquidity(gl) => match gl { + serai_abi::genesis_liquidity::Call::remove_coin_liquidity { balance } => { + RuntimeCall::GenesisLiquidity(genesis_liquidity::Call::remove_coin_liquidity { balance }) + } + serai_abi::genesis_liquidity::Call::set_initial_price { prices, signature } => { + RuntimeCall::GenesisLiquidity(genesis_liquidity::Call::set_initial_price { + prices, + signature, + }) + } + }, Call::ValidatorSets(vs) => match vs { serai_abi::validator_sets::Call::set_keys { network, @@ -261,6 +272,15 @@ impl TryInto for RuntimeCall { } _ => Err(())?, }), + RuntimeCall::GenesisLiquidity(call) => Call::GenesisLiquidity(match call { + genesis_liquidity::Call::remove_coin_liquidity { balance } => { + serai_abi::genesis_liquidity::Call::remove_coin_liquidity { balance } + } + genesis_liquidity::Call::set_initial_price { prices, signature } => { + serai_abi::genesis_liquidity::Call::set_initial_price { prices, signature } + } + _ => Err(())?, + }), RuntimeCall::ValidatorSets(call) => Call::ValidatorSets(match call { validator_sets::Call::set_keys { network, removed_participants, key_pair, signature } => { serai_abi::validator_sets::Call::set_keys {