Skip to content

Commit 9526d38

Browse files
authored
add readme to script/universal dir (#169)
1 parent 51788f9 commit 9526d38

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

script/universal/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Universal Scripts
2+
3+
This directory contains a collection of utility scripts and libraries used in Base smart contract operations tasks. These utilities are designed to simplify the process of creating, simulating, signing, and executing transactions, particularly those involving Gnosis Safe multisigs.
4+
5+
For the actual operations tasks and usage examples, please refer to the [contract-deployments repository](https://github.com/base/contract-deployments).
6+
7+
## Key Files
8+
9+
### `MultisigScript.sol`
10+
11+
This is the core script for building Forge scripts that interact with Gnosis Safes. It supports:
12+
13+
- **Nested Multisigs**: Handles arbitrary depths of nested Safes (Safes owned by other Safes).
14+
- **Workflows**: Provides standard functions for `sign` (generating signatures), `approve` (onchain approval for nested Safes), `simulate` (dry-run with state overrides), and `run` (execution).
15+
- **Simulation**: Integrates with `Simulation.sol` to provide detailed simulation links and state diffs.
16+
17+
### `Simulation.sol`
18+
19+
A library for simulating multisig transactions with state overrides. It is particularly useful for:
20+
21+
- Generating Tenderly simulation links.
22+
- Overriding contract storage (e.g., modifying Safe thresholds or nonces) to test execution paths that would otherwise be blocked.
23+
24+
### `MultisigBuilder.sol`
25+
26+
_Deprecated_. Use `MultisigScript.sol` instead. This was an earlier version of the multisig tooling.
27+
28+
### Other Utilities
29+
30+
- `IGnosisSafe.sol`: Interface definitions for interacting with Gnosis Safe contracts.
31+
- `Signatures.sol`: Helper functions for handling and formatting signatures for Gnosis Safe transactions.
32+
- `StateDiff.sol`: Utilities for capturing and reporting state changes during simulations.
33+
34+
## Usage
35+
36+
These scripts are typically imported by specific task scripts in the `contract-deployments` repository. A typical task script inherits from `MultisigScript` and implements the `_buildCalls` method to define the actions to be taken.

0 commit comments

Comments
 (0)