From 5ac22cbb5b928e91c7a7c2ec950d400f1b3c8077 Mon Sep 17 00:00:00 2001 From: benluelo Date: Thu, 9 Jan 2025 07:19:37 +0000 Subject: [PATCH] chore: clean up and fix state lens client types in deploy.sol --- evm/scripts/Deploy.s.sol | 24 ++++++++++++------------ voyager/src/cli.rs | 13 ------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/evm/scripts/Deploy.s.sol b/evm/scripts/Deploy.s.sol index ef3aca944d..4f21689abd 100644 --- a/evm/scripts/Deploy.s.sol +++ b/evm/scripts/Deploy.s.sol @@ -44,8 +44,8 @@ library IBC { library LightClients { string constant NAMESPACE = "lightclients"; string constant COMETBLS = "cometbls"; - string constant STATE_LENS_EVM = "state-lens/evm"; - string constant STATE_LENS_COSMOS = "state-lens/ics23-ics23"; + string constant STATE_LENS_ICS23_MPT = "state-lens/ics23/mpt"; + string constant STATE_LENS_ICS23_ICS23 = "state-lens/ics23/ics23"; function make( string memory lightClient @@ -116,7 +116,7 @@ abstract contract UnionScript is UnionBase { ) internal returns (StateLensIcs23MptClient) { return StateLensIcs23MptClient( deploy( - LightClients.make(LightClients.STATE_LENS_EVM), + LightClients.make(LightClients.STATE_LENS_ICS23_MPT), abi.encode( address(new StateLensIcs23MptClient()), abi.encodeCall( @@ -134,7 +134,7 @@ abstract contract UnionScript is UnionBase { ) internal returns (StateLensIcs23Ics23Client) { return StateLensIcs23Ics23Client( deploy( - LightClients.make(LightClients.STATE_LENS_COSMOS), + LightClients.make(LightClients.STATE_LENS_ICS23_ICS23), abi.encode( address(new StateLensIcs23Ics23Client()), abi.encodeCall( @@ -452,10 +452,10 @@ contract DeployIBC is UnionScript { ) = deployIBC(vm.addr(privateKey)); handler.registerClient(LightClients.COMETBLS, cometblsClient); handler.registerClient( - LightClients.STATE_LENS_EVM, stateLensIcs23MptClient + LightClients.STATE_LENS_ICS23_MPT, stateLensIcs23MptClient ); handler.registerClient( - LightClients.STATE_LENS_COSMOS, stateLensIcs23Ics23Client + LightClients.STATE_LENS_ICS23_ICS23, stateLensIcs23Ics23Client ); vm.stopBroadcast(); @@ -503,10 +503,10 @@ contract DeployDeployerAndIBC is UnionScript { ) = deployIBC(vm.addr(privateKey)); handler.registerClient(LightClients.COMETBLS, cometblsClient); handler.registerClient( - LightClients.STATE_LENS_EVM, stateLensIcs23MptClient + LightClients.STATE_LENS_ICS23_MPT, stateLensIcs23MptClient ); handler.registerClient( - LightClients.STATE_LENS_COSMOS, stateLensIcs23Ics23Client + LightClients.STATE_LENS_ICS23_ICS23, stateLensIcs23Ics23Client ); vm.stopBroadcast(); @@ -562,9 +562,9 @@ contract GetDeployed is Script { address cometblsClient = getDeployed(LightClients.make(LightClients.COMETBLS)); address stateLensIcs23MptClient = - getDeployed(LightClients.make(LightClients.STATE_LENS_EVM)); + getDeployed(LightClients.make(LightClients.STATE_LENS_ICS23_MPT)); address stateLensIcs23Ics23Client = - getDeployed(LightClients.make(LightClients.STATE_LENS_COSMOS)); + getDeployed(LightClients.make(LightClients.STATE_LENS_ICS23_ICS23)); address ucs00 = getDeployed(Protocols.make(Protocols.UCS00)); address ucs01 = getDeployed(Protocols.make(Protocols.UCS01)); address ucs02 = getDeployed(Protocols.make(Protocols.UCS02)); @@ -1108,7 +1108,7 @@ contract UpgradeStateLensIcs23MptClient is Script { function run() public { address stateLensIcs23MptClient = - getDeployed(LightClients.make(LightClients.STATE_LENS_EVM)); + getDeployed(LightClients.make(LightClients.STATE_LENS_ICS23_MPT)); console.log( string( abi.encodePacked( @@ -1150,7 +1150,7 @@ contract UpgradeStateLensIcs23Ics23Client is Script { function run() public { address stateLensIcs23Ics23Client = - getDeployed(LightClients.make(LightClients.STATE_LENS_COSMOS)); + getDeployed(LightClients.make(LightClients.STATE_LENS_ICS23_ICS23)); console.log( string( abi.encodePacked( diff --git a/voyager/src/cli.rs b/voyager/src/cli.rs index b7013e8022..538b2bfca4 100644 --- a/voyager/src/cli.rs +++ b/voyager/src/cli.rs @@ -9,10 +9,6 @@ use voyager_message::{ }; use voyager_vm::{BoxDynError, Op}; -// use crate::cli::handshake::HandshakeCmd; - -// pub mod handshake; - #[derive(Debug, Parser)] #[command(arg_required_else_help = true)] pub struct AppArgs { @@ -60,7 +56,6 @@ pub enum Command { /// Config related subcommands. #[command(subcommand)] Config(ConfigCmd), - // Handshake(HandshakeCmd), /// Construct a `FetchBlocks` op to send to the specified chain. InitFetch { #[arg(value_parser(|s: &str| Ok::<_, BoxDynError>(ChainId::new(s.to_owned()))))] @@ -86,14 +81,6 @@ pub enum Command { Rpc(RpcCmd), #[command(subcommand)] Msg(MsgCmd), - // Query { - // #[arg(value_parser(|s: &str| Ok::<_, BoxDynError>(ChainId::new(s.to_owned()))))] - // on: ChainId, - // #[arg(long, short = 'H', default_value_t = QueryHeight::Latest)] - // height: QueryHeight, - // #[command(subcommand)] - // path: ics24::Path, - // }, } #[derive(Debug, Subcommand)]