You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Create detailed documentation to replace outdated docs
- Add new documentation structure with separate guides for each topic
- Add CLI reference with all available commands
- Add API reference with key classes and methods
- Update README with links to new documentation
- Fix examples to use correct Ape patterns and ape-tokens plugin
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+49-39Lines changed: 49 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,19 @@
1
-
# Quick Start
1
+
# Ape Safe
2
2
3
-
Account plugin for the [Safe](https://safe.global//) Multisig wallet (previously known as Gnosis Safe).
3
+
Account plugin for the [Safe](https://safe.global/) multisig wallet (previously known as Gnosis Safe) for the [Ape Framework](https://github.com/ApeWorX/ape).
4
+
5
+
## Features
6
+
7
+
-**Safe Account Management**: Add, list, and remove Safe multisig wallets
8
+
-**Transaction Management**: Create, propose, sign, and execute Safe transactions
9
+
-**Multisig Workflows**: Manage transaction approval workflows with multiple signers
10
+
-**MultiSend Support**: Batch multiple transactions together efficiently
11
+
-**CLI Interface**: Comprehensive command line tools for Safe management
12
+
-**Python API**: Programmatic access to all Safe functionality
4
13
5
14
## Dependencies
6
15
7
-
-[python3](https://www.python.org/downloads) version 3.9 up to 3.12.
16
+
-[python3](https://www.python.org/downloads) version 3.9 or newer
8
17
9
18
## Installation
10
19
@@ -73,19 +82,22 @@ To specify via environment variable, do:
73
82
APE_SAFE_DEFAULT_SAFE="my-safe"
74
83
```
75
84
76
-
**NOTE**: Also, to avoid always needing to specify `--network`, you can set a default ecosystem, network, and provider in your config file.
77
-
The rest of the guide with not specify `--network` on each command but assume the correct one is set in the config file.
85
+
**NOTE**: To avoid always needing to specify `--network`, you can set a default ecosystem, network, and provider in your config file.
78
86
Here is an example:
79
87
80
88
```yaml
81
-
default_ecosystem: optimism
89
+
default_ecosystem: ethereum
82
90
83
91
ethereum:
84
-
default_network: sepolia
85
-
sepolia:
92
+
default_network: mainnet
93
+
mainnet:
86
94
default_provider: infura
87
95
```
88
96
97
+
The rest of the guide will not specify `--network` on each command but assume the correct one is set in the config file.
98
+
99
+
---
100
+
89
101
Once you have a safe, you can view pending transactions:
Transaction 8 transfer (1/2) safe_tx_hash=0xed43d80255bcd5ffacb755e8f51bee825913373705d6baea006419d2a33a0a5b
105
117
```
106
118
107
-
**NOTE**: Use the `--verbose` flag to see more information about each transaction.
119
+
Use the `--verbose` flag to see more information about each transaction:
108
120
109
121
```sh
110
122
ape safe pending list --verbose
111
123
```
112
124
113
-
There are several operations you can do on a pending transaction.
114
-
One of them is "approve" which adds your local signers' signatures to the transaction.
125
+
There are several operations you can do on a pending transaction:
115
126
116
127
```sh
128
+
# Approve a transaction (add your signature)
117
129
ape safe pending approve 0x09ab9a229fc60da66ec0fa8fa886ab7c95902fdf5df5a5009ba06010fbb9a9a7
118
-
```
119
130
120
-
**NOTE**: Here we are using the transaction hash `0x09ab9a229fc60da66ec0fa8fa886ab7c95902fdf5df5a5009ba06010fbb9a9a7` to specify the transaction because there are more than one.
121
-
However, you can also use the nonce if there is only a single transaction.
122
-
123
-
If you want to both execute and approve at the same time, you can use the `--execute` option on approve and specify a sender:
124
-
125
-
```sh
131
+
# Approve and execute in one step
126
132
ape safe pending approve 2 --execute my_account
127
-
```
128
-
129
-
Else, you can use the `execute` command directly:
130
133
131
-
```sh
134
+
# Execute a fully signed transaction
132
135
ape safe pending execute 2
133
-
```
134
-
135
-
**NOTE**: `execute` requires a full signed transaction ready to be submitted on-chain.
136
136
137
-
The last main operation is `reject`.
138
-
Rejecting a transaction replaces that transaction with a zero-value transfer from the safe to itself.
139
-
140
-
```sh
137
+
# Reject a transaction
141
138
ape safe pending reject 2
142
139
```
143
140
144
-
### Multisend
141
+
##MultiSend Example
145
142
146
-
The following example shows how to use multisend:
143
+
The following example shows how to use multisend to batch transactions:
147
144
148
145
```python
149
146
from ape_safe import multisend
@@ -152,7 +149,7 @@ from ape_tokens import tokens
152
149
153
150
safe = accounts.load("my-safe")
154
151
155
-
# Load some contracts (here using ape-tokens)
152
+
# Load some contracts using ape-tokens
156
153
dai = tokens["DAI"]
157
154
vault = tokens["yvDAI"]
158
155
amount = dai.balanceOf(safe) # How much we want to deposit
@@ -162,14 +159,12 @@ txn = multisend.MultiSend()
162
159
txn.add(dai.approve, vault, amount)
163
160
txn.add(vault.deposit, amount)
164
161
165
-
# Fetch signatures from any local signers, and broadcast if confirmations are met
166
-
# Note that in case the user intends to only stage a transaction, then `submit=False` argument can also be added
167
-
# It is normal that when a user only intend to stage a transaction, an error is thrown
168
-
# this can be ignored by including the necessary try-catch (from ape.exceptions import SignatureError)
169
-
# Note that transaction is automatically prompted for execution if enough signers are available in local
170
-
txn(sender=safe,gas=0)
162
+
# Fetch signatures from local signers and broadcast if confirmations are met
163
+
txn(sender=safe, gas=0)
171
164
```
172
165
166
+
<<<<<<< HEAD
167
+
173
168
## Cloud Usage
174
169
175
170
To use this plugin in a cloud environment, such as with the [Silverback Platform](https://silverback.apeworx.io), you will need to make sure that you have configured your Safe to exist within the environment.
If a safe with the same alias as an entry in `require` exists in your local environment, this will skip adding it, even if the existing alias points to a different address than the one in the config item.
203
198
```
204
199
200
+
=======
201
+
202
+
## Documentation
203
+
204
+
For more detailed documentation, see:
205
+
206
+
-[Setup](./docs/setup.md) - Configuration and initial setup
Please see the [contributing guide](CONTRIBUTING.md) to learn more how to contribute to this project.
208
218
Comments, questions, criticisms and pull requests are welcomed.
209
219
210
220
## Acknowledgements
211
221
212
-
This package was inspired by [the original ape-safe](https://github.com/banteg/ape-safe#readme) by [banteg](https://github.com/banteg).
222
+
This package was inspired by the original ape-safe, now [brownie-safe](https://github.com/banteg/brownie-safe) by [banteg](https://github.com/banteg).
213
223
For versions prior to v0.6.0, the original package should be referenced.
0 commit comments