Skip to content

Commit

Permalink
chore: update set-silo-params command (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
raventid authored Jan 31, 2024
1 parent 104135f commit 3be872d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion scripts/simple-silo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ sleep 2
result=$(aurora-cli --engine $ENGINE_ACCOUNT get-fixed-gas || error_exit)
assert_eq "none" "$result"
# Set fixed gas
aurora-cli --engine $ENGINE_ACCOUNT set-silo-params --cost 0 --rollback-address \
aurora-cli --engine $ENGINE_ACCOUNT set-silo-params --gas 0 --fallback-address \
0x7e5f4552091a69125d5dfcb7b8c2659029395bdf || error_exit
sleep 1
# Get fixed gas
Expand Down
8 changes: 4 additions & 4 deletions src/cli/simple/command/silo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ pub async fn set_fixed_gas(client: Client, cost: u64) -> anyhow::Result<()> {

pub async fn set_silo_params(
client: Client,
cost: u64,
rollback_address: String,
gas: u64,
fallback_address: String,
) -> anyhow::Result<()> {
let args = Some(SiloParamsArgs {
fixed_gas: EthGas::new(cost),
erc20_fallback_address: hex_to_address(&rollback_address)?,
fixed_gas: EthGas::new(gas),
erc20_fallback_address: hex_to_address(&fallback_address)?,
})
.try_to_vec()?;

Expand Down
12 changes: 6 additions & 6 deletions src/cli/simple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ pub enum Command {
SetSiloParams {
/// Fixed gas in EthGas.
#[arg(long, short)]
cost: u64,
/// Rollback EVM address.
gas: u64,
/// Fallback EVM address.
#[arg(long, short)]
rollback_address: String,
fallback_address: String,
},
/// Return a status of the whitelist
GetWhitelistStatus {
Expand Down Expand Up @@ -483,10 +483,10 @@ pub async fn run(args: Cli) -> anyhow::Result<()> {
command::silo::set_fixed_gas(client, cost).await?;
}
Command::SetSiloParams {
cost,
rollback_address,
gas,
fallback_address,
} => {
command::silo::set_silo_params(client, cost, rollback_address).await?;
command::silo::set_silo_params(client, gas, fallback_address).await?;
}
Command::GetWhitelistStatus { kind } => {
command::silo::get_whitelist_status(client, kind).await?;
Expand Down

0 comments on commit 3be872d

Please sign in to comment.