made in ETHGlobal's Superhack 2024 and winner of the second place in the Fraxtal prize track.
At the intersection of L2's, we found interoperability.
The Inter-OP Layer is a set of experimental contracts that seek unify the entry point to all OP-Stack compatible chains, Our goal is to enhance interoperability across various OP L2's (and perhaps one day All Layer 2's).
DISCLAIMER: These contracts have not been audited, and are highly experimental, they are provided on an "as is" basis, users should proceed at their own risk.
- Bedrock Utils : expriemetnal contracts meant to work on top of the existing Bedrock contracts.
-
Install the
contracts-bedrock
(v0.15.0) library (assuming you already have Node.js and yarn):cd foundry/lib yarn
-
Install the
Solmate
contracts library (perferrably with Forge):cd .. forge install transmissions11/solmate@v7 --no-git
Wrapper contracts on top of multiple OP chain's bed-rock contracts, they simply enable batch sending and retrieval of multiple OP Chains such as the Standard bridge, as well as an expirmental Create2 cross chain deployer, these do not modify any of the existing OP bedrock contracts
Constants lib that make fetching multiple OP chain's addresses, and chain ID's simpler for our contracts, and potentially any contracts that seek to enhance interoperability on top of the OP-Stack, think of them as a similar contracts to the predeploys.sol
in the OP-Stack.
place holder contracts and mocks.
The batch senders in both the forks and the wrappers will fail in the case one transfer fails, there is a solution to that, which is wrapping the calls in encoded calls rather than functoin calls, but for now be wary when using it
imrovement: batch sending is done to the msg sender only, build a function that batch sends to an array of recipents on the L1 standard bridge
please do provide feedback by submitting an issue, anything you see off or any potential improvements
ATTENTION: These contracts are configured for testnet usage, and remain highly expriemental, and only tested at Sepolia or similar testnets, in order to use them for production use or mainnet, further configurations/modifications are due, please be advised.
The contracts in this repo is divided into two parts, the ARCHIVED folder, a hypothetitcal OP stack fork, which has since been archived, instead the Bedrock utils are now the main usage of this repo, they remain free for anyone to check out or build upon, however they won't be maintained, as for the the Bedrock-Utils they serve as a a good example of what it coudl've been but with no changes to existing infra, they are deployed on Sepolia and while the code is a WIP, we have a POC of a multi deposit to 6 OP chains within the same transaction, as well as a cross chain create2 Deployer, which is also deployed here L1ContractDeployer.
If you'd like to test the wrapper, you can go to the contract's webpage listed above, and input these entries in your favourite block explorer or click here directly, from there you will populate the quickDepositToAnyChain()
function with these parameters or similar:
0.1, [11155420, 999999999, 84532, 919, 4460, 58008, 4202]
where the 0.1 represents 0.1 Eth, which is insginifcat for testing on Sepolia, and the array of numbers is the OP chains our OP Chain registry has Defined.
The L1ToL2 create2 Deployer might need a bit more, but here is the conract address, feel free to DM me on X for help, L1ContractDeployer and the L2Create2Deployer on Optimism and multiple OP chains as well.