Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ broadcast/
Makefile
abi.json
.vscode/
zkout/
foundryup-zksync
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@
[submodule "lib/murky"]
path = lib/murky
url = https://github.com/dmfxyz/murky
branch = main
branch = main
[submodule "lib/era-contracts"]
path = lib/era-contracts
url = https://github.com/matter-labs/era-contracts
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
simulate-deploy:
# For live deployment, add --broadcast --verify --delay 30 --etherscan-api-key ${ETHERSCAN_API_KEY}
forge script -vvv script/Deploy.s.sol --sig "run()" --rpc-url ${RPC_URL} --private-key ${PK} --broadcast --verify --delay 30 --etherscan-api-key ${ETHERSCAN_API_KEY}
forge script -vvv script/Deploy.s.sol --sig "run()" --rpc-url ${RPC_URL} --private-key ${PK}

verify:
forge verify-contract 0x00000000000000447e69651d841bD8D104Bed493 src/DelegateRegistry.sol:DelegateRegistry --chain 81457 --etherscan-api-key ${ETHERSCAN_API_KEY} --retries 5 --delay 30 --watch
forge verify-contract 0x0000000059A24EB229eED07Ac44229DB56C5d797 src/DelegateRegistry.sol:DelegateRegistry --chain 11124 --etherscan-api-key ${ETHERSCAN_API_KEY} --retries 5 --delay 30 --watch --zksync
# forge verify-contract 0x0000000059A24EB229eED07Ac44229DB56C5d797 src/DelegateRegistry.sol:DelegateRegistry --retries 5 --delay 30 --watch --zksync --verifier-url https://api-sepolia.abscan.org/api --etherscan-api-key IEYKU3EEM5XCD76N7Y7HF9HG7M9ARZ2H4A

cast-deploy-singlesig:
cast send --rpc-url ${RPC_URL} --private-key ${PK} 0x0000000000ffe8b47b3e2130213b802212439497 0x64e03087000000000000000000000000000000000000000016c7768a8c7a2824b846321d00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bf0608060405234801561001057600080fd5b50604051610bd0380380610bd083398101604081905261002f9161007d565b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100ad565b60006020828403121561008f57600080fd5b81516001600160a01b03811681146100a657600080fd5b9392505050565b610b14806100bc6000396000f3fe6080604052600436106100915760003560e01c8063b61d27f611610063578063e30c39781161004b578063e30c397814610214578063f23a6e6114610241578063f2fde38b1461028757005b8063b61d27f6146101ac578063bc197c81146101cc57005b806301ffc9a71461009a578063150b7a02146100cf57806379ba5097146101455780638da5cb5b1461015a57005b3661009857005b005b3480156100a657600080fd5b506100ba6100b5366004610703565b6102a7565b60405190151581526020015b60405180910390f35b3480156100db57600080fd5b506101146100ea3660046107be565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016100c6565b34801561015157600080fd5b5061009861038c565b34801561016657600080fd5b506000546101879073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100c6565b3480156101b857600080fd5b506100ba6101c736600461085c565b6104cb565b3480156101d857600080fd5b506101146101e736600461098a565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b34801561022057600080fd5b506001546101879073ffffffffffffffffffffffffffffffffffffffff1681565b34801561024d57600080fd5b5061011461025c366004610a45565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b34801561029357600080fd5b506100986102a2366004610abd565b6105e6565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061033a57507f150b7a02000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061038657507f4e2312e0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610438576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6001546000805460405173ffffffffffffffffffffffffffffffffffffffff93841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600154600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610573576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161042f565b8373ffffffffffffffffffffffffffffffffffffffff1683836040516105999190610ad8565b60006040518083038185875af1925050503d80600081146105d6576040519150601f19603f3d011682016040523d82523d6000602084013e6105db565b606091505b509095945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461068d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161042f565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227009190a350565b60006020828403121561071557600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461074557600080fd5b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461077057600080fd5b919050565b60008083601f84011261078757600080fd5b50813567ffffffffffffffff81111561079f57600080fd5b6020830191508360208285010111156107b757600080fd5b9250929050565b6000806000806000608086880312156107d657600080fd5b6107df8661074c565b94506107ed6020870161074c565b935060408601359250606086013567ffffffffffffffff81111561081057600080fd5b61081c88828901610775565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561087157600080fd5b61087a8461074c565b925060208401359150604084013567ffffffffffffffff8082111561089e57600080fd5b818601915086601f8301126108b257600080fd5b8135818111156108c4576108c461082d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561090a5761090a61082d565b8160405282815289602084870101111561092357600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60008083601f84011261095757600080fd5b50813567ffffffffffffffff81111561096f57600080fd5b6020830191508360208260051b85010111156107b757600080fd5b60008060008060008060008060a0898b0312156109a657600080fd5b6109af8961074c565b97506109bd60208a0161074c565b9650604089013567ffffffffffffffff808211156109da57600080fd5b6109e68c838d01610945565b909850965060608b01359150808211156109ff57600080fd5b610a0b8c838d01610945565b909650945060808b0135915080821115610a2457600080fd5b50610a318b828c01610775565b999c989b5096995094979396929594505050565b60008060008060008060a08789031215610a5e57600080fd5b610a678761074c565b9550610a756020880161074c565b94506040870135935060608701359250608087013567ffffffffffffffff811115610a9f57600080fd5b610aab89828a01610775565b979a9699509497509295939492505050565b600060208284031215610acf57600080fd5b6107458261074c565b6000825160005b81811015610af95760208186018101518583015201610adf565b50600092019182525091905056fea164736f6c6343000815000a0000000000000000000000006ed7d526b020780f694f3c10dfb25e1b134d321500000000000000000000000000000000
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Frontend website interface at [delegate.xyz](https://delegate.xyz). Full docs at
|Mainnet Chain|Address|
|---|---|
|Ethereum|[0x00000000000000447e69651d841bd8d104bed493](https://etherscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Animechain|[0x00000000000000447e69651d841bd8d104bed493](https://explorer.anime.xyz/address/0x00000000000000447e69651d841bD8D104Bed493)|
|Apechain|[0x00000000000000447e69651d841bd8d104bed493](https://apescan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Arbitrum|[0x00000000000000447e69651d841bd8d104bed493](https://arbiscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Arbitrum (Nova)|[0x00000000000000447e69651d841bd8d104bed493](https://nova.arbiscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
Expand All @@ -21,13 +22,14 @@ Frontend website interface at [delegate.xyz](https://delegate.xyz). Full docs at
|Fantom|[0x00000000000000447e69651d841bd8d104bed493](https://ftmscan.com/address/0x00000000000000447e69651d841bd8d104bed493)|
|Gnosis|[0x00000000000000447e69651d841bd8d104bed493](https://gnosisscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Hychain|[0x00000000000000447e69651d841bd8d104bed493](https://explorer.hychain.com/address/0x00000000000000447e69651d841bd8d104bed493)|
|Optimism|[0x00000000000000447e69651d841bd8d104bed493](https://optimistic.etherscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Polygon|[0x00000000000000447e69651d841bd8d104bed493](https://polygonscan.com/address/0x00000000000000447e69651d841bd8d104bed493)|
|Polygon zkEVM|[0x00000000000000447e69651d841bd8d104bed493](https://zkevm.polygonscan.com/address/0x00000000000000447e69651d841bd8d104bed493)|
|Linea|[0x00000000000000447e69651d841bd8d104bed493](https://lineascan.build/address/0x00000000000000447e69651d841bd8d104bed493)|
|Mantle|[0x00000000000000447e69651d841bd8d104bed493](https://explorer.mantle.xyz/address/0x00000000000000447e69651d841bd8d104bed493)|
|Moonbeam|[0x00000000000000447e69651d841bd8d104bed493](https://moonscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Moonriver|[0x00000000000000447e69651d841bd8d104bed493](https://moonriver.moonscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Optimism|[0x00000000000000447e69651d841bd8d104bed493](https://optimistic.etherscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Polygon|[0x00000000000000447e69651d841bd8d104bed493](https://polygonscan.com/address/0x00000000000000447e69651d841bd8d104bed493)|
|Polygon zkEVM|[0x00000000000000447e69651d841bd8d104bed493](https://zkevm.polygonscan.com/address/0x00000000000000447e69651d841bd8d104bed493)|
|Plume|[0x00000000000000447e69651d841bd8d104bed493](https://phoenix-explorer.plumenetwork.xyz/address/0x00000000000000447e69651d841bD8D104Bed493)|
|Ronin|[0x00000000000000447e69651d841bd8d104bed493](https://app.roninchain.com/address/0x00000000000000447e69651d841bd8d104bed493)|
|Sanko|[0x00000000000000447e69651d841bd8d104bed493](https://explorer.sanko.xyz/address/0x00000000000000447e69651d841bd8d104bed493)|
|Scroll|[0x00000000000000447e69651d841bd8d104bed493](https://scrollscan.com/address/0x00000000000000447e69651d841bd8d104bed493)|
Expand All @@ -38,12 +40,22 @@ Frontend website interface at [delegate.xyz](https://delegate.xyz). Full docs at
|ZetaChain|[0x00000000000000447e69651d841bd8d104bed493](https://mainnet.explorer.zetachain.app/address/0x00000000000000447e69651d841bd8d104bed493)|
|Zora|[0x00000000000000447e69651d841bd8d104bed493](https://explorer.zora.energy/address/0x00000000000000447e69651d841bd8d104bed493)|

|ZKSync Chain|Address|
|---|---|
|Abstract (Sepolia)|[0x0000000059A24EB229eED07Ac44229DB56C5d797](https://sepolia.abscan.org/address/0x0000000059A24EB229eED07Ac44229DB56C5d797)|
|ZKsync Era|[0x0000000059A24EB229eED07Ac44229DB56C5d797](https://holesky.etherscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Treasure|[0x0000000059A24EB229eED07Ac44229DB56C5d797](https://sepolia.basescan.org/address/0x00000000000000447e69651d841bd8d104bed493)|

|Testnet Chain|Address|
|---|---|
|Ethereum (Sepolia)|[0x00000000000000447e69651d841bd8d104bed493](https://sepolia.etherscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Ethereum (Holesky)|[0x00000000000000447e69651d841bd8d104bed493](https://holesky.etherscan.io/address/0x00000000000000447e69651d841bd8d104bed493)|
|Abstract (Sepolia)|[0x00000000000000447e69651d841bd8d104bed493](https://sepolia.abscan.org/address/0x00000000000000447e69651d841bd8d104bed493)|
|Base (Sepolia)|[0x00000000000000447e69651d841bd8d104bed493](https://sepolia.basescan.org/address/0x00000000000000447e69651d841bd8d104bed493)|
|Berachain bArtio|[0x00000000000000447e69651d841bd8d104bed493](https://bartio.beratrail.io/address/0x00000000000000447e69651d841bD8D104Bed493)|
|Monad|[0x00000000000000447e69651d841bd8d104bed493](https://testnet.monadexplorer.com/address/0x00000000000000447e69651d841bD8D104Bed493)|
|Ronin (Saigon)|[0x00000000000000447e69651d841bd8d104bed493](https://saigon-app.roninchain.com/address/0x00000000000000447e69651d841bd8d104bed493)|



If you'd like to get the DelegateRegistry on another EVM chain, anyone in the community can deploy to the same address! Simply run the script in [Deploy.s.sol](script/Deploy.s.sol) with the specified salt. The CREATE2 factory must be deployed at `0x0000000000FFe8B47B3e2130213B802212439497`, but this factory exists on 19 separate chains so shouldn't be an issue. If you've run a community deployment, open a PR adding the link to the above table.
Expand Down
5 changes: 5 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ src = 'src'
out = 'out'
libs = ['lib']

# zksync specific
fallback_oz = true
is_system = false # Note: NonceHolder and the ContractDeployer system contracts can only be called with a special isSystem flag as true
mode = "3"

auto_detect_remappings = false
# remappings = []

Expand Down
11 changes: 0 additions & 11 deletions gasbenchmark200

This file was deleted.

20 changes: 0 additions & 20 deletions gasreport200

This file was deleted.

1 change: 1 addition & 0 deletions lib/era-contracts
Submodule era-contracts added at 3288ad
3 changes: 2 additions & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ds-test/=lib/forge-std/lib/ds-test/src/
forge-std/=lib/forge-std/src/
murky/=lib/murky/src/
openzeppelin/=lib/openzeppelin-contracts/contracts/
openzeppelin/=lib/openzeppelin-contracts/contracts/
era-contracts=lib/era-contracts/
Loading
Loading