Skip to content

Commit

Permalink
chore: rename test to example in gmp.js
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Aug 23, 2024
1 parent a7f9613 commit 40c5b7c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sui/gmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ async function sendCommand(keypair, client, contracts, args, options) {
const [destinationChain, destinationAddress, feeAmount, payload] = args;
const params = options.params;

const [testConfig, gasServiceConfig] = contracts;
const [exampleConfig, gasServiceConfig] = contracts;
const gasServiceObjectId = gasServiceConfig.objects.GasService;
const singletonObjectId = testConfig.objects.Singleton;
const singletonObjectId = exampleConfig.objects.Singleton;

const unitAmount = getUnitAmount(feeAmount);
const walletAddress = keypair.toSuiAddress();
Expand All @@ -33,7 +33,7 @@ async function sendCommand(keypair, client, contracts, args, options) {
const [coin] = tx.splitCoins(tx.gas, [unitAmount]);

tx.moveCall({
target: `${testConfig.address}::test::send_call`,
target: `${exampleConfig.address}::gmp::send_call`,
arguments: [
tx.object(singletonObjectId),
tx.object(gasServiceObjectId),
Expand All @@ -52,18 +52,18 @@ async function sendCommand(keypair, client, contracts, args, options) {
}

async function execute(keypair, client, contracts, args, options) {
const [testConfig, , axelarGatewayConfig] = contracts;
const [exampleConfig, , axelarGatewayConfig] = contracts;

const [sourceChain, messageId, sourceAddress, payload] = args;

const gatewayObjectId = axelarGatewayConfig.objects.Gateway;
const discoveryObjectId = axelarGatewayConfig.objects.RelayerDiscovery;

// Get the channel id from the options or use the channel id from the deployed test contract object.
const channelId = options.channelId || testConfig.objects.ChannelId;
// Get the channel id from the options or use the channel id from the deployed Example contract object.
const channelId = options.channelId || exampleConfig.objects.ChannelId;

if (!channelId) {
throw new Error('Please provide either a channel id (--channelId) or deploy the test contract');
throw new Error('Please provide either a channel id (--channelId) or deploy the Example contract');
}

// Get Discovery table id from discovery object
Expand Down Expand Up @@ -150,7 +150,7 @@ async function processCommand(command, chain, args, options) {

await printWalletInfo(keypair, client, chain, options);

const contracts = [chain.contracts.Test, chain.contracts.GasService, chain.contracts.AxelarGateway];
const contracts = [chain.contracts.Example, chain.contracts.GasService, chain.contracts.AxelarGateway];

await command(keypair, client, contracts, args, options);
}
Expand Down

0 comments on commit 40c5b7c

Please sign in to comment.