Solidity-HW20 – 坚固性-HW20区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Solidity-HW20 – 坚固性-HW20区块链毕设代写 是一篇很好的国外资料

Solidity-HW20

Background

Your new startup has created its own Ethereum-compatible blockchain to help connect financial institutions, and the team wants to build smart contracts to automate some company finances to make everyone’s lives easier, increase transparency, and to make accounting and auditing practically automatic!

  • Level One is an AssociateProfitSplitter contract. This will accept Ether into the contract and divide the Ether evenly among the associate level employees. This will allow the Human Resources department to pay employees quickly and efficiently.

  • Level Two is a TieredProfitSplitter that will distribute different percentages of incoming Ether to employees at different tiers/levels. For example, the CEO gets paid 60%, CTO 25%, and Bob gets 15%.

  • Level Three is a DeferredEquityPlan that models traditional company stock plans. This contract will automatically manage 1000 shares with an annual distribution of 250 over 4 years for a single employee.

The following testnet addresses are used for reference in this document for the first 2 contracts

Owner
0xD7B48E19E4e00aD5A52332368723DF6D209054Cf

Employee_one (CEO)
0x679D67a351F4c2D0aD246a5171833a884c784feE

Employee_two (CTO)
0x012774570f8f08bB703931B0C00b0fC3d9cF8739

Employee_three (Bob)
0x884C1F4d397C50555E6819D4a46943859bC60d6B

1. Level One AssociateProfitSplitter contract

This will accept Ether into the contract and divide the Ether evenly among the associate level employees.

  • Balances before transaction
    Solidity-HW20 - 坚固性-HW20

  • Contract 1 creation

    Solidity-HW20 - 坚固性-HW20

  • Deposit 20 ETH evenly among 3 employees addresses using contract 1

    Solidity-HW20 - 坚固性-HW20

  • Balances after deposit

    Solidity-HW20 - 坚固性-HW20

  • Contract log in Ganache
    Solidity-HW20 - 坚固性-HW20

2. Level Two TieredProfitSplitter contract

This will distribute different percentages of incoming Ether to employees at different tiers/levels.

  • Balances before transaction
    Solidity-HW20 - 坚固性-HW20

  • Contract 2 creation

    Solidity-HW20 - 坚固性-HW20

  • Deposit 21 ETH using tiered points system usng contract 2
    21/100 = 0.21 The following increase in balance should be visible after deposit
    CEO = 0.21 * 60 = 12.6
    CTO = 0.21 * 25 = 5.25
    Bob = 0.21 * 15 = 3.15

    Solidity-HW20 - 坚固性-HW20

  • Balances after deposit

    Solidity-HW20 - 坚固性-HW20

3. Level Three DeferredEquityPlan

This contract will automatically manage 1000 shares with an annual distribution of 250 over 4 years for a single employee.

  • Contract 3 creation

    Solidity-HW20 - 坚固性-HW20

  • Distribute with start time as now gives a Gas exception error
    Solidity-HW20 - 坚固性-HW20

  • Fastforward to 100 days, the transaction will go ahead

    Solidity-HW20 - 坚固性-HW20

Deploy TieredProfitSplitter contract to a live Kovan Testnet

Point MetaMask to the Kovan network. Ensure you have test Ether on this network!

  • After switching MetaMask to Kovan, deploy the contracts as before and copy/keep a note of their deployed addresses.

    Solidity-HW20 - 坚固性-HW20

  • Run Deposit function in Kovan network for contract 2

    Solidity-HW20 - 坚固性-HW20

  • Etherscan log for deposit run. This will show that the deposits were made to 3 addresses from sender using contract# 2

    Solidity-HW20 - 坚固性-HW20


Solidity-HW20

Background

您的新初创公司已经创建了自己的以太坊eth兼容区块链blockchain,以帮助连接金融机构,团队希望构建智能合约,以自动化一些公司财务,使每个人的生活更轻松,增加透明度,并使会计和审计几乎自动化!

  • 一级是一个AssociateProfitSpliter合约。这将把乙醚纳入合同,并将乙醚平均分配给员工。这将使人力资源部能够快速有效地向员工支付薪酬。
  • 第二级是分层利润分配器,它将不同百分比的乙醚分配给不同层级/级别的员工。例如,首席执行官的工资为60%,首席技术官的工资为25%,鲍勃的工资为15%。
  • 第三级是一个延迟的计划,它模拟了传统的公司股票计划。该合同将自动管理1000股,在4年内为单个员工分配250股。

以下testnet地址在本文档中用于前两份合同的参考

所有者
0xD7B48E19E4e00aD5A52332368723DF6D209054Cf

员工一(CEO)
0x679D67A351F4C2D0AD246A513A884C784费用

员工二(CTO)
0x012774570F8F08BB703931B0C00FC3D9CF8739

员工三(Bob)
0x884c1f4d397c5055e6819d4a46943859bc60d6b

1. Level One AssociateProfitSplitter contract

这将接受合同中的乙醚,并将乙醚平均分配给员工。

  • 交易前余额
    Solidity-HW20 - 坚固性-HW20
  • 合同1创建Solidity-HW20 - 坚固性-HW20
  • 使用合同1Solidity-HW20 - 坚固性-HW20
  • 存款后余额Solidity-HW20 - 坚固性-HW20
  • 合同登录到Ganache
    Solidity-HW20 - 坚固性-HW20

2. Level Two TieredProfitSplitter contract

合同2创建

  • 交易前余额
    Solidity-HW20 - 坚固性-HW20
  • 合同2创建Solidity-HW20 - 坚固性-HW20
  • 使用分层积分系统usng合同2存款21 ETH
    21/100=0.21存款后余额增加应可见
    CEO=0.21*60=12.6
    CTO=0.21*25=5.25
    Bob=0.21*15=3.15存款后余额
  • 将MetaMask切换到Kovan后,像以前一样部署契约,并复制/记录其部署的地址。在合同2的Kovan网络中运行存款功能。这将显示押金是使用合同2从发送者处存入3个地址的Solidity-HW20 - 坚固性-HW20

3. Level Three DeferredEquityPlan

Solidity-HW20 - 坚固性-HW20

  • 分配开始时间,因为现在给出气体异常错误
    Solidity-HW20 - 坚固性-HW20

    快进到100天,事务将继续进行

  • Solidity-HW20 - 坚固性-HW20

  • 指向Kovan网络的点元掩码。确保此网络上有测试以太网!

    将MetaMask切换到Kovan后,像以前一样部署契约,并复制/记录它们部署的地址。在合同2的Kovan网络中运行存款功能。这将表明寄件人使用合同2向3个地址存款。一级合作伙伴合同。二级利润分成合同。三级延迟EquityPlan将TieredProfitSpliter合约部署到一个live Kovan Testnet

  • 一级是一个AssociateProfitSpliter合约。这将把乙醚纳入合同,并将乙醚平均分配给员工。这将使人力资源部能够快速有效地向员工支付薪酬。
  • 第二级是分层利润分配器,它将不同百分比的乙醚分配给不同层级/级别的员工。例如,首席执行官的工资为60%,首席技术官的工资为25%,鲍勃的工资为15%。
  • 第三级是一个延迟的计划,它模拟了传统的公司股票计划。该合同将自动管理1000股,在4年内为单个员工分配250股。
  • 交易前余额
    Solidity-HW20 - 坚固性-HW20
  • 合同1创建Solidity-HW20 - 坚固性-HW20
  • 使用合同1Solidity-HW20 - 坚固性-HW20
  • 存款后余额Solidity-HW20 - 坚固性-HW20
  • 合同登录到Ganache
    Solidity-HW20 - 坚固性-HW20
  • 交易前余额
    Solidity-HW20 - 坚固性-HW20
  • 合同2创建Solidity-HW20 - 坚固性-HW20
  • 使用分层积分系统usng合同2存款21 ETH
    21/100=0.21存款后余额增加应可见
    CEO=0.21*60=12.6
    CTO=0.21*25=5.25
    Bob=0.21*15=3.15存款后余额
  • 将MetaMask切换到Kovan后,像以前一样部署契约,并复制/记录其部署的地址。在合同2的Kovan网络中运行存款功能。这将显示押金是使用合同2从发送者处存入3个地址的Solidity-HW20 - 坚固性-HW20

Deploy TieredProfitSplitter contract to a live Kovan Testnet

Point MetaMask to the Kovan network. Ensure you have test Ether on this network!

  • After switching MetaMask to Kovan, deploy the contracts as before and copy/keep a note of their deployed addresses.

    Solidity-HW20 - 坚固性-HW20

  • Run Deposit function in Kovan network for contract 2

    Solidity-HW20 - 坚固性-HW20

  • Etherscan log for deposit run. This will show that the deposits were made to 3 addresses from sender using contract# 2

    Solidity-HW20 - 坚固性-HW20

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情