Blockchain Course – 区块链课程区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Blockchain Course – 区块链课程区块链毕设代写 是一篇很好的国外资料

Blockchain Course

Code from the Udemy Ethereum and Solidity: The Complete Developer’s Guide course by Stephen Grider.

Progress

Section 5 – Campaign App, just finished initial campaign details page

Security

The deploy scripts are not included, for security of my seed words. Although I will never use them for a real app, you can never be too careful.

Differences

There will inevitably be differences between my code and Stephen’s. I will point out the most relevant parts below.

Testing of failures

In the tests which have the form

it('should fail xxx', () => {   try {     await xxx.methods.xxx().send({       xxx: xxx,       xxx: xxx     });      assert(false);   } catch (err) {     assert(err);   } }; 

The catch(err) will always be entered even when the assert(false) is hit, making the test null and void. A change is needed to the assert inside to assert.equal(err.name, 'c').

... } catch (err) {   assert.equal(err.name, 'c'); } 

General

I prefer to use names like enterLottery() or createCampaign() instead of onSubmit(), and names like updateAmount() instead of onChange().

I have done a lot of object destructuring.

Layout

My Layout component takes a title attribute to set the title in the head section.

Lottery Contract

I have implemented the lastWinner storage in my Lottery contract and use it in the lottery app.

Campaign

Contract

I have used contributors and contributorsCount for contributors in the contract and subsequent summary page. The Request struct still has approvals and approvalCount though.

My finalise function is called finaliseRequest() with an s.

App

I am validating the numeric inputs to only allow digits and the decimal point in. I feel that there’s no point in allowing bad input and then only catching it when it fails to convert to a number later on.

We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.


区块链blockchain课程

来自Udemy以太坊eth和Solidity的代码:Stephen Grider的完整开发人员指南课程。

进度

第5节-活动应用程序,刚完成初始活动详细信息页

安全性

为了安全起见,不包括部署脚本。虽然我不会把它们用于真正的应用程序,但你永远也不会太小心。

差异

我的代码和Stephen的代码之间不可避免地会有差异。我将在下面指出最相关的部分。

故障测试

在格式为

it('should fail xxx', () => {   try {     await xxx.methods.xxx().send({       xxx: xxx,       xxx: xxx     });      assert(false);   } catch (err) {     assert(err);   } }; 

的测试中,始终会输入catch(err),即使assert(false)被命中,也会使测试无效。需要对内部断言进行更改断言相等(错误名称“c”)。

... } catch (err) {   assert.equal(err.name, 'c'); } 

常规

我更喜欢使用enterLotter()或createCampaign()之类的名称,而不是onSubmit(),也喜欢使用updateMount()而不是onChange()。

我做了很多对象分解。

布局

我的布局组件采用title属性来设置标题部分。

彩票合同分析cookies

我已经在我的彩票合同中实现了上一个中奖者存储,并在彩票应用程序中使用它。

Campaign

Contract

我在合同和后续摘要页面中使用了贡献者和贡献者计数作为贡献者。但是请求结构仍然有approvalscount和approvalCount。

我的finalize函数名为finalizerequest()。

App

我正在验证数字输入,使其只允许输入数字和小数点。我觉得允许错误的输入,然后只在以后无法转换为数字时才捕捉它是没有意义的。

我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情