Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
735b518
add aeneid config for hardhat e2e test
jia57b Jul 18, 2025
4e4a240
update constants address for testing
jia57b Jul 18, 2025
115a566
update mockerc20 address
jia57b Jul 21, 2025
9baa217
use mintAmount for mockerc20
jia57b Jul 21, 2025
ff7e5a8
fix address
jia57b Jul 21, 2025
9b69c6d
test upgrade
jia57b Jul 22, 2025
2eac416
script to verify upgrade
jia57b Jul 22, 2025
dd9ed55
update verification script
jia57b Jul 23, 2025
9e6fc5c
update v2 test contract
jia57b Jul 24, 2025
06098c8
update v2 test contract with constant
jia57b Jul 24, 2025
9f92e1c
update contract address for public poc
jia57b Jul 31, 2025
39a8ef3
update to use WIP
jia57b Jul 31, 2025
bd57e93
chore
lucas2brh Aug 8, 2025
38cd269
tmp: QA for cantina 124
lucas2brh Sep 20, 2025
2b32fe6
update for aeneid test config
jia57b Sep 23, 2025
33873e6
update Admin whitelist invalid group reward pool test
jia57b Sep 23, 2025
5878c92
polish workflow
lucas2brh Sep 24, 2025
4175cc2
use 0x1514 as the default token
lucas2brh Sep 24, 2025
185d73f
whitelist the currencyToken first
lucas2brh Sep 24, 2025
0d0d8b2
modify the erc20 related logic
lucas2brh Sep 24, 2025
02cc344
polish
lucas2brh Sep 24, 2025
30786ad
fix: support new DisputeRaised event signature in dispute tests
lucas2brh Sep 24, 2025
84767d5
feat: add test pattern selection to e2e workflow
lucas2brh Sep 24, 2025
cf741a1
Merge branch 'main' into yao/test/cantina_124
lucas2brh Sep 24, 2025
e2d7c0e
Update hardhat.config.ts
lucas2brh Sep 24, 2025
faa9ef8
clean dust
lucas2brh Sep 24, 2025
f87fe05
run prepare:test first to prepare the mock contracts
lucas2brh Sep 24, 2025
9ec244d
Merge test-aeneid-safe-migration branch
lucas2brh Sep 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 41 additions & 40 deletions .github/workflows/hardhat_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: -> HardHat E2E Test
on:
# push:
# branches:
# - update-e2e-test
# - yao/test/cantina_124

workflow_dispatch:
inputs:
Expand All @@ -13,29 +13,34 @@ on:
default: 'internal-devnet'
type: choice
options:
- devnet
- aeneid
- mainnet
- internal-devnet
erc721_address:
description: 'ERC721 contract address'
description: 'ERC721 contract address (leave empty to deploy new contract)'
required: false
default: ''
default: '0x15cbB99b60F06CC70D819dD256BC7B7F6eC391B9'
type: string
oov3_address:
description: 'Optimistic Oracle V3 address'
description: 'OOV3 contract address (leave empty to deploy new contract)'
required: false
default: ''
default: '0x21F4AbC03C1323ffc139b9Af6e261B825BFd73ca'
type: string
deploy_oov3:
description: 'Deploy Optimistic Oracle V3'
schedule:
description: 'Schedule first before the set opertion'
required: false
default: false
type: boolean
schedule:
description: 'Schedule first before the set opertion'
deploy_report:
description: 'Deploy test report to GitHub Pages'
required: false
default: true
default: false
type: boolean
test_pattern:
description: 'Test pattern to run (e.g., dispute, licensing, royalty, or leave empty for all tests)'
required: false
default: ''
type: string


workflow_call:
Expand All @@ -46,9 +51,14 @@ on:
default: 'internal-devnet'
type: string
erc721_address:
description: 'ERC721 contract address'
description: 'ERC721 contract address (leave empty to deploy new contract)'
required: false
default: ''
default: '0x15cbB99b60F06CC70D819dD256BC7B7F6eC391B9'
type: string
oov3_address:
description: 'OOV3 contract address (leave empty to deploy new contract)'
required: false
default: '0x21F4AbC03C1323ffc139b9Af6e261B825BFd73ca'
type: string

jobs:
Expand All @@ -62,7 +72,6 @@ jobs:
echo "devnet_version: ${{ inputs.devnet_version || github.event.inputs.devnet_version || 'internal-devnet' }}"
echo "erc721_address: ${{ inputs.erc721_address || github.event.inputs.erc721_address || '' }}"
echo "oov3_address: ${{ inputs.oov3_address || github.event.inputs.oov3_address || '' }}"
echo "deploy_oov3: ${{ inputs.deploy_oov3 || github.event.inputs.deploy_oov3 || '' }}"
echo "schedule: ${{ inputs.schedule || github.event.inputs.schedule || '' }}"

set-devnet-constants:
Expand All @@ -72,7 +81,7 @@ jobs:
id: devnet_version
run: |
declare -A devnet_config=(
["devnet"]="1315 http://r1-d.odyssey-devnet.storyrpc.io:8545"
["aeneid"]="1315 https://aeneid.storyrpc.io"
["mainnet"]="1514 https://public.storyrpc.io"
["internal-devnet"]="1512 https://rpc.devnet.storyrpc.io"
)
Expand All @@ -84,6 +93,7 @@ jobs:

echo "CHAINID=$chainid" >> $GITHUB_OUTPUT
echo "RPCURL='$rpcurl'" >> $GITHUB_OUTPUT
echo "NETWORK_VERSION=$devnet_version" >> $GITHUB_OUTPUT
else
echo "Unknown devnet version: $devnet_version"
exit 1
Expand All @@ -96,32 +106,14 @@ jobs:
echo "MOCK_ERC20_ADDRESS=0x1514000000000000000000000000000000000000" >> $GITHUB_OUTPUT
# this is for MockERC20
# echo "MOCK_ERC20_ADDRESS=0x688abA77b2daA886c0aF029961Dc5fd219cEc3f6" >> $GITHUB_OUTPUT
# echo "MOCK_ERC20_ADDRESS=0xa5D13B403C22E28eE1153CFc6aB5e5f740A65611" >> $GITHUB_OUTPUT

outputs:
CHAINID: ${{ steps.devnet_version.outputs.CHAINID }}
RPCURL: ${{ steps.devnet_version.outputs.RPCURL }}
MOCK_ERC20_ADDRESS: ${{ steps.mock_erc20_address.outputs.MOCK_ERC20_ADDRESS }}
NETWORK_VERSION: ${{ steps.devnet_version.outputs.NETWORK_VERSION }}

prepare-erc721:
name: prepare-erc721
needs: set-devnet-constants
if: ${{ inputs.erc721_address != '' && github.event.inputs.erc721_address != '' }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- name: Echo 721 address
id: prepare
run: |
erc721_address=${{ inputs.erc721_address || github.event.inputs.erc721_address || '' }}
echo "STORY_ERC721=$erc721_address" >> $GITHUB_ENV
echo "::set-output name=STORY_ERC721::$erc721_address"

outputs:
STORY_ERC721: ${{ steps.prepare.outputs.STORY_ERC721 }}

deploy-erc721:
name: Deploy ERC721
Expand Down Expand Up @@ -170,7 +162,7 @@ jobs:

deploy-oov3-sandbox:
name: Deploy UMA Optimistic Oracle V3
if: ${{ inputs.deploy_oov3 == true || github.event.inputs.deploy_oov3 == true }}
if: ${{ inputs.oov3_address == '' && github.event.inputs.oov3_address == '' }}
needs: set-devnet-constants
runs-on: ubuntu-latest

Expand Down Expand Up @@ -219,7 +211,7 @@ jobs:
run-hardhat-test:
name: Run E2E Test
runs-on: ubuntu-latest
needs: [set-devnet-constants, deploy-erc721, deploy-oov3-sandbox, prepare-erc721 ]
needs: [set-devnet-constants, deploy-erc721, deploy-oov3-sandbox]
if: always() && !failure() && !cancelled()

strategy:
Expand Down Expand Up @@ -258,17 +250,26 @@ jobs:
echo "STORY_USER2=${{ secrets.STORY_USER2 }}" >> .env
echo "STORY_URL=${{ needs.set-devnet-constants.outputs.RPCURL }}" >> .env
echo "STORY_CHAINID=${{ needs.set-devnet-constants.outputs.CHAINID }}" >> .env
echo "STORY_ERC721=${{ needs.deploy-erc721.outputs.STORY_ERC721 || needs.prepare-erc721.outputs.STORY_ERC721 }}" >> .env
echo "STORY_ERC721=${{ needs.deploy-erc721.outputs.STORY_ERC721 || inputs.erc721_address || github.event.inputs.erc721_address }}" >> .env
echo "STORY_OOV3=${{ needs.deploy-oov3-sandbox.outputs.OOV3_ADDRESS || inputs.oov3_address || github.event.inputs.oov3_address }}" >> .env

# add one more blank line to .env
echo "" >> .env

- name: Run test
run: |
# Prepare test environment: copy mock contracts from test/foundry/mocks/ to contracts/ directory
# and compile all contracts. This is required because Hardhat tests reference mock contracts
# that are located in the Foundry test directory structure.
yarn prepare:test
# run test
npx hardhat test test/hardhat/e2e/**/*.ts --network internal_devnet

if [ -n "${{ inputs.test_pattern }}" ]; then
echo "Running tests matching pattern: ${{ inputs.test_pattern }}"
npx hardhat test test/hardhat/e2e/**/*${{ inputs.test_pattern }}*.ts --network ${{ needs.set-devnet-constants.outputs.NETWORK_VERSION }}
else
echo "Running all tests"
npx hardhat test test/hardhat/e2e/**/*.ts --network ${{ needs.set-devnet-constants.outputs.NETWORK_VERSION }}
fi

- name: Upload Test Report
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ broadcast

# Dotenv file
.env
.env*

.idea/
node_modules/
Expand Down
Loading
Loading