From 7da59ab2633eeb63ebe0f7598f409fef2519940f Mon Sep 17 00:00:00 2001 From: harsh-98 Date: Sat, 3 Aug 2024 02:08:07 +0700 Subject: [PATCH] feat: update optimism --- configs/arbitrum.jsonnet | 12 +++++++----- configs/mainnet.jsonnet | 1 + configs/optimism.jsonnet | 7 ++++++- core/multicall.go | 13 +++++++++++-- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/configs/arbitrum.jsonnet b/configs/arbitrum.jsonnet index 07a5e258f..30391a1f2 100644 --- a/configs/arbitrum.jsonnet +++ b/configs/arbitrum.jsonnet @@ -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', @@ -102,8 +102,8 @@ SUSD: '0xA970AF1a584579B618be4d69aD6F73459D112F95', }, farmingPools: { - sdUSDCV3: '0xd0181a36b0566a8645b7eecff2148ade7ecf2be9', - sdWETHV3: '0xf3b7994e4da53e04155057fd61dc501599d57877', + sdUSDCV3: '0xD0181a36B0566a8645B7eECFf2148adE7Ecf2BE9', + sdWETHV3: '0xf3b7994e4dA53E04155057Fd61dc501599d57877', }, ids: { cvx3Crv: 9, @@ -230,6 +230,7 @@ rETH_wETH_BPT: 2, '33AURA_33ARB_33BAL': 3, ezETH_wstETH: 2, + bpt_ethtri: 3, }, }, redstone: { @@ -379,6 +380,7 @@ dataServiceId: 'redstone-primary-prod', dataId: 'rsETH/ETH', signersThreshold: 5, + token: '0x15094B05e679c9B7fDde6FB8e6BDa930ff1D6a62', }, }, } diff --git a/configs/mainnet.jsonnet b/configs/mainnet.jsonnet index f2decbf1a..6570db121 100644 --- a/configs/mainnet.jsonnet +++ b/configs/mainnet.jsonnet @@ -409,6 +409,7 @@ rETH_wETH_BPT: 2, '33AURA_33ARB_33BAL': 3, ezETH_wstETH: 2, + bpt_ethtri: 3, }, }, redstone: { diff --git a/configs/optimism.jsonnet b/configs/optimism.jsonnet index 27836db70..95a6ca386 100644 --- a/configs/optimism.jsonnet +++ b/configs/optimism.jsonnet @@ -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', @@ -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', @@ -201,6 +205,7 @@ rETH_wETH_BPT: 2, '33AURA_33ARB_33BAL': 3, ezETH_wstETH: 2, + bpt_ethtri: 3, }, }, redstone: { diff --git a/core/multicall.go b/core/multicall.go index 24ef206eb..d37604c81 100644 --- a/core/multicall.go +++ b/core/multicall.go @@ -1,6 +1,7 @@ package core import ( + "encoding/hex" "math" "math/big" "strings" @@ -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) @@ -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