Skip to content

Instantly share code, notes, and snippets.

View JustDravee's full-sized avatar

Dravee JustDravee

View GitHub Profile
@devtooligan
devtooligan / pureConsole.sol
Last active January 21, 2024 14:25
console.log from pure functions h/t @z0age
// @author original POC by @z0age
library pureConsole {
/*********************
* string + uint256
********************/
function log(string memory errorMessage, uint256 value) internal pure {
@owenThurm
owenThurm / GasGrief.sol
Created January 24, 2023 03:41
63/64 Gas Exploit Scenario
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.17;
interface ICallback {
function beforeExecution() external;
}
/** Exploit Desc: **/
// The GasGriefer is used as a `callbackContract` on a swapOrder
@cwhinfrey
cwhinfrey / bridge_hacks.md
Last active July 16, 2024 21:42
Bridge Hack List

Setup

Install virtualenv

sudo apt install virtualenv

Install virtualenvwrapper

@spalladino
spalladino / falsehoods-that-ethereum-programmers-believe.md
Last active May 20, 2024 21:04
Falsehoods that Ethereum programmers believe

Falsehoods that Ethereum programmers believe

I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.

About Gas

Calling estimateGas will return the gas required by my transaction

Calling estimateGas will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i