Skip to content

Commit

Permalink
feat(mangrove): Add addresses for base Sepolia.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxencerb committed May 31, 2024
1 parent de1d229 commit fc0ccc1
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-points-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@mangrovedao/mgv": patch
---

Add addresses for base sepolia
13 changes: 9 additions & 4 deletions src/addresses/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@ export type {
BuildTokenParms,
} from './tokens/index.js'

export { blastMarkets } from './markets/index.js'
export { blastMarkets, baseSepoliaMarkets } from './markets/index.js'

// --- tokens ---

export {
blastTokens,
buildToken,
blastWETH,
blastUSDB,
blastMetaStreetWETHPUNKS20,
blastMetaStreetWETHPUNKS40,
blastTokens,
buildToken,
baseSepoliaUSDC,
baseSepoliaWETH,
baseSepoliaTokens,
} from './tokens/index.js'

// --- mangrove ---

export { blastMangrove } from './mangrove/index.js'
export { blastMangrove, baseSepoliaMangrove } from './mangrove/index.js'

// --- logics ---

Expand All @@ -37,6 +40,8 @@ export {
blastZeroLendLogic,
blastPacFinanceLogic,
blastLogics,
baseSepoliaAave,
baseSepoliaLogics,
balanceLogicABI,
baseBalance,
aaveLogicABI,
Expand Down
12 changes: 12 additions & 0 deletions src/addresses/logics/chains/base-sepolia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { aaveBalance, aaveOverLying } from '../strategies/aave.js'
import { buildLogic } from '../utils.js'

export const baseSepoliaAave = buildLogic(
'Aave',
'0xF1E3f817fF9CaAF7083a58C50a3c4a05f80dE565',
1_300_000n,
aaveOverLying,
aaveBalance,
)

export const baseSepoliaLogics = [baseSepoliaAave] as const
5 changes: 5 additions & 0 deletions src/addresses/logics/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ export {
blastPacFinanceLogic,
blastLogics,
} from './blast.js'

export {
baseSepoliaAave,
baseSepoliaLogics,
} from './base-sepolia.js'
2 changes: 2 additions & 0 deletions src/addresses/logics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export {
blastZeroLendLogic,
blastPacFinanceLogic,
blastLogics,
baseSepoliaAave,
baseSepoliaLogics,
} from './chains/index.js'

export {
Expand Down
9 changes: 9 additions & 0 deletions src/addresses/mangrove/base-sepolia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { MangroveActionsDefaultParams } from '../../types/index.js'

export const baseSepoliaMangrove = {
mgv: '0xBe1E54d0fC7A6044C0913013593FCd7D854C07FB',
mgvOrder: '0xC00D2Da52195B123d3c994aaf2eb1E8DA8999d4f',
mgvReader: '0xe118B2CF4e893DD8D954bB1D629e95026b5E8D5A',
smartRouter: '0xF83D022384268A1cc2e3CEb0EB19336E9cb8cB3b',
routerProxyFactory: '0xE44FfC50ED6673d6A1C385B76152E1551a6c14a3',
} as const satisfies MangroveActionsDefaultParams
1 change: 1 addition & 0 deletions src/addresses/mangrove/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { blastMangrove } from './blast.js'
export { baseSepoliaMangrove } from './base-sepolia.js'
10 changes: 10 additions & 0 deletions src/addresses/markets/base-sepolia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { MarketParams } from '../../types/index.js'
import { baseSepoliaUSDC, baseSepoliaWETH } from '../tokens/base-sepolia.js'

export const baseSepoliaMarkets = [
{
base: baseSepoliaWETH,
quote: baseSepoliaUSDC,
tickSpacing: 1n,
},
] as const satisfies MarketParams[]
1 change: 1 addition & 0 deletions src/addresses/markets/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { blastMarkets } from './blast.js'
export { baseSepoliaMarkets } from './base-sepolia.js'
16 changes: 16 additions & 0 deletions src/addresses/tokens/base-sepolia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { buildToken } from './utils.js'

export const baseSepoliaWETH = buildToken({
address: '0x4200000000000000000000000000000000000006',
symbol: 'WETH',
})

export const baseSepoliaUSDC = buildToken({
address: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',
symbol: 'USDC',
displayDecimals: 2,
priceDisplayDecimals: 2,
decimals: 6,
})

export const baseSepoliaTokens = [baseSepoliaUSDC, baseSepoliaWETH] as const
6 changes: 6 additions & 0 deletions src/addresses/tokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ export {
blastTokens,
} from './blast.js'

export {
baseSepoliaUSDC,
baseSepoliaWETH,
baseSepoliaTokens,
} from './base-sepolia.js'

export type {
Token,
BuildTokenParms,
Expand Down

0 comments on commit fc0ccc1

Please sign in to comment.