File tree 1 file changed +28
-3
lines changed
src/adapters/peggedAssets/frax-usd
1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change
1
+ import { addChainExports , solanaMintedOrBridged } from "../helper/getSupply" ;
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 : [ "0xe4354602aa4311f36240dd57f3f3435ffccdbd0cd2963f1a69da39a2dbcd59b5" ] ,
13
+ } ) ;
14
+ balances [ "peggedUSD" ] = Number ( resp . vec [ 0 ] ) / 1e6 ;
15
+
16
+ return balances ;
17
+ }
18
+
1
19
const chainContracts = {
2
20
ethereum : {
3
21
issued : [ "0xcacd6fd266af91b8aed52accc382b4e165586e29" ] ,
@@ -46,8 +64,15 @@ const chainContracts = {
46
64
} ,
47
65
} ;
48
66
49
- import { addChainExports } from "../helper/getSupply" ;
50
- const adapter = addChainExports ( chainContracts ) ;
51
- export default adapter ;
67
+ const adapter : PeggedIssuanceAdapter = {
68
+ ...addChainExports ( chainContracts ) ,
69
+
70
+ move : {
71
+ minted : moveSupply ,
72
+ }
73
+ } ;
74
+
75
+ export default adapter ;
76
+
52
77
53
78
// frxUSD, use LayerZero OFT (Mint-Burn) Modal to bridge
You can’t perform that action at this time.
0 commit comments