Skip to content

Commit fbcdea6

Browse files
add movement
1 parent 82a97c6 commit fbcdea6

File tree

1 file changed

+28
-3
lines changed
  • src/adapters/peggedAssets/frax-usd

1 file changed

+28
-3
lines changed

src/adapters/peggedAssets/frax-usd/index.ts

+28-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
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+
119
const chainContracts = {
220
ethereum: {
321
issued: ["0xcacd6fd266af91b8aed52accc382b4e165586e29"],
@@ -46,8 +64,15 @@ const chainContracts = {
4664
},
4765
};
4866

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+
5277

5378
// frxUSD, use LayerZero OFT (Mint-Burn) Modal to bridge

0 commit comments

Comments
 (0)