Vulnerable code example including tests for Constantinople Reentrancy
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contracts Adding drain function so attacker can get ETH Jan 15, 2019
migrations Initial Commit Jan 15, 2019
test Using drain function in test Jan 15, 2019
.gitattributes Adding .gitattributes for code highlighting Jan 15, 2019
README.md Changes: Jan 15, 2019
package.json Changes: Jan 15, 2019
truffle.js Initial Commit Jan 15, 2019

README.md

Demonstration of new Constantinople Reentrancy

Install

  • Install dependencies: npm i
  • Install ganache@beta: npm i -g ganache-cli@beta (at least ganache-cli@6.3.0-beta.0)

To test the attack

  • Run ganache: ganache-cli --hardfork=constantinople
  • Run tests: truffle test

To compare with the current state in byzantium

  • Run ganache: ganache-cli --hardfork=byzantium
  • Run (failing) tests: truffle test

Contact

In case of questions or comments, please contact contact@chainsecurity.com