andrejrakic / chainlink-arbitrum

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chainlink <> Arbitrum

This project demonstrates how to use Chainlink Price Feeds on Arbitrum Rinkeby Testnet Rollup.

Getting started

Prerequisites

Be sure to have installed the following

Installation

  1. Clone the repo
git clone https://github.com/andrejrakic/chainlink-arbitrum.git
cd chainlink-arbitrum
  1. Install packages
yarn install
  1. Compile contracts
npx hardhat compile

Additionally, try running some of the following tasks:

npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
npx hardhat help
REPORT_GAS=true npx hardhat test
npx hardhat coverage
npx hardhat run scripts/deploy.ts
TS_NODE_FILES=true npx ts-node scripts/deploy.ts
npx eslint '**/*.{js,ts}'
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
npx solhint 'contracts/**/*.sol'
npx solhint 'contracts/**/*.sol' --fix

Deployment

In this project, copy the .env.example file to a file named .env, and then edit it to fill in the details. Enter your Chainlink Rinkeby node URL (eg from Alchemy), and the private key of the account which will send the deployment transaction.

hardhat run --network arbitrum_rinkeby scripts/deploy.ts

Arbiscan verification

Enter your Arbiscan API key in .env file. Then, copy the deployment address and paste it in to replace DEPLOYED_CONTRACT_ADDRESS in this command:

npx hardhat verify --network arbitrum_rinkeby DEPLOYED_CONTRACT_ADDRESS 

About


Languages

Language:TypeScript 51.8%Language:Solidity 33.3%Language:JavaScript 9.1%Language:Shell 5.7%