Skip to content

Commit

Permalink
feat: add LNA and update multicall addresses (#182)
Browse files Browse the repository at this point in the history
* feat: add LNA and update multicall addresses

* fix: update supported chains
  • Loading branch information
mathiasmoeller committed Jul 26, 2023
1 parent 9a08885 commit 6a4b374
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export enum ChainKey {
ARN = 'arn',
ERA = 'era',
PZE = 'pze',
LNA = 'lna',

// Testnets
GOR = 'gor',
Expand Down Expand Up @@ -170,6 +171,7 @@ export enum ChainId {
ARN = 42170,
ERA = 324,
PZE = 1101,
LNA = 59144,

// Testnets
GOR = 5,
Expand Down
3 changes: 2 additions & 1 deletion src/chains/supported.chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,7 @@ export const supportedEVMChains: EVMChain[] = [
mainnet: true,
logoURI:
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/zksync.png',
multicallAddress: multicallAddresses[ChainId.ERA],

metamask: {
chainId: prefixChainId(324),
Expand Down Expand Up @@ -1249,7 +1250,7 @@ export const supportedEVMChains: EVMChain[] = [
mainnet: false,
logoURI:
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/linea.svg',
// multicallAddress: multicallAddresses[ChainId.LNAT], // Not deployed yet
multicallAddress: multicallAddresses[ChainId.LNAT],
faucetUrls: ['https://faucetlink.to/goerli'],

metamask: {
Expand Down
7 changes: 5 additions & 2 deletions src/multicall.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ChainId } from '.'

// based on:
// new nice tool to search for addresses: https://www.multicall3.com/deployments
// - https://github.com/mds1/multicall#deployments
// - https://github.com/sushiswap/sushiswap-sdk/blob/canary/src/constants/addresses.ts#L323
// - https://github.com/joshstevens19/ethereum-multicall#multicall-contracts
Expand Down Expand Up @@ -33,10 +34,11 @@ export const multicallAddresses: { [ChainId: number]: string } = {
[ChainId.RSK]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.VEL]: '0x6ede559F2Bd951777470595761672091CCD21Ac6',
[ChainId.PZE]: '0xcA11bde05977b3631167028862bE2a173976CA11',
// [ChainId.ERA]: '', // not available
[ChainId.ERA]: '0xF9cda624FBC7e059355ce98a31693d299FACd963',
[ChainId.LNA]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.ARN]: '0xcA11bde05977b3631167028862bE2a173976CA11',

// TODO
// [ChainId.ARN]: '', // TODO
// [ChainId.EXP]: '', // TODO
// [ChainId.TCH]: '', // TODO
// [ChainId.UBQ]: '', // TODO
Expand All @@ -60,6 +62,7 @@ export const multicallAddresses: { [ChainId: number]: string } = {
[ChainId.FTMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.RSKT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.ARBG]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.LNAT]: '0xcA11bde05977b3631167028862bE2a173976CA11',

// TODO
// [ChainId.METT]: '', // TODO
Expand Down

0 comments on commit 6a4b374

Please sign in to comment.