Skip to content

shark0der/blockchain-lab

Repository files navigation

Simple Ethereum Exploit Project

Presentation

Here: Smart contract hacking

Spin a local ethereum node

  1. Copy .env to .env.sample and fill up with your private/miner keys, miner address and RPC URL (see below).
  2. Run ERIGON_URL=http://127.0.0.1:8545 docker-compose up

Exposed endpoints:

  • RPC URL: http://127.0.0.1:8545
  • Otterscan: http://127.0.0.1:8080

Install deps

npm install

Compile the contracts

npx hardhat compile

Run exploits locally

npx hardhat test test/dice.js
npx hardhat test test/fixeddice.js

Deploy the contracts to the local ethereum node

node scripts/deploy.js

Run exploits on a forked network:

FORK=1 node scripts/fork.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published