Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Sep 25, 2024
1 parent 73433aa commit 11c566a
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/evmCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/evmDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/evmDepositAndCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ethers } from "ethers";

export type revertOptions = {
callOnRevert: boolean;
onRevertGasLimit: number;
revertAddress: string;
revertMessage: string;
callOnRevert: boolean;
};

export type txOptions = {
Expand Down
8 changes: 4 additions & 4 deletions packages/client/src/zetachainCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -107,5 +107,5 @@ export const zetachainCall = async function (
revertOptions,
args.txOptions
);
return { tx, gasZRC20, gasFee };
return { gasFee, gasZRC20, tx };
};
6 changes: 3 additions & 3 deletions packages/client/src/zetachainWithdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -93,5 +93,5 @@ export const zetachainWithdraw = async function (
revertOptions,
args.txOptions
);
return { tx, gasZRC20, gasFee };
return { gasFee, gasZRC20, tx };
};
8 changes: 4 additions & 4 deletions packages/client/src/zetachainWithdrawAndCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -131,5 +131,5 @@ export const zetachainWithdrawAndCall = async function (
revertOptions,
args.txOptions
);
return { tx, gasZRC20, gasFee };
return { gasFee, gasZRC20, tx };
};
4 changes: 2 additions & 2 deletions packages/tasks/src/evmCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
});
Expand Down
8 changes: 4 additions & 4 deletions packages/tasks/src/evmDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions packages/tasks/src/evmDepositAndCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
});
Expand Down
8 changes: 4 additions & 4 deletions packages/tasks/src/zetachainCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions packages/tasks/src/zetachainWithdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
});

Expand Down
10 changes: 5 additions & 5 deletions packages/tasks/src/zetachainWithdrawAndCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 11c566a

Please sign in to comment.