Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Aug 27, 2024
1 parent 51224cb commit 0a82199
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
5 changes: 3 additions & 2 deletions common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const readlineSync = require('readline-sync');
const { CosmWasmClient } = require('@cosmjs/cosmwasm-stargate');
const { ethers } = require('hardhat');
const {
utils: { keccak256, defaultAbiCoder },
utils: { keccak256, hexlify, defaultAbiCoder },
} = ethers;
const { normalizeBech32 } = require('@cosmjs/encoding');

Expand Down Expand Up @@ -389,8 +389,9 @@ async function getDomainSeparator(config, chain, options) {
}

const expectedDomainSeparator = calculateDomainSeparator(chain.axelarId, routerAddress, chainId);

if (options.domainSeparator === 'offline') {
printInfo('Computed domain separator offline')
printInfo('Computed domain separator offline');
return expectedDomainSeparator;
}

Expand Down
5 changes: 4 additions & 1 deletion sui/deploy-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ const GATEWAY_CMD_OPTIONS = [
new Option('--minimumRotationDelay <minimumRotationDelay>', 'minium delay for signer rotations (in second)')
.argParser((val) => parseInt(val) * 1000)
.default(24 * 60 * 60),
new Option('--domainSeparator <domainSeparator>', 'domain separator (pass in the keccak256 hash value OR "offline" meaning that its computed locally)'),
new Option(
'--domainSeparator <domainSeparator>',
'domain separator (pass in the keccak256 hash value OR "offline" meaning that its computed locally)',
),
new Option('--nonce <nonce>', 'nonce for the signer (defaults to HashZero)'),
new Option('--previousSigners <previousSigners>', 'number of previous signers to retain').default('15'),
];
Expand Down
22 changes: 11 additions & 11 deletions sui/gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async function approve(keypair, client, config, chain, contractConfig, args, opt

async function submitProof(keypair, client, config, chain, contractConfig, args, options) {
const packageId = contractConfig.address;
const [ multisigSessionId ] = args;
const [multisigSessionId] = args;
const { payload, status } = await getMultisigProof(config, chain.axelarId, multisigSessionId);

if (!status.completed) {
Expand Down Expand Up @@ -243,16 +243,16 @@ async function submitProof(keypair, client, config, chain, contractConfig, args,
],
});
} else if (payload.messages) {
printInfo('Submitting approve_messages');

tx.moveCall({
target: `${packageId}::gateway::approve_messages`,
arguments: [
tx.object(contractConfig.objects.Gateway),
tx.pure(bcs.vector(bcs.u8()).serialize(new Uint8Array(executeData.payload)).toBytes()),
tx.pure(bcs.vector(bcs.u8()).serialize(new Uint8Array(executeData.proof)).toBytes()),
],
});
printInfo('Submitting approve_messages');

tx.moveCall({
target: `${packageId}::gateway::approve_messages`,
arguments: [
tx.object(contractConfig.objects.Gateway),
tx.pure(bcs.vector(bcs.u8()).serialize(new Uint8Array(executeData.payload)).toBytes()),
tx.pure(bcs.vector(bcs.u8()).serialize(new Uint8Array(executeData.proof)).toBytes()),
],
});
} else {
throw new Error(`Unknown payload type: ${payload}`);
}
Expand Down

0 comments on commit 0a82199

Please sign in to comment.