Skip to content

Latest commit

 

History

History
145 lines (96 loc) · 2.48 KB

README.md

File metadata and controls

145 lines (96 loc) · 2.48 KB

ENS Expiration Manager (Chainlink Automation)

I. About

The ENS Expiration Manager is a smart contract that allows users to manage the expiration of their ENS domains.

II. Pre-requisites

1. Clone repo

$ git clone [email protected]:linkpoolio/ens-expiration-manager.git

2. Create etherscan API key

3. Setup contracts environment variables

# Network RPCs
export RPC_URL=

# Mainnet RPC
export MAINNET_RPC_URL=

# Private key for contract deployment
export PRIVATE_KEY=

# Explorer API key used to verify contracts
export EXPLORER_KEY=

# From anvil
export LOCAL_RPC_URL="http://localhost:8545"
export ANVIL_PRIVATE_KEY="" # Get from anvil after running for the first time, see below

# UI
export UI_ENS_EXPIRATION_MANAGER_CONTRACT_ADDRESS=
export UI_ENS_BASE_REGISTRAR_CONTRACT_ADDRESS=

4. Setup Wallet

Install any wallet to your browser (currently supports Metamask)

III. Local Setup

Option 1: Docker

1. Start docker

# <root>
$ docker compose up

2. View UI

  • Open browser at localhost:3005

Option 2: Manual Setup

1. Setup Foundry

Installation instructions

# Download foundry
$ curl -L https://foundry.paradigm.xyz | bash

# Install foundry
$ foundryup

# (Mac only) Install anvil (prereq: Homebrew)
$ brew install libusb

2. Install contract dependencies if changes have been made to contracts

# <root>/contracts
$ make install

3. Run anvil

# <root>/contracts (run in new terminal window)
$ anvil

4. Deploy contract

Note: each time anvil is restarted, the contract will need to be re-deployed but will have the same contract address assuming no contract changes

# <root>/contracts

# If deploying locally
$ make deploy-local

# Or if deploying to public network, set RPC_URL to desired network:
$ make deploy

5. Install UI dependencies

# <root>/client
$ nvm use
$ yarn

6. Run UI

# <root>/client/packages/ui
$ yarn start

7. View UI

  • Open browser at localhost:3005

IV. Testing

1. Test Contracts

# <root>/contracts
make test-contracts-all

2. Test UI

# <root>/client/packages/ui
$ yarn test
$ yarn tsc
$ yarn lint
$ yarn prettier