Skip to content

Commit

Permalink
chore: clean up and fix state lens client types in deploy.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
benluelo committed Jan 9, 2025
1 parent 226c6b7 commit 5ac22cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
24 changes: 12 additions & 12 deletions evm/scripts/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
13 changes: 0 additions & 13 deletions voyager/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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()))))]
Expand All @@ -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)]
Expand Down

0 comments on commit 5ac22cb

Please sign in to comment.