From c59bb65868233d3b6bc2a0872a9f1c3f6ff08ef8 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 26 Nov 2024 19:13:41 +0300 Subject: [PATCH 1/2] fix: nft testnet script --- examples/nft/scripts/testnet.sh | 10 +++++----- examples/nft/tasks/deploy.ts | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/nft/scripts/testnet.sh b/examples/nft/scripts/testnet.sh index efea4097..039db0a1 100755 --- a/examples/nft/scripts/testnet.sh +++ b/examples/nft/scripts/testnet.sh @@ -5,17 +5,17 @@ set -x npx hardhat compile --force --quiet -UNIVERSAL=$(npx hardhat deploy --name Universal --network zeta_testnet --gateway 0x6c533f7fe93fae114d0954697069df33c9b74fd7 --uniswap-router 0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe --gas-limit 500000 --json | jq -r '.contractAddress') +UNIVERSAL=$(npx hardhat deploy --name Universal --network zeta_testnet --deploy-gas-limit 10000000 --gateway 0x6c533f7fe93fae114d0954697069df33c9b74fd7 --uniswap-router 0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe --gas-limit 500000 --json | jq -r '.contractAddress') CONNECTED_BASE=$(npx hardhat deploy --name Connected --network base_sepolia --gateway 0x0c487a766110c85d301d96e33579c5b317fa4995 --gas-limit 500000 --json | jq -r '.contractAddress') CONNECTED_BNB=$(npx hardhat deploy --name Connected --network bsc_testnet --gateway 0x0c487a766110c85d301d96e33579c5b317fa4995 --gas-limit 500000 --json | jq -r '.contractAddress') ZRC20_BASE=0x236b0DE675cC8F46AE186897fCCeFe3370C9eDeD ZRC20_BNB=0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891 -npx hardhat connected-set-counterparty --network base_sepolia --contract "$CONNECTED_BASE" --counterparty "$UNIVERSAL" --json +npx hardhat connected-set-universal --network base_sepolia --contract "$CONNECTED_BASE" --universal "$UNIVERSAL" --json -npx hardhat connected-set-counterparty --network bsc_testnet --contract "$CONNECTED_BNB" --counterparty "$UNIVERSAL" --json +npx hardhat connected-set-universal --network bsc_testnet --contract "$CONNECTED_BNB" --universal "$UNIVERSAL" --json -npx hardhat universal-set-counterparty --network zeta_testnet --contract "$UNIVERSAL" --counterparty "$CONNECTED_BASE" --zrc20 "$ZRC20_BASE" --json +npx hardhat universal-set-connected --network zeta_testnet --contract "$UNIVERSAL" --connected "$CONNECTED_BASE" --zrc20 "$ZRC20_BASE" --json -npx hardhat universal-set-counterparty --network zeta_testnet --contract "$UNIVERSAL" --counterparty "$CONNECTED_BNB" --zrc20 "$ZRC20_BNB" --json \ No newline at end of file +npx hardhat universal-set-connected --network zeta_testnet --contract "$UNIVERSAL" --connected "$CONNECTED_BNB" --zrc20 "$ZRC20_BNB" --json \ No newline at end of file diff --git a/examples/nft/tasks/deploy.ts b/examples/nft/tasks/deploy.ts index 845098d3..7c3d1426 100644 --- a/examples/nft/tasks/deploy.ts +++ b/examples/nft/tasks/deploy.ts @@ -22,6 +22,7 @@ const main = async (args: any, hre: HardhatRuntimeEnvironment) => { ...(args.uniswapRouter ? [args.uniswapRouter] : []), { gasPrice: args.deployGasPrice, + gasLimit: args.deployGasLimit, } ); @@ -64,4 +65,9 @@ task("deploy", "Deploy the NFT contract", main) "Gas price for deploy transaction", "10000000000" ) + .addOptionalParam( + "deployGasLimit", + "Gas limit for deploy transaction", + "5000000" + ) .addOptionalParam("uniswapRouter", "Uniswap v2 Router address"); From 6d042acb13d8fc915cef7785665ddc1b822313e1 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 26 Nov 2024 19:18:28 +0300 Subject: [PATCH 2/2] fix localnet --- examples/nft/scripts/localnet.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/nft/scripts/localnet.sh b/examples/nft/scripts/localnet.sh index e546d973..dc72f82c 100755 --- a/examples/nft/scripts/localnet.sh +++ b/examples/nft/scripts/localnet.sh @@ -27,13 +27,13 @@ GATEWAY_BNB=$(jq -r '.addresses[] | select(.type=="gatewayEVM" and .chain=="bnb" UNISWAP_ROUTER=$(jq -r '.addresses[] | select(.type=="uniswapRouterInstance" and .chain=="zetachain") | .address' localnet.json) SENDER=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 -CONTRACT_ZETACHAIN=$(npx hardhat deploy --network localhost --gateway "$GATEWAY_ZETACHAIN" --uniswap-router "$UNISWAP_ROUTER" --json | jq -r '.contractAddress') +CONTRACT_ZETACHAIN=$(npx hardhat deploy --network localhost --gateway "$GATEWAY_ZETACHAIN" --deploy-gas-limit 10000000 --uniswap-router "$UNISWAP_ROUTER" --json | jq -r '.contractAddress') echo -e "\nšŸš€ Deployed NFT contract on ZetaChain: $CONTRACT_ZETACHAIN" -CONTRACT_ETHEREUM=$(npx hardhat deploy --name Connected --json --network localhost --gateway "$GATEWAY_ETHEREUM" | jq -r '.contractAddress') +CONTRACT_ETHEREUM=$(npx hardhat deploy --name Connected --json --network localhost --deploy-gas-limit 10000000 --gateway "$GATEWAY_ETHEREUM" | jq -r '.contractAddress') echo -e "šŸš€ Deployed NFT contract on Ethereum: $CONTRACT_ETHEREUM" -CONTRACT_BNB=$(npx hardhat deploy --name Connected --json --network localhost --gas-limit 1000000 --gateway "$GATEWAY_BNB" | jq -r '.contractAddress') +CONTRACT_BNB=$(npx hardhat deploy --name Connected --json --network localhost --deploy-gas-limit 10000000 --gas-limit 1000000 --gateway "$GATEWAY_BNB" | jq -r '.contractAddress') echo -e "šŸš€ Deployed NFT contract on BNB chain: $CONTRACT_BNB" echo -e "\nšŸ“® User Address: $SENDER"