-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
rpc-eth-client
for Ethereum compatible JSON-RPC endpoint (#…
…398) * Implement rpc-eth-client with getStorageAt method * Add test for comparing RPC and GQL eth-client getStorageAt method * Add getBlockWithTransactions and getBlocks method * Implement getFullBlocks with RLP encoded data * Implement getFullTransaction method with raw tx * Implement getBlockByHash and getLogs methods * Add flag and interface to switch between RPC and GQL eth clients * Fix getBlocks to return empty array when block not present * Return empty array in getBlocks for missing block and use blockNumber in getLogs * Fix getRawTransaction method for zero signature.v value * Remove duplicate util from rpc-eth-client
- Loading branch information
Showing
22 changed files
with
889 additions
and
53 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
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,5 @@ | ||
# Don't lint node_modules. | ||
node_modules | ||
|
||
# Don't lint build output. | ||
dist |
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,32 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"semistandard", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"indent": ["error", 2, { "SwitchCase": 1 }], | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": [ | ||
"warn", | ||
{ | ||
"allowArgumentsExplicitlyTypedAsAny": true | ||
} | ||
], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ "ignoreRestSiblings": true } | ||
] | ||
} | ||
} |
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,5 @@ | ||
/src/ | ||
index.ts | ||
tsconfig.json | ||
.eslintrc.json | ||
.eslintignore |
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,5 @@ | ||
// | ||
// Copyright 2021 Vulcanize, Inc. | ||
// | ||
|
||
export * from './src/eth-client'; |
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,44 @@ | ||
{ | ||
"name": "@cerc-io/rpc-eth-client", | ||
"version": "0.2.50", | ||
"description": "RPC ETH Client", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test:rpc": "mocha -r ts-node/register src/**/*.test.ts", | ||
"build": "tsc" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/cerc-io/watcher-ts.git" | ||
}, | ||
"author": "", | ||
"license": "AGPL-3.0", | ||
"bugs": { | ||
"url": "https://github.com/cerc-io/watcher-ts/issues" | ||
}, | ||
"homepage": "https://github.com/cerc-io/watcher-ts#readme", | ||
"dependencies": { | ||
"@cerc-io/cache": "^0.2.50", | ||
"@cerc-io/util": "^0.2.50", | ||
"@cerc-io/ipld-eth-client": "^0.2.50", | ||
"cross-fetch": "^3.1.4", | ||
"debug": "^4.3.1", | ||
"ethers": "^5.4.4", | ||
"left-pad": "^1.3.0", | ||
"ws": "^8.11.0", | ||
"zen-observable-ts": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"@types/ws": "^8.5.3", | ||
"@typescript-eslint/eslint-plugin": "^5.47.1", | ||
"@typescript-eslint/parser": "^5.47.1", | ||
"eslint": "^8.35.0", | ||
"eslint-config-semistandard": "^15.0.1", | ||
"eslint-config-standard": "^16.0.3", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^5.1.0", | ||
"eslint-plugin-standard": "^5.0.0" | ||
} | ||
} |
Oops, something went wrong.