- arbitrum nova 0x1c5771e96C9d5524fb6e606f5B356d08C40Eb194
- arbitrum 0xA7caC4207579A179c1069435d032ee0F9F150e5c
- avax 0xbACEB8eC6b9355Dfc0269C18bac9d6E2Bdc29C4F
- boba 0x2f686751b19a9d91cc3d57d90150bc767f050066
- bsc 0xD75F5369724b513b497101fb15211160c1d96550
- ethereum 0x044b75f554b886A065b9567891e45c79542d7357
- fantom 0x3e603C14aF37EBdaD31709C4f848Fc6aD5BEc715
- fuse 0x2f686751b19a9d91cc3d57d90150Bc767f050066
- gnosis 0x145d82bCa93cCa2AE057D1c6f26245d1b9522E6F
- moonbeam 0x1838b053E0223F05FB768fa79aA07Df3f0f27480
This file contains hidden or 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.19; | |
| import { Script } from "forge-std/Script.sol"; | |
| abstract contract BaseScript is Script { | |
| /// @dev Included to enable compilation of the script without a $MNEMONIC environment variable. | |
| string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk"; | |
| /// @dev Needed for the deterministic deployments. |
This file contains hidden or 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; | |
| import "./../interfaces/ICar.sol"; | |
| import "./../utils/SignedWadMath.sol"; | |
| import "solmate/utils/SafeCastLib.sol"; | |
| import "forge-std/Test.sol"; | |
| /* |
Translate EVM bytecode into opcodes using pure Regex :)
Demo: https://twitter.com/0x796/status/1608039943582142464
Try here: https://regex101.com/
Use PCRE2 (Perl compatible) Regex flavor.
Search:
This file contains hidden or 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
| ########### | |
| # Imports # | |
| ########### | |
| # the RPCs file should include RPC URLs and Etherscan API Keys for relevant networks | |
| # (in a separate file so they don't get committed) | |
| source "$(dirname "$0")/rpcs.sh" | |
| # any useful addresses for various networks for easy reference | |
| source "$(dirname "$0")/addresses.sh" | |
| # any useful functions and definitions for interacting with Seaport |
This file contains hidden or 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
| object "Contract" { | |
| code { | |
| datacopy(0, dataoffset("runtime"), datasize("runtime")) | |
| return(0, datasize("runtime")) | |
| } | |
| object "runtime" { | |
| code { | |
| if iszero(calledByOwner()) { revert(0, 0) } | |
| switch selector() | |
| case 0x00 { |
This file contains hidden or 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! |