Skip to content

money-on-chain/stable-protocol-flipmoney-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlipMoney protocol

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.

Getting Started

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.

Prerequisites

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)

Installing

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

Generate Types

In order to get contract types

npm run typechain

Deployment

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:

  1. deploy and initialize the protocol using a governor mocked to skip governance system
  2. initialize the protocol with Pegged Tokens
  3. 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

Deploy scripts

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.

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

Versioning

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

License

See the LICENSE file for details