diff --git a/examples/swap/hardhat.config.ts b/examples/swap/hardhat.config.ts index 7c53654b..32a1790f 100644 --- a/examples/swap/hardhat.config.ts +++ b/examples/swap/hardhat.config.ts @@ -1,8 +1,8 @@ import "./tasks/deploy"; import "./tasks/companionSwap"; import "./tasks/deployCompanion"; -import "./tasks/swapFromZetaChain"; -import "./tasks/swapFromEVM"; +import "./tasks/zetachainSwap"; +import "./tasks/evmGatewaySwap"; import "@zetachain/localnet/tasks"; import "@nomicfoundation/hardhat-toolbox"; import "@zetachain/toolkit/tasks"; diff --git a/examples/swap/scripts/localnet.sh b/examples/swap/scripts/localnet.sh index c6819fdb..5b7ada9f 100755 --- a/examples/swap/scripts/localnet.sh +++ b/examples/swap/scripts/localnet.sh @@ -42,33 +42,33 @@ npx hardhat companion-swap \ npx hardhat localnet-check -# npx hardhat swap-from-evm \ -# --network localhost \ -# --receiver "$CONTRACT_SWAP" \ -# --amount 1 \ -# --target "$ZRC20_BNB" \ -# --recipient "$SENDER" - -# npx hardhat localnet-check - -# npx hardhat swap-from-evm \ -# --network localhost \ -# --receiver "$CONTRACT_SWAP" \ -# --amount 1 \ -# --target "$ZRC20_BNB" \ -# --recipient "$SENDER" \ -# --withdraw false - -# npx hardhat localnet-check - -# npx hardhat swap-from-zetachain \ -# --network localhost \ -# --contract "$CONTRACT_SWAP" \ -# --amount 1 \ -# --zrc20 "$ZRC20_BNB" \ -# --target "$ZRC20_ETHEREUM" \ -# --recipient "$SENDER" - -# npx hardhat localnet-check +npx hardhat evm-gateway-swap \ + --network localhost \ + --receiver "$CONTRACT_SWAP" \ + --amount 1 \ + --target "$ZRC20_BNB" \ + --recipient "$SENDER" + +npx hardhat localnet-check + +npx hardhat evm-gateway-swap \ + --network localhost \ + --receiver "$CONTRACT_SWAP" \ + --amount 1 \ + --target "$ZRC20_BNB" \ + --recipient "$SENDER" \ + --withdraw false + +npx hardhat localnet-check + +npx hardhat zetachain-swap \ + --network localhost \ + --contract "$CONTRACT_SWAP" \ + --amount 1 \ + --zrc20 "$ZRC20_BNB" \ + --target "$ZRC20_ETHEREUM" \ + --recipient "$SENDER" + +npx hardhat localnet-check if [ "$1" = "start" ]; then npx hardhat localnet-stop; fi \ No newline at end of file diff --git a/examples/swap/tasks/swapFromEVM.ts b/examples/swap/tasks/evmGatewaySwap.ts similarity index 97% rename from examples/swap/tasks/swapFromEVM.ts rename to examples/swap/tasks/evmGatewaySwap.ts index 2c5f745f..2c591ab2 100644 --- a/examples/swap/tasks/swapFromEVM.ts +++ b/examples/swap/tasks/evmGatewaySwap.ts @@ -37,7 +37,7 @@ export const evmDepositAndCall = async ( } }; -task("swap-from-evm", "Swap tokens from EVM", evmDepositAndCall) +task("evm-gateway-swap", "Swap tokens from EVM", evmDepositAndCall) .addParam("receiver", "Receiver address on ZetaChain") .addOptionalParam( "gatewayEvm", diff --git a/examples/swap/tasks/swapFromZetaChain.ts b/examples/swap/tasks/zetachainSwap.ts similarity index 95% rename from examples/swap/tasks/swapFromZetaChain.ts rename to examples/swap/tasks/zetachainSwap.ts index cd1c4b4f..3c6c2dde 100644 --- a/examples/swap/tasks/swapFromZetaChain.ts +++ b/examples/swap/tasks/zetachainSwap.ts @@ -29,7 +29,7 @@ const main = async (args: any, hre: HardhatRuntimeEnvironment) => { console.log(`Transaction hash: ${tx.hash}`); }; -task("swap-from-zetachain", "Swap tokens from ZetaChain", main) +task("zetachain-swap", "Swap tokens from ZetaChain", main) .addFlag("json", "Output JSON") .addParam("contract", "Contract address") .addParam("amount", "Token amount to send")