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 SKALE Europa to Assets Controller #4476

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions packages/assets-controllers/src/AssetsContractController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export const SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID: Record<Hex, string> = {
'0x6aa75276052d96696134252587894ef5ffa520af',
[SupportedTokenDetectionNetworks.moonriver]:
'0x6aa75276052d96696134252587894ef5ffa520af',
[SupportedTokenDetectionNetworks.skale_europa_mainnet]:
'0xb44d3D2865841F4051332AF90EbE028e01f92f7C',
};

export const MISSING_PROVIDER_ERROR =
Expand Down
8 changes: 8 additions & 0 deletions packages/assets-controllers/src/assetsUtil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ describe('assetsUtil', () => {
).toBe(true);
});

it('returns true for the SKALE Europa Mainnet network', () => {
expect(
assetsUtil.isTokenDetectionSupportedForNetwork(
assetsUtil.SupportedTokenDetectionNetworks.skale_europa_mainnet,
),
).toBe(true);
});

it('returns false for testnets such as Goerli', () => {
expect(assetsUtil.isTokenDetectionSupportedForNetwork(toHex(5))).toBe(
false,
Expand Down
3 changes: 3 additions & 0 deletions packages/assets-controllers/src/assetsUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ export enum SupportedTokenDetectionNetworks {
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
// eslint-disable-next-line @typescript-eslint/naming-convention
moonriver = '0x505', // decimal: 1285
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
// eslint-disable-next-line @typescript-eslint/naming-convention
skale_europa_mainnet = '0x79f99296', // decimal: 2046399126
}

/**
Expand Down