Source repository for fiat tokens on the CENTRE network.
Clone or download
mirathewhite Update license year 2019 (#241)
### Fix license of use, 
update 2019; 
Format ISO 8869-1;
----------------------------------------------------------------------------------------------------------------------
in Memoriam Guto Schiavon 
![guto-schiavon_bitcoin](https://user-images.githubusercontent.com/7637553/50562143-a7506f80-0cf8-11e9-9e58-bed4565c4715.jpg)
R.I.P pioneer and friend. 

#ripGUTO
Latest commit 6a587bf Jan 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci add cloudformation template for codebuild project (#222) Sep 27, 2018
contracts Update indent levels to be consistent Oct 30, 2018
doc Correct typos in doc/* Oct 30, 2018
echidna_tests Fixes typo in config.yaml Aug 10, 2018
migrations Fix build Jul 31, 2018
scripts remove encoder and decoder tools Sep 21, 2018
test removed duplicate tests from TestWrapper Aug 15, 2018
validate Uncommented truffle-hdwallet-provider package declaration and updated… Aug 14, 2018
verification cleanup Sep 25, 2018
.babelrc Fixes extra whitespace Jun 19, 2018
.gitignore Merge branch 'master' into echidna Aug 9, 2018
.gitmodules adds echidna to test suite [CENT-186] Aug 9, 2018
.solcover.js tests events on UpgradedFiatToken, use initV2 for upgradeToAndCall Aug 2, 2018
.travis.yml Initial .travis.yml file Oct 15, 2018
Dockerfile.ganache Run truffle/ganache in docker to make running the tests from CI easier May 14, 2018
Dockerfile.truffle Run truffle/ganache in docker to make running the tests from CI easier May 14, 2018
LICENSE Update license year 2019 Jan 1, 2019
README.md readme cleanup Sep 25, 2018
build-dev.sh Run truffle/ganache in docker to make running the tests from CI easier May 14, 2018
buildspec.yaml Fixes grep exit error; adds more descriptive messages; fixes typo Aug 21, 2018
docker-compose.yml Run truffle/ganache in docker to make running the tests from CI easier May 14, 2018
package.json remove encoder and decoder tools Sep 21, 2018
truffle-config.js Adds OpenZeppelin library as submodule fixed to v1.6.0; Adds FiatToke… Feb 7, 2018
truffle.js Uncommented truffle-hdwallet-provider package declaration and updated… Aug 14, 2018
yarn.lock remove encoder and decoder tools Sep 21, 2018

README.md

centre-tokens

Fiat tokens on the CENTRE network.

Setup

Tests need node v8.0.0 or higher, as they depend on async/await functionality. Interacting with eth is very async-y so await makes it much easier to write tests. Depends on truffle and testrpc for testing.

install truffle: npm install -g truffle

install ganache-cli: npm install -g ganache-cli

install project npm dependencies: npm install

Testing

All tests are run with: npm run truffle-test

or run a specific file of tests with: npm run truffle-test -- [file]

to generate test coverage on all tests run: npm test

Contracts

The implementation uses 2 separate contracts - a proxy contract (FiatTokenProxy.sol)and an implementation contract(FiatToken.sol). This allows upgrading the contract, as a new implementation contact can be deployed and the Proxy updated to point to it.

FiatToken

The FiatToken offers a number of capabilities, which briefly are described below. There are more detailed design docs in the doc folder.

ERC20 compatible

The FiatToken implements the ERC20 interface.

Pausable

The entire contract can be frozen, in case a serious bug is found or there is a serious key compromise. No transfers can take place while the contract is paused. Access to the pause functionality is controlled by the pauser address.

Upgradable

A new implementation contract can be deployed, and the proxy contract will forward calls to the new contract. Access to the upgrade functionality is guarded by a proxyOwner address. Only the proxyOwner address can change the proxyOwner address.

Blacklist

The contract can blacklist certain addresses which will prevent those addresses from transferring or receiving tokens. Access to the blacklist functionality is controlled by the blacklister address.

Minting/Burning

Tokens can be minted or burned on demand. The contract supports having multiple minters simultaneously. There is a masterMinter address which controls the list of minters and how much each is allowed to mint. The mint allowance is similar to the ERC20 allowance - as each minter mints new tokens their allowance decreases. When it gets too low they will need the allowance increased again by the masterMinter.

Ownable

The contract has an Owner, who can change the owner, pauser, blacklister, or masterMinter addresses. The owner can not change the proxyOwner address.