Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.8.0;
contract VerifySignature {
function verifySignedMessage(string memory _originalMessage, bytes memory _signature) public pure returns (address) {
bytes memory prefix = "\x19Ethereum Signed Message:\n";
bytes memory messageLength = bytes(uintToString(bytes(_originalMessage).length));
bytes memory prefixedMessage = abi.encodePacked(prefix, messageLength, _originalMessage);
bytes32 messageHash = keccak256(prefixedMessage);
0x6020615fb86000396000516040602082615fb80160003960005111615fb357602081615fb80160003960005180604052602082018181615fb8016060395050506020615fd86000396000516020602082615fb80160003960005111615fb357602081615fb8016000396000518060a05260208201602081615fb80160003960005160c0525050506020615ff86000396000518060a01c615fb35760e05260206160186000396000518060a01c615fb3576101005260206160386000396000518060a01c615fb3576101205260206160586000396000518060a01c615fb3576101405260206160786000396000518060a01c615fb3576101605234615fb35761016051615c955261014051615cb5523360055560405180615cd552600081601f0160051c60028111615fb357801561015157905b8060051b606001518160051b606001615c950152600101818118610132575b50505060a05180615d355260c051615d55525060e051600255610100516003556101205160045560206160b860003960005160015560206160d8600039600051600a5560206160d8600039600051600c55602061611860003960005160155560206160f860003960005160175560206161386000396000516006556020616138600039600051600755602061613860003960005160085542600955670de0b6b3a7640000601355615cd5518061
0x6020615fb86000396000516040602082615fb80160003960005111615fb357602081615fb80160003960005180604052602082018181615fb8016060395050506020615fd86000396000516020602082615fb80160003960005111615fb357602081615fb8016000396000518060a05260208201602081615fb80160003960005160c0525050506020615ff86000396000518060a01c615fb35760e05260206160186000396000518060a01c615fb3576101005260206160386000396000518060a01c615fb3576101205260206160586000396000518060a01c615fb3576101405260206160786000396000518060a01c615fb3576101605234615fb35761016051615c955261014051615cb5523360055560405180615cd552600081601f0160051c60028111615fb357801561015157905b8060051b606001518160051b606001615c950152600101818118610132575b50505060a05180615d355260c051615d55525060e051600255610100516003556101205160045560206160b860003960005160015560206160d8600039600051600a5560206160d8600039600051600c55602061611860003960005160155560206160f860003960005160175560206161386000396000516006556020616138600039600051600755602061613860003960005160085542600955670de0b6b3a7640000601355615cd5518061
# @version ^0.3.7
# (c) Curve.Fi, 2023
"""
@title CurveTricryptoOptimizedWETH
@license MIT
@author Curve.Fi
@notice A Curve AMM pool for 3 unpegged assets (e.g. ETH, BTC, USD).
@dev All prices in the AMM are with respect to the first token in the pool.
"""
@Enigmatic331
Enigmatic331 / dump.txt
Created December 12, 2022 13:54
Txhash: 0xf967cb7f4828adc4340a8c2d1f6c44b087c492ae80adfbd9f4941a04236b789d
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"calls": [
{
"from": "0xe78e7447223aaed59301b44513d1d3a892ecf212",
"gas": "0x7858bc",
"gasUsed": "0x1ab5",
"input": "0xbecbcc6a0000000000000000000000005183e1b1091804bc2602586919e6880ac1cf2896000000000000000000000000b12bfca5a55806aaf64e99521918a4bf0fc408020000000000000000000000000000000000000000000000000000000000000190",
{
"language": "Solidity",
"settings": {
"optimizer": {
"enabled": false
},
"metadata": {
"bytecodeHash": "none"
},
"outputSelection": {
pragma solidity ^0.6.0;
contract shortContract2 {
int256 constant public INT256_MIN = int256(uint256(1) << 255);
int256 constant public INT256_MAX = int256(~(uint256(1) << 255));
uint256 constant public UINT256_MIN = 0;
uint256 constant public UINT256_MAX = ~uint256(0);
}
@Enigmatic331
Enigmatic331 / BytecodeAtAddress
Created October 25, 2019 03:30
ENS.lll bytecode (At address vs compiled output)
3360206000015561021a806100146000396000f3630178b8bf60e060020a600035041415610020576004355460405260206040f35b6302571be360e060020a600035041415610044576020600435015460405260206040f35b6316a25cbd60e060020a600035041415610068576040600435015460405260206040f35b635b0fc9c360e060020a6000350414156100b557602060043501543314151561008f576002565b6024356020600435015560243560405260043560198061020160003960002060206040a2005b6306ab592360e060020a6000350414156101135760206004350154331415156100dc576002565b6044356020600435600052602435602052604060002001556044356040526024356004356021806101e060003960002060206040a3005b631896f70a60e060020a60003504141561015d57602060043501543314151561013a576002565b60243560043555602435604052600435601c806101c460003960002060206040a2005b6314ab903860e060020a6000350414156101aa576020600435015433141515610184576002565b602435604060043501556024356040526004356016806101ae60003960002060206040a2005b6002564e657754544c28627974657333322c75696e743634294e65775265736f6c76657228627974657333322c61646472657373294e65774f776e657228627974
@Enigmatic331
Enigmatic331 / BytecodeAtAddress
Created October 23, 2019 03:41
FundFactory Bytecode (solc v0.4.25, Optimizer True, Runs 200)
608060405260043610620001c15763ffffffff60e060020a60003504166304478c318114620001c65780630a726fe514620001d25780630c1eef4a146200020f578063116c719f146200021957806313af40351462000240578063149e685a14620002655780631f2d1531146200029957806320531bc914620002a357806328e68ebe14620002bb5780632b34963c14620002e25780632bd90a5914620002fa57806332e143d614620003125780633f825ed8146200035157806342e2f54c146200035b57806354fd4d5014620003805780635967d7e814620003985780635d12928b14620003b05780636b44e6be14620003ba5780637a3f5c8714620003df5780637a9e5e4b14620004135780637b10399914620004385780637b8e8895146200045057806386ecdc4f14620004755780638a471df9146200047f5780638aea8f7114620004975780638da5cb5b14620004a1578063ab5abd5f14620004b9578063b6c3ddf014620004de578063bf7e214f1462000503578063c9d4623f146200051b578063d6ee80a91462000533578063d8a06f731462000568578063e8b822db1462000580578063ebd0d0c71462000598578063f778c10514620005a2575b600080fd5b620001d0620005ba565b005b348015620001df57600080fd5b50620001f7620001f136600462002936565b62000abf565b6040516200020691
@Enigmatic331
Enigmatic331 / bytecode.bin
Created October 22, 2019 03:49
Runtime bytecode for compiled FundFactory.sol (VSCode, Remix, and solc) - v0.4.25, Optimizer with 200 Runs.
608060405260043610620001855763ffffffff60e060020a60003504166304478c3181146200018a5780630a726fe514620001965780630c1eef4a14620001d3578063116c719f14620001dd578063149e685a14620002045780631f2d1531146200023857806320531bc9146200024257806328e68ebe146200025a5780632b34963c14620002815780632bd90a59146200029957806332e143d614620002b15780633f825ed814620002f057806354fd4d5014620002fa5780635967d7e814620003125780635d12928b146200032a5780636b44e6be14620003345780637a3f5c8714620003595780637b103999146200038d5780637b8e889514620003a557806386ecdc4f14620003ca5780638a471df914620003d45780638aea8f7114620003ec578063ab5abd5f14620003f6578063b6c3ddf0146200041b578063c9d4623f1462000440578063d6ee80a91462000458578063d8a06f73146200048d578063e8b822db14620004a5578063ebd0d0c714620004bd578063f778c10514620004c7575b600080fd5b62000194620004df565b005b348015620001a357600080fd5b50620001bb620001b53660046200254c565b620009e4565b604051620001ca919062002eb6565b60405180910390f35b62000194620009f9565b348015620001ea57600080fd5b50620001f562000b86565b604051620001ca919062