From a7604435be112834098c7225030044392015487d Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Fri, 27 Dec 2024 16:57:26 +0800 Subject: [PATCH 01/16] add e2e test workflow --- .env.example | 12 +-- .github/workflows/hardhat_e2e.yml | 125 ++++++++++++++++++++++++++++++ hardhat.config.ts | 16 ++-- test/hardhat/e2e/setup.ts | 2 + 4 files changed, 141 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/hardhat_e2e.yml diff --git a/.env.example b/.env.example index 6576cd5c..a099c014 100644 --- a/.env.example +++ b/.env.example @@ -15,9 +15,9 @@ TENDERLY_PRIVATEKEY = ETHERSCAN_API_KEY = ETHERSCANAPIKEYETHERSCANAPIKEY # TESTNET -DEVNET_URL = http:// -DEVNET_CHAINID = 1315 -DEVNET_PRIVATEKEY = -DEVNET_USER1 = -DEVNET_USER2 = -DEVNET_ERC721 = +STORY_URL = http:// +STORY_CHAINID = 1315 +STORY_PRIVATEKEY = +STORY_USER1 = +STORY_USER2 = +STORY_ERC721 = diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml new file mode 100644 index 00000000..ead2273e --- /dev/null +++ b/.github/workflows/hardhat_e2e.yml @@ -0,0 +1,125 @@ +name: HardHat E2E Test + +on: + # pull_request: + # branches: + # - main + workflow_dispatch: + inputs: + devnet_version: + description: 'devnet; mainnet;' + required: true + default: 'devnet' + type: choice + options: + - devnet + - mainnet + + workflow_call: + inputs: + devnet_version: + description: 'devnet; mainnet;' + required: false + default: 'devnet' + type: string +jobs: + print-config: + runs-on: ubuntu-latest + + steps: + - name: Print Inputs + run: | + echo "Inputs:" + echo "devnet_version: ${{ inputs.devnet_version || github.event.inputs.devnet_version || 'devnet' }}" + + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.0.0] + + steps: + - name: Check Out Repository Code + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Run install + uses: borales/actions-yarn@v4 + with: + cmd: install # will run `yarn install` command + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: 'Create env file' + run: | + touch .env + echo "MAINNET_PRIVATEKEY=${{ secrets.STORY_PRIVATEKEY }}" >> .env + echo "SEPOLIA_PRIVATEKEY=${{ secrets.STORY_PRIVATEKEY }}" >> .env + echo "STORY_PRIVATEKEY=${{ secrets.STORY_PRIVATEKEY }}" >> .env + echo "STORY_USER1=${{ secrets.STORY_USER1 }}" >> .env + echo "STORY_USER2=${{ secrets.STORY_USER1 }}" >> .env + + - name: Deploy MockERC721 Contract + run: | + devnet_version=${{ inputs.devnet_version || github.event.inputs.devnet_version || 'devnet' }} + if [[ "$devnet_version" == "devnet" ]]; then + rpcurl = "http://r1-d.odyssey-devnet.storyrpc.io:8545" + chainid = 1315 + else + rpcurl = "https://public.storyrpc.io" + chainid = 1514 + fi + + result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" --legacy 2>&1) + echo $result + erc721 = $(echo $result | grep "Deployed to:" | cut -d ":" -f 2 | tr -d ' ') + echo $erc721 + + echo "STORY_URL=$rpcurl" >> .env + echo "STORY_CHAINID=$chainid" >> .env + echo "STORY_ERC721=$erc721" >> .env + + # add one more blank line to .env + echo "" >> .env + + - name: Run test + run: | + npx hardhat test --network odyssey + + - name: Upload Test Report + uses: actions/upload-artifact@v4 + with: + name: poc-test-report + path: | + ./mochawesome-report + if: always() + + - name: Copy report to date folder + id: create_folder + run: | + folder_name=$(date +%Y%m%d) + echo "Folder name: $folder_name" + + # Determine version_name based on devnet_version + env_name=${{ inputs.devnet_version || github.event.inputs.devnet_version || 'devnet' }} + + mkdir -p ./tmp/$folder_name/$env_name + cp -R ./mochawesome-report/* ./tmp/$folder_name/$env_name + + - name: Deploy report to GitHub Pages + if: ${{ inputs.deploy_report == 'true' }} + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./tmp + publish_branch: gh-pages + keep_files: true + diff --git a/hardhat.config.ts b/hardhat.config.ts index ad78b862..f9c85dd8 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -31,11 +31,11 @@ const USE_TENDERLY = process.env.USE_TENDERLY === "true" const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || "key" const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY || "key" -const DEVNET_URL = process.env.DEVNET_URL || "http://" -const DEVNET_CHAINID = Number(process.env.DEVNET_CHAINID) || 1513 -const DEVNET_PRIVATEKEY = process.env.DEVNET_PRIVATEKEY || "0xkey" -const DEVNET_USER1 = process.env.DEVNET_USER1 || "0xkey" -const DEVNET_USER2 = process.env.DEVNET_USER2 || "0xkey" +const STORY_URL = process.env.STORY_URL || "http://" +const STORY_CHAINID = Number(process.env.STORY_CHAINID) || 1513 +const STORY_PRIVATEKEY = process.env.STORY_PRIVATEKEY || "0xkey" +const STORY_USER1 = process.env.STORY_USER1 || "0xkey" +const STORY_USER2 = process.env.STORY_USER2 || "0xkey" if (USE_TENDERLY) { tdly.setup({ @@ -70,9 +70,9 @@ const config: HardhatUserConfig = { chainId: 31337, }, odyssey: { - chainId: DEVNET_CHAINID, - url: DEVNET_URL, - accounts: [DEVNET_PRIVATEKEY, DEVNET_USER1, DEVNET_USER2], + chainId: STORY_CHAINID, + url: STORY_URL, + accounts: [STORY_PRIVATEKEY, STORY_USER1, STORY_USER2], }, localhost: { chainId: 31337, diff --git a/test/hardhat/e2e/setup.ts b/test/hardhat/e2e/setup.ts index 30c2f8c2..d4c5bcec 100644 --- a/test/hardhat/e2e/setup.ts +++ b/test/hardhat/e2e/setup.ts @@ -24,6 +24,8 @@ before(async function () { console.log(`================= Load Users =================`); [this.owner, this.user1, this.user2] = await hre.ethers.getSigners(); + await this.owner.sendTransaction({ to: this.user1.address, value: hre.ethers.parseEther("10") }); + await this.owner.sendTransaction({ to: this.user2.address, value: hre.ethers.parseEther("10") }); console.log(`================= Chain ID =================`); const networkConfig = network.config; From c9d3262ed075082e7362e3b4ef679bb13baee4fc Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Fri, 27 Dec 2024 17:21:32 +0800 Subject: [PATCH 02/16] Update constants.ts --- test/hardhat/e2e/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hardhat/e2e/constants.ts b/test/hardhat/e2e/constants.ts index 3c101540..d9d8e22c 100644 --- a/test/hardhat/e2e/constants.ts +++ b/test/hardhat/e2e/constants.ts @@ -25,4 +25,4 @@ export const RoyaltyPolicyLAP = "0x28b4F70ffE5ba7A26aEF979226f77Eb57fb9Fdb6"; export const RoyaltyPolicyLRP = "0x7D2d9af4E4ab14Afcfd86436BC348928B40963Dd"; // Mock ERC721 contract address -export const MockERC721 = process.env.DEVNET_ERC721 as string; +export const MockERC721 = process.env.STORY_ERC721 as string; From f5e3151790618d77b33eee648c1c98a8d2fe0f12 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 14:57:43 +0800 Subject: [PATCH 03/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index ead2273e..881ca746 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -1,9 +1,10 @@ name: HardHat E2E Test on: - # pull_request: - # branches: - # - main + push: + branches: + - add-e2e-workflow + workflow_dispatch: inputs: devnet_version: From fea012e2be9ab0039a0045ca5afafce8a030b059 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 15:12:32 +0800 Subject: [PATCH 04/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index 881ca746..a1cacee6 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -72,16 +72,19 @@ jobs: run: | devnet_version=${{ inputs.devnet_version || github.event.inputs.devnet_version || 'devnet' }} if [[ "$devnet_version" == "devnet" ]]; then - rpcurl = "http://r1-d.odyssey-devnet.storyrpc.io:8545" - chainid = 1315 + rpcurl="http://r1-d.odyssey-devnet.storyrpc.io:8545" + chainid=1315 else - rpcurl = "https://public.storyrpc.io" - chainid = 1514 + rpcurl="https://public.storyrpc.io" + chainid=1514 fi + echo $rpcurl + echo $chainid + result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" --legacy 2>&1) echo $result - erc721 = $(echo $result | grep "Deployed to:" | cut -d ":" -f 2 | tr -d ' ') + erc721=$(echo $result | grep "Deployed to:" | cut -d ":" -f 2 | tr -d ' ') echo $erc721 echo "STORY_URL=$rpcurl" >> .env From 7b6e12755ef48072a33434c59db1eec2d64a7232 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 15:31:07 +0800 Subject: [PATCH 05/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index a1cacee6..c920d37c 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -82,7 +82,7 @@ jobs: echo $rpcurl echo $chainid - result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" --legacy 2>&1) + result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" --legacy) echo $result erc721=$(echo $result | grep "Deployed to:" | cut -d ":" -f 2 | tr -d ' ') echo $erc721 From 399b3d6cc8cd20126c5252a65d82cf59979551ca Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 16:06:52 +0800 Subject: [PATCH 06/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index c920d37c..302c241f 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -82,9 +82,7 @@ jobs: echo $rpcurl echo $chainid - result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" --legacy) - echo $result - erc721=$(echo $result | grep "Deployed to:" | cut -d ":" -f 2 | tr -d ' ') + $erc721=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" | jq '.deployedTo') echo $erc721 echo "STORY_URL=$rpcurl" >> .env From a2501aec041325d7eb17ed81b7d24ecc3816c9fd Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 16:11:51 +0800 Subject: [PATCH 07/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index 302c241f..de2e44fe 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -82,7 +82,7 @@ jobs: echo $rpcurl echo $chainid - $erc721=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" | jq '.deployedTo') + erc721=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" | jq '.deployedTo') echo $erc721 echo "STORY_URL=$rpcurl" >> .env From 886779d2dd4f5448c8f0e3a4df85718bd97669aa Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 16:28:53 +0800 Subject: [PATCH 08/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index de2e44fe..301e327d 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -38,7 +38,7 @@ jobs: strategy: matrix: - node-version: [20.0.0] + node-version: [21.x] steps: - name: Check Out Repository Code @@ -82,7 +82,8 @@ jobs: echo $rpcurl echo $chainid - erc721=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" | jq '.deployedTo') + result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC") + erc721=$(echo $result | jq -r '.deployedTo') echo $erc721 echo "STORY_URL=$rpcurl" >> .env From 8c8029835a202d622f43eb5a9e95030c587c2b8e Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 16:34:57 +0800 Subject: [PATCH 09/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index 301e327d..69cce567 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -56,8 +56,16 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly + + - name: Install forge-std + run: | + cd foundry + forge install foundry-rs/forge-std --no-commit + + - name: Install openzeppelin-contracts + run: | + cd foundry + forge install OpenZeppelin/openzeppelin-contracts --no-commit - name: 'Create env file' run: | From ae83e04e5b0e3a64d1d873a78620c73429a3a1a3 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 16:40:43 +0800 Subject: [PATCH 10/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index 69cce567..31dc5ad2 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -59,12 +59,10 @@ jobs: - name: Install forge-std run: | - cd foundry forge install foundry-rs/forge-std --no-commit - name: Install openzeppelin-contracts run: | - cd foundry forge install OpenZeppelin/openzeppelin-contracts --no-commit - name: 'Create env file' From c72ee76d23794d890e013e88b1d86bfe198bc8d5 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 17:00:02 +0800 Subject: [PATCH 11/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index 31dc5ad2..a7a6ccad 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -56,14 +56,8 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - - - name: Install forge-std - run: | - forge install foundry-rs/forge-std --no-commit - - - name: Install openzeppelin-contracts - run: | - forge install OpenZeppelin/openzeppelin-contracts --no-commit + with: + version: nightly - name: 'Create env file' run: | @@ -88,7 +82,8 @@ jobs: echo $rpcurl echo $chainid - result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC") + result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --force --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" | grep deployedTo) + echo $result erc721=$(echo $result | jq -r '.deployedTo') echo $erc721 From eecec6c5023a8d30e5c76469e129de983c355147 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 17:17:26 +0800 Subject: [PATCH 12/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index a7a6ccad..075ccdcb 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -82,9 +82,9 @@ jobs: echo $rpcurl echo $chainid - result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --force --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" | grep deployedTo) + result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" 2>&1) echo $result - erc721=$(echo $result | jq -r '.deployedTo') + erc721=$(echo $result | grep deployedTo | jq -r '.deployedTo') echo $erc721 echo "STORY_URL=$rpcurl" >> .env From 149b45052418a9ac69670b6a7f15ea353e9f063d Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 17:45:49 +0800 Subject: [PATCH 13/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index 075ccdcb..6fd2c407 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -82,7 +82,7 @@ jobs: echo $rpcurl echo $chainid - result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" 2>&1) + result=$(forge create --rpc-url "$rpcurl" --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" 2>&1) echo $result erc721=$(echo $result | grep deployedTo | jq -r '.deployedTo') echo $erc721 From 386628d79d9660414eaf456319b743577fe5cf63 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 17:51:34 +0800 Subject: [PATCH 14/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index 6fd2c407..b9d4c18c 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -82,7 +82,7 @@ jobs: echo $rpcurl echo $chainid - result=$(forge create --rpc-url "$rpcurl" --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" 2>&1) + result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_USER1 }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" 2>&1) echo $result erc721=$(echo $result | grep deployedTo | jq -r '.deployedTo') echo $erc721 From d4699f5f86ded06b31b9c514a58f4b6ea74ea131 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Mon, 30 Dec 2024 17:56:02 +0800 Subject: [PATCH 15/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index b9d4c18c..e1cd7ad1 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -82,7 +82,7 @@ jobs: echo $rpcurl echo $chainid - result=$(forge create --rpc-url $rpcurl --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_USER1 }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" 2>&1) + result=$(forge create --rpc-url $rpcurl --use 0.8.26 --optimize --optimizer-runs 30000 --legacy --json --private-key ${{ secrets.STORY_PRIVATEKEY }} test/foundry/mocks/token/MockERC721.sol:MockERC721 --constructor-args "MockERC" "MockERC" 2>&1) echo $result erc721=$(echo $result | grep deployedTo | jq -r '.deployedTo') echo $erc721 From 92f434336e49a4b0513e125ce582e473ea2cc3a0 Mon Sep 17 00:00:00 2001 From: Tina-57blocks Date: Tue, 31 Dec 2024 09:50:13 +0800 Subject: [PATCH 16/16] Update hardhat_e2e.yml --- .github/workflows/hardhat_e2e.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hardhat_e2e.yml b/.github/workflows/hardhat_e2e.yml index e1cd7ad1..82add9cf 100644 --- a/.github/workflows/hardhat_e2e.yml +++ b/.github/workflows/hardhat_e2e.yml @@ -42,7 +42,10 @@ jobs: steps: - name: Check Out Repository Code - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + submodules: recursive + fetch-depth: 0 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4