-
Notifications
You must be signed in to change notification settings - Fork 47
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
[DO-NOT-MERGE] Better loom compatibility with JSON RPC specification for Ethereum #242
base: master
Are you sure you want to change the base?
Conversation
* Better docs on loom provider responses * Improved interfaces on loom provider * Do not throw when cant find getCode * Improving block 0 handling * Added strict mode that remove non standard variables
ae913e4
to
99219e8
Compare
src/loom-provider.ts
Outdated
@@ -832,17 +987,28 @@ export class LoomProvider { | |||
} | |||
|
|||
private _createLogResult(log: EthFilterLog): IEthFilterLog { | |||
const removed = log.getRemoved() | |||
const blockTime = numberToHexLC(log.getBlockTime()) |
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.
Looks like this was a decimal before, won't converting to hex break clients?
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.
Fixed, the potential break can exist only if the client marks as strict like loomProvider.strict = true
blockNumber: string | ||
transactionHash: string | ||
number: string | null | ||
hash: string |
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.
Potentially breaking changes?
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.
Those are the values according to the specification, added back the non-strict values at the end of the interface
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.
Fixed, the potential break can exist only if the client marks as strict like loomProvider.strict = true
This PR targets to improve the LoomProvider compatibility with Web3 and Block Explorers that understanding Eth JSON RPC