@normalfinance/contracts v0.1.2
Normal
For documentation of the Normal Index system, see docs.normalfinance.io.
npm package
This repo doubles as an npm package with the compiled JSON contracts
import { IndexToken, Vault } from "@normalfinance/contracts";Importing from solidity
import '@normalfinance/contracts/contracts/IndexToken.sol';
import '@normalfinance/contracts/contracts/Vault.sol';Contracts
IndexToken
An ERC-20 token deployed on the Polygon PoS network representing ownership in a Normal Index Fund.
Vault
A multi-chain contract used to securely custody a Normal Index Funds assets and execute authorized withdrawals.
Developer guide
Prettier pre-commit hook
This repo runs a husky precommit to prettify all contract files to keep them consistent. Add new folder/files to prettier format script in package.json. If you need to add other tasks to the pre-commit script, add them to .husky/pre-commit
How to setup
git clone https://github.com/normalfinance/contracts
cd normalfinance-contracts
yarnHow to run tests
yarn testHow to publish
yarn pubRelease flow
Smart contract development tends to take a long release cycle. To prevent unnecessary dependency conflicts, please create a feature branch (features/$BRNACH_NAME) and raise a PR against the feature branch. The feature branch must be merged into master only after the smart contracts are deployed to the Ethereum mainnet.