Skip to content

Commit 649704d

Browse files
add arche protocol msd adapter
1 parent fbcdea6 commit 649704d

File tree

1 file changed

+26
-0
lines changed
  • src/adapters/peggedAssets/arche-protocol-msd

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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;

0 commit comments

Comments
 (0)