@@ -8,12 +8,14 @@ const WRAPPED_M_CONTRACT = "0x437cc33344a0B27A429f795ff6B469C72698B291";
88const QUEUED_DEPOSITOR_CONTRACT = "0x81cc0DEE5e599784CBB4862c605c7003B0aC5A53" ;
99const MAX_UINT_128 = "0xffffffffffffffffffffffffffffffff" ;
1010
11+ // missing pools call from this upgrade: https://arbiscan.io/address/0x0c4c71f1c3aa5af90b6c7516a26fe5a493c4bf3f#code
12+ const POOLS = [ '0x0f62b8C58E1039F246d69bA2215ad5bF0D2Bb867' ]
13+
1114async function tvl ( api ) {
1215 // Get all pools engaged by the protocol
13- const pools = await api . call ( {
14- target : STAKED_USDAI_CONTRACT ,
15- abi : abi . pools ,
16- } ) ;
16+ let pools = await api . call ( { target : STAKED_USDAI_CONTRACT , abi : abi . pools , permitFailure : true } ) ;
17+ if ( ! pools ) pools = POOLS ;
18+
1719 const tokens = await api . multiCall ( { abi : abi . currencyToken , calls : pools } ) ;
1820 const ct = await api . multiCall ( { abi : abi . collateralToken , calls : pools } ) ;
1921
@@ -47,10 +49,9 @@ async function tvl(api) {
4749
4850async function borrowed ( api ) {
4951 // Get all pools engaged by the protocol
50- const pools = await api . call ( {
51- target : STAKED_USDAI_CONTRACT ,
52- abi : abi . pools ,
53- } ) ;
52+ let pools = await api . call ( { target : STAKED_USDAI_CONTRACT , abi : abi . pools , permitFailure : true } ) ;
53+ if ( ! pools ) pools = POOLS ;
54+
5455 const tokens = await api . multiCall ( { abi : abi . currencyToken , calls : pools } ) ;
5556 const tokenDecimals = await api . multiCall ( {
5657 abi : "erc20:decimals" ,
0 commit comments