Skip to content

kypanz/olympus-contracts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ω Olympus Smart Contracts

image

This is the main Olympus smart contract development repository.

🔧 Setting up local development

Requirements

Local Setup Steps

# Clone the repository
git clone https://github.com/OlympusDAO/olympus-contracts.git

# Install dependencies
yarn install

# Set up environment variables (keys)
cp .env.example .env # (linux)
copy .env.example .env # (windows)

# compile solidity, the below will automatically also run yarn typechain
yarn compile

# if you want to explicitly run typechain, run
yarn compile --no-typechain
yarn typechain

# run a local hardhat node
yarn run start

# test deployment or deploy 
# yarn run deploy:<network>, example:
yarn run deploy:hardhat

Local Setup Steps (with Docker)

A Docker image is available to simplify setup.

# First setup keys, to do this first copy as above
cp .env.example .env # (linux)
copy .env.example .env # (windows)

# Populate ALCHEMY_API_KEY and PRIVATE_KEY into `.env` afterwards
# Then, start the node
make run

📜 Contract Addresses

Notes for localhost

  • The deployments/localhost directory is included in the git repository, so that the contract addresses remain constant. Otherwise, the frontend's constants.ts file would need to be updated.
  • Avoid committing changes to the deployments/localhost files (unless you are sure), as this will alter the state of the hardhat node when deployed in tests.

📖 Guides

Contracts

Testing

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Solidity 65.3%
  • TypeScript 21.0%
  • JavaScript 13.1%
  • Makefile 0.2%
  • Shell 0.2%
  • Dockerfile 0.1%
  • Nix 0.1%