File tree Expand file tree Collapse file tree 4 files changed +14
-12
lines changed
src/adapters/peggedAssets Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,6 @@ export const chainContracts: ChainContracts = {
379379 bridgedFromETH : [ "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb" ] , // USDT0
380380 } ,
381381 move : {
382- bridgedFromETH : [ "0x38cdb3f0afabee56a3393793940d28214cba1f5781e13d5db18fa7079f60ab55 " ] , // OFT native bridge
382+ bridgedFromETH : [ "0x447721a30109c662dde9c73a0c2c9c9c459fb5e5a9c92f03c50fa69737f5d08d " ] , // OFT native bridge
383383 }
384384} ;
Original file line number Diff line number Diff line change @@ -458,14 +458,15 @@ async function suiBridged(): Promise<Balances> {
458458 return balances ;
459459}
460460
461- async function moveNativeBridge ( ) : Promise < Balances > {
461+ async function moveSupply ( ) : Promise < Balances > {
462462 const balances = { } as Balances ;
463463
464464 const resp = await function_view ( {
465- functionStr : `${ chainContracts . move . bridgedFromETH } ::oft_fa::supply` ,
466- args : [ ] ,
465+ functionStr : '0x1::fungible_asset::supply' ,
466+ type_arguments : [ '0x1::object::ObjectCore' ] ,
467+ args : [ chainContracts . move . bridgedFromETH [ 0 ] ] ,
467468 } ) ;
468- balances [ "peggedUSD" ] = Number ( resp ) / 1e6 ; // adjust if decimals ≠ 6
469+ balances [ "peggedUSD" ] = Number ( resp . vec [ 0 ] ) / 1e6 ;
469470
470471 return balances ;
471472}
@@ -1105,7 +1106,7 @@ const adapter: PeggedIssuanceAdapter = {
11051106 ethereum : bridgedSupply ( "corn" , 6 , chainContracts . corn . bridgedFromETH )
11061107 } ,
11071108 move : {
1108- ethereum : moveNativeBridge ,
1109+ ethereum : moveSupply ,
11091110 }
11101111} ;
11111112
Original file line number Diff line number Diff line change @@ -486,6 +486,6 @@ export const chainContracts: ChainContracts = {
486486 bridgedFromETH : [ "0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6" ] ,
487487 } ,
488488 move : {
489- bridgedFromETH : [ "0x4d2969d384e440db9f1a51391cfc261d1ec08ee1bdf7b9711a6c05d485a4110a " ] , // oft native bridge
489+ bridgedFromETH : [ "0x83121c9f9b0527d1f056e21a950d6bf3b9e9e2e8353d0e95ccea726713cbea39 " ] , // oft native bridge
490490 } ,
491491} ;
Original file line number Diff line number Diff line change @@ -500,14 +500,15 @@ async function flowBridged(address: string, decimals: number) {
500500 } ;
501501}
502502
503- async function moveNativeBridge ( ) : Promise < Balances > {
503+ async function moveSupply ( ) : Promise < Balances > {
504504 const balances = { } as Balances ;
505505
506506 const resp = await function_view ( {
507- functionStr : `${ chainContracts . move . bridgedFromETH } ::oft_fa::supply` ,
508- args : [ ] ,
507+ functionStr : '0x1::fungible_asset::supply' ,
508+ type_arguments : [ '0x1::object::ObjectCore' ] ,
509+ args : [ chainContracts . move . bridgedFromETH [ 0 ] ] ,
509510 } ) ;
510- balances [ "peggedUSD" ] = Number ( resp ) / 1e6 ; // adjust if decimals ≠ 6
511+ balances [ "peggedUSD" ] = Number ( resp . vec [ 0 ] ) / 1e6 ;
511512
512513 return balances ;
513514}
@@ -1049,7 +1050,7 @@ const adapter: PeggedIssuanceAdapter = {
10491050 )
10501051 } ,
10511052 move : {
1052- ethereum : moveNativeBridge ,
1053+ ethereum : moveSupply ,
10531054 }
10541055} ;
10551056
You can’t perform that action at this time.
0 commit comments