diff --git a/contracts/axelar-gas-service/src/contract.rs b/contracts/axelar-gas-service/src/contract.rs index efe88339..9108ba60 100644 --- a/contracts/axelar-gas-service/src/contract.rs +++ b/contracts/axelar-gas-service/src/contract.rs @@ -4,10 +4,8 @@ use crate::error::ContractError; use crate::event; use crate::interface::AxelarGasServiceInterface; use crate::storage_types::DataKey; -use axelar_soroban_std::shared_interfaces::{ - migrate, MigratableInterface, OwnableInterface, UpgradableInterface, -}; -use axelar_soroban_std::{ensure, shared_interfaces, types::Token}; +use axelar_soroban_std::interfaces::{MigratableInterface, OwnableInterface, UpgradableInterface}; +use axelar_soroban_std::{ensure, interfaces, types::Token}; #[contract] pub struct AxelarGasService; @@ -16,7 +14,7 @@ pub struct AxelarGasService; impl AxelarGasService { /// Initialize the gas service contract with a gas_collector address. pub fn __constructor(env: Env, owner: Address, gas_collector: Address) { - shared_interfaces::set_owner(&env, &owner); + interfaces::set_owner(&env, &owner); env.storage() .instance() .set(&DataKey::GasCollector, &gas_collector); @@ -34,7 +32,7 @@ impl MigratableInterface for AxelarGasService { type Error = ContractError; fn migrate(env: &Env, migration_data: ()) -> Result<(), ContractError> { - migrate::(env, || Self::run_migration(env, migration_data)) + interfaces::migrate::(env, || Self::run_migration(env, migration_data)) .map_err(|_| ContractError::MigrationNotAllowed) } } @@ -46,7 +44,7 @@ impl UpgradableInterface for AxelarGasService { } fn upgrade(env: &Env, new_wasm_hash: BytesN<32>) { - shared_interfaces::upgrade::(env, new_wasm_hash); + interfaces::upgrade::(env, new_wasm_hash); } } @@ -54,7 +52,7 @@ impl UpgradableInterface for AxelarGasService { impl OwnableInterface for AxelarGasService { // boilerplate necessary for the contractimpl macro to include function in the generated client fn owner(env: &Env) -> Address { - shared_interfaces::owner(env) + interfaces::owner(env) } } diff --git a/contracts/axelar-gateway/src/contract.rs b/contracts/axelar-gateway/src/contract.rs index 52878d11..6a9f1d0c 100644 --- a/contracts/axelar-gateway/src/contract.rs +++ b/contracts/axelar-gateway/src/contract.rs @@ -4,10 +4,11 @@ use crate::messaging_interface::AxelarGatewayMessagingInterface; use crate::storage_types::{DataKey, MessageApprovalKey, MessageApprovalValue}; use crate::types::{CommandType, Message, Proof, WeightedSigners}; use crate::{auth, event}; -use axelar_soroban_std::shared_interfaces::{migrate, UpgradableInterface}; -use axelar_soroban_std::shared_interfaces::{MigratableInterface, OwnableInterface}; +use axelar_soroban_std::interfaces::{ + migrate, MigratableInterface, OwnableInterface, UpgradableInterface, +}; use axelar_soroban_std::ttl::{INSTANCE_TTL_EXTEND_TO, INSTANCE_TTL_THRESHOLD}; -use axelar_soroban_std::{ensure, shared_interfaces}; +use axelar_soroban_std::{ensure, interfaces}; use soroban_sdk::xdr::ToXdr; use soroban_sdk::{contract, contractimpl, Address, Bytes, BytesN, Env, String, Vec}; @@ -35,7 +36,7 @@ impl UpgradableInterface for AxelarGateway { // boilerplate necessary for the contractimpl macro to include function in the generated client fn upgrade(env: &Env, new_wasm_hash: BytesN<32>) { - shared_interfaces::upgrade::(env, new_wasm_hash); + interfaces::upgrade::(env, new_wasm_hash); } } @@ -43,7 +44,7 @@ impl UpgradableInterface for AxelarGateway { impl OwnableInterface for AxelarGateway { // boilerplate necessary for the contractimpl macro to include function in the generated client fn owner(env: &Env) -> Address { - shared_interfaces::owner(env) + interfaces::owner(env) } } @@ -59,7 +60,7 @@ impl AxelarGateway { previous_signers_retention: u64, initial_signers: Vec, ) -> Result<(), ContractError> { - shared_interfaces::set_owner(&env, &owner); + interfaces::set_owner(&env, &owner); env.storage().instance().set(&DataKey::Operator, &operator); auth::initialize_auth( @@ -254,7 +255,7 @@ impl AxelarGatewayInterface for AxelarGateway { let owner: Address = Self::owner(&env); owner.require_auth(); - shared_interfaces::set_owner(&env, &new_owner); + interfaces::set_owner(&env, &new_owner); event::transfer_ownership(&env, owner, new_owner); } diff --git a/contracts/axelar-gateway/src/interface.rs b/contracts/axelar-gateway/src/interface.rs index 079c3193..9c2081ea 100644 --- a/contracts/axelar-gateway/src/interface.rs +++ b/contracts/axelar-gateway/src/interface.rs @@ -3,7 +3,7 @@ use crate::{ types::{Message, Proof, WeightedSigners}, AxelarGatewayMessagingInterface, }; -use axelar_soroban_std::shared_interfaces::UpgradableInterface; +use axelar_soroban_std::interfaces::UpgradableInterface; use soroban_sdk::{contractclient, Address, BytesN, Env, Vec}; #[contractclient(name = "AxelarGatewayClient")] diff --git a/contracts/axelar-operators/src/contract.rs b/contracts/axelar-operators/src/contract.rs index c483bf80..c33e7b40 100644 --- a/contracts/axelar-operators/src/contract.rs +++ b/contracts/axelar-operators/src/contract.rs @@ -1,9 +1,8 @@ use crate::error::ContractError; use crate::event; use crate::storage_types::DataKey; -use axelar_soroban_std::shared_interfaces::{migrate, UpgradableInterface}; -use axelar_soroban_std::shared_interfaces::{MigratableInterface, OwnableInterface}; -use axelar_soroban_std::{ensure, shared_interfaces}; +use axelar_soroban_std::interfaces::{MigratableInterface, OwnableInterface, UpgradableInterface}; +use axelar_soroban_std::{ensure, interfaces}; use soroban_sdk::{contract, contractimpl, Address, BytesN, Env, String, Symbol, Val, Vec}; #[contract] @@ -12,7 +11,7 @@ pub struct AxelarOperators; #[contractimpl] impl AxelarOperators { pub fn __constructor(env: Env, owner: Address) { - shared_interfaces::set_owner(&env, &owner); + interfaces::set_owner(&env, &owner); } pub fn transfer_ownership(env: Env, new_owner: Address) -> Result<(), ContractError> { @@ -20,7 +19,7 @@ impl AxelarOperators { owner.require_auth(); - shared_interfaces::set_owner(&env, &new_owner); + interfaces::set_owner(&env, &new_owner); event::transfer_ownership(&env, owner, new_owner); @@ -106,7 +105,7 @@ impl MigratableInterface for AxelarOperators { type Error = ContractError; fn migrate(env: &Env, migration_data: ()) -> Result<(), ContractError> { - migrate::(env, || Self::run_migration(env, migration_data)) + interfaces::migrate::(env, || Self::run_migration(env, migration_data)) .map_err(|_| ContractError::MigrationNotAllowed) } } @@ -118,7 +117,7 @@ impl UpgradableInterface for AxelarOperators { } fn upgrade(env: &Env, new_wasm_hash: BytesN<32>) { - shared_interfaces::upgrade::(env, new_wasm_hash); + interfaces::upgrade::(env, new_wasm_hash); } } @@ -126,6 +125,6 @@ impl UpgradableInterface for AxelarOperators { impl OwnableInterface for AxelarOperators { // boilerplate necessary for the contractimpl macro to include function in the generated client fn owner(env: &Env) -> Address { - shared_interfaces::owner(env) + interfaces::owner(env) } } diff --git a/contracts/interchain-token-service/src/contract.rs b/contracts/interchain-token-service/src/contract.rs index 7cc4ea4a..9e5a4958 100644 --- a/contracts/interchain-token-service/src/contract.rs +++ b/contracts/interchain-token-service/src/contract.rs @@ -1,5 +1,5 @@ use axelar_soroban_std::types::Token; -use axelar_soroban_std::{ensure, shared_interfaces}; +use axelar_soroban_std::{ensure, interfaces}; use soroban_sdk::{bytes, contract, contractimpl, Address, Bytes, BytesN, Env, FromVal, String}; use crate::error::ContractError; @@ -12,9 +12,7 @@ use axelar_gas_service::AxelarGasServiceClient; use axelar_gateway::AxelarGatewayMessagingClient; use axelar_gateway::executable::AxelarExecutableInterface; -use axelar_soroban_std::shared_interfaces::{ - migrate, MigratableInterface, OwnableInterface, UpgradableInterface, -}; +use axelar_soroban_std::interfaces::{MigratableInterface, OwnableInterface, UpgradableInterface}; #[contract] pub struct InterchainTokenService; @@ -22,7 +20,7 @@ pub struct InterchainTokenService; #[contractimpl] impl InterchainTokenService { pub fn __constructor(env: Env, owner: Address, gateway: Address, gas_service: Address) { - shared_interfaces::set_owner(&env, &owner); + interfaces::set_owner(&env, &owner); env.storage().instance().set(&DataKey::Gateway, &gateway); env.storage() .instance() @@ -101,7 +99,7 @@ impl InterchainTokenServiceInterface for InterchainTokenService { let owner = Self::owner(env); owner.require_auth(); - shared_interfaces::set_owner(env, &new_owner); + interfaces::set_owner(env, &new_owner); event::transfer_ownership(env, owner, new_owner); } @@ -246,7 +244,7 @@ impl MigratableInterface for InterchainTokenService { type Error = axelar_gateway::error::ContractError; fn migrate(env: &Env, migration_data: ()) -> Result<(), axelar_gateway::error::ContractError> { - migrate::(env, || Self::run_migration(env, migration_data)) + interfaces::migrate::(env, || Self::run_migration(env, migration_data)) .map_err(|_| axelar_gateway::error::ContractError::MigrationNotAllowed) } } @@ -258,7 +256,7 @@ impl UpgradableInterface for InterchainTokenService { } fn upgrade(env: &Env, new_wasm_hash: BytesN<32>) { - shared_interfaces::upgrade::(env, new_wasm_hash); + interfaces::upgrade::(env, new_wasm_hash); } } @@ -266,6 +264,6 @@ impl UpgradableInterface for InterchainTokenService { impl OwnableInterface for InterchainTokenService { // boilerplate necessary for the contractimpl macro to include function in the generated client fn owner(env: &Env) -> Address { - shared_interfaces::owner(env) + interfaces::owner(env) } } diff --git a/contracts/interchain-token/src/contract.rs b/contracts/interchain-token/src/contract.rs index ffe6c502..e7c2f752 100644 --- a/contracts/interchain-token/src/contract.rs +++ b/contracts/interchain-token/src/contract.rs @@ -10,10 +10,8 @@ use crate::storage_types::DataKey; use crate::interface::InterchainTokenInterface; use crate::storage_types::{AllowanceDataKey, AllowanceValue}; -use axelar_soroban_std::shared_interfaces::{ - migrate, MigratableInterface, OwnableInterface, UpgradableInterface, -}; -use axelar_soroban_std::{ensure, shared_interfaces}; +use axelar_soroban_std::interfaces::{MigratableInterface, OwnableInterface, UpgradableInterface}; +use axelar_soroban_std::{ensure, interfaces}; use soroban_sdk::token::TokenInterface; use soroban_sdk::{assert_with_error, contract, contractimpl, token, Address, BytesN, Env, String}; @@ -31,7 +29,7 @@ impl InterchainToken { token_id: BytesN<32>, token_meta_data: TokenMetadata, ) -> Result<(), ContractError> { - shared_interfaces::set_owner(&env, &owner); + interfaces::set_owner(&env, &owner); Self::validate_token_metadata(token_meta_data.clone())?; @@ -114,7 +112,7 @@ impl InterchainTokenInterface for InterchainToken { owner.require_auth(); - shared_interfaces::set_owner(&env, &new_owner); + interfaces::set_owner(&env, &new_owner); TokenUtils::new(&env) .events() @@ -366,7 +364,7 @@ impl MigratableInterface for InterchainToken { type Error = ContractError; fn migrate(env: &Env, migration_data: ()) -> Result<(), ContractError> { - migrate::(env, || Self::run_migration(env, migration_data)) + interfaces::migrate::(env, || Self::run_migration(env, migration_data)) .map_err(|_| ContractError::MigrationNotAllowed) } } @@ -378,7 +376,7 @@ impl UpgradableInterface for InterchainToken { } fn upgrade(env: &Env, new_wasm_hash: BytesN<32>) { - shared_interfaces::upgrade::(env, new_wasm_hash); + interfaces::upgrade::(env, new_wasm_hash); } } @@ -386,6 +384,6 @@ impl UpgradableInterface for InterchainToken { impl OwnableInterface for InterchainToken { // boilerplate necessary for the contractimpl macro to include function in the generated client fn owner(env: &Env) -> Address { - shared_interfaces::owner(env) + interfaces::owner(env) } } diff --git a/contracts/upgrader/src/contract.rs b/contracts/upgrader/src/contract.rs index 6a4bc94f..a7ab428f 100644 --- a/contracts/upgrader/src/contract.rs +++ b/contracts/upgrader/src/contract.rs @@ -1,6 +1,6 @@ use crate::error::ContractError; use axelar_soroban_std::ensure; -use axelar_soroban_std::shared_interfaces::UpgradableClient; +use axelar_soroban_std::interfaces::UpgradableClient; use soroban_sdk::{ contract, contractimpl, symbol_short, Address, BytesN, Env, String, Symbol, Val, }; diff --git a/contracts/upgrader/tests/utils/dummy_contract.rs b/contracts/upgrader/tests/utils/dummy_contract.rs index 99466be6..69509d4d 100644 --- a/contracts/upgrader/tests/utils/dummy_contract.rs +++ b/contracts/upgrader/tests/utils/dummy_contract.rs @@ -1,7 +1,7 @@ //! Dummy contract to test the [crate::Upgrader] -use axelar_soroban_std::shared_interfaces; -use axelar_soroban_std::shared_interfaces::{OwnableInterface, UpgradableInterface}; +use axelar_soroban_std::interfaces; +use axelar_soroban_std::interfaces::{OwnableInterface, UpgradableInterface}; use soroban_sdk::{contract, contracterror, contractimpl, contracttype, Address, BytesN, Env}; #[contract] @@ -23,14 +23,14 @@ impl UpgradableInterface for DummyContract { #[contractimpl] impl OwnableInterface for DummyContract { fn owner(env: &Env) -> Address { - shared_interfaces::owner(env) + interfaces::owner(env) } } #[contractimpl] impl DummyContract { pub fn __constructor(env: Env, owner: Address) { - shared_interfaces::set_owner(&env, &owner); + interfaces::set_owner(&env, &owner); } } diff --git a/contracts/upgrader/tests/utils/dummy_contract_after_upgrade.rs b/contracts/upgrader/tests/utils/dummy_contract_after_upgrade.rs index d1b067e0..1df4ccd3 100644 --- a/contracts/upgrader/tests/utils/dummy_contract_after_upgrade.rs +++ b/contracts/upgrader/tests/utils/dummy_contract_after_upgrade.rs @@ -1,7 +1,7 @@ //! Base for the dummy.wasm file. This is the dummy contract after upgrade. -use axelar_soroban_std::shared_interfaces; -use axelar_soroban_std::shared_interfaces::{OwnableInterface, UpgradableInterface}; +use axelar_soroban_std::interfaces; +use axelar_soroban_std::interfaces::{OwnableInterface, UpgradableInterface}; use soroban_sdk::{contract, contracterror, contractimpl, contracttype, Address, BytesN, Env}; #[contract] @@ -23,14 +23,14 @@ impl UpgradableInterface for DummyContract { #[contractimpl] impl OwnableInterface for DummyContract { fn owner(env: &Env) -> Address { - shared_interfaces::owner(env) + interfaces::owner(env) } } #[contractimpl] impl DummyContract { pub fn __constructor(env: Env, owner: Address) { - shared_interfaces::set_owner(&env, &owner); + interfaces::set_owner(&env, &owner); } pub fn migrate(env: Env, migration_data: soroban_sdk::String) -> Result<(), ContractError> { diff --git a/packages/axelar-soroban-std/src/testdata/test_format_last_emitted_event.golden b/packages/axelar-soroban-std/src/contract_traits/testdata/test_format_last_emitted_event.golden similarity index 100% rename from packages/axelar-soroban-std/src/testdata/test_format_last_emitted_event.golden rename to packages/axelar-soroban-std/src/contract_traits/testdata/test_format_last_emitted_event.golden diff --git a/packages/axelar-soroban-std/src/events.rs b/packages/axelar-soroban-std/src/events.rs index 62e931ce..d25ec41e 100644 --- a/packages/axelar-soroban-std/src/events.rs +++ b/packages/axelar-soroban-std/src/events.rs @@ -128,7 +128,7 @@ mod test { struct Contract; #[test] - fn test_format_last_emitted_event() { + fn format_last_emitted_event() { let env = Env::default(); let expected = TestEvent { topic1: Symbol::new(&env, "topic1"), diff --git a/packages/axelar-soroban-std/src/interfaces/mod.rs b/packages/axelar-soroban-std/src/interfaces/mod.rs new file mode 100644 index 00000000..3565fc27 --- /dev/null +++ b/packages/axelar-soroban-std/src/interfaces/mod.rs @@ -0,0 +1,5 @@ +#[cfg(test)] +mod testdata; +mod upgradable; + +pub use upgradable::*; diff --git a/packages/axelar-soroban-std/src/testdata/contract.rs b/packages/axelar-soroban-std/src/interfaces/testdata/contract.rs similarity index 79% rename from packages/axelar-soroban-std/src/testdata/contract.rs rename to packages/axelar-soroban-std/src/interfaces/testdata/contract.rs index 9490a2e6..499e36c0 100644 --- a/packages/axelar-soroban-std/src/testdata/contract.rs +++ b/packages/axelar-soroban-std/src/interfaces/testdata/contract.rs @@ -1,5 +1,4 @@ -use crate::shared_interfaces; -use crate::shared_interfaces::{MigratableInterface, OwnableInterface, UpgradableInterface}; +use crate::interfaces::{upgradable, MigratableInterface, OwnableInterface, UpgradableInterface}; use soroban_sdk::testutils::arbitrary::std; use soroban_sdk::{ contract, contracterror, contractimpl, contracttype, Address, BytesN, Env, String, @@ -29,7 +28,7 @@ impl MigratableInterface for Contract { type Error = ContractError; fn migrate(env: &Env, migration_data: ()) -> Result<(), ContractError> { - shared_interfaces::migrate::(env, || Self::run_migration(env, migration_data)) + upgradable::migrate::(env, || Self::run_migration(env, migration_data)) .map_err(|_| ContractError::SomeFailure) } } @@ -37,7 +36,7 @@ impl MigratableInterface for Contract { #[contractimpl] impl OwnableInterface for Contract { fn owner(env: &Env) -> Address { - shared_interfaces::owner(env) + upgradable::owner(env) } } @@ -48,7 +47,7 @@ impl UpgradableInterface for Contract { } fn upgrade(env: &Env, new_wasm_hash: BytesN<32>) { - shared_interfaces::upgrade::(env, new_wasm_hash); + upgradable::upgrade::(env, new_wasm_hash); } } diff --git a/packages/axelar-soroban-std/src/testdata/contract.wasm b/packages/axelar-soroban-std/src/interfaces/testdata/contract.wasm similarity index 100% rename from packages/axelar-soroban-std/src/testdata/contract.wasm rename to packages/axelar-soroban-std/src/interfaces/testdata/contract.wasm diff --git a/packages/axelar-soroban-std/src/testdata/migrate_succeeds_if_owner_is_authenticated_and_called_after_upgrade.golden b/packages/axelar-soroban-std/src/interfaces/testdata/migrate_succeeds_if_owner_is_authenticated_and_called_after_upgrade.golden similarity index 100% rename from packages/axelar-soroban-std/src/testdata/migrate_succeeds_if_owner_is_authenticated_and_called_after_upgrade.golden rename to packages/axelar-soroban-std/src/interfaces/testdata/migrate_succeeds_if_owner_is_authenticated_and_called_after_upgrade.golden diff --git a/packages/axelar-soroban-std/src/testdata/mod.rs b/packages/axelar-soroban-std/src/interfaces/testdata/mod.rs similarity index 100% rename from packages/axelar-soroban-std/src/testdata/mod.rs rename to packages/axelar-soroban-std/src/interfaces/testdata/mod.rs diff --git a/packages/axelar-soroban-std/src/shared_interfaces.rs b/packages/axelar-soroban-std/src/interfaces/upgradable.rs similarity index 93% rename from packages/axelar-soroban-std/src/shared_interfaces.rs rename to packages/axelar-soroban-std/src/interfaces/upgradable.rs index 000a3079..e503e0b0 100644 --- a/packages/axelar-soroban-std/src/shared_interfaces.rs +++ b/packages/axelar-soroban-std/src/interfaces/upgradable.rs @@ -144,12 +144,11 @@ pub enum MigrationError { #[cfg(test)] mod test { - use crate::shared_interfaces::{OwnershipClient, UpgradableClient, UpgradedEvent}; - use crate::{ - assert_invoke_auth_err, assert_invoke_auth_ok, events, shared_interfaces, testdata, - }; + use crate::interfaces::upgradable::{OwnershipClient, UpgradableClient, UpgradedEvent}; + use crate::{assert_invoke_auth_err, assert_invoke_auth_ok, events}; - use crate::testdata::contract::ContractClient; + use crate::interfaces::testdata::contract::ContractClient; + use crate::interfaces::{testdata, upgradable}; use soroban_sdk::testutils::{Address as _, MockAuth, MockAuthInvoke}; use soroban_sdk::{contracttype, Address, Env, String}; @@ -196,7 +195,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); assert_eq!(OwnershipClient::new(&env, &contract_id).owner(), owner); @@ -221,7 +220,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); assert!(UpgradableClient::new(&env, &contract_id) @@ -237,7 +236,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); let client = UpgradableClient::new(&env, &contract_id); @@ -252,7 +251,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); let client = UpgradableClient::new(&env, &contract_id); @@ -267,7 +266,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); let upgrade_client = UpgradableClient::new(&env, &contract_id); @@ -285,7 +284,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); let upgrade_client = UpgradableClient::new(&env, &contract_id); @@ -302,7 +301,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); let client = ContractClient::new(&env, &contract_id); @@ -317,7 +316,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); let upgradable_client = UpgradableClient::new(&env, &contract_id); @@ -346,8 +345,8 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); - shared_interfaces::start_migration(&env); + upgradable::set_owner(&env, &owner); + upgradable::start_migration(&env); }); let client = ContractClient::new(&env, &contract_id); @@ -362,7 +361,7 @@ mod test { let owner = Address::generate(&env); env.as_contract(&contract_id, || { - shared_interfaces::set_owner(&env, &owner); + upgradable::set_owner(&env, &owner); }); let upgradable_client = UpgradableClient::new(&env, &contract_id); diff --git a/packages/axelar-soroban-std/src/lib.rs b/packages/axelar-soroban-std/src/lib.rs index ec4d6eb1..1b9bd3e7 100644 --- a/packages/axelar-soroban-std/src/lib.rs +++ b/packages/axelar-soroban-std/src/lib.rs @@ -16,11 +16,8 @@ pub mod types; pub mod error; -pub mod shared_interfaces; - pub mod ttl; pub mod events; -#[cfg(test)] -mod testdata; +pub mod interfaces; diff --git a/packages/axelar-soroban-std/src/testdata/format_last_emitted_event.golden b/packages/axelar-soroban-std/src/testdata/format_last_emitted_event.golden new file mode 100644 index 00000000..6ed8dd01 --- /dev/null +++ b/packages/axelar-soroban-std/src/testdata/format_last_emitted_event.golden @@ -0,0 +1,3 @@ +contract: Contract(CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM) +topics: (Symbol(topic1), String(topic2), 10) +data: (String(data1), BytesN<32>(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)) \ No newline at end of file