-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to replace HH Node with Anvil to allow upgrade to Node 20 #2023
base: dcroote/issue1918
Are you sure you want to change the base?
Conversation
@@ -34,7 +34,7 @@ | |||
"@types/mocha": "^10.0.6", | |||
"chai": "^4.4.1", | |||
"ethereum-waffle": "^4.0.10", | |||
"hardhat": "^2.19.5", | |||
"hardhat": "^2.23.0-dev.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't help.
@@ -6,7 +6,7 @@ describe('buildingRequest', () => { | |||
const options = fixtures.buildRequestOptions(); | |||
const res = build.buildRequest(options); | |||
expect(res).toEqual({ | |||
baseUrl: 'http://localhost:5000', | |||
baseUrl: 'http://localhost:5005', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mac OS runs an Airdrop service on this port.
@@ -75,7 +75,7 @@ describe('SDK', () => { | |||
|
|||
it('uses transaction overrides', async () => { | |||
await expect(sdk.sponsorRequester(wallet.address, { gasLimit: 1 })).rejects.toThrow( | |||
'Transaction requires at least 21572 gas but got 1' | |||
expect.objectContaining({name: expect.stringContaining('Error'), message: expect.stringContaining('gas')}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anvil returns a different error message for gas compared to HH Node.
@@ -103,6 +104,11 @@ const processBlockData = async ( | |||
} | |||
}; | |||
|
|||
const resetAnvil = async () => { | |||
spawn("bash", ["-c", 'killall anvil;']); | |||
await new Promise(f => setTimeout(f, 1000)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally starting and stopping Anvil could be managed in code or handled more intelligently.
A more comprehensive approach can be found here: https://github.com/api3dao/oev-searcher-poc/blob/main/src/simulation.ts
No description provided.