
Obol Splits
This repo contains Obol Splits smart contracts. This suite of smart contracts and associated tests are intended to serve as a public good to enable the safe and secure creation of Distributed Validators for Ethereum Consensus-based networks.
### Disclaimer
The following smart contracts are provided as is, without warranty. Details of their audit can be consulted [here](https://docs.obol.org/docs/advanced-and-troubleshooting/security/overview).
## Quickstart
This repo is built with [foundry](https://github.com/foundry-rs/foundry), a rust-based solidity development environment, and relies on [solmate](https://github.com/Rari-Capital/solmate), an efficient solidity smart contract library. Read the docs on our [docs site](https://docs.obol.org/docs/learn/introduction/obol-splits) for more information on what Distributed Validators are, and their smart contract lifecycle.
### Installation
Follow the instructions here to install [foundry](https://github.com/foundry-rs/foundry#installation).
Then install the contract dependencies:
```sh
forge install
```
### Local Development
To test your changes to the codebase run the unit tests with:
```
cp .env.sample .env
```
```sh
forge test
```
This command starts runs all tests.
> NOTE: To run a specific test:
```sh
forge test --match-contract ContractTest --match-test testFunction -vv
```
### Build
To compile your smart contracts and generate their ABIs run:
```sh
forge build
```
This command generates compilation output into the `out` directory.
### Deployment
This repo can be deployed with `forge create` or running the deployment scripts.
#### Create a new Lido Split
To create a new Lido Splitter, setup your environment variables (`cp .env.sample .env` and ajust as needed) and then `source .env` to load them, then run the following command:
```sh
forge script script/ObolLidoSetupScript.sol:ObolLidoSetupScript --fork-url $RPC_URL -vvvv --sig "run(string,address,address)" "./script/data/lido-data.json" $SPLITMAIN $OBOL_LIDO_SPLIT_FACTORY
```
> [!TIP]
> The above is setup as a dry-run, you must add `--broadcast` to the end of the command for the transaction to be sent to the network.
#### Hoodi
ObolValidatorManagerFactory: https://hoodi.etherscan.io/address/0x5754C8665B7e7BF15E83fCdF6d9636684B782b12
#### Sepolia
ObolValidatorManagerFactory: https://sepolia.etherscan.io/address/0xF32F8B563d8369d40C45D5d667C2B26937F2A3d3
OptimisticWithdrawalRecipientFactory: https://sepolia.etherscan.io/address/0xca78f8fda7ec13ae246e4d4cd38b9ce25a12e64a
OptimisticWithdrawalRecipient: https://sepolia.etherscan.io/address/0x99585e71ab1118682d51efefca0a170c70eef0d6
#### Mainnet
ObolValidatorManagerFactory: https://etherscan.io/address/0x2c26B5A373294CaccBd3DE817D9B7C6aea7De584
OptimisticWithdrawalRecipientFactory: https://etherscan.io/address/0x119acd7844cbdd5fc09b1c6a4408f490c8f7f522
OptimisticWithdrawalRecipient: https://etherscan.io/address/0xe11eabf19a49c389d3e8735c35f8f34f28bdcb22
ObolLidoSplitFactory: https://etherscan.io/address/0xA9d94139A310150Ca1163b5E23f3E1dbb7D9E2A6
ObolLidoSplit: https://etherscan.io/address/0x2fB59065F049e0D0E3180C6312FA0FeB5Bbf0FE3
### Versioning
Releases of this repo constitute post-fix review, audited commits. Consult the release notes and audits as not all contracts are in scope each audit.
## License
Unless a file's `SPDX-License-Identifier` says otherwise, the code in this repository is licensed under the
[Apache License 2.0](LICENSE). Files marked `GPL-3.0-or-later` (much of it derived from 0xSplits) stay under the GPL,
and files marked `MIT` or `CC0-1.0` stay under those licenses.
The Obol Validator Manager v1.0.0 was deployed and verified with `SPDX-License-Identifier: Proprietary` headers (tag
`ovm-v1.0.0`; block explorers hold a flattened copy). That code is also licensed under Apache-2.0. Only the headers
changed since: the contract code is identical, but rebuild from the tag to reproduce the deployed metadata hash.
The license grants no rights to Obol's names or trademarks (Apache-2.0, section 6).