Skip to content

Commit

Permalink
feat: support bulk balance checks on blast (#23358)
Browse files Browse the repository at this point in the history
## **Description**

Support bulk balance checks on blast. This will reduce the number of RPC
calls.

I deployed this contract to blast to support the feature:
https://github.com/wbobeirne/eth-balance-checker


This was the tx:
https://blastscan.io/tx/0x89a96f29e38ae2c42528ad0b0f07df9465bba6433eda12911c7520bcccc8fbaa

Also verified the source code on blastscan.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/23358?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

Switch to blast network, should show native balances correctly across
all accounts.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
bergeron authored Mar 7, 2024
1 parent d980602 commit 1d4ac46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/scripts/constants/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export const SINGLE_CALL_BALANCES_ADDRESSES = {
[CHAIN_IDS.AVALANCHE]: '0xD023D153a0DFa485130ECFdE2FAA7e612EF94818',
[CHAIN_IDS.FANTOM]: '0x07f697424ABe762bB808c109860c04eA488ff92B',
[CHAIN_IDS.ARBITRUM]: '0x151E24A486D7258dd7C33Fb67E4bB01919B7B32c',
[CHAIN_IDS.BLAST]: '0xfd5730e96f9dffae40d99b77015bd42816280998',
};
2 changes: 2 additions & 0 deletions shared/constants/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export const CHAIN_IDS = {
ZKSYNC_ERA: '0x144',
TEST_ETH: '0x539',
ARBITRUM_GOERLI: '0x66eed',
BLAST: '0x13e31',
} as const;

const CHAINLIST_CHAIN_IDS_MAP = {
Expand Down Expand Up @@ -855,6 +856,7 @@ export const BUYABLE_CHAINS_MAP: {
| typeof CHAIN_IDS.GNOSIS
| typeof CHAIN_IDS.AURORA
| typeof CHAIN_IDS.ARBITRUM_GOERLI
| typeof CHAIN_IDS.BLAST
>]: BuyableChainSettings;
} = {
[CHAIN_IDS.MAINNET]: {
Expand Down

0 comments on commit 1d4ac46

Please sign in to comment.