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
42 changes: 42 additions & 0 deletions packages/blue-sdk/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,26 @@ const _addressesRegistry = {

wNative: "0x1Cd0690fF9a693f5EF2dD976660a8dAFc81A109c",
},
[ChainId.MonadMainnet]: {
morpho: "0xD5D960E8C380B724a48AC59E2DfF1b2CB4a1eAee",

bundler3: {
bundler3: "0x82b684483e844422FD339df0b67b3B111F02c66E",
generalAdapter1: "0x725AB8CAd931BCb80Fdbf10955a806765cCe00e5",
},
adaptiveCurveIrm: "0x09475a3D6eA8c314c592b1a3799bDE044E2F400F",
publicAllocator: "0xfd70575B732F9482F4197FE1075492e114E97302",
metaMorphoFactory: "0x33f20973275B2F574488b18929cd7DCBf1AbF275",
vaultV2Factory: "0x8B2F922162FBb60A6a072cC784A2E4168fB0bb0c",
morphoMarketV1AdapterFactory: "0x8Da54fbF89B3D6fC6DCC92F31CF75a211ACF3d46",
morphoVaultV1AdapterFactory: "0x9f3c0999425656fD189C69a8aD68cB64986D644A",
registryList: "0x6a42f8b46224baA4DbBBc2F860F4675eeA7bd52B",
chainlinkOracleFactory: "0xC8659Bcd5279DB664Be973aEFd752a5326653739",
preLiquidationFactory: "0xB5b3e541abD19799E0c65905a5a42BD37d6c94c0",

wNative: "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A",
usdc: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
},
} as const;

export type ChainDeployments<Addresses = ChainAddresses> = {
Expand Down Expand Up @@ -858,6 +878,25 @@ const _deployments = {
chainlinkOracleFactory: 7526768n,
preLiquidationFactory: 7527649n,
},
[ChainId.MonadMainnet]: {
morpho: 31907457n,

bundler3: {
bundler3: 32321504n,
generalAdapter1: 32321504n,
},
adaptiveCurveIrm: 31907457n,

publicAllocator: 31907457n,
metaMorphoFactory: 32320327n,
vaultV2Factory: 32321811n,
morphoMarketV1AdapterFactory: 32321811n,
morphoVaultV1AdapterFactory: 32321811n,
registryList: 32322465n,
chainlinkOracleFactory: 32320327n,
preLiquidationFactory: 32321504n,
usdc: 22909616n,
},
} as const satisfies Record<ChainId, ChainDeployments>;

export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;
Expand Down Expand Up @@ -964,6 +1003,9 @@ const _unwrappedTokensMapping: Record<number, Record<Address, Address>> = {
[ChainId.ZeroGMainnet]: {
[_addressesRegistry[ChainId.ZeroGMainnet].wNative]: NATIVE_ADDRESS,
},
[ChainId.MonadMainnet]: {
[_addressesRegistry[ChainId.MonadMainnet].wNative]: NATIVE_ADDRESS,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wNative doesn't exist so this should raise a type error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve properly added wNative to the address registry :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe you're talking about something else?

},
};

export function getUnwrappedToken(wrappedToken: Address, chainId: number) {
Expand Down
8 changes: 8 additions & 0 deletions packages/blue-sdk/src/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export enum ChainId {
HyperliquidMainnet = 999,
SeiMainnet = 1329,
ZeroGMainnet = 16661,
MonadMainnet = 143,
}

export interface ChainMetadata {
Expand Down Expand Up @@ -215,5 +216,12 @@ export namespace ChainUtils {
explorerUrl: "https://chainscan.0g.ai",
identifier: "0G",
},
[ChainId.MonadMainnet]: {
name: "Monad",
id: ChainId.MonadMainnet,
nativeCurrency: { name: "Monad", symbol: "MON", decimals: 18 },
explorerUrl: "https://monad.socialscan.io",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you find the explorer URL? i don't see any in the official doc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a URL that didn’t come from the official docs, @Jean-Grimal gave it to me. Should I just leave it blank if no explorer is available on mainnet?

identifier: "monad",
},
} satisfies Record<ChainId, ChainMetadata>;
}
5 changes: 5 additions & 0 deletions packages/liquidation-sdk-viem/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export const midasConfigs: Record<ChainId, Record<Address, MidasConfig>> = {
[ChainId.HyperliquidMainnet]: {},
[ChainId.SeiMainnet]: {},
[ChainId.ZeroGMainnet]: {},
[ChainId.MonadMainnet]: {},
};

export const preLiquidationFactoryConfigs: Record<
Expand Down Expand Up @@ -225,4 +226,8 @@ export const preLiquidationFactoryConfigs: Record<
address: addressesRegistry[ChainId.ZeroGMainnet].preLiquidationFactory,
startBlock: 7527649n,
},
[ChainId.MonadMainnet]: {
address: addressesRegistry[ChainId.MonadMainnet].preLiquidationFactory,
startBlock: 32321504n,
},
};