Skip to content

Tentative spec for TypeScript package #21

@PaulRBerg

Description

@PaulRBerg

Context

See the full rationale behind this proposal here: Package for listing deployment addresses and subgraph endpoints?

Spec

  • Turn this repo into a TypeScript package
  • Provide bespoke types SablierChain, SablierContract, and SablierRelease
  • Export the addresses and indexer URLs
  • Use this package in the consuming repos listed below
  • Set up a GitHub Actions workflow for automatically shipping updates to npm
  • In the same CI workflow, have a GitHub bot automatically create GitHub issues in the consuming repos, prompting the maintainers of those repos to bump the package

TypeScript Types

Toggle to see my proposed design

type SablierChain = {
  explorerURL: string;
  id: number;
  name: string;
  nativeCurrency: {
    "name": string;
    "symbol": string;
    "decimals": number;
  }
}

// Also used for libraries
type SablierContract = {
  address: string;
  name: string;
  chain: SablierChain;
}

type Indexers =
  | { envio: string; thegraph: string | null }
  | { envio: string | null; thegraph: string };

type SablierRelease = {
  contracts: SablierContract[];
  product: "airdrops" | "flow" | "lockup";
  indexers: Indexers;
  version: string;
};

type SablierContracts = SablierContract[]

type SablierReleases = SablierRelease[]

Consuming Repos

TBD

  • Whether we ship to npm or not — to begin with, we can simply install the package from GitHub directly
  • Whether we import the addresses from the artifacts directory — to begin with, we can just hard code them

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: epicMulti-stage task that may require multiple PRs.priority: 1This is important. It should be dealt with shortly.type: featureNew feature or request.work: complicatedSense-analyze-respond. The relationship between cause and effect requires analysis or expertise.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions