From 11c566af0ea8cef75dd2bcaa14ee5d917f57d8f9 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Wed, 25 Sep 2024 15:48:18 +0300 Subject: [PATCH] lint --- packages/client/src/evmCall.ts | 4 ++-- packages/client/src/evmDeposit.ts | 2 +- packages/client/src/evmDepositAndCall.ts | 4 ++-- packages/client/src/types.ts | 2 +- packages/client/src/zetachainCall.ts | 8 ++++---- packages/client/src/zetachainWithdraw.ts | 6 +++--- packages/client/src/zetachainWithdrawAndCall.ts | 8 ++++---- packages/tasks/src/evmCall.ts | 4 ++-- packages/tasks/src/evmDeposit.ts | 8 ++++---- packages/tasks/src/evmDepositAndCall.ts | 8 ++++---- packages/tasks/src/zetachainCall.ts | 8 ++++---- packages/tasks/src/zetachainWithdraw.ts | 6 +++--- packages/tasks/src/zetachainWithdrawAndCall.ts | 10 +++++----- 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/packages/client/src/evmCall.ts b/packages/client/src/evmCall.ts index 1b4897bb..d05ee5fa 100644 --- a/packages/client/src/evmCall.ts +++ b/packages/client/src/evmCall.ts @@ -26,10 +26,10 @@ export const evmCall = async function ( args: { gatewayEvm: string; receiver: string; + revertOptions: revertOptions; + txOptions: txOptions; types: string[]; values: any[]; - txOptions: txOptions; - revertOptions: revertOptions; } ) { const signer = this.signer; diff --git a/packages/client/src/evmDeposit.ts b/packages/client/src/evmDeposit.ts index 01542e1b..de556728 100644 --- a/packages/client/src/evmDeposit.ts +++ b/packages/client/src/evmDeposit.ts @@ -29,8 +29,8 @@ export const evmDeposit = async function ( erc20: string; gatewayEvm: string; receiver: string; - txOptions: txOptions; revertOptions: revertOptions; + txOptions: txOptions; } ) { const signer = this.signer; diff --git a/packages/client/src/evmDepositAndCall.ts b/packages/client/src/evmDepositAndCall.ts index cd47e0d0..c5a1833d 100644 --- a/packages/client/src/evmDepositAndCall.ts +++ b/packages/client/src/evmDepositAndCall.ts @@ -31,10 +31,10 @@ export const evmDepositAndCall = async function ( erc20: string; gatewayEvm: string; receiver: string; + revertOptions: revertOptions; + txOptions: txOptions; types: string[]; values: any[]; - txOptions: txOptions; - revertOptions: revertOptions; } ) { const signer = this.signer; diff --git a/packages/client/src/types.ts b/packages/client/src/types.ts index 1b689f88..92b666e8 100644 --- a/packages/client/src/types.ts +++ b/packages/client/src/types.ts @@ -1,10 +1,10 @@ import { ethers } from "ethers"; export type revertOptions = { + callOnRevert: boolean; onRevertGasLimit: number; revertAddress: string; revertMessage: string; - callOnRevert: boolean; }; export type txOptions = { diff --git a/packages/client/src/zetachainCall.ts b/packages/client/src/zetachainCall.ts index 1c9da663..8355723e 100644 --- a/packages/client/src/zetachainCall.ts +++ b/packages/client/src/zetachainCall.ts @@ -31,14 +31,14 @@ export const zetachainCall = async function ( this: ZetaChainClient, args: { function: string; + gasLimit: number; gatewayZetaChain: string; receiver: string; + revertOptions: revertOptions; + txOptions: txOptions; types: string[]; values: any[]; zrc20: string; - gasLimit: number; - txOptions: txOptions; - revertOptions: revertOptions; } ) { const signer = this.signer; @@ -107,5 +107,5 @@ export const zetachainCall = async function ( revertOptions, args.txOptions ); - return { tx, gasZRC20, gasFee }; + return { gasFee, gasZRC20, tx }; }; diff --git a/packages/client/src/zetachainWithdraw.ts b/packages/client/src/zetachainWithdraw.ts index e4fdd3df..daf6bbfb 100644 --- a/packages/client/src/zetachainWithdraw.ts +++ b/packages/client/src/zetachainWithdraw.ts @@ -30,9 +30,9 @@ export const zetachainWithdraw = async function ( amount: string; gatewayZetaChain: string; receiver: string; - zrc20: string; - txOptions: txOptions; revertOptions: revertOptions; + txOptions: txOptions; + zrc20: string; } ) { const signer = this.signer; @@ -93,5 +93,5 @@ export const zetachainWithdraw = async function ( revertOptions, args.txOptions ); - return { tx, gasZRC20, gasFee }; + return { gasFee, gasZRC20, tx }; }; diff --git a/packages/client/src/zetachainWithdrawAndCall.ts b/packages/client/src/zetachainWithdrawAndCall.ts index cd55ce8a..91d8521a 100644 --- a/packages/client/src/zetachainWithdrawAndCall.ts +++ b/packages/client/src/zetachainWithdrawAndCall.ts @@ -33,14 +33,14 @@ export const zetachainWithdrawAndCall = async function ( args: { amount: string; function: string; + gasLimit: number; gatewayZetaChain: string; receiver: string; + revertOptions: revertOptions; + txOptions: txOptions; types: string[]; values: any[]; zrc20: string; - gasLimit: number; - txOptions: txOptions; - revertOptions: revertOptions; } ) { const signer = this.signer; @@ -131,5 +131,5 @@ export const zetachainWithdrawAndCall = async function ( revertOptions, args.txOptions ); - return { tx, gasZRC20, gasFee }; + return { gasFee, gasZRC20, tx }; }; diff --git a/packages/tasks/src/evmCall.ts b/packages/tasks/src/evmCall.ts index c99f8e2a..6258c936 100644 --- a/packages/tasks/src/evmCall.ts +++ b/packages/tasks/src/evmCall.ts @@ -8,6 +8,8 @@ export const evmCall = async (args: any, hre: HardhatRuntimeEnvironment) => { const [signer] = await hre.ethers.getSigners(); const client = new ZetaChainClient({ network: "testnet", signer }); const tx = await client.evmCall({ + gatewayEvm: args.gatewayEvm, + receiver: args.receiver, revertOptions: { callOnRevert: args.callOnRevert, onRevertGasLimit: args.onRevertGasLimit, @@ -18,8 +20,6 @@ export const evmCall = async (args: any, hre: HardhatRuntimeEnvironment) => { gasLimit: args.gasLimit, gasPrice: args.gasPrice, }, - gatewayEvm: args.gatewayEvm, - receiver: args.receiver, types: JSON.parse(args.types), values: args.values, }); diff --git a/packages/tasks/src/evmDeposit.ts b/packages/tasks/src/evmDeposit.ts index c506fb0c..f2568af2 100644 --- a/packages/tasks/src/evmDeposit.ts +++ b/packages/tasks/src/evmDeposit.ts @@ -8,6 +8,10 @@ export const evmDeposit = async (args: any, hre: HardhatRuntimeEnvironment) => { const [signer] = await hre.ethers.getSigners(); const client = new ZetaChainClient({ network: "testnet", signer }); const tx = await client.evmDeposit({ + amount: args.amount, + erc20: args.erc20, + gatewayEvm: args.gatewayEvm, + receiver: args.receiver, revertOptions: { callOnRevert: args.callOnRevert, onRevertGasLimit: args.onRevertGasLimit, @@ -18,10 +22,6 @@ export const evmDeposit = async (args: any, hre: HardhatRuntimeEnvironment) => { gasLimit: args.gasLimit, gasPrice: args.gasPrice, }, - amount: args.amount, - erc20: args.erc20, - gatewayEvm: args.gatewayEvm, - receiver: args.receiver, }); if (tx) { const receipt = await tx.wait(); diff --git a/packages/tasks/src/evmDepositAndCall.ts b/packages/tasks/src/evmDepositAndCall.ts index c221f154..5045bdce 100644 --- a/packages/tasks/src/evmDepositAndCall.ts +++ b/packages/tasks/src/evmDepositAndCall.ts @@ -11,6 +11,10 @@ export const evmDepositAndCall = async ( const [signer] = await hre.ethers.getSigners(); const client = new ZetaChainClient({ network: "testnet", signer }); const tx = await client.evmDepositAndCall({ + amount: args.amount, + erc20: args.erc20, + gatewayEvm: args.gatewayEvm, + receiver: args.receiver, revertOptions: { callOnRevert: args.callOnRevert, onRevertGasLimit: args.onRevertGasLimit, @@ -21,10 +25,6 @@ export const evmDepositAndCall = async ( gasLimit: args.gasLimit, gasPrice: args.gasPrice, }, - amount: args.amount, - erc20: args.erc20, - gatewayEvm: args.gatewayEvm, - receiver: args.receiver, types: JSON.parse(args.types), values: args.values, }); diff --git a/packages/tasks/src/zetachainCall.ts b/packages/tasks/src/zetachainCall.ts index 0adf34e7..1def729c 100644 --- a/packages/tasks/src/zetachainCall.ts +++ b/packages/tasks/src/zetachainCall.ts @@ -11,6 +11,10 @@ export const zetachainCall = async ( const [signer] = await hre.ethers.getSigners(); const client = new ZetaChainClient({ network: "testnet", signer }); const response = await client.zetachainCall({ + function: args.function, + gasLimit: args.gasLimit, + gatewayZetaChain: args.gatewayZetaChain, + receiver: args.receiver, revertOptions: { callOnRevert: args.callOnRevert, onRevertGasLimit: args.onRevertGasLimit, @@ -21,10 +25,6 @@ export const zetachainCall = async ( gasLimit: args.txOptionsGasLimit, gasPrice: args.txOptionsGasPrice, }, - function: args.function, - gasLimit: args.gasLimit, - gatewayZetaChain: args.gatewayZetaChain, - receiver: args.receiver, types: JSON.parse(args.types), values: args.values, zrc20: args.zrc20, diff --git a/packages/tasks/src/zetachainWithdraw.ts b/packages/tasks/src/zetachainWithdraw.ts index c7f18d60..da26a60e 100644 --- a/packages/tasks/src/zetachainWithdraw.ts +++ b/packages/tasks/src/zetachainWithdraw.ts @@ -11,6 +11,9 @@ export const zetachainWithdraw = async ( const [signer] = await hre.ethers.getSigners(); const client = new ZetaChainClient({ network: "testnet", signer }); const response = await client.zetachainWithdraw({ + amount: args.amount, + gatewayZetaChain: args.gatewayZetaChain, + receiver: args.receiver, revertOptions: { callOnRevert: args.callOnRevert, onRevertGasLimit: args.onRevertGasLimit, @@ -21,9 +24,6 @@ export const zetachainWithdraw = async ( gasLimit: args.txOptionsGasLimit, gasPrice: args.txOptionsGasPrice, }, - amount: args.amount, - gatewayZetaChain: args.gatewayZetaChain, - receiver: args.receiver, zrc20: args.zrc20, }); diff --git a/packages/tasks/src/zetachainWithdrawAndCall.ts b/packages/tasks/src/zetachainWithdrawAndCall.ts index 61cf7cc7..24506818 100644 --- a/packages/tasks/src/zetachainWithdrawAndCall.ts +++ b/packages/tasks/src/zetachainWithdrawAndCall.ts @@ -11,6 +11,11 @@ export const zetachainWithdrawAndCall = async ( const [signer] = await hre.ethers.getSigners(); const client = new ZetaChainClient({ network: "testnet", signer }); const response = await client.zetachainWithdrawAndCall({ + amount: args.amount, + function: args.function, + gasLimit: args.gasLimit, + gatewayZetaChain: args.gatewayZetaChain, + receiver: args.receiver, revertOptions: { callOnRevert: args.callOnRevert, onRevertGasLimit: args.onRevertGasLimit, @@ -21,11 +26,6 @@ export const zetachainWithdrawAndCall = async ( gasLimit: args.txOptionsGasLimit, gasPrice: args.txOptionsGasPrice, }, - amount: args.amount, - function: args.function, - gasLimit: args.gasLimit, - gatewayZetaChain: args.gatewayZetaChain, - receiver: args.receiver, types: JSON.parse(args.types), values: args.values, zrc20: args.zrc20,