CNH Coin (CNHC) – CNH硬币(CNHC)区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,CNH Coin (CNHC) – CNH硬币(CNHC)区块链毕设代写 是一篇很好的国外资料

CNH Coin (CNHC)

CNHC Group Limit (CGL)-issued CNH-collateralized ERC20 stablecoin public smart contract repository.

https://www.cnhc.to

The contract can be found here

The whitepaper can be found here.

ABI, Address, and Verification

The contract abi is in CNHCToken.abi. It is the abi of the implementation contract. CNHCToken.json is fully compiled file generated by truffle. See also our independent security audits by PeckShield and Beosin in audit-reports.

Contract Specification

CNHC is an ERC20 token that is Centrally Minted and Burned by CGL, representing the trusted party backing the token with CNH.

ERC20 Token

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.

Controlling the token supply

The total supply of CNHC is backed by fiat held in reserve at CGL. There is a 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);

Pausing the contract

In the event of a critical security threat, CGL 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.

Contract Tests

To run smart contract tests first start

ganache-cli

in another terminal

Then run

truffle test

init


CNH Coin (CNHC)

CNHC Group Limit (CGL)-issued CNH-collateralized ERC20 stablecoin public smart contract repository.

https://www.cnhc.to

The contract can be found here

The whitepaper can be found here.

ABI, Address, and Verification

The contract abi is in CNHCToken.abi. It is the abi of the implementation contract. CNHCToken.json is fully compiled file generated by truffle. See also our independent security audits by PeckShield and Beosin in audit-reports.

Contract Specification

CNHC is an ERC20 token that is Centrally Minted and Burned by CGL, representing the trusted party backing the token with CNH.

ERC20 Token

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.

Controlling the token supply

The total supply of CNHC is backed by fiat held in reserve at CGL. There is a 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);

Pausing the contract

In the event of a critical security threat, CGL 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.

Contract Tests

To run smart contract tests first start

ganache-cli

in another terminal

Then run

truffle test

init

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20137.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » CNH Coin (CNHC) – CNH硬币(CNHC)区块链毕设代写

提供最优质的资源集合

立即查看 了解详情