For the complete documentation index, see llms.txt. This page is also available as Markdown.

2.0 Async Javascript

Creating Revenue Path (code subject to change)

see here for example createArgs parameters

import { R3vlClient } from "@r3vl/sdk";
import { ethers } from "ethers";

interface ICreateArgs {
  addressList: string[][];
  distributionsList: number[][];
  tokenList: string[];
  limitSequence: ethers.BigNumberish[][];
  pathName: string;
  isImmutable: boolean;
}

export const CreatePathButton = ({ createArgs }: { ICreateArgs }) => {
    
    const handleSubmit = async () => {
        client = new R3vlClient.v2;
        try {
          await client.createRevenuePath(createArgs);
        } catch (e) {
          console.log(e);
        }
    };
    
    return (
        <button onClick={handleSubmit}>Create Path</button>
    );
};

Withdrawing From Revenue Path

Get Revenue Path Balances

a simple hook to display a user's available balances

Last updated