Skip to content

Instantly share code, notes, and snippets.

@0age
0age / c000r.sol
Last active June 10, 2024 18:32
0xMonaco car (top-ranked finisher by ELO, Paradigm CTF 2022) https://0xmonaco.ctf.paradigm.xyz/viewTeam/OpenSea
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16; // (10M optimization runs)
interface MonacoInterface {
struct CarData {
uint32 balance; // Where 0 means the car has no money.
uint32 speed; // Where 0 means the car isn't moving.
uint32 y; // Where 0 means the car hasn't moved.
Car car;
}
@0age
0age / Seaport.json
Last active February 18, 2024 05:18
Seaport 1.4 ABI
[
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "offerer",
"type": "address"
},
@0age
0age / Seaport_Flattened_Condensed.sol
Last active May 16, 2023 16:39
Seaport version 1.5 (flattened and whitespace-reduced)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
// Seaport version 1.5 (flattened and whitespace-reduced)
// compiled with viaIR: true, optimizer enabled with runs: 4_294_967_295, metadata bytecodeHash: none
// Deployed via cross-chain immutable create2 factory to 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC
enum OrderType {/* 0: no partial fills, anyone can execute */ FULL_OPEN, /* 1: partial fills supported, anyone can execute */ PARTIAL_OPEN, /* 2: no partial fills, only offerer or zone can execute */ FULL_RESTRICTED, /* 3: partial fills supported, only offerer or zone can execute */ PARTIAL_RESTRICTED, /* 4: contract order type */ CONTRACT}
enum BasicOrderType {/* 0: no partial fills, anyone can execute */ ETH_TO_ERC721_FULL_OPEN, /* 1: partial fills supported, anyone can execute */ ETH_TO_ERC721_PARTIAL_OPEN, /* 2: no partial fills, only offerer or zone can execute */ ETH_TO_ERC721_FULL_RESTRICTED, /* 3: partial fills supported, only offerer or zone can execute */ ETH_TO_ERC721_PARTIAL_RESTRICTE
@0age
0age / Seaport_Flattened.sol
Created May 16, 2023 16:38
Seaport version 1.5 (flattened)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
enum OrderType {
// 0: no partial fills, anyone can execute
FULL_OPEN,
// 1: partial fills supported, anyone can execute
PARTIAL_OPEN,
@0age
0age / SeaportNavigatorABI.json
Created June 21, 2023 14:23
ABIs for SeaportNavigator & SeaportValidator contracts
[
{
"inputs": [],
"name": "CannotDeriveProofForSingleTokenId",
"type": "error"
},
{
"inputs": [],
"name": "CannotDeriveRootForSingleTokenId",
"type": "error"
@0age
0age / deprecate_wyvern_user_proxy.sh
Created July 24, 2023 15:39
shell script to examine and deprecate a Wyvern user proxy via `cast`
##### SUMMARY #####
#
# to brick a user proxy, you can upgrade to this contract then call the proxy:
# https://etherscan.io/address/0x00000000008fe2c0c1795fe9a8e2c1d3f913b35d#code
#
# Step 1: find the proxy for the account
# proxy registry: 0xa5409ec958C83C3f309868babACA7c86DCB077c1
# call: proxies(address) where address = user's account
#
# Step 2: upgrade the proxy and call it to renounce ownership