Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

refactor(core, contract, etherscan): move Chain enum, use HashMap::from #524

Merged
merged 4 commits into from
Oct 24, 2021

Conversation

shekhirin
Copy link
Contributor

@shekhirin shekhirin commented Oct 21, 2021

Motivation

Resolve #511

Solution

HashMap::from

@shekhirin shekhirin marked this pull request as ready for review October 21, 2021 16:13
@shekhirin shekhirin changed the title refactor(contract, etherscan): make use of HashMap::from refactor(contract, etherscan): use HashMap::from Oct 21, 2021
[
// mainnet
(
1.into(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like there should be function for that?
we already have the Chain enum in the etherscan crate, should we move this to core and add a function for that instead?

Copy link
Owner

Choose a reason for hiding this comment

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

I am OK with doing that, can move the Chain enum to ethers-core probably?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@shekhirin shekhirin changed the title refactor(contract, etherscan): use HashMap::from refactor(core, contract, etherscan): introduce Chain enum, use HashMap::from Oct 24, 2021
@shekhirin shekhirin changed the title refactor(core, contract, etherscan): introduce Chain enum, use HashMap::from refactor(core, contract, etherscan): move Chain enum, use HashMap::from Oct 24, 2021
@shekhirin shekhirin force-pushed the refactor/hashmap-from branch from addf907 to b23d00e Compare October 24, 2021 18:07
@shekhirin shekhirin force-pushed the refactor/hashmap-from branch from b23d00e to c2c203e Compare October 24, 2021 18:14
@shekhirin shekhirin requested a review from gakonst October 24, 2021 18:35
@gakonst gakonst merged commit cba1a85 into gakonst:master Oct 24, 2021
@gakonst
Copy link
Owner

gakonst commented Oct 24, 2021

Great stuff

meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
* fix gas usage reporting

* fix adjustment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use HashMap::from for immediate-use hashmaps initialization
3 participants