Skip to content

openlawteam/tribute-contracts-cli

Repository files navigation

Tribute Contract CLI

Setup

In the root folder of the project, create the .env file, and set the env vars:

##
# The DAO Address to interact with
DAO_ADDRESS=0x...

##
# Infura API KEY or Alchemy API KEY. Pick one.
INFURA_KEY=
ALCHEMY_KEY=

##
# 12 word seed phrase from your wallet or the account private key
MNEMONIC_OR_PRIVATE_KEY=...

##
# The snapshot-hub URL to connect
SNAPSHOT_HUB_API_URL=http://...

##
# The space name defined in the Snapshot Hub API
SNAPSHOT_HUB_SPACE=...

##
# Enable DEBUG to see the logs of the CLI interactions with SnapshotHub and DAO
DEBUG=false

##
# The API that you are using to connect to Ethereum Blockchain
#
# ALCHEMY Mainnet: https://eth-mainnet.alchemyapi.io/v2/[YOUR_ALCHEMY_API_KEY]
# ALCHEMY Polygon: https://polygon-mainnet.alchemyapi.io/v2/[YOUR_ALCHEMY_API_KEY]
#
# INFURA Mainnet: https://mainnet.infura.io/v3/[YOUR_INFURA_API_KEY]
# INFURA Polygon: https://polygon-mainnet.io/v3/[YOUR_INFURA_API_KEY]
ETHEREUM_BLOCKCHAIN_API=...

##
# The Ethereum Network which CLI should interact with: ganache, polygon, mainnet
ETHEREUM_NETWORK=..

##
# The token used for onboarding, typically ETH (0x0000000000000000000000000000000000000000)
TOKEN_ADDR=0x...

Install

npm ci

Build

npm run build

Available Commands

trib --help

Version Compatibility

CLI Snapshot-JS Contracts Snapshot Hub
v0.1.1 v1.2.0 v1.0.0 v5.0.0-erc712
v0.1.2 v1.2.0 v1.0.2 v5.0.1-erc712
v0.2.1 v1.3.0 v2.0.4 v5.0.2-erc712
v0.2.2 v1.3.0 v2.2.1 v5.0.2-erc712
v0.2.3 v1.3.0 v2.3.3 v5.0.2-erc712

Packages