8000 Add Polygon support by drwtsn95 · Pull Request #11 · pawurb/mevlog-rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Polygon support #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers an 8000 d 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

Merged
merged 1 commit into from
May 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ You can reverse the display order by adding the `--reverse` flag.
* [Mainnet](https://etherscan.io)
* [Base](https://basescan.org)
* [BSC](https://bscscan.com)
* [Polygon](https://polygonscan.com)

If you want to add an EVM network, please submit a PR as described [in this issue](https://github.com/pawurb/mevlog-rs/issues/9).

Expand Down
7 changes: 7 additions & 0 deletions src/misc/shared_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub enum EVMChainType {
Base,
BSC,
Arbitrum,
Polygon,
}

#[derive(Debug, Clone)]
Expand All @@ -40,6 +41,7 @@ impl EVMChainType {
EVMChainType::Base => 8453,
EVMChainType::BSC => 56,
EVMChainType::Arbitrum => 42161,
EVMChainType::Polygon => 137,
}
}

Expand All @@ -49,6 +51,7 @@ impl EVMChainType {
EVMChainType::Base => "base",
EVMChainType::BSC => "bsc",
EVMChainType::Arbitrum => "arbitrum",
EVMChainType::Polygon => "polygon",
}
}

Expand All @@ -58,6 +61,7 @@ impl EVMChainType {
EVMChainType::Base,
EVMChainType::BSC,
EVMChainType::Arbitrum,
EVMChainType::Polygon,
]
}

Expand Down Expand Up @@ -126,6 +130,7 @@ impl EVMChain {
EVMChainType::Base => address!("0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70"),
EVMChainType::BSC => address!("0x0567f2323251f0aab15c8dfb1967e4e8a7d42aee"),
EVMChainType::Arbitrum => address!("0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612"),
EVMChainType::Polygon => address!("0xAB594600376Ec9fD91F8e885dADF0CE036862dE0"),
}
}

Expand All @@ -135,6 +140,7 @@ impl EVMChain {
EVMChainType::Base => "https://basescan.org",
EVMChainType::BSC => "https://bscscan.com",
EVMChainType::Arbitrum => "https://arbiscan.io",
EVMChainType::Polygon => "https://polygonscan.com",
}
}

Expand All @@ -145,6 +151,7 @@ impl EVMChain {
pub fn currency_symbol(&self) -> &str {
match self.chain_type {
EVMChainType::BSC => "BNB",
EVMChainType::Polygon => "POL",
_ => "ETH",
}
}
Expand Down
Loading
0