Skip to content
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
3 changes: 2 additions & 1 deletion packages/assets-controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add multicall address for the chain: `Tempo Testnet` ([#7753](https://github.com/MetaMask/core/pull/7753))
- Add INK (0xdef1) mapping to eip155:57073/slip44:60 ([#7688](https://github.com/MetaMask/core/pull/7688))
- Add multicall3 address for chain: `Tempo Testnet` ([#7753](https://github.com/MetaMask/core/pull/7753))

### Changed

Expand Down
24 changes: 24 additions & 0 deletions packages/assets-controllers/src/multicall.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,30 @@ describe('multicall', () => {
'Contract call failed',
);
});

it('should support INK mainnet (0xdef1)', async () => {
const calls: Aggregate3Call[] = [
{
target: '0x0000000000000000000000000000000000000001',
allowFailure: true,
callData:
'0x70a08231000000000000000000000000000000000000000000000000000000000000000a',
},
];

jest
.spyOn(provider, 'call')
.mockResolvedValue(
defaultAbiCoder.encode(
['tuple(bool,bytes)[]'],
[[[true, defaultAbiCoder.encode(['uint256'], [100])]]],
),
);

const results = await aggregate3(calls, '0xdef1', provider);
expect(results).toHaveLength(1);
expect(results[0].success).toBe(true);
});
});

describe('getTokenBalancesForMultipleAddresses', () => {
Expand Down
2 changes: 2 additions & 0 deletions packages/assets-controllers/src/multicall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ const MULTICALL_CONTRACT_BY_CHAINID = {
'0x10e6': '0xcA11bde05977b3631167028862bE2a173976CA11',
// MSU (contract they deployed by their team for us)
'0x10b3e': '0x99423C88EB5723A590b4C644426069042f137B9e',
// INK Mainnet
'0xdef1': '0xcA11bde05977b3631167028862bE2a173976CA11',
// Tempo Testnet, contract found but not in multicall3 repo
'0xa5bf': '0xcA11bde05977b3631167028862bE2a173976CA11',
} as Record<Hex, Hex>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ export const SPOT_PRICES_SUPPORT_INFO = {
'0x15f900': 'eip155:1440000/erc20:0x0000000000000000000000000000000000000000', // xrpl-evm - native symbol: XRP
'0x4e454152': 'eip155:1313161554/slip44:60', // Aurora Mainnet (Ethereum L2 on NEAR) - Native symbol: ETH
'0x63564c40': 'eip155:1666600000/slip44:1023', // Harmony Mainnet Shard 0 - Native symbol: ONE
'0xdef1': 'eip155:57073/erc20:0x0000000000000000000000000000000000000000', // Ink Mainnet - Native symbol: ETH
} as const;

// MISSING CHAINS WITH NO NATIVE ASSET PRICES
Expand Down
2 changes: 2 additions & 0 deletions packages/controller-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Add INK (0xed88) mapping to eip155:57073/erc20:0x0000000000000000000000000000000000000000 ([#7688](https://github.com/MetaMask/core/pull/7688))

## [11.18.0]

### Changed
Expand Down
Loading