-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve RPC API compatibility for Ethers.js (#1957)
* Add minimal ts project * Add ethers.js dependency * Add etherejs api test (currently failing) Test tries to get the block * Add dummy data for gas limit field * Build ethersjs project before executing test * Return real gas limit in place of dummy data * Return baseFee if it is acessible * Use framework for ethers.js compatibility tests Instead of running a script we now use the mocha testing framework which provides much better output and makes it much easier to add testcases. * Store package lock * Add make rule to install ethersjs project deps * Update ci to prepare ehtersjs project * Add dockerfile for a node/golang CI executor Update CI to use new docker image, since we now need to run node and npm as part of our tests. * Run e2e coverage CI tests verbosely * Add debug * Add more debug * Change address format The IPV6 addresses returned from the geth node were not working on CI so we convert them to IPV4 addresses. * Update log message for clarity * Update node-golang dockerfile Add installed go binaries location to user's path * Update readme to specify a minimum go version This should mitigate the readme going out of date whenever we update go. * Default to single quotes in typescript * Flag to disable RPC compatibilty fields If the flag is set then the 'gasLimit' and 'baseFeePerGas' fields will not be returned on RPC blocks. * Split the tests under 2 describe headings One for tests with state one for tests without. This makes executing each batch of tests easier because we can just grep for the describe headings. * Document that js tests shoudn't be run standalone * Move ethersjs test project under e2e_test Just to further signify that it is not for standalone use. * Do not return block fields that cant be retreived If the state is missing for gasLimit or baseFeePerGas or if there is some other failure when retrieving them then do not add them as fields to the block. Preivously in some cases a default value would have been added to the block and returned. * Fix typos * Remove unused code Co-authored-by: Pasto <hbandura@gmail.com> Co-authored-by: Gaston Ponti <ponti@clabs.co>
- Loading branch information
1 parent
7019852
commit 2e37ebe
Showing
22 changed files
with
1,768 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This has been pushed to us.gcr.io/celo-testnet/circleci-node12-golang1.17.5 | ||
FROM circleci/node:12 | ||
|
||
COPY --from=circleci/golang:1.17.5 /usr/local/go/ /usr/local/go/ | ||
|
||
ENV PATH="/home/circleci/go/bin:${PATH}" | ||
ENV PATH="/usr/local/go/bin:${PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
dist | ||
|
Oops, something went wrong.