SoliditySmartContracts – SoliditySmartContracts公司区块链毕设代写

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

SoliditySmartContracts

Associate ProfitSplitter

SoliditySmartContracts - SoliditySmartContracts公司

This contract 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.

Before deploying the contract make sure your MetamMask is connected and pointed to localhost:8545.

To deploy a contract using Remix IDE to your local Ganache chain by connecting to Injected Web3 and ensuring MetaMask is pointed to localhost:8545.

You will need to fill in the constructor parameters with your designated employee addresses. Test the deposit function by sending various values.

SoliditySmartContracts - SoliditySmartContracts公司

SoliditySmartContracts - SoliditySmartContracts公司

Keep an eye on the employee balances as you send different amounts of Ether to the contract and ensure the logic is executing properly.

SoliditySmartContracts - SoliditySmartContracts公司

TieredProfitSplitter

In this contract, rather than splitting the profits evenly between Associate-level employees, you will calculate different percentages for different tiers of employees (CEO 60%, CTO 25%, and Associate 15%). This contract also sends the remainder amount to the employee with the highest percentage, which in this case is the CEO.

Screen Shot 2021-05-16 at 10.09.54 PMSoliditySmartContracts - SoliditySmartContracts公司

DeferredEquityPlan

In this contract, we will be managing an employee’s “deferred equity incentive plan” in which 1000 shares will be distributed over 4 years to the employee. We won’t need to work with Ether in this contract, but we will be storing and setting amounts that represent the number of distributed shares the employee owns and enforcing the vetting periods automatically.

SoliditySmartContracts - SoliditySmartContracts公司

For this contract we use a timelock functionality by adding a new variable called uint fakenow = now; as the first line of the contract, and then replacing every other instance of now with fakenow. The timelock functionality locks the contract until a specific amount of time has passed, in this contract we are locking the shares of employees for as long as they are vested in the company.


SoliditySmartContracts

Associate ProfitSplitter

SoliditySmartContracts - SoliditySmartContracts公司

This contract 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.

Before deploying the contract make sure your MetamMask is connected and pointed to localhost:8545.

To deploy a contract using Remix IDE to your local Ganache chain by connecting to Injected Web3 and ensuring MetaMask is pointed to localhost:8545.

You will need to fill in the constructor parameters with your designated employee addresses. Test the deposit function by sending various values.

SoliditySmartContracts - SoliditySmartContracts公司

SoliditySmartContracts - SoliditySmartContracts公司

Keep an eye on the employee balances as you send different amounts of Ether to the contract and ensure the logic is executing properly.

SoliditySmartContracts - SoliditySmartContracts公司

TieredProfitSplitter

In this contract, rather than splitting the profits evenly between Associate-level employees, you will calculate different percentages for different tiers of employees (CEO 60%, CTO 25%, and Associate 15%). This contract also sends the remainder amount to the employee with the highest percentage, which in this case is the CEO.

Screen Shot 2021-05-16 at 10.09.54 PM SoliditySmartContracts - SoliditySmartContracts公司

DeferredEquityPlan

In this contract, we will be managing an employee’s “deferred equity incentive plan” in which 1000 shares will be distributed over 4 years to the employee. We won’t need to work with Ether in this contract, but we will be storing and setting amounts that represent the number of distributed shares the employee owns and enforcing the vetting periods automatically.

SoliditySmartContracts - SoliditySmartContracts公司

For this contract we use a timelock functionality by adding a new variable called uint fakenow = now; as the first line of the contract, and then replacing every other instance of now with fakenow. The timelock functionality locks the contract until a specific amount of time has passed, in this contract we are locking the shares of employees for as long as they are vested in the company.

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情