From a5288b2bbb6e3ebc8ec86f9c0dc7e924d5101690 Mon Sep 17 00:00:00 2001 From: lempire123 <61431140+lempire123@users.noreply.github.com> Date: Sat, 13 May 2023 20:06:58 +0200 Subject: [PATCH] change command to kebab-case --- scripts/simple.sh | 25 +++++++++++++------------ src/cli/simple/command.rs | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/simple.sh b/scripts/simple.sh index 82ec3a8..8c0d02d 100755 --- a/scripts/simple.sh +++ b/scripts/simple.sh @@ -190,18 +190,19 @@ aurora-cli --engine $ENGINE_ACCOUNT factory-set-wnear-address 0x80c6a002756e29b8 sleep 1 aurora-cli --engine $ENGINE_ACCOUNT fund-xcc-sub-account 0x43a4969cc2c22d0000c591ff4bd71983ea8a8be9 some_account.near 25.5 || error_exit # Check that Silo methods work normally. -aurora-cli --engine $ENGINE_ACCOUNT SetFixedGasCost 1 || error_exit -result=$(aurora-cli --engine $ENGINE_ACCOUNT GetFixedGasCost || error_exit) -assert_eq "$result" "1" -aurora-cli --engine $ENGINE_ACCOUNT SetWhitelistStatus "EvmAdmin" true || error_exit -result=$(aurora-cli --engine $ENGINE_ACCOUNT GetWhitelistStatus "EvmAdmin" || error_exit) -assert_eq "$result" "true" -aurora-cli --engine $ENGINE_ACCOUNT SetWhitelistStatus "Address" false || error_exit -result=$(aurora-cli --engine $ENGINE_ACCOUNT GetWhitelistStatus "Address" || error_exit) -assert_eq "$result" "false" -aurora-cli --engine $ENGINE_ACCOUNT AddEntryToWhitelist "WhitelistAddressArgs" "Address" "0x1B16948F011686AE64BB2Ba0477aeFA2Ea97084D" || error_exit -# aurora-cli --engine $ENGINE_ACCOUNT AddEntryToWhitelistBatch || error_exit -aurora-cli --engine $ENGINE_ACCOUNT RemoveEntryFromWhitelist "WhitelistAddressArgs" "Address" "0x1B16948F011686AE64BB2Ba0477aeFA2Ea97084D" || error_exit +aurora-cli --engine $ENGINE_ACCOUNT set-fixed-gas-cost 1 || error-exit +result=$(aurora-cli --engine $ENGINE_ACCOUNT get-fixed-gas-cost || error-exit) +assert-eq "$result" "1" +aurora-cli --engine $ENGINE_ACCOUNT set-whitelist-status "evm-admin" true || error-exit +result=$(aurora-cli --engine $ENGINE_ACCOUNT get-whitelist-status "evm-admin" || error-exit) +assert-eq "$result" "true" +aurora-cli --engine $ENGINE_ACCOUNT set-whitelist-status "address" false || error-exit +result=$(aurora-cli --engine $ENGINE_ACCOUNT get-whitelist-status "address" || error-exit) +assert-eq "$result" "false" +aurora-cli --engine $ENGINE_ACCOUNT add-entry-to-whitelist "whitelist-address-args" "address" "0x1B16948F011686AE64BB2Ba0477aeFA2Ea97084D" || error-exit +# aurora-cli --engine $ENGINE_ACCOUNT add-entry-to-whitelist-batch || error-exit +aurora-cli --engine $ENGINE_ACCOUNT remove-entry-from-whitelist "whitelist-address-args" "address" "0x1B16948F011686AE64BB2Ba0477aeFA2Ea97084D" || error-exit + # Stop NEAR node and clean up. finish diff --git a/src/cli/simple/command.rs b/src/cli/simple/command.rs index 11d0b9d..4fd6af8 100644 --- a/src/cli/simple/command.rs +++ b/src/cli/simple/command.rs @@ -4,7 +4,7 @@ use aurora_engine::parameters::{ }; use aurora_engine::xcc::FundXccArgs; use aurora_engine_sdk::types::near_account_to_evm_address; -use aurora_engine_silo::silo::parameters::{ +use aurora_engine::silo::parameters::{ WhitelistAccountArgs, WhitelistAddressArgs, WhitelistArgs, WhitelistKind, WhitelistKindArgs, WhitelistStatusArgs, }; @@ -501,7 +501,7 @@ pub async fn get_fixed_gas_cost(client: Client) -> anyhow::Result<()> { } pub async fn set_fixed_gas_cost(client: Client, cost: u64) -> anyhow::Result<()> { - let args = Wei::new_u64(cost).try_to_vec()?; + let args = Wei::new_u64(cost).to_bytes().to_vec(); ContractCall { method: "set_fixed_gas_cost",