Skip to content

Commit

Permalink
rename its module too
Browse files Browse the repository at this point in the history
  • Loading branch information
Foivos committed Dec 11, 2024
1 parent 6f8e5da commit e021873
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion move/example/sources/its/its.move
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use gas_service::gas_service::GasService;
use its::coin_info;
use its::coin_management;
use its::discovery as its_discovery;
use its::its::{Self, InterchainTokenService};
use its::interchain_token_service::{Self, InterchainTokenService};
use its::token_id::TokenId;
use relayer_discovery::discovery::RelayerDiscovery;
use relayer_discovery::transaction::{Self, Transaction};
Expand Down
14 changes: 7 additions & 7 deletions move/its/sources/discovery.move
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module its::discovery;

use abi::abi::{Self, AbiReader};
use its::its::InterchainTokenService;
use its::interchain_token_service::InterchainTokenService;
use its::token_id::{Self, TokenId};
use relayer_discovery::discovery::RelayerDiscovery;
use relayer_discovery::transaction::{Self, Transaction, package_id};
Expand Down Expand Up @@ -212,7 +212,7 @@ fun initial_tx(its: &InterchainTokenService): Transaction {
#[test]
fun test_discovery_initial() {
let ctx = &mut sui::tx_context::dummy();
let mut its = its::its::create_for_testing(ctx);
let mut its = its::interchain_token_service::create_for_testing(ctx);
let mut discovery = relayer_discovery::discovery::new(ctx);

register_transaction(&mut its, &mut discovery);
Expand All @@ -230,7 +230,7 @@ fun test_discovery_initial() {
#[test]
fun test_discovery_interchain_transfer() {
let ctx = &mut sui::tx_context::dummy();
let mut its = its::its::create_for_testing(ctx);
let mut its = its::interchain_token_service::create_for_testing(ctx);
let mut discovery = relayer_discovery::discovery::new(ctx);

register_transaction(&mut its, &mut discovery);
Expand Down Expand Up @@ -286,7 +286,7 @@ fun test_discovery_interchain_transfer() {
#[test]
fun test_discovery_interchain_transfer_with_data() {
let ctx = &mut sui::tx_context::dummy();
let mut its = its::its::create_for_testing(ctx);
let mut its = its::interchain_token_service::create_for_testing(ctx);
let mut discovery = relayer_discovery::discovery::new(ctx);

register_transaction(&mut its, &mut discovery);
Expand Down Expand Up @@ -333,7 +333,7 @@ fun test_discovery_interchain_transfer_with_data() {
#[test]
fun test_discovery_deploy_token() {
let ctx = &mut sui::tx_context::dummy();
let mut its = its::its::create_for_testing(ctx);
let mut its = its::interchain_token_service::create_for_testing(ctx);
let mut discovery = relayer_discovery::discovery::new(ctx);

register_transaction(&mut its, &mut discovery);
Expand Down Expand Up @@ -444,7 +444,7 @@ fun test_interchain_transfer_info_invalid_message_type() {
#[test]
fun test_discovery_hub_message() {
let ctx = &mut sui::tx_context::dummy();
let mut its = its::its::create_for_testing(ctx);
let mut its = its::interchain_token_service::create_for_testing(ctx);
let mut discovery = relayer_discovery::discovery::new(ctx);

register_transaction(&mut its, &mut discovery);
Expand Down Expand Up @@ -504,7 +504,7 @@ fun test_discovery_hub_message() {
#[expected_failure(abort_code = EUnsupportedMessageType)]
fun test_call_info_unsupported_message_type() {
let ctx = &mut sui::tx_context::dummy();
let its = its::its::create_for_testing(ctx);
let its = its::interchain_token_service::create_for_testing(ctx);

let mut writer = abi::new_writer(1);
writer.write_u256(5);
Expand Down
2 changes: 1 addition & 1 deletion move/its/sources/interchain_token_service.move
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module its::its;
module its::interchain_token_service;

use axelar_gateway::channel::{ApprovedMessage, Channel};
use axelar_gateway::message_ticket::MessageTicket;
Expand Down
2 changes: 1 addition & 1 deletion move/squid/sources/squid/discovery.move
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module squid::discovery;

use axelar_gateway::gateway::Gateway;
use its::its::InterchainTokenService;
use its::interchain_token_service::InterchainTokenService;
use relayer_discovery::discovery::RelayerDiscovery;
use relayer_discovery::transaction::{Self, MoveCall, Transaction};
use squid::deepbook_v3;
Expand Down
6 changes: 3 additions & 3 deletions move/squid/sources/squid/squid.move
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module squid::squid;

use axelar_gateway::channel::ApprovedMessage;
use its::its::InterchainTokenService;
use its::interchain_token_service::InterchainTokenService;
use squid::owner_cap::{Self, OwnerCap};
use squid::squid_v0::{Self, Squid_v0};
use squid::swap_info::SwapInfo;
Expand Down Expand Up @@ -175,7 +175,7 @@ use its::coin::COIN;
fun test_start_swap() {
let ctx = &mut tx_context::dummy();
let clock = sui::clock::create_for_testing(ctx);
let mut its = its::its::create_for_testing(ctx);
let mut its = its::interchain_token_service::create_for_testing(ctx);
let mut squid = new_for_testing(ctx);

let coin_info = its::coin_info::from_info<COIN>(
Expand All @@ -195,7 +195,7 @@ fun test_start_swap() {
);

// This gives some coin to InterchainTokenService
let interchain_transfer_ticket = its::its::prepare_interchain_transfer(
let interchain_transfer_ticket = its::interchain_token_service::prepare_interchain_transfer(
token_id,
coin,
std::ascii::string(b"Chain Name"),
Expand Down
2 changes: 1 addition & 1 deletion move/squid/sources/squid/transfers.move
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module squid::transfers;

use axelar_gateway::gateway::Gateway;
use its::its::{Self, InterchainTokenService};
use its::interchain_token_service::{Self, InterchainTokenService};
use its::token_id::{Self, TokenId};
use relayer_discovery::transaction::{Self, MoveCall};
use squid::squid::Squid;
Expand Down
6 changes: 3 additions & 3 deletions move/squid/sources/squid/versioned/squid_v0.move
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module squid::squid_v0;

use axelar_gateway::channel::{Self, Channel, ApprovedMessage};
use its::its::InterchainTokenService;
use its::interchain_token_service::InterchainTokenService;
use squid::coin_bag::{Self, CoinBag};
use squid::swap_info::{Self, SwapInfo};
use std::ascii::String;
Expand Down Expand Up @@ -114,7 +114,7 @@ use sui::test_utils::destroy;
fun test_start_swap() {
let ctx = &mut tx_context::dummy();
let clock = sui::clock::create_for_testing(ctx);
let mut its = its::its::create_for_testing(ctx);
let mut its = its::interchain_token_service::create_for_testing(ctx);
let squid = new_for_testing(ctx);

let coin_info = its::coin_info::from_info<COIN>(
Expand All @@ -134,7 +134,7 @@ fun test_start_swap() {
);

// This gives some coin to the service.
let interchain_transfer_ticket = its::its::prepare_interchain_transfer(
let interchain_transfer_ticket = its::interchain_token_service::prepare_interchain_transfer(
token_id,
coin,
std::ascii::string(b"Chain Name"),
Expand Down
10 changes: 5 additions & 5 deletions test/its.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe('ITS', () => {
const txBuilder = new TxBuilder(client);

await txBuilder.moveCall({
target: `${deployments.example.packageId}::its::register_transaction`,
target: `${deployments.example.packageId}::interchain_token_service::register_transaction`,
arguments: [objectIds.relayerDiscovery, objectIds.singleton, objectIds.its, CLOCK_PACKAGE_ID],
});

Expand All @@ -164,7 +164,7 @@ describe('ITS', () => {
it('should register a coin successfully', async () => {
const txBuilder = new TxBuilder(client);
await txBuilder.moveCall({
target: `${deployments.example.packageId}::its::register_coin`,
target: `${deployments.example.packageId}::interchain_token_service::register_coin`,
arguments: [objectIds.its, objectIds.tokenCoinMetadata],
typeArguments: [`${deployments.example.packageId}::token::TOKEN`],
});
Expand Down Expand Up @@ -202,7 +202,7 @@ describe('ITS', () => {
});

await txBuilder.moveCall({
target: `${deployments.example.packageId}::its::send_interchain_transfer_call`,
target: `${deployments.example.packageId}::interchain_token_service::send_interchain_transfer_call`,
arguments: [
objectIds.singleton,
objectIds.its,
Expand Down Expand Up @@ -272,7 +272,7 @@ describe('ITS', () => {
});

await txBuilder.moveCall({
target: `${deployments.example.packageId}::its::deploy_remote_interchain_token`,
target: `${deployments.example.packageId}::interchain_token_service::deploy_remote_interchain_token`,
arguments: [
objectIds.its,
objectIds.gateway,
Expand Down Expand Up @@ -310,7 +310,7 @@ describe('ITS', () => {
const txBuilder = new TxBuilder(client);

await txBuilder.moveCall({
target: `${deployments.its.packageId}::its::give_unregistered_coin`,
target: `${deployments.its.packageId}::interchain_token_service::give_unregistered_coin`,
arguments: [objectIds.its, treasuryCap, metadata],
typeArguments: [typeArg],
});
Expand Down
6 changes: 3 additions & 3 deletions test/squid.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ describe('Squid', () => {
});

const interchainTransfer = await builder.moveCall({
target: `${deployments.its.packageId}::its::prepare_interchain_transfer`,
target: `${deployments.its.packageId}::interchain_token_service::prepare_interchain_transfer`,
arguments: [tokenId, input, trustedSourceChain, '0xadd1', '0x', channel],
typeArguments: [coins[coinName].type],
});

const messageTicket = await builder.moveCall({
target: `${deployments.its.packageId}::its::send_interchain_transfer`,
target: `${deployments.its.packageId}::interchain_token_service::send_interchain_transfer`,
arguments: [objectIds.its, interchainTransfer, CLOCK_PACKAGE_ID],
typeArguments: [coins[coinName].type],
});
Expand Down Expand Up @@ -267,7 +267,7 @@ describe('Squid', () => {
typeArguments: [coins[coin].type],
});
await builder.moveCall({
target: `${deployments.its.packageId}::its::register_coin`,
target: `${deployments.its.packageId}::interchain_token_service::register_coin`,
arguments: [objectIds.its, coinInfo, coinManagment],
typeArguments: [coins[coin].type],
});
Expand Down
2 changes: 1 addition & 1 deletion test/testutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ async function setupTrustedAddresses(client, keypair, objectIds, deployments, tr
});

await trustedAddressTxBuilder.moveCall({
target: `${deployments.its.packageId}::its::set_trusted_addresses`,
target: `${deployments.its.packageId}::interchain_token_service::set_trusted_addresses`,
arguments: [objectIds.its, objectIds.itsOwnerCap, trustedAddressesObject],
});

Expand Down

0 comments on commit e021873

Please sign in to comment.