-
run
pnpm i
to install dependencies (you can usenpm/bun/yarn
as well)
for example:
# use tsx (Node.js v18 or higher is required)
npx tsx src/examples/getShareRate.ts
# use bun
bun src/examples/getShareRate.ts
- cgUSD address:
0xCa72827a3D211CfD8F6b00Ac98824872b72CAb49
- cgUSD ABI: see src/abi/index.ts
- see the implementation (explained with comments) for details.
- usage