ssec-swc-112-delegatecall | Solidity | Security | SWC-112 | Delegatecall to Untrusted Callee – ssec-swc-112-delegatecall |坚固性|安全性| swc-112 |向不受信任的被叫方委派呼叫区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,ssec-swc-112-delegatecall | Solidity | Security | SWC-112 | Delegatecall to Untrusted Callee – ssec-swc-112-delegatecall |坚固性|安全性| swc-112 |向不受信任的被叫方委派呼叫区块链毕设代写 是一篇很好的国外资料

ssec-swc-112-delegatecall | Solidity | Security | SWC-112 | Delegatecall to Untrusted Callee


Reference

  • HackPedia: 16 Solidity Hacks/Vulnerabilities, their Fixes and Real World Examples | by vasa | HackerNoon.com | Medium

  • SWC-112 · Overview

  • sigp/solidity-security-blog: Comprehensive list of known attack vectors and common anti-patterns

  • contract design – Difference between CALL, CALLCODE and DELEGATECALL – Ethereum Stack Exchange

  • Introduction to Smart Contracts — Solidity 0.7.2 documentation

  • How to Secure Your Smart Contracts: 6 Solidity Vulnerabilities and how to avoid them (Part 1) | by Georgios Konstantopoulos | Loom Network | Medium

  • Calling functions of other contracts on Solidity | by Graphicaldot (Saurav verma) | Aug, 2020 | Medium

  • All you should know about libraries in solidity | by Sarvesh Jain | Coinmonks | Medium

  • blockchain – What is the difference between an internal/external and public/private function in solidity? – Stack Overflow

  • Unable to link libraries with Buidler (and other issues with Waffle) · Issue #611 · nomiclabs/buidler


Example-1 :: Fibonacci

Howto Install & build

git clone https://github.com/shamb0/ssec-swc-112-delegatecall.git cd ssec-swc-112-delegatecall yarn install yarn build

Fibonacci ( Vulnarable One )

master $ env DEBUG="info*,debug*,error*" yarn run test ./test/FibonacciBalance.spec.ts yarn run v1.22.4 $ yarn run test:contracts ./test/FibonacciBalance.spec.ts $ cross-env SOLPP_FLAGS="FLAG_IS_TEST,FLAG_IS_DEBUG" buidler test --show-stack-traces ./test/FibonacciBalance.spec.ts $(process.argv.length) All contracts have already been compiled, skipping compilation.     EtherGame Attack Test   info:FibonacciBalance-Test Admin :: 0x17ec8597ff92C3F44523bDc65BF0f1bE632917ff +0ms   info:FibonacciBalance-Test Usr1 :: 0x63FC2aD3d021a4D7e64323529a55a9442C444dA0 +1ms   info:FibonacciBalance-Test Usr2 :: 0xD1D84F0e28D6fedF03c73151f98dF95139700aa7 +0ms   info:FibonacciBalance-Test Usr3 :: 0xd59ca627Af68D29C547B91066297a7c469a7bF72 +0ms   debug:FibonacciBalance-Test Network Gas price @ 8000000000 +0ms   debug:FibonacciBalance-Test S1-Ent wallet bal :: 10.0 +5ms   debug:FibonacciBalance-Test fibonaccilib @ 0xA193E42526F1FEA8C99AF609dcEabf30C1c29fAA +45ms   debug:FibonacciBalance-Test FibonacciLib balance :: 0.0 +3ms   debug:FibonacciBalance-Test S1-Ext wallet bal :: 9.99838772 +2ms   debug:FibonacciBalance-Test S2-Ent wallet bal :: 9.99838772 +3ms   debug:FibonacciBalance-Test Fibbobalance @ 0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34 +31ms   debug:FibonacciBalance-Test Fibbobalance balance :: 2.0 +0ms   debug:FibonacciBalance-Test S2-Ext wallet bal :: 7.99763407 +3ms   debug:FibonacciBalance-Test withdraw +0ms   error:FibonacciBalance-Test Exception Err Error: VM Exception while processing transaction: revert Err@FibboBal::withdraw failed in Delegatecall-1 +0ms     ✓ tst-item-001-withdraw-test   debug:FibonacciBalance-Test FibboLib balance :: 0.0 +30ms   debug:FibonacciBalance-Test FibboBal balance :: 2.0 +2ms   debug:FibonacciBalance-Test S4-Ext wallet bal :: 7.99763407 +3ms   debug:FibonacciBalance-Test FibboLib balance :: 0.0 +87ms   debug:FibonacciBalance-Test FibboBal balance :: 0.0 +3ms   debug:FibonacciBalance-Test S5-Ext wallet bal :: 9.997228326 +2ms     1 passing (414ms)  Done in 7.84s.

WK2040 linked Library example


ssec-swc-112-delegatecall | Solidity |安全性| swc-112 | delegatecall到不受信任的被调用方


引用

  • HackPedia:16个Solidity黑客/漏洞,他们的修复和现实世界的例子HackerNoon.com网站|Medium
  • SWC-112.概述,CALLCODE and DELEGATECALL-以太坊eth堆栈交换
  • 智能合约简介-Solidity 0.7.2文档Solidity | Graphicaldot(Saurav verma)| 2020年8月| Medium
  • 关于Solidity中的库的所有您应该知道的信息| Sarvesh Jain | Coinmonks | Medium
  • 区块链blockchain-内部/外部和公共/私人功能在Solidity中的区别是什么?-堆栈溢出
  • 无法将库与Buidler链接(以及其他Waffle问题)·问题#611·nomiclabs/Buidler
  • 区块链blockchain-内部/外部和公共/私有功能之间的区别是什么?-堆栈溢出

  • 无法将库与Buidler链接(以及其他Waffle问题)·问题#611·nomiclabs/Buidler

  • 如何安装和构建

  • Unable to link libraries with Buidler (and other issues with Waffle) · Issue #611 · nomiclabs/buidler


示例1::Fibonacci

Howto Install & build

git clone https://github.com/shamb0/ssec-swc-112-delegatecall.git cd ssec-swc-112-delegatecall yarn install yarn build

Fibonacci(Vulnarable One)

master $ env DEBUG="info*,debug*,error*" yarn run test ./test/FibonacciBalance.spec.ts yarn run v1.22.4 $ yarn run test:contracts ./test/FibonacciBalance.spec.ts $ cross-env SOLPP_FLAGS="FLAG_IS_TEST,FLAG_IS_DEBUG" buidler test --show-stack-traces ./test/FibonacciBalance.spec.ts $(process.argv.length) All contracts have already been compiled, skipping compilation.     EtherGame Attack Test   info:FibonacciBalance-Test Admin :: 0x17ec8597ff92C3F44523bDc65BF0f1bE632917ff +0ms   info:FibonacciBalance-Test Usr1 :: 0x63FC2aD3d021a4D7e64323529a55a9442C444dA0 +1ms   info:FibonacciBalance-Test Usr2 :: 0xD1D84F0e28D6fedF03c73151f98dF95139700aa7 +0ms   info:FibonacciBalance-Test Usr3 :: 0xd59ca627Af68D29C547B91066297a7c469a7bF72 +0ms   debug:FibonacciBalance-Test Network Gas price @ 8000000000 +0ms   debug:FibonacciBalance-Test S1-Ent wallet bal :: 10.0 +5ms   debug:FibonacciBalance-Test fibonaccilib @ 0xA193E42526F1FEA8C99AF609dcEabf30C1c29fAA +45ms   debug:FibonacciBalance-Test FibonacciLib balance :: 0.0 +3ms   debug:FibonacciBalance-Test S1-Ext wallet bal :: 9.99838772 +2ms   debug:FibonacciBalance-Test S2-Ent wallet bal :: 9.99838772 +3ms   debug:FibonacciBalance-Test Fibbobalance @ 0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34 +31ms   debug:FibonacciBalance-Test Fibbobalance balance :: 2.0 +0ms   debug:FibonacciBalance-Test S2-Ext wallet bal :: 7.99763407 +3ms   debug:FibonacciBalance-Test withdraw +0ms   error:FibonacciBalance-Test Exception Err Error: VM Exception while processing transaction: revert Err@FibboBal::withdraw failed in Delegatecall-1 +0ms     ✓ tst-item-001-withdraw-test   debug:FibonacciBalance-Test FibboLib balance :: 0.0 +30ms   debug:FibonacciBalance-Test FibboBal balance :: 2.0 +2ms   debug:FibonacciBalance-Test S4-Ext wallet bal :: 7.99763407 +3ms   debug:FibonacciBalance-Test FibboLib balance :: 0.0 +87ms   debug:FibonacciBalance-Test FibboBal balance :: 0.0 +3ms   debug:FibonacciBalance-Test S5-Ext wallet bal :: 9.997228326 +2ms     1 passing (414ms)  Done in 7.84s.

WK2040 linked Library example

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

www.interchains.cc

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

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » ssec-swc-112-delegatecall | Solidity | Security | SWC-112 | Delegatecall to Untrusted Callee – ssec-swc-112-delegatecall |坚固性|安全性| swc-112 |向不受信任的被叫方委派呼叫区块链毕设代写

提供最优质的资源集合

立即查看 了解详情