PupperCoin_Crowdsale – 傀儡集市区块链毕设代写
区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,PupperCoin_Crowdsale – 傀儡集市区块链毕设代写 是一篇很好的国外资料
PupperCoin_Crowdsale
Project Background
A company has decided to crowdsale their PupperCoin token in order to help fund the network development. This network will be used to track the dog breeding activity across the globe in a decentralized way, and allow humans to track the genetic trail of their pets. The company has already worked with the necessary legal bodies and has the green light on creating a crowdsale open to the public. However, they are required to enable refunds if the crowdsale is successful and the goal is met, and you are only allowed to raise a maximum of 300 Ether. The crowdsale will run for 24 weeks.
Some crowdsale contract features:
- An ERC20 token will be created and be minted through a Crowdsale contract that can be leveraged from the OpenZeppelin Solidity library.
- This crowdsale contract manages the entire process, allowing users to send ETH and get back PUP (PupperCoin).
- This contract will mint the tokens automatically and distribute them to buyers in one transaction.
- The crowdsale contract inherits from
Crowdsale
,CappedCrowdsale
,TimedCrowdsale
,RefundableCrowdsale
, andMintedCrowdsale
. - The crowdsale will be conducted on the Kovan testnet in order to get a real-world pre-production test in.
PupperCoin.sol
file creates a standard ERC20Mintable
token. It uses an ERC20Detailed contract.
Crowdsale.sol
file takes in the following parameters:
- rate – rate in TKNbits
- wallet – sale beneficiary
- goal – cap of the crowdsale
- openingTime – is set equal to
now
- closingTime – is set equal to
now + 24 weeks
As mentioned previously, this contract inherits from the following OpenZeppelin contracts:
Crowdsale
– takes in rate, wallet, and token as parametersCappedCrowdsale
– takes in goal as a parameterTimedCrowdsale
– takes in openingTime and closingTime as parametersRefundableCrowdsale
– takes in goal as a parameterMintedCrowdsale
It is important to note that the RefundableCrowdsale
constructor is called instead of the RefundablePostDeliveryCrowdsale
contract because RefundablePostDeliveryCrowdsale
inherits the RefundableCrowdsale
constructor.
Testing the Crowdsale
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
You can always update your selection by clicking Cookie Preferences at the bottom of the page. For more information, see our Privacy Statement.
Essential cookies
We use essential cookies to perform essential website functions, e.g. they’re used to log you in. Learn more
Always active
Analytics cookies
We use analytics cookies to understand how you use our websites so we can make them better, e.g. they’re used to gather information about the pages you visit and how many clicks you need to accomplish a task. Learn more
PupperCoin_众包销售
项目背景
一家公司决定众包其PupperCoin代币,以帮助为网络发展提供资金。这个网络将被用来以分散的方式追踪全球范围内的狗繁殖活动,并允许人类追踪其宠物的遗传轨迹。该公司已与必要的法律机构合作,并已批准创建向公众开放的众包销售。但是,如果众筹成功并且达到了目标,他们需要进行退款,而且你最多只能筹集300以太币。众筹活动将持续24周。
众包合同的一些特点:
- 将创建一个ERC20代币,并通过可从OpenZeppelin Solidity中利用的众包合同进行铸造图书馆。
- 这个众包合同管理整个过程,允许用户发送ETH并取回PupperCoin。
- 此合同将自动生成代币,并在一次交易中将其分发给买家。
- 众筹合同继承自众筹、封顶众筹、TimedCrowdsale、可退款众筹和MintedCrowdsale。
- 众包销售将在Kovan testnet上进行,以便在中进行真实的预生产测试。
木偶角.sol文件创建一个标准的ERC20Maintable令牌。它使用ERC20详细合同。
众筹.sol文件接受以下参数:
- 费率-TKNbits中的费率
- 钱包-销售受益人
- 目标-众包销售的上限
- 开放时间-设置为现在
- 结束时间-设置为现在+24周,而token作为参数
如前所述,此合同继承了以下OpenZeppelin合同:
- CappedCrowdsale-以入站目标为参数
- TimedCrowdsale-以openingTime和closingTime为参数
TimedCrowdsale
– takes in openingTime and closingTime as parametersRefundableCrowdsale
– takes in goal as a parameterMintedCrowdsale
需要注意的是,调用的是可退款的众包销售构造函数,而不是可退款的PostDeliveryCrowdSaleContract,因为ReundablePostDeliveryCrowdSale继承了可退款的众包销售构造函数。
测试众包
我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。
我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。
您可以随时通过单击页面底部的Cookie首选项来更新您的选择。有关更多信息,请参阅我们的隐私声明。
基本cookies
我们使用基本Cookie来执行基本的网站功能,例如,它们用于让您登录。了解更多
分析cookies
Analytics cookies
我们使用analytics Cookie来了解您如何使用我们的网站,以便我们能够使其变得更好,例如,它们用于收集有关您访问的页面以及完成一项任务需要多少次单击的信息。了解更多
部分转自网络,侵权联系删除区块链源码网
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » PupperCoin_Crowdsale – 傀儡集市区块链毕设代写