An open API service indexing awesome lists of open source software.

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

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