Skip to content

Commit 970c791

Browse files
committed
refactor(script): update asset manager retrieval method in FAssets TypeScript examples
1 parent c10ab80 commit 970c791

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

examples/developer-hub-javascript/fassetsExecuteMinting.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getFXRPAssetManager } from "../utils/fassets";
1+
import { getAssetManagerFXRP } from "../utils/fassets";
22
import { prepareAttestationRequestBase } from "../utils/fdc";
33
import { IAssetManagerInstance } from "../../typechain-types";
44
import { logEvents } from "../../scripts/utils/core";
@@ -86,7 +86,7 @@ async function main() {
8686
// 9. Get proof from FDC
8787
const proof = await getProof(TARGET_ROUND_ID);
8888

89-
const assetManager: IAssetManagerInstance = await getFXRPAssetManager();
89+
const assetManager: IAssetManagerInstance = await getAssetManagerFXRP();
9090

9191
// 10. Execute minting
9292
const tx = await assetManager.executeMinting(

examples/developer-hub-javascript/fassetsReserveCollateral.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getFXRPAssetManager } from "../utils/fassets";
1+
import { getAssetManagerFXRP } from "../utils/fassets";
22
import { IAssetManagerInstance } from "../../typechain-types";
33
import { logEvents } from "../../scripts/utils/core";
44

@@ -66,8 +66,7 @@ async function findBestAgent(
6666

6767
// 4. Function to parse the CollateralReserved event
6868
async function parseCollateralReservedEvent(
69-
transactionReceipt: any,
70-
decimals: number,
69+
transactionReceipt: any
7170
) {
7271
console.log("\nParsing events...", transactionReceipt.rawLogs);
7372

@@ -132,7 +131,6 @@ async function main() {
132131
// 12. Parse the CollateralReserved event
133132
const collateralReservedEvent = await parseCollateralReservedEvent(
134133
tx.receipt,
135-
decimals,
136134
);
137135

138136
// 13. Get the collateral reservation info

examples/developer-hub-javascript/fassetsReserveCollateralWithExecutor.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getFXRPAssetManager } from "../utils/fassets";
1+
import { getAssetManagerFXRP } from "../utils/fassets";
22
import { IAssetManagerInstance } from "../../typechain-types";
33
import { logEvents } from "../../scripts/utils/core";
44

@@ -68,7 +68,6 @@ async function findBestAgent(
6868
// 4. Function to parse the CollateralReserved event
6969
async function parseCollateralReservedEvent(
7070
transactionReceipt: any,
71-
decimals: number,
7271
) {
7372
console.log("\nParsing events...", transactionReceipt.rawLogs);
7473

@@ -140,7 +139,6 @@ async function main() {
140139
// 13. Parse the CollateralReserved event
141140
const collateralReservedEvent = await parseCollateralReservedEvent(
142141
tx.receipt,
143-
decimals,
144142
);
145143

146144
// 14. Get the collateral reservation info

examples/developer-hub-javascript/fassets_get_fxrp.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { getAssetManagerFXRP } from "../utils/getters";
22

33
// yarn hardhat run scripts/fassets/getFXRP.ts --network coston2
44

5-
const IAssetManager = artifacts.require("IAssetManager");
6-
75
async function main() {
86
const assetManager = await getAssetManagerFXRP();
97
const fasset = await assetManager.fAsset();

0 commit comments

Comments
 (0)