File tree 1 file changed +22
-0
lines changed
src/adapters/peggedAssets/ethena-usde
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { addChainExports , solanaMintedOrBridged } from "../helper/getSupply" ;
2
2
import { PeggedIssuanceAdapter } from "../peggedAsset.type" ;
3
+ import { function_view } from "../helper/aptos" ;
4
+ import { Balances } from "../peggedAsset.type" ;
5
+
6
+ async function moveSupply ( ) : Promise < Balances > {
7
+ const balances = { } as Balances ;
8
+
9
+ const resp = await function_view ( {
10
+ functionStr : '0x1::fungible_asset::supply' ,
11
+ type_arguments : [ '0x1::object::ObjectCore' ] ,
12
+ args : [ chainContracts . move . bridgedFromETH [ 0 ] ] ,
13
+ } ) ;
14
+ balances [ "peggedUSD" ] = Number ( resp . vec [ 0 ] ) / 1e6 ;
15
+
16
+ return balances ;
17
+ }
3
18
4
19
const chainContracts = {
5
20
ethereum : {
@@ -56,6 +71,10 @@ const chainContracts = {
56
71
zircuit : {
57
72
bridgedFromETH : "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34" ,
58
73
} ,
74
+ move : {
75
+ bridgedFromETH : "0x9d146a4c9472a7e7b0dbc72da0eafb02b54173a956ef22a9fba29756f8661c6c" ,
76
+ } ,
77
+
59
78
} ;
60
79
61
80
const adapter : PeggedIssuanceAdapter = {
@@ -64,6 +83,9 @@ const adapter: PeggedIssuanceAdapter = {
64
83
solana : {
65
84
ethereum : solanaMintedOrBridged ( [ "DEkqHyPN7GMRJ5cArtQFAWefqbZb33Hyf6s5iCwjEonT" ] ) ,
66
85
} ,
86
+ move : {
87
+ ethereum : moveSupply ,
88
+ }
67
89
} ;
68
90
69
91
export default adapter ;
You can’t perform that action at this time.
0 commit comments