Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Base deployment #14

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
"pre:codegen:moonbeam": "rimraf types && yarn script template --deployment moonbeam",
"pre:codegen:ethereum": "rimraf types && yarn script template --deployment ethereum",
"pre:codegen:arbitrum": "rimraf types && yarn script template --deployment arbitrum",
"pre:codegen:base": "rimraf types && yarn script template --deployment base",
"codegen": "graph codegen --output-dir ./types",
"deploy:polygon": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-polygon --debug",
"deploy:moonbase": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-moonbase-alpha --debug",
"deploy:optimism": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-optimism --debug",
"deploy:moonbeam": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-moonbeam --debug",
"deploy:ethereum": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-mainnet --debug",
"deploy:arbitrum": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-arbitrum --debug"
"deploy:arbitrum": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-arbitrum --debug",
"deploy:base": "graph deploy --studio cllipper-base"
},
"dependencies": {
"@graphprotocol/graph-cli": "0.21.0",
Expand Down
30 changes: 29 additions & 1 deletion scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Deployment {
clipperCove: string
feeSplit: string
permitRouter: string
farmingHelper: string;
farmingHelper: string

// Currencies
ethOracleAddress: string
Expand Down Expand Up @@ -256,6 +256,34 @@ async function fetchDeployment(source: string): Promise<Deployment> {
}
}

if (source === 'base') {
return {
networkName: 'base',
startBlock: 11871349,
coveStartBlock: 11871349,

// Core
clipperDirectExchange: '0xb32D856cAd3D2EF07C94867A800035E37241247C',
clipperCove: '0x0000000000000000000000000000000000000000',

addressZeroMap: {
symbol: 'ETH',
decimals: 18,
name: 'Ether',
address: '0x0000000000000000000000000000000000000000',
},

...commonConfig,
permitRouter: '0x41c5362ADf3a2Cf6815454F7633172e7F6C1f834',

// currency oracles
ethOracleAddress: '0x71041dddad3595f9ced3dccfbe3d1f4b0a16bb70',
btcOracleAddress: '0xccadc697c55bbb68dc5bcdf8d3cbe83cdd4e071e',
daiOracleAddress: '0x591e79239a7d679378ec8c847e5038150364c78f',
usdcOracleAddress: '0x7e860098f58bbfc8648a4311b374b1d669a2bc6b',
}
}

throw new Error('Unsupported deployment')
}

Expand Down
6 changes: 6 additions & 0 deletions templates/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,11 @@ ShorttailAssets.set(Address.fromString('0x1dc78acda13a8bc4408b207c9e48cdbc096d95
ShorttailAssets.set(Address.fromString('0xc234a67a4f840e61ade794be47de455361b52413'), 'DAI')
ShorttailAssets.set(Address.fromString('0x1d4c2a246311bb9f827f4c768e277ff5787b7d7e'), 'MOVR')

// base
ShorttailAssets.set(Address.fromString('0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'), 'USDC')
ShorttailAssets.set(Address.fromString('0x4200000000000000000000000000000000000006'), 'WETH')
ShorttailAssets.set(Address.fromString('0x1ceA84203673764244E05693e42E6Ace62bE9BA5'), 'WBTC')
ShorttailAssets.set(Address.fromString('0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb'), 'DAI')

// ClipperLP
ShorttailAssets.set(Address.fromString('{{clipperDirectExchange}}'), 'CLPRDRPL')