Trust Reserve Limited (TRL) issues CNH collateralized stablecoin public smart contract repository.
Official website: https://www.trustreserve.com
View ERC20 token (Ethereum) contract
View ERC20 token (Conflux eSpace) contract
View CRC20 token (Conflux Core) contract
The contract abi is in CNHCToken.abi
. It is the abi of the implementation contract. CNHCToken.json
is a fully compiled file generated by truffle. You can view our independent security audits by PeckShield and Beosin in audit-reports
.
CNHC is a token that is Centrally Minted and Burned by TRL, representing the trusted party backing the token with CNH.
The public interface of CNHC is the ERC20 interface specified by EIP-20.
name()
symbol()
decimals()
totalSupply()
balanceOf(address who)
transfer(address to, uint256 value)
approve(address spender, uint256 value)
allowance(address owner, address spender)
transferFrom(address from, address to, uint256 value)
And the usual events.
event Transfer(address indexed from, address indexed to, uint256 value)
event Approval(address indexed owner, address indexed spender, uint256 value)
Typical interaction with the contract will use transfer
to move the token as payment. Additionally, a pattern involving approve
and transferFrom
can be used to allow another address to move tokens from your address to a third party without the need for the middleperson to custody the tokens, such as in the 0x protocol.
The total supply of CNHC is backed by fiat held in reserve at TRL. An owner address can submit proposals for minting and burning the token and several voters can audit the proposals based on the actual movement of cash in and out of the reserve based on requests for the purchase and redemption of CNHC.
Votable Events
OpenProposal(uint16 pid);
CloseProposal(uint16 pid);
DoneProposal(uint16 pid);
VoteProposal(uint16 pid, address voter);
AddVoter(address voter);
RemoveVoter(address voter);
In the event of a critical security threat, Trust Reserve Limited has the ability to pause and unpause transfers and approvals of the CNHC token. The ability is controlled by a single owner
role, following OpenZeppelin's Ownable. The simple model for pausing transfers following OpenZeppelin's Pausable.
To run smart contract tests first start
ganache-cli
in another terminal
Then run
truffle test