FlipMoney is an implementation of the Money On Chain main protocol that uses (DOC) Dollar on Chain as collateral of the system. For more information, please refer to the documentation section.
These instructions will get you a copy of the project up and running on your local machine for development. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# Install proper node version
nvm use
Create .env
file (you can base on .env.example
)
A step by step series of examples that tell you how to get a development env running
Say what the step will be
# Install the dependencies
npm install
In order to get contract types
npm run typechain
It imports smart contracts and deploy scripts from MoC-main-sc repository and uses them to deploy the RC20 Collateralized Asset version, with custom networks configurations. To add networks for deployment or set new deploy parameters see hardhat.base.config.ts.
You can configure a network as testnet
using tags mechanism, that will allow you to:
- deploy and initialize the protocol using a governor mocked to skip governance system
- initialize the protocol with Pegged Tokens
- transfer governance to the real governor
Otherwise, you can set it as mainnet
and will be initialized with the real governor. In that way, you must add Pegged Tokens and Assets using the governance system. See more in Areopagus-Governance
To deploy contracts in rsk testnet
npm run deploy-rskTestnet
A deployments folder will be created with a subfolder for each network. There you will find a json file for each contract deployed that includes the address and ABI.
Keep in mind that all the contracts are upgradeables using UUPS proxy pattern, so to interact with them you must use the contract implementation ABI but calling the contract proxy address.
- Hardhat - Task runner
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
We use SemVer and conventional commits for versioning. For the versions available, see the tags on this repository.
To create a new release execute the script
npm run release
See the LICENSE file for details