File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/adapters/peggedAssets/arche-protocol-msd Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { PeggedIssuanceAdapter } from "../peggedAsset.type" ;
2
+ import { function_view } from "../helper/aptos" ;
3
+ import { Balances } from "../peggedAsset.type" ;
4
+
5
+ async function moveSupply ( ) : Promise < Balances > {
6
+ const balances = { } as Balances ;
7
+
8
+ const resp = await function_view ( {
9
+ functionStr : '0x1::fungible_asset::supply' ,
10
+ type_arguments : [ '0x1::object::ObjectCore' ] ,
11
+ args : [ "0x7c9d9f4972072b6ff7dfa48f259688e7286abac9ebd192bbda30fea910139024" ] ,
12
+ } ) ;
13
+ balances [ "peggedUSD" ] = Number ( resp . vec [ 0 ] ) / 1e6 ;
14
+
15
+ return balances ;
16
+ }
17
+
18
+
19
+
20
+ const adapter : PeggedIssuanceAdapter = {
21
+ move : {
22
+ minted : moveSupply ,
23
+ } ,
24
+ } ;
25
+
26
+ export default adapter ;
You can’t perform that action at this time.
0 commit comments