diff --git a/.github/workflows/forge-build.yml b/.github/workflows/forge-build.yml new file mode 100644 index 00000000..51d1f595 --- /dev/null +++ b/.github/workflows/forge-build.yml @@ -0,0 +1,67 @@ +name: "Build a Forge project" + +on: + workflow_call: + inputs: + cache-path: + default: | + cache + node_modules + out + out-optimized + required: false + type: "string" + + save-cache: + default: true + required: false + type: boolean + + store-artifacts: + default: true + required: false + type: boolean + +jobs: + forge-build: + runs-on: "ubuntu-latest" + steps: + - name: "Check out the repo" + uses: "actions/checkout@v4" + + - name: "Install Foundry" + uses: "foundry-rs/foundry-toolchain@v1" + with: + version: nightly-ea2eff95b5c17edd3ffbdfc6daab5ce5cc80afc0 + + - name: "Install NodeJS" + uses: actions/setup-node@v4 + with: + node-version: 18 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9.1.2 + run_install: false + + - name: "Install the Node.js dependencies" + run: "pnpm install" + + - name: "Show the Forge config" + run: "forge config" + + - name: "Build the production contracts" + run: "forge build" + + - name: "Cache the contracts and the node modules so that they can be re-used by the other jobs" + if: ${{ inputs.save-cache }} + uses: "actions/cache/save@v4" + with: + key: "build-and-modules-${{ github.sha }}" + path: ${{ inputs.cache-path }} + + - name: "Add summary" + run: | + echo "## Build result" >> $GITHUB_STEP_SUMMARY + echo "✅ Passed" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7f71545..bcfa7639 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ env: jobs: build: - uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-build.yaml@main" + uses: "./.github/workflows/forge-build.yml" test: needs: ["build"] diff --git a/.vscode/settings.json b/.vscode/settings.json index 305a9c19..2d30b949 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "solidity.compileUsingRemoteVersion": "v0.8.23+commit.f704f362" + "solidity.compileUsingRemoteVersion": "v0.8.25+commit.b61c2a91" } diff --git a/test/integration/OwnableValidatorRecovery/OwnableValidatorBase.t.sol b/test/integration/OwnableValidatorRecovery/OwnableValidatorBase.t.sol index 3520d797..b17b8aec 100644 --- a/test/integration/OwnableValidatorRecovery/OwnableValidatorBase.t.sol +++ b/test/integration/OwnableValidatorRecovery/OwnableValidatorBase.t.sol @@ -92,7 +92,7 @@ abstract contract OwnableValidatorBase is IntegrationBase { // console2.log("recoveryModule: ", recoveryModule); string memory subject = - "Recover account 0x19F55F3fE4c8915F21cc92852CD8E924998fDa38 to new owner 0x7240b687730BE024bcfD084621f794C2e4F8408f using recovery module 0xE98A1D4388fb2354016e56bFDb8dA7c55cDdae98"; + "Recover account 0x19F55F3fE4c8915F21cc92852CD8E924998fDa38 to new owner 0x7240b687730BE024bcfD084621f794C2e4F8408f using recovery module 0xbF6064f750F31Dc9c9E7347E0C2236Be80B014B4"; address router = zkEmailRecovery.getRouterForAccount(accountAddress); bytes32 nullifier = keccak256(abi.encode("nullifier 2")); uint256 templateIdx = 0; diff --git a/test/unit/UnitBase.t.sol b/test/unit/UnitBase.t.sol index 15f3e6b2..c036ac8b 100644 --- a/test/unit/UnitBase.t.sol +++ b/test/unit/UnitBase.t.sol @@ -175,7 +175,7 @@ abstract contract UnitBase is RhinestoneModuleKit, Test { address router = zkEmailRecovery.getRouterForAccount(accountAddress); string memory subject = - "Recover account 0x50Bc6f1F08ff752F7F5d687F35a0fA25Ab20EF52 to new owner 0x7240b687730BE024bcfD084621f794C2e4F8408f using recovery module 0x0957519DC28b1d289F4721244416C3F00033747c"; + "Recover account 0x50Bc6f1F08ff752F7F5d687F35a0fA25Ab20EF52 to new owner 0x7240b687730BE024bcfD084621f794C2e4F8408f using recovery module 0x07859195125c40eE1f7dA0A9B88D2eF19b633947"; bytes32 nullifier = keccak256(abi.encode("nullifier 2")); EmailProof memory emailProof = generateMockEmailProof(subject, nullifier, accountSalt);