Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.39 KB

README.md

File metadata and controls

35 lines (21 loc) · 1.39 KB

Elk Finance Smart Contracts

This repository contains all of the smart contracts used to run Elk Finance.

Elk Finance uses three main contract templates:

  • ElkRouter: high-level interface for all Elk Exchange functionality
  • ElkFactory: creates and manages liquidity pairs
  • ElkPair: a liquidity pair made of two assets

Deployed Contracts

Please see https://docs.elk.finance/addresses for an up-to-date list of addresses of deployed contracts on supported chains.

Compiling and Running

Using Hardhat

  1. Get Hardhat.
  2. Execute yarn install to prepare the environment.
  3. Execute yarn compile to compile the contracts.

Using Remix IDE

A tutorial for using Remix is located here.

Development

Accessing the ABI

  1. Install into your project using npm install --dev @elkdex/avax-exchange-contracts.
  2. Import the ABI: import { abi as IPangolinPairABI } from '@elkdex/avax-exchange-contracts/artifacts/contracts/elk-core/interfaces/IElkPair.sol/IElkPair.json'.

Attribution

These contracts were adapted from these Uniswap repos: uniswap-v2-core, uniswap-v2-periphery, and uniswap-lib.