From c79631c6afb16fd1b257464d847e02ade36dfc93 Mon Sep 17 00:00:00 2001 From: clement-ux Date: Thu, 18 Jul 2024 15:22:31 +0200 Subject: [PATCH 1/5] build: fix main branch name. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e3740d5..0a2dff6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: types: [opened, reopened, synchronize] push: branches: - - 'master' + - 'main' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 44fed5aa1ffe0545322f06de2ea7266affa43d77 Mon Sep 17 00:00:00 2001 From: clement-ux Date: Thu, 18 Jul 2024 18:04:14 +0200 Subject: [PATCH 2/5] fix: `writeJson()` (probably) native error. --- script/deploy/DeployManager.sol | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/script/deploy/DeployManager.sol b/script/deploy/DeployManager.sol index cfae954..9f32d7c 100644 --- a/script/deploy/DeployManager.sol +++ b/script/deploy/DeployManager.sol @@ -139,20 +139,28 @@ contract DeployManager is Script { deployedContracts[name] = addr; } - // Sleep 0.5s so that the previous write is complete - vm.sleep(500); - vm.writeJson(networkDeployments, deploymentsFilePath, contractsKey); - console.log("> Deployment addresses stored."); - /** * Write Execution History */ currentExecutions = vm.serializeUint(executionsKey, deployScript.DEPLOY_NAME(), block.timestamp); - // Sleep 0.5s so that the previous write is complete - vm.sleep(500); - vm.writeJson(currentExecutions, deploymentsFilePath, executionsKey); - console.log("> Deploy script execution complete."); + // Write to file instead of using writeJson to avoid "EOF while parsing a value at line 1 column 0" error. + vm.writeFile( + getForkDeploymentFilePath(), + string( + abi.encodePacked( + '{ "', + chainIdStr, + '": { "executions": ', + currentExecutions, + ', "contracts": ', + networkDeployments, + "}}" + ) + ) + ); + + console.log("> Deployment addresses stored and Deploy script execution complete."); } } From 1d155f31032becbe34fc883a17f261a7d80897f7 Mon Sep 17 00:00:00 2001 From: clement-ux Date: Thu, 18 Jul 2024 18:48:48 +0200 Subject: [PATCH 3/5] try something --- .github/workflows/main.yml | 2 +- test/AbstractForkTest.sol | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a2dff6..75193c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,4 +41,4 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 - name: Run fork tests - run: forge test --fork-url $PROVIDER_URL -vvv + run: forge test --mt test_withdrawal --fork-url $PROVIDER_URL -vvvvv diff --git a/test/AbstractForkTest.sol b/test/AbstractForkTest.sol index 1745659..90a585e 100644 --- a/test/AbstractForkTest.sol +++ b/test/AbstractForkTest.sol @@ -14,5 +14,7 @@ abstract contract AbstractForkTest is Test { // Run deployments deployManager.setUp(); deployManager.run(); + + revert("1234"); } } From 10274a90ef113c227fd4819b32e28c496f485521 Mon Sep 17 00:00:00 2001 From: clement-ux Date: Thu, 18 Jul 2024 23:05:19 +0200 Subject: [PATCH 4/5] Revert "try something" This reverts commit 1d155f31032becbe34fc883a17f261a7d80897f7. --- .github/workflows/main.yml | 2 +- test/AbstractForkTest.sol | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75193c3..0a2dff6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,4 +41,4 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 - name: Run fork tests - run: forge test --mt test_withdrawal --fork-url $PROVIDER_URL -vvvvv + run: forge test --fork-url $PROVIDER_URL -vvv diff --git a/test/AbstractForkTest.sol b/test/AbstractForkTest.sol index 90a585e..1745659 100644 --- a/test/AbstractForkTest.sol +++ b/test/AbstractForkTest.sol @@ -14,7 +14,5 @@ abstract contract AbstractForkTest is Test { // Run deployments deployManager.setUp(); deployManager.run(); - - revert("1234"); } } From df381df197dbcbe25405a021cdb13eb2d7f2c30f Mon Sep 17 00:00:00 2001 From: clement-ux Date: Thu, 18 Jul 2024 23:05:48 +0200 Subject: [PATCH 5/5] test: qkip delay between request and claim. --- test/OethLiquidityManager.t.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/OethLiquidityManager.t.sol b/test/OethLiquidityManager.t.sol index 4d7faf9..1a1eb6d 100644 --- a/test/OethLiquidityManager.t.sol +++ b/test/OethLiquidityManager.t.sol @@ -46,6 +46,8 @@ contract OethLiquidityManagerTest is AbstractForkTest { vault.addWithdrawalQueueLiquidity(); + skip(10 minutes); + // Claim the ETH. oethARM.claimWithdrawal(requestId);