https://github.com/5afe/safe-tasks
Hardhat task collection for the Safe contracts
https://github.com/5afe/safe-tasks
Last synced: 3 months ago
JSON representation
Hardhat task collection for the Safe contracts
- Host: GitHub
- URL: https://github.com/5afe/safe-tasks
- Owner: 5afe
- License: lgpl-3.0
- Created: 2021-04-12T17:41:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T11:25:43.000Z (about 2 years ago)
- Last Synced: 2025-03-27T16:49:26.675Z (about 1 year ago)
- Language: TypeScript
- Size: 172 KB
- Stars: 46
- Watchers: 6
- Forks: 26
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Gnosis Safe Tasks
=================
Install
-------
Set correct node version (see `.nvmrc`) with [nvm](https://github.com/nvm-sh/nvm)
```bash
nvm use
```
Install requirements with yarn:
```bash
yarn
```
Quick Start
-----------
### Setup
Create `.env` file to use the commands (see `.env.sample` for more info):
- `NETWORK` - Network that should be used (e.g. `rinkeby`, `mainnet` or `custom`)
- `PK` or `MNEMONIC`- Credentials for the account that should be used
- `INFURA`- For network that use Infura based RPC
- `NODE`- RPC node for `custom` network (optional)
### Help
Use `yarn safe help ` to get more information about parameters of a command.
Example:
```bash
yarn safe help create
```
### Create Safe
Creates and setups a Safe proxy via the proxy factory. All parameters of the Safe `setup` method can be configured.
#### Example
This will deploy a Safe that uses the first imported account as an owner and set the threshold to 1.
```bash
yarn safe create
```
### Safe Info
Displays information about a Safe
#### Usage
```bash
yarn safe info
```
### Propose Safe Transaction
Creates a proposal json file for a Safe transaction that can be shared. The name of the json file will be `.proposal.json` and it will be stored in the `cli_cache` folder.
#### Examples
This will create a transaction from the Safe to the target without any value or data.
```bash
yarn safe propose
--to
```
This will create a transaction based on the sample tx input json that mints some WETH and sets an approve for it.
```bash
yarn safe propose-multi
tx_input.sample.json
```
### Show Proposal
Shows the information of the proposal.
Note: This requires the proposal file created before for that Safe transaction in the `cli_cache`.
#### Usage
```bash
yarn safe show-proposal
```
### Sign Proposal
Signs a proposal with the imported account
Note: This requires the proposal file created before for that Safe transaction in the `cli_cache`.
#### Usage
```bash
yarn safe sign-proposal
```
### Submit Proposal
Submits a proposal with the imported account
Note: This requires the proposal file created before for that Safe transaction in the `cli_cache`.
#### Usage
```bash
yarn safe submit-proposal
```
### Show Transaction History
Displays the transaction history of a Safe based on events
#### Usage
```bash
yarn safe history
```
Security and Liability
----------------------
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
License
-------
All smart contracts are released under LGPL-3.0