Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional ethereum utils #189

Merged
merged 1 commit into from Jun 7, 2019
Merged

Conversation

matthewjablack
Copy link
Contributor

@matthewjablack matthewjablack commented Jun 5, 2019

Description

Add removeAddress0x, checksumEncode and ensureBlockFormat to Ethereum utils

removeAddress0x is for standardizing an Ethereum address and converting it to lower case

checksumEncode is for ensuring that an Ethereum address is following EIP 55

ensureBlockFormat is for ensuring that block parameter specified is using the correct format, when using calls such as eth_call (https://infura.io/docs/ethereum/json-rpc/eth_call).

For example, you could have client.chains.getCode(contractAddress, 'latest') or client.chains.getCode(contractAddress, 7896092) or even not include it, and it would ensure that it defaulted to latest.

Submission Checklist 馃摑

  • Add removeAddress0x
  • Add checksumEncode
  • Add ensureBlockFormat

Copy link
Collaborator

@monokh monokh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine as long as conflicts are fixed

@matthewjablack matthewjablack merged commit f91e1aa into dev Jun 7, 2019
@matthewjablack matthewjablack deleted the add-additional-ethereum-utils branch June 7, 2019 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants