Skip to content

Latest commit

Β 

History

3,229 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Premia - Next-Generation Options AMM

https://premia.finance

Deployments

Deployment Arbitrum Arbitrum Goerli Arbitrum Nova
Core Contracts πŸ“œ πŸ“œ πŸ“œ
Option Physically Settled πŸ“œ πŸ“œ
Option Rewards πŸ“œ πŸ“œ
Vaults πŸ“œ πŸ“œ

Development

Install dependencies via Yarn:

yarn install

Setup Husky to format code on commit:

yarn postinstall

Create a .env file with the following values defined:

Key Description Required for
API_KEY_ALCHEMY Alchemy API key for node connectivity Tests + deployments
API_KEY_ARBISCAN Arbiscan API key for source code verification Contracts verification
PKEY_DEPLOYER_MAIN contract deployer private key for production use on mainnets Mainnet deployment
PKEY_DEPLOYER_TEST contract deployer private key for test/development use on testnets Testnet deployment
PKEY_PROPOSER_MAIN Safe multi-sig transaction proposer private key for production use on mainnets Mainnet deployment
PKEY_PROPOSER_TEST Safe multi-sig transaction proposer private key for test/development use on testnets Testnet deployment

Testing

Test contracts via Forge:

forge test -vv

Generate a code coverage report using Forge:

forge coverage

Generate a HTML code coverage report using Forge :

forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage

Deployment

Contracts deployment is done through Hardhat. Available networks : arbitrum, arbitrumNova, goerli, arbitrumGoerli

hardhat run ./scripts/deploy/0000-baseLayer.ts --network goerli

Contracts upgrade

Example to upgrade pools implementation on goerli network :

hardhat run ./scripts/upgrade/0000-pools.ts --network goerli

Other upgrades scripts are available in ./scripts/upgrade to upgrade different components of the protocol.

Docker

To run the code in developer mode using docker, start by building the docker image:

docker build -t premia-v3 .

Then run the docker container by using the command:

MacOS/Linux

docker run -it -u=$(id -u $USER):$(id -g $USER) \
           -v $PWD:/src \
           premia-v3

Windows

docker run -it -v %CD%:/src premia-v3

Upon executing, you will have access to the command line inside the container and will be able to run the commands for forge and hardhat.

Licensing

TBD

Used by

Contributors

Languages