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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rsk format of checksum #2147

Merged
merged 11 commits into from
Jun 17, 2019
Merged

add rsk format of checksum #2147

merged 11 commits into from
Jun 17, 2019

Conversation

ayrat555
Copy link
Contributor

@ayrat555 ayrat555 commented Jun 12, 2019

fixes #2139

We should add one env variable:
CHECKSUM_FUNCTION = rsk

Changelog

  • add rsk format of checksum

@coveralls
Copy link

coveralls commented Jun 12, 2019

Pull Request Test Coverage Report for Build 6e47786f-6226-48de-a452-0361d8dc91dc

  • 34 of 36 (94.44%) changed or added relevant lines in 4 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.05%) to 80.716%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex 2 3 66.67%
apps/explorer/lib/explorer/chain/net_version_cache.ex 10 11 90.91%
Files with Coverage Reduction New Missed Lines %
apps/indexer/lib/indexer/fetcher/token.ex 1 78.57%
apps/indexer/lib/indexer/fetcher/token_balance.ex 2 87.1%
apps/indexer/lib/indexer/block/fetcher.ex 3 88.0%
Totals Coverage Status
Change from base Build be7d4c0a-8fbe-49ce-ae62-2e3ddf25e349: -0.05%
Covered Lines: 4918
Relevant Lines: 6093

💛 - Coveralls

@@ -80,7 +80,9 @@ if System.get_env("SOURCE_MODULE") == "TransactionAndLog" do
end

config :explorer,
solc_bin_api_url: "https://solc-bin.ethereum.org"
solc_bin_api_url: "https://solc-bin.ethereum.org",
chain_id: System.get_env("CHAIN_ID"),
Copy link
Member

Choose a reason for hiding this comment

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

@ayrat555 Do we need to define a CHAIN_ID var since we can get chain ID from the Ethereum client https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vbaranov you're right. I'll update my pr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vbaranov done

else
to_string(["0x" | checksum_formatted])
end
def rsk_checksum(hash) do
Copy link
Member

Choose a reason for hiding this comment

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

@ayrat555 let's add a comment here with the link to the corresponding RSKIP

@vbaranov vbaranov merged commit 3e2f437 into master Jun 17, 2019
@vbaranov vbaranov deleted the ab-rsk-checksum branch June 17, 2019 09:02
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.

Display address checksum for RSK
6 participants