Skip to content

Commit

Permalink
tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Dec 6, 2024
1 parent 9412caf commit bf4d40d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions examples/swap/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
56 changes: 28 additions & 28 deletions examples/swap/scripts/localnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit bf4d40d

Please sign in to comment.