From 91a217edc12d7348cb4fdea6098742c5e674d9fc Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Fri, 1 Nov 2024 15:47:13 +0300 Subject: [PATCH 1/2] Testing: read addresses from localnet.json --- examples/nft/package.json | 2 +- examples/nft/scripts/test.sh | 9 ++++----- examples/nft/yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/examples/nft/package.json b/examples/nft/package.json index 7aefa3fa..1e04fba6 100644 --- a/examples/nft/package.json +++ b/examples/nft/package.json @@ -27,7 +27,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/localnet": "4.0.0-rc3", + "@zetachain/localnet": "4.0.0-rc4", "@zetachain/toolkit": "13.0.0-rc4", "axios": "^1.3.6", "chai": "^4.2.0", diff --git a/examples/nft/scripts/test.sh b/examples/nft/scripts/test.sh index 09f46ff2..0b831115 100755 --- a/examples/nft/scripts/test.sh +++ b/examples/nft/scripts/test.sh @@ -21,13 +21,12 @@ function nft_balance() { echo -e "\nšŸš€ Compiling contracts..." npx hardhat compile --force --quiet -ZRC20_ETHEREUM=0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe # ZRC-20 of the gas token of Ethereum -ZRC20_BNB=0x65a45c57636f9BcCeD4fe193A602008578BcA90b # ZRC-20 of the gas token of BNB -GATEWAY_ETHEREUM=0x610178dA211FEF7D417bC0e6FeD39F05609AD788 -GATEWAY_BNB=0x3Aa5ebB10DC797CAC828524e59A333d0A371443c +ZRC20_ETHEREUM=$(jq -r '.addresses[] | select(.type=="ZRC-20 ETH on 5") | .address' localnet.json) +ZRC20_BNB=$(jq -r '.addresses[] | select(.type=="ZRC-20 BNB on 97") | .address' localnet.json) +GATEWAY_ETHEREUM=$(jq -r '.addresses[] | select(.type=="gatewayEVM" and .chain=="ethereum") | .address' localnet.json) +GATEWAY_BNB=$(jq -r '.addresses[] | select(.type=="gatewayEVM" and .chain=="bnb") | .address' localnet.json) SENDER=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 - CONTRACT_ZETACHAIN=$(npx hardhat deploy --network localhost --json | jq -r '.contractAddress') echo -e "\nšŸš€ Deployed NFT contract on ZetaChain: $CONTRACT_ZETACHAIN" diff --git a/examples/nft/yarn.lock b/examples/nft/yarn.lock index 7809cb80..e897e2e7 100644 --- a/examples/nft/yarn.lock +++ b/examples/nft/yarn.lock @@ -2743,10 +2743,10 @@ typescript "5.5.4" zod "3.22.4" -"@zetachain/localnet@4.0.0-rc3": - version "4.0.0-rc3" - resolved "https://registry.yarnpkg.com/@zetachain/localnet/-/localnet-4.0.0-rc3.tgz#72405fb23795aaa5eedd994b5078190e8330a20a" - integrity sha512-KPyz63H+eXK6V8mTmJNZ4KJfgEHu00BC3Bl+dn5BgzgD0Rh7R1pBYj+r0qGTm0FSBAFAv8ol3W46C1UK5t1iAA== +"@zetachain/localnet@4.0.0-rc4": + version "4.0.0-rc4" + resolved "https://registry.yarnpkg.com/@zetachain/localnet/-/localnet-4.0.0-rc4.tgz#916c58f83dd4901691fbc1216aec2ee88e7f531e" + integrity sha512-yNlA6qaQZiuHXRx4pgNLLHlJ+2ENet9WTIWxoslnLzzDljWwYTJHkErlTQcWa5oL9jjyn2/hQB/laoqXzlX1gQ== dependencies: "@inquirer/prompts" "^5.5.0" "@uniswap/v2-core" "^1.0.1" From b2764f1124ac1d7caad8433c42ea6b1ee8ce203f Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Fri, 1 Nov 2024 15:49:48 +0300 Subject: [PATCH 2/2] run tests on pr --- .github/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 531bd38b..1fdd0546 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,7 +1,6 @@ name: Run Tests on: - push: pull_request: workflow_dispatch: