This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "address", | |
"name": "offerer", | |
"type": "address" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.5.8; | |
/** | |
* @title Metamorphic Delegator Factory | |
* @author 0age | |
* @notice This contract creates metamorphic contracts, or contracts that can be | |
* redeployed with new code to the same address. First, it deploys a contract | |
* with the initialization code of the contract you want to deploy stored in its | |
* RUNTIME code. Then, it deploys the contract, which retrieves the address of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var Decimal = require('decimal.js') // $ yarn add decimal.js | |
// pulling out the big guns (maybe a tad excessive...) | |
Decimal.config( | |
{ | |
precision: 500, | |
toExpNeg: -500 | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* @title Metamorphic Contract | |
* @author 0age, derived from cloner contract by @mhswende | |
* @notice This contract will create a metamorphic contract, or an upgradeable | |
* contract that does not rely on a transparent proxy, when deployed using | |
* CREATE2. It expects the deployer to provide a getImplementation() function | |
* that will return an implementation address, which it will then clone and | |
* deploy. Unlike with upgradeable transparent proxies, the state of a | |
* metamorphic contract will be wiped clean with each upgrade. With great power | |
* comes great responsibility - implement appropriate controls and educate the | |
* users of your contract if it will be interacted with! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Web3 = require('web3'); | |
const fs = require('fs'); | |
process.chdir(__dirname); | |
const PROPOSAL_ID = 2; | |
const QUORUM = 40_000_000; | |
// Be sure to use a provider that can retrieve all required events. | |
const web3Provider = `https://eth-mainnet.alchemyapi.io/jsonrpc/${process.env.WEB3_API_KEY}`; | |
const web3 = new Web3(web3Provider); |
NewerOlder