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
AVAX
ElkFactory address: 0x091d35d7F63487909C863001ddCA481c6De47091
ElkRouter address: 0x9E4AAbd2B3E60Ee1322E94307d0776F2c8e6CFbb
MATIC
Not yet supported.
BSC
Not yet supported.
ETH
Not yet supported.
Compiling and Running
Using Hardhat
- Get Hardhat.
- Execute
yarn install
to prepare the environment. - Execute
yarn compile
to compile the contracts.
Using Remix IDE
A tutorial for using Remix is located here.
Development
Accessing the ABI
- Install into your project using
npm install --dev @elkdex/avax-exchange-contracts
. - 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.