基于区块链的毕业设计Altafin – Ethereum – Altafin-以太坊

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Altafin – Ethereum – Altafin-以太坊 是一篇很好的国外资料

Altafin – Ethereum

Altafin public smart contracts built on Ethereum protocol.

Testing

First, make sure Ganache is running.

Run all test:

$ npm test 

To run tests in a specific file, run:

$ npm test [path/to/file] 

Contracts

Altafin Token

The Altafin Token offers a number of capabilities, which briefly are described below.

ERC20 compatible

The Altafin Token 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_ROLE 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 DEFAULT_ADMIN_ROLE address. Only the DEFAULT_ADMIN_ROLE address can change the DEFAULT_ADMIN_ROLE 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 BLACKLIST_ROLE address.

Minting/Burning

Tokens can be minted or burned on demand. The contract supports having multiple minters simultaneously. There is a MINTER_ROLE 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 MINTER_ROLE.

Ownable

The contract has an Owner, who can change the PAUSER_ROLE, BLACKLIST_ROLE, or MINTER_ROLE addresses.


Altafin-以太坊eth

基于以太坊eth协议的Altafin公共智能合约。

测试

首先,确保Ganache正在运行。

运行所有测试:

$ npm test 

要在特定文件中运行测试,请运行:

$ npm test [path/to/file] 

合同

Altafin代币

Altafin令牌提供了许多功能,下面简要介绍这些功能。

ERC20兼容

Altafin令牌实现ERC20接口。

可暂停

如果发现严重的bug或存在严重的密钥泄露,可以冻结整个合同。合同暂停时不能进行任何转让。对暂停功能的访问由暂停者角色地址控制。

可升级

可以部署新的实现协定,代理协定将向新协定转发调用。对升级功能的访问由默认的管理角色地址保护。只有默认的管理员角色地址才能更改默认的管理员角色地址。

黑名单

合同可以将某些地址列入黑名单,从而阻止这些地址传输或接收令牌。黑名单功能的访问由黑名单角色地址控制。

铸造/燃烧

代币可以根据需要铸造或烧制。契约支持同时有多个minter。有一个MINTERu角色地址,它控制MINTER的列表以及每个MINTER可以造币多少。造币厂津贴类似于ERC20津贴-因为每个造币厂铸造新的代币他们的津贴减少。当它变得太低时,他们将需要由MINTERu角色再次增加津贴。

可拥有

合同有一个所有者,可以更改暂停者角色、黑名单角色或最小者角色地址。

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情