Pattern samples in Solidity. – 在坚实的样品模式。区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Pattern samples in Solidity. – 在坚实的样品模式。区块链毕设代写 是一篇很好的国外资料

Pattern samples in Solidity.

List of Patterns

  • Security Category
    • Balance Limit
    • Check effects interaction

Balance Limit ↑

Problem: In the case of security bug discover by hackers, all contract funds can be lost.

Solution Set a contract balance limit at risk that allows the threshold of amount to manage and validate operations that cannot exceed a predetermined limit.

Check Effects Inter Action ↑

Problem In the case contracts can call other contracts to execute their functions (external calls). This feature is the baseline for reentrancy1 attack exploitation.

To avoid reentrancy To avoid reentrancy attacks, every time external calls are needed. Firstly, the caller contract makes validations (checks), secondly makes all necessary internal state changes (effects) and finally makes the external call (interaction).

Related patterns Mutex, Secure ether transfer, Pull payment.

Examples:

  • Balance Limit
  • Check effects interaction

Pattern samples in Solidity.

List of Patterns

  • Security Category
    • Balance Limit
    • Check effects interaction

Balance Limit ↑

Problem: In the case of security bug discover by hackers, all contract funds can be lost.

Solution Set a contract balance limit at risk that allows the threshold of amount to manage and validate operations that cannot exceed a predetermined limit.

Check Effects Inter Action ↑

Problem In the case contracts can call other contracts to execute their functions (external calls). This feature is the baseline for reentrancy1 attack exploitation.

To avoid reentrancy To avoid reentrancy attacks, every time external calls are needed. Firstly, the caller contract makes validations (checks), secondly makes all necessary internal state changes (effects) and finally makes the external call (interaction).

Related patterns Mutex, Secure ether transfer, Pull payment.

Examples:

  • Balance Limit
  • Check effects interaction

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情