Map FID to Vesting Contract Addresses
Using data from the moxie_resolve.json
file, you can easily import it and map an FID to their respective vesting contract addresses very easily by using the function defined below:
- TypeScript
- JavaScript
index.ts
import data from "./moxie_resolve.json";
const resolveFidToVesting = (fid: number) =>
data
?.filter((d) => d?.fid === fid && d?.type === "VESTING_ADDRESS")
?.map((d) => d?.address);
index.js
const data = require("./moxie_resolve.json");
const resolveFidToVesting = (fid) =>
data
?.filter((d) => d?.fid === fid && d?.type === "VESTING_ADDRESS")
?.map((d) => d?.address);