@vanilladefi/trade-contracts
v1.1.27
Published
Smart contracts for vanilladefi.com
Downloads
29
Readme
Vanilla Contracts v1.1
This repository contains the core smart contracts for Vanilla. For documentation, see the technical overview of the contracts.
Install Yarn
We use Yarn instead of npm.
curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
Build and Test
We use Hardhat as a build tool.
On first yarn install
the typechain generation will fail, as the contracts aren't built on postinstall
. Just run
To build, yarn install
, build contracts with yarn run compile:sol
, generate Typechain bindings with yarn run generate:typechain
, and run model tests:
yarn install
yarn run compile:sol
yarn run generate:typechain
yarn test
To run coverage reports
yarn run coverage:sol
Lint and reformat
We use ESLint for JS/TS code and Prettier for Solidity code.
To run lint checks:
yarn run lint:js
yarn run lint:sol
To reformat / prettify:
yarn run format:js
yarn run format:sol
Deployment
We use Hardhat also for all deployments. See DEPLOYMENT.md for detailed instructions.
License
All source code is licensed under GPL-3.0-or-later except:
- contracts/Tickmath.sol -library, which is a derived work from a similar library in Uniswap v3 Core, and is licensed under GPL-2.0-or-later