Skip to content

Commit

Permalink
Feat/arbitrum/markets (#126)
Browse files Browse the repository at this point in the history
* feat(addresses): add new arbitrum markets

* chore: changeset

* chore: format

---------

Co-authored-by: maxencerb <[email protected]>
  • Loading branch information
maxencerb and maxencerb authored Aug 27, 2024
1 parent ee45564 commit 48ee6b9
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/plenty-paws-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@mangrovedao/mgv": patch
---

Added WETH/WBTC WBTC/USDT and weETH/WETH on arbitrum
5 changes: 5 additions & 0 deletions src/addresses/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export {
arbitrumWETHUSDC,
arbitrumWETHUSDT,
arbitrumUSDCUSDT,
arbitrumWETHWBTC,
arbitrumWBTCUSDT,
arbitrumWETHweETH,
} from './markets/index.js'

// --- tokens ---
Expand All @@ -37,8 +40,10 @@ export {
baseSepoliaWBTC,
baseSepoliaTokens,
arbitrumWETH,
arbitrumWBTC,
arbitrumUSDC,
arbitrumUSDT,
arbitrumweETH,
arbitrumTokens,
} from './tokens/index.js'

Expand Down
29 changes: 28 additions & 1 deletion src/addresses/markets/arbitrum.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import type { MarketParams } from '../../types/index.js'
import { arbitrumUSDC, arbitrumUSDT, arbitrumWETH } from '../tokens/arbitrum.js'
import {
arbitrumUSDC,
arbitrumUSDT,
arbitrumWBTC,
arbitrumWETH,
arbitrumweETH,
} from '../tokens/arbitrum.js'

export const arbitrumWETHUSDC = {
base: arbitrumWETH,
Expand All @@ -19,8 +25,29 @@ export const arbitrumUSDCUSDT = {
tickSpacing: 1n,
} as const satisfies MarketParams

export const arbitrumWETHWBTC = {
base: arbitrumWETH,
quote: arbitrumWBTC,
tickSpacing: 1n,
} as const satisfies MarketParams

export const arbitrumWBTCUSDT = {
base: arbitrumWBTC,
quote: arbitrumUSDT,
tickSpacing: 1n,
} as const satisfies MarketParams

export const arbitrumWETHweETH = {
base: arbitrumWETH,
quote: arbitrumweETH,
tickSpacing: 1n,
} as const satisfies MarketParams

export const arbitrumMarkets = [
arbitrumWETHUSDC,
arbitrumWETHUSDT,
arbitrumUSDCUSDT,
arbitrumWETHWBTC,
arbitrumWBTCUSDT,
arbitrumWETHweETH,
] as const satisfies MarketParams[]
3 changes: 3 additions & 0 deletions src/addresses/markets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ export {
arbitrumWETHUSDC,
arbitrumWETHUSDT,
arbitrumUSDCUSDT,
arbitrumWETHWBTC,
arbitrumWBTCUSDT,
arbitrumWETHweETH,
} from './arbitrum.js'
15 changes: 15 additions & 0 deletions src/addresses/tokens/arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export const arbitrumWETH = buildToken({
symbol: 'WETH',
})

export const arbitrumWBTC = buildToken({
address: '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f',
symbol: 'WBTC',
decimals: 8,
displayDecimals: 5,
priceDisplayDecimals: 6,
})

export const arbitrumUSDC = buildToken({
address: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
symbol: 'USDC',
Expand All @@ -21,8 +29,15 @@ export const arbitrumUSDT = buildToken({
priceDisplayDecimals: 4,
})

export const arbitrumweETH = buildToken({
address: '0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe',
symbol: 'weETH',
})

export const arbitrumTokens = [
arbitrumWETH,
arbitrumWBTC,
arbitrumUSDC,
arbitrumUSDT,
arbitrumweETH,
] as const
2 changes: 2 additions & 0 deletions src/addresses/tokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ export {

export {
arbitrumWETH,
arbitrumWBTC,
arbitrumUSDC,
arbitrumUSDT,
arbitrumweETH,
arbitrumTokens,
} from './arbitrum.js'

Expand Down

0 comments on commit 48ee6b9

Please sign in to comment.