Skip to content

chickenpie347/boot-customswap

 
 

Repository files navigation

boot-customswap

This is a heavily modified fork of saddle smart contracts that implements a dual curve and temporal parameter ramp features 🤠

The contracts are compiled with Hardhat, and tested using Waffle and TypeScript.

Installation

$ npm i

Usage

Build

$ npm run build

Test

$ npm test

Coverage

$ npm run coverage

Deploying contracts to localhost Hardhat EVM

$ npx hardhat node
$ npx hardhat run --network localhost deployment/hardhat/swap.ts

deployment/hardhat/swap-forkMainnet.ts is also available for forking the mainnet contracts into the hardhat network.

You can connect to this RPC server via localhost:8545.

Deploying contracts to Rinkeby Testnet

  • Environment variables
    • Create a .env file with its values:
DEPLOYER_PRIVATE_KEY_RINKEBY=<private_key_without_0x>
INFURA_API_KEY=<SECRET_KEY>
REPORT_GAS=<true_or_false>

BTC tokens pool

$ npx hardhat run deployment/rinkeby/swap-btc.ts --network rinkeby

FRAX-FXS pool

$ npx hardhat run deployment/rinkeby/swap-frax.ts --network rinkeby

Generating GitBook docs

$ npx solidity-docgen --templates=templates

The output in the docs folder should be copied to the appropriate folder in the saddle-docs repo.

Running Slither

Slither is a Solidity static analysis framework. To run it locally:

$ pip3 install slither-analyzer
$ slither .

Slither is configured to run as a GitHub Action and error on any high findings.

Brownie

It is recommended that you create a virtualenv with direnv or other suitable shell helpers when developing or running the brownie tests and other Python based tools. Make sure your Python 3.7+ virtualenv is configured and activated before running these commands.

Also, since Brownie uses Ganache, make sure you have npm 14+ installed.

$ pip install -r requirements.txt
$ brownie test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 57.0%
  • Solidity 32.2%
  • Python 10.0%
  • Other 0.8%