Skip to content

PeppyFinance/contracts

Repository files navigation

Peppy Finance Smart Contracts

Installation

  1. First get foundry via getfoundry.sh.

  2. Second run foundryup to install the foundry toolchain.

  3. Now we can build the project running forge build.

  4. For local development make sure to add an .env and add the following env vars:

RPC_URL=http://localhost:8545/
PRIVATE_KEY=my-priv-key
PUBLIC_ADDR=my-pub-key
PYTH_ADDR=pyth-addr
  1. run anvil with the --fork-url flag and specify which chain should be forked. It is then important to match PYTH_ADDR with the actual address on the forked chain.

Testing and logging

You can run foundry tests with forge test.

You can optionally log state for simulation tests with LOG_SIMULATION=true forge test

Local Deployment

start anvil with anvil --dump-state 'state/deployment.state'

run deployment script with './deploy-local.sh', make sure to have a .env file.

Next time, you can load the deployment in you anvil with anvil --load-state 'state/deployment.state'

You can get the addresses from deployments/addresses.ts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages