Map Beneficiary Or Vesting Contract Addresses to FID
Using data from the moxie_resolve.json
file, you can easily import it and map a beneficiary or vesting contract addresses to an FID very easily using the function defined below:
- TypeScript
- JavaScript
index.ts
import data from "./moxie_resolve.json";
const resolveBeneficiaryOrVestingToFid = (address: string) =>
data
?.filter((d) => d?.address === address?.toLowerCase())
?.map((d) => d?.fid);
index.js
const data = require("./moxie_resolve.json");
const resolveBeneficiaryOrVestingToFid = (address) =>
data
?.filter((d) => d?.address === address?.toLowerCase())
?.map((d) => d?.fid);