Skip to content

Commit

Permalink
feat: update optimism
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh-98 committed Aug 2, 2024
1 parent e6b3872 commit 7da59ab
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
12 changes: 7 additions & 5 deletions configs/arbitrum.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@
aurawstETH_rETH_sfrxETH_vault: '0xa427B131059A503b5fC9C7e1a130585ca3b32e3d',
auracbETH_rETH_wstETH_vault: '0x8cA64Bd82AbFE138E195ce5Cb7268CA285D42245',
aurarETH_wETH_BPT_vault: '0x129A44AC6ff0f965C907579F96F2eD682E52c84A',
dUSDCV3: '0x890a69ef363c9c7bdd5e36eb95ceb569f63acbf6',
sdUSDCV3: '0xd0181a36b0566a8645b7eecff2148ade7ecf2be9',
dUSDCV3: '0x890A69EF363C9c7BdD5E36eb95Ceb569F63ACbF6',
sdUSDCV3: '0xD0181a36B0566a8645B7eECFf2148adE7Ecf2BE9',
dWETHV3: '0x04419d3509f13054f60d253E0c79491d9E683399',
sdWETHV3: '0xf3b7994e4da53e04155057fd61dc501599d57877',
sdWETHV3: '0xf3b7994e4dA53E04155057Fd61dc501599d57877',
sdWETHV3_OLD: '0x6773fF780Dd38175247795545Ee37adD6ab6139a',
dUSDC_eV3: '0xa76c604145D7394DEc36C49Af494C144Ff327861',
sdUSDC_eV3: '0x608F9e2E8933Ce6b39A8CddBc34a1e3E8D21cE75',
Expand All @@ -102,8 +102,8 @@
SUSD: '0xA970AF1a584579B618be4d69aD6F73459D112F95',
},
farmingPools: {
sdUSDCV3: '0xd0181a36b0566a8645b7eecff2148ade7ecf2be9',
sdWETHV3: '0xf3b7994e4da53e04155057fd61dc501599d57877',
sdUSDCV3: '0xD0181a36B0566a8645B7eECFf2148adE7Ecf2BE9',
sdWETHV3: '0xf3b7994e4dA53E04155057Fd61dc501599d57877',
},
ids: {
cvx3Crv: 9,
Expand Down Expand Up @@ -230,6 +230,7 @@
rETH_wETH_BPT: 2,
'33AURA_33ARB_33BAL': 3,
ezETH_wstETH: 2,
bpt_ethtri: 3,
},
},
redstone: {
Expand Down Expand Up @@ -379,6 +380,7 @@
dataServiceId: 'redstone-primary-prod',
dataId: 'rsETH/ETH',
signersThreshold: 5,
token: '0x15094B05e679c9B7fDde6FB8e6BDa930ff1D6a62',
},
},
}
1 change: 1 addition & 0 deletions configs/mainnet.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@
rETH_wETH_BPT: 2,
'33AURA_33ARB_33BAL': 3,
ezETH_wstETH: 2,
bpt_ethtri: 3,
},
},
redstone: {
Expand Down
7 changes: 6 additions & 1 deletion configs/optimism.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
exchanges: {
FRAXSWAP_ROUTER: '0xB9A55F455e46e8D717eEA5E47D2c449416A0437F',
VELODROME_V2_ROUTER: '0xa062aE8A9c5e11aaA026fc2670B0D65cCc8B2858',
VELODROME_CL_ROUTER: '0x0792a633F0c19c351081CF4B211F68F79bCc9676',
CURVE_3CRV_POOL_OP: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
CURVE_ETH_WSTETH_GATEWAY_OP: '0xF12057505cd8e3256d3654C0dC32BEB0c531eb77',
YEARN_DAI_VAULT: '0x65343F414FFD6c97b0f6add33d16F6845Ac22BAc',
YEARN_USDC_E_VAULT: '0xaD17A225074191d5c8a37B50FdA1AE278a2EE6A2',
YEARN_WETH_VAULT: '0x5B977577Eb8a480f63e11FC615D6753adB8652Ae',
Expand Down Expand Up @@ -60,14 +62,16 @@
BPT_WSTETH_ETH: '0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2',
BPT_ROAD: '0x39965c9dAb5448482Cf7e002F583c812Ceb53046',
ECLP_wstETH_WETH: '0x7Ca75bdEa9dEde97F8B13C6641B768650CB83782',
bpt_ethtri: '0x5F8893506Ddc4C271837187d14A9C87964a074Dc',
auraBPT_rETH_ETH: '0x094C6846Fb2801b4753182ADFac336AAE8030A46',
auraBPT_WSTETH_ETH: '0x4c7E79c921144eBf7eBdbf0D3156bf192cDBe5f5',
auraBPT_rETH_ETH_vault: '0x61ac9315a1Ae71633E95Fb35601B59180eC8d61d',
auraBPT_WSTETH_ETH_vault: '0xe110b862E4D076596707892c0C5163BC183eb161',
dUSDCV3: '0x5520dAa93A187f4Ec67344e6D2C4FC9B080B6A35',
dUSDCV3: '0xa210BB193Ca352Fa81fBd0e81Cb800580b0762eE',
dWETHV3: '0x42dB77B3103c71059F4b997d6441cFB299FD0d94',
sdUSDCV3: '0x73302b63Ad4a16C498f26dB89cb27F37a72E4E04',
sdWETHV3: '0x704c4C9F0d29257E5b0E526b20b48EfFC8f758b2',
dUSDC_eV3: '0x5520dAa93A187f4Ec67344e6D2C4FC9B080B6A35',
GEAR: '0x39E6C2E1757ae4354087266E2C3EA9aC4257C1eb',
ETH: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
SUSD: '0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9',
Expand Down Expand Up @@ -201,6 +205,7 @@
rETH_wETH_BPT: 2,
'33AURA_33ARB_33BAL': 3,
ezETH_wstETH: 2,
bpt_ethtri: 3,
},
},
redstone: {
Expand Down
13 changes: 11 additions & 2 deletions core/multicall.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package core

import (
"encoding/hex"
"math"
"math/big"
"strings"
Expand All @@ -12,7 +13,13 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
)

func toHex(calls []multicall.Multicall2Call) []string {
ans := []string{}
for _, call := range calls {
ans = append(ans, hex.EncodeToString(call.CallData)+"@"+call.Target.Hex())
}
return ans
}
// make multicall
func MakeMultiCall(client ClientI, blockNum int64, successRequired bool, calls []multicall.Multicall2Call, params ...int) []multicall.Multicall2Result {
contract := getMultiCallContract(client)
Expand Down Expand Up @@ -48,12 +55,14 @@ func MakeMultiCall(client ClientI, blockNum int64, successRequired bool, calls [
strings.Contains(err.Error(), "out of gas") || // ankr
strings.Contains(err.Error(), "524: A timeout occurred") || // anvil
strings.Contains(err.Error(), "intrinsic gas too low") || // arbitrum
strings.Contains(err.Error(), "intrinsic gas too low") || // arbitrum
strings.Contains(err.Error(), "timeout awaiting response headers") || // anvil
strings.Contains(err.Error(), "we can't execute this request") { // ankr
tmpResult = MakeMultiCall(client, blockNum, successRequired, jobCalls, defaultSize/2)
} else if strings.Contains(err.Error(), "Unknown block number") { // on alchemy in the trading-price
tmpResult = MakeMultiCall(client, blockNum, successRequired, jobCalls, defaultSize)
} else {
log.Fatal(err)
log.Fatal(err, blockNum, toHex(calls) )
}
}
return tmpResult
Expand Down

0 comments on commit 7da59ab

Please sign in to comment.