This repository contains the complete issuance contract/fundraising suite, along with tests and a few deployment scenarios.
This is a community driven fork of the first contract suite (github.com/swarmfund/swarm-compliant-contract). The main advantages of the fork being
- up to date code (using solidity 0.7)
- simpler fundraising model (stablecoin contributions only)
- overall code refactoring and simplifications
- good test coverage
Run the test suite with
yarn test
To spin a local hardhat network and automatically deploy on it, use the following scripts.
To deploy the base contracts (registry, minter, mock erc20 tokens for SWM and USDC).
yard dev:base
To deploy the base contracts plus a few testing SRC20 tokens.
yarn dev:issuance
To deploy to a specific network, use the following script:
yarn deploy <network>
Make sure you configure the network in hardhat.config.js
. Also, note that this only deploys the
base contracts. The actual SRC20 tokens are expected to be deployed through the
Isuannce Dapp.
Feel free to build your own deployment scenarios using the bundled deployment and token helpers. The unit tests and the deploy-issuance script should work as a good reference.
Contract | Address |
---|---|
SwmToken | 0x46874BfC5Ed8D1c238F615Bb95c13b99994Aa578 |
SWMPriceOracle | 0x9f776C0c0f0507E308FEb966ed1D38AE5Db46F85 |
SRC20Registry | 0xbA4d1F887B93ccF466d85C3Cb5486720c7B350Dc |
TokenMinter | 0x6d108EBecedb4a146B860A09EeD4CD4A0dfeE463 |
FundraiserManager | 0x7fA5b6D9D1cbdc21f921c96Fd3ef7aEDDb19bd50 |
Contract | Address |
---|---|
SwmToken | 0x3505f494c3f0fed0b594e01fa41dd3967645ca39 |
SWMPriceOracle | 0xa2e45Ad7431CB8599e71857085737869eacbf842 |
SRC20Registry | 0x4e5370B262e83EAd732fb184205510B78eC0fbda |
TokenMinter | 0x18F98d695aaEed2f2705512D885b0D4FA6B33062 |
FundraiserManager | 0x68C3ddF1a019f462B6162d3201D9bC5462197F6c |
The code has been audited by Armen Arakelian from Distributed Lab.