基于区块链的毕业设计Ethgoal – 埃塞俄比亚目标

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Ethgoal – 埃塞俄比亚目标 是一篇很好的国外资料

Ethgoal - 埃塞俄比亚目标 Ethgoal - 埃塞俄比亚目标

Ethgoal

Achieve goals with your friends’ help, powered by the Ethereum blockchain.

NOTE: THESE CONTRACTS HAVE NOT YET BEEN AUDITED, USE AT YOUR OWN RISK!

How it works

  1. Submit a “pledge” to the blockchain along with digital signatures of between 1 and 3 friends who agree to judge whether you’ve achieved your pledge by a given end date. You submit a deposit along with your pledge. This is denominated in DAI and can be any amount of your choosing.

  2. After the the end date has passed your friends can vote to say you’ve passed or failed. They will by default 1 week to cast their votes – this is known as the “judgement period”.

  3. If the majority vote to say that you failed to meet your pledge then your deposit gets split between them and you get nothing back. If they vote to say that you’ve passed or they fail to vote then it is assumed that you passed and you thus get your deposit back.

  4. You can then withdraw the DAI due to you at any time after the pledge judgement period has passed.

You can have any number of pledges open at a time.

Note: on non-mainnet networks we deploy MintableToken, a simple ERC-20 token which allows for unlimited minting.

Chai integration

On mainnet, when you submit your deposit it gets deposited in a Bank contract which will actually send it to Chai to earn interest – this way we don’t need to charge the users any fees upfront!

Note: on non-mainnet networks we deploy DevChai, a mock Chai implementation that simply mints more MintableTokens.

Architecture

Key contracts

  • Controller.sol (non-upgradeable) – the main contract users interact with.
  • Bank.sol (upgradeable) – handles user token deposits and withdrawals and speaks to Chai.
  • Settings.sol (upgradeable) – all other contracts use this to discover each other.

Upgradeability

The upgradeability architecture is implemented in Proxy.sol and is based on the OpenZepellin eternal storage pattern.

However, an ability to prevent future upgrades has been added (see the freezeImplementation() method). This means that the admins will be able to make the code truly immutable at any point in time once they are confident there are no more upgrades needed.

For devs

Run a devnet:

yarn devnet

Deploy contracts locally:

yarn deploy:local

Run tests:

yarn test

Run tests with coverage:

yarn coverage

LICENSE

AGPLv3

Ethgoal Copyright (C) 2020 [Ramesh Nair](https://github.com/hiddentao)  This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.  You should have received a copy of the GNU Affero General Public License along with this program.  If not, see <https://www.gnu.org/licenses/>. 

<Ethgoal><Ethgoal>Ethgoal - 埃塞俄比亚目标

借助以太坊eth区块链blockchain,在朋友的帮助下实现目标。

注意:这些合同尚未审核,使用风险自负!

区块链blockchain提交一份“承诺书”,并附上1到3位同意判断您是否在给定结束日期前实现承诺的朋友的数字签名。你要在保证书的同时交一笔押金。这是以傣族命名的,可以是你选择的任何数量。

结束日期过后,您的朋友可以投票决定您通过或失败。他们将默认在一周内投票,这被称为“审判期”。

如果多数人投票说你没有履行你的承诺,那么你的存款就会被他们分开,你什么也得不到。如果他们投票说你通过了,或者他们没有投票,那么就假定你通过了,你就可以拿回你的押金。

然后,您可以在质押判决期结束后的任何时候提取应付给您的DAI。

您一次可以打开任意数量的认捐。

注意:在非主网网络上,我们部署了MintableToken,这是一种简单的ERC-20代币,允许无限造币。

在mainnet上,当您提交存款时,您会将存款存入银行合同,该合同实际上会将其发送给Chai以赚取利息-这样我们就不需要向用户收取任何费用了!

注意:在非mainnet网络上,我们部署了DevChai,这是一个模拟Chai实现,它只需生成更多的mintabletoken。

关键合同

可升级性

可升级性体系结构在中实现代理.sol并基于OpenZepellin永恒存储模式。

但是,添加了一个防止将来升级的功能(请参见freezeImplementation()方法)。这意味着一旦管理员确信不再需要升级,他们将能够在任何时间点使代码真正不可变。

运行devnet:

在本地部署合同:

运行测试:

运行覆盖范围的测试:

AGPLv3

Ethgoal

其工作原理

Chai集成

体系结构

对于dev

许可证

  • 与数字一起向区块链blockchain提交“承诺”1到3个朋友的签名,他们同意判断您是否在给定的结束日期之前实现了您的承诺。你要在保证书的同时交一笔押金。这是以傣族命名的,可以是你选择的任何数量。
  • 结束日期过后,您的朋友可以投票决定您通过或失败。他们将默认在一周内投票,这被称为“审判期”。
  • 如果多数人投票认为你没有履行你的承诺,那么你的存款就会被他们分开,你将一无所获。如果他们投票说你通过了,或者他们没有投票,那么就假定你通过了,你就可以拿回你的押金。
  • 然后,您可以在质押判决期结束后的任何时候提取应付给您的DAI。
  • 控制器.sol(不可升级)-主合同用户与交互。
  • 银行.sol(可升级)-处理用户代币存款和取款,并与Chai通话。
  • 设置.sol(可升级)-所有其他合同都使用此功能来发现对方。在
  • Ethgoal

    借助以太坊eth区块链blockchain,在朋友的帮助下实现目标。

    注意:这些合同尚未审核,使用风险自负!

    其工作原理

    1. 与数字一起向区块链blockchain提交“承诺”1到3个朋友的签名,他们同意判断您是否在给定的结束日期之前实现了您的承诺。你要在保证书的同时交一笔押金。这是以傣族命名的,可以是你选择的任何数量。
    2. 结束日期过后,您的朋友可以投票决定您通过或失败。他们将默认在一周内投票,这被称为“审判期”。
    3. 如果多数人投票认为你没有履行你的承诺,那么你的存款就会被他们分开,你将一无所获。如果他们投票说你通过了,或者他们没有投票,那么就假定你通过了,你就可以拿回你的押金。
    4. 然后,您可以在质押判决期结束后的任何时候提取应付给您的DAI。

    您一次可以打开任意数量的认捐。

    注意:在非主网网络上,我们部署了MintableToken,这是一种简单的ERC-20代币,允许无限造币。

    Chai集成

    在mainnet上,当您提交存款时,您会将存款存入银行合同,该合同实际上会将其发送给Chai以赚取利息-这样我们就不需要向用户收取任何费用了!

    注意:在非mainnet网络上,我们部署了DevChai,这是一个模拟Chai实现,它只需生成更多的mintabletoken。

    体系结构

    关键合同

    • 控制器.sol(不可升级)-主合同用户与交互。
    • 银行.sol(可升级)-处理用户代币存款和取款,并与Chai通话。
    • 设置.sol(可升级)-所有其他合同都使用此功能来发现对方。在

    可升级性

    可升级性体系结构在中实现代理.sol并基于OpenZepellin永恒存储模式。

    但是,添加了一个防止将来升级的功能(请参见freezeImplementation()方法)。这意味着一旦管理员确信不再需要升级,他们将能够在任何时间点使代码真正不可变。

    对于dev

    运行devnet:

    yarn devnet

    在本地部署合同:

    yarn deploy:local

    运行测试:

    yarn test

    运行覆盖范围的测试:

    yarn coverage

    许可证

    AGPLv3

    Ethgoal Copyright (C) 2020 [Ramesh Nair](https://github.com/hiddentao)  This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.  You should have received a copy of the GNU Affero General Public License along with this program.  If not, see <https://www.gnu.org/licenses/>. 

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

    www.interchains.cc

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

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

    提供最优质的资源集合

    立即查看 了解详情