1.0.2 • Published 2 years ago

@elementfi/elf-council-proposals v1.0.2

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

elf-council-proposals

A simple JSON file that stores our pairs of on-chain and off-chain proposals.

Install

Run

npm install git+https://github.com/element-fi/elf-council-proposals.git

Build

npm run build

Example

import { mainnetProposals } from "elf-council-proposals";

// Get the list of proposals that haven't expired yet
const openProposals = mainnetProposals.proposals.filter(
  (proposal) => provider.getBlock() < proposal.expiration
);

Here, take this!

Since this repo is not an npm package, it can be helpful to include this simple script to upgrade your project to the latest commit:

  "scripts": {
    "update-elf-council-proposals": "npm install git+https://github.com/element-fi/elf-council-proposals.git"
  },

Configure

To build this repo you need to configure some env variables. For linux and mac run the following:

  1. Copy elf.default.env
cp elf.default.env elf.env
  1. Update elf.env with your alchemy api key
export ALCHEMY_MAINNET_API_KEY=
  1. Source the env file
source elf.env