Skip to content

Instantly share code, notes, and snippets.

View pradyuman-verma's full-sized avatar
❄️
Living in Web3

prady pradyuman-verma

❄️
Living in Web3
View GitHub Profile
@pradyuman-verma
pradyuman-verma / evm-puzzle.yul
Last active April 13, 2023 10:27
evm-puzzle-007: RULES - 1. The puzzle has more than one solution | 2. All the values should be non zero | 3. You need to hack it such a way it satisfies every calldata passed.
GASPRICE
CALLDATASIZE
CALLVALUE
PUSH2 0x3E8
PUSH0
CALLDATALOAD
PUSH1 0xf4
SHR
MUL
PUSH0
// SPDX-License-Identifier: WTFPL
pragma solidity ^0.8.0;
// Simple order-based exchange for selling ERC20 tokens in exchange for ETH. Orders are stored off-chain and signed by the sellers.
// Buyers submit the order to execute to the contract, along with the seller's signature and the ETH to purchase the tokens.
// Orders can be EXACT or PARTIAL. Exact orders need to be fulfilled in a single operation, whereas partial orders can be fulfilled in multiple purchases from multiple buyers.
// Orders can also optionally define a referrer address, who will receive 1% of the value in ETH of the purchase. Can be used to reward the app that stores the orders off-chain.
// Does not allocate a fee if set to the zero address.
// ==========================