- https://github.com/flashbots/mev-boost-relay (extensive documentation in the README)
- https://flashbots.notion.site/Running-mev-boost-relay-at-scale-draft-4040ccd5186c425d9a860cbb29bbfe09
pragma solidity >=0.8.0; | |
import "forge-std/Test.sol"; | |
import "forge-std/console2.sol"; | |
contract ContractA { | |
function destroy() public { | |
selfdestruct(payable(0)); | |
} |
// @author original POC by @z0age | |
library pureConsole { | |
/********************* | |
* string + uint256 | |
********************/ | |
function log(string memory errorMessage, uint256 value) internal pure { |
Do you write smart contracts? Want them to be safe and efficient? Read on!
The state of smart contract languages could historically be categorized as lacking constructs that drive programmers to write safe code and being inefficient due to poor optimizations. Oftentimes, programmers write lower level code riddled with footguns in pursuit of gas savings. What if safety and efficiency weren’t at odds?
Here’s how we can eliminate an entire class of bugs without spending an exorbitant amount of gas on safety checks thanks to EIP-1153!
For example, take the following smart contract (Figure 1) which exhibits “read-only reentrancy”. Currently, nothing prevents the following call sequence from succeeding despite there being ambiguity about what value will be returned by DataRace.price during call sequence, X.
Callstack [DataRace.withdraw, msg.sender, X, token.transfer]
Find the full article at https://mirror.xyz/coa.eth/mvPbLPXvy375CXi1_XwMTzG84lwlSKYUBHDx_R1TIgU, which includes some additional context, descriptions of symptoms, etc.
This write-up goes through some brief details on vrs signatures, what makes signature validation fail on some web apps when signing using a Ledger device connected through MetaMask extension, followed by what to do about it.
- "I'm in hurry and just want things to work."
- "Reasonable. Scroll down some for the fix. It's just four rows of JS + comments."
Compile solc
locally after applying the below patch (solc.patch
).Build instructions.
./solc example.sol --model-checker-engine bmc
Call to check. Solver state:
(declare-datatypes ((bytes_tuple 0)) (((bytes_tuple (bytes_tuple_accessor_array (Array Int Int)) (bytes_tuple_accessor_length Int)))))
(declare-datatypes ((tx_type 0)) (((tx_type (block.basefee Int) (block.chainid Int) (block.coinbase Int) (block.difficulty Int) (block.gaslimit Int) (block.number Int) (block.timestamp Int) (blockhash (Array Int Int)) (msg.data bytes_tuple) (msg.sender Int) (msg.sig Int) (msg.value Int) (tx.gasprice Int) (tx.origin Int)))))
#!/bin/bash | |
echo "Searching for node_modules directories..." | |
find . -type d -name "node_modules" -prune -exec echo "Removing {}" \; -exec rm -rf {} \; | |
echo "All node_modules directories have been removed." |
#!/bin/bash | |
alias c='code .' | |
alias cdh='cd $HOME' | |
alias ls='ls -la' | |
alias sl="ls" | |
alias cls='clear' | |
alias g='git status' | |
alias gap='git add -p' | |
alias gl='git log' |
pragma solidity >=0.8.17; | |
// Cursed ERC20 that does everything in events. | |
// by @danielvf, based solmate by @transmissions11 | |
abstract contract ERC20 { | |
event Transfer(address indexed from, address indexed to, uint256 amount); | |
event Approval(address indexed owner, address indexed spender, uint256 amount); | |
string public name; |