Skip to content

flare-foundation/flare-smart-accounts-viem

Repository files navigation

Flare Logo
Example TypeScript scripts for interacting with the Flare smart accounts using Viem.
About · Contributing · Security · Changelog

Flare smart account with Viem

This repository contains example code for interacting with the Flare smart accounts system using the Viem library. All example scripts are located in the src directory.

src
├── abis
├── utils
├── index.ts
├── mint-and-transfer.ts: mint FXRP and transfer it to a Flare account; essentially, this allows you to mint FXRP to an arbitrary Flare address.
├── README.md
├── state-lookup.ts: get personal account of an XRPL address, its FXRP balance, the XRP balance of the address...
└── upshift-mint-and-deposit.ts: mint FXRP and deposit it to an Upshift type vault

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd flare-smart-accounts-viem
  2. Create a .env file:

    cp .env.example .env
  3. Configure your environment: Edit the .env file and add your configuration values (private keys, RPC URLs, etc.).

  4. Install dependencies:

    pnpm install

    Note: You can use npm or yarn instead of pnpm if you prefer.

Running Scripts

Execute any script in the src directory using:

pnpm run script <path-to-file>

Example:

pnpm run script src/mint-and-transfer.ts

Resources

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors