Skip to content

Commit

Permalink
Improve information of error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
moisses89 committed Jul 6, 2022
1 parent 66b8dd2 commit a848e5d
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions docs/error_codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
- **GS000: Could not finish initialization**

- **GS001: Threshold needs to be defined**
Threshold is `equals to zero`, some error could happen during the Safe creation.
Threshold is `equal to zero`, some error could happen during the Safe setup.

### General gas/ execution related
- **GS010: Not enough gas to execute Safe transaction**
SafeTxHash is too high or gas limit is too low to execute the transaction, remeber that `3000 gwei` are needed to events.
Review this values and increase or reduce it according the current gas price and your requirements.
SafeTxHash is too high or gas limit is too low to execute the transaction, keep in mind that `2500 gwei` are needed to events and `500 gwei` to perform code until execution.
Review this values and increase the `gasLimit` or reduce the `safeTxHash` according the current gas price and your requirements.

- **GS011: Could not pay gas costs with ether**
The transaction that you are trying to execute cannot be paid with `ether`.
Configure the correct token on gasToken parameter.
There are not enough funds of `ether` to execute the transaction.
Make sure that you have enough funds of `ether` or choose other token with enough funds setting it in `gasToken`.

- **GS012: Could not pay gas costs with token**
The transaction that you are trying to execute cannot be paid with the `token` configured on gasToken.
Configure the correct token on gasToken parameter or set it to 0 if you want use `ether`.
There are not enough funds of the token choosen on `gasToken` to execute the transaction.
Make sure you have enough of the gasToken or set it to `address(0)` if you want use ether.

- **GS013: Safe transaction failed when gasPrice and safeTxGas were 0**
This happen because the safe try to use all provided gas (gasLimit) but was insufficient.
Expand Down Expand Up @@ -70,16 +70,15 @@ The module address provided cannot be `Zero` or `SENTINEL`.
The module that are trying to add was added before.

- **GS103: Invalid prevModule, module pair provided**
`prevModule` is not linked with `module` in the dynamic list.
Review that you are providing the correct values.
`prevModule` is not the previous element to `module` in the module list.

- **GS104: Method can only be called from an enabled module**


### Owner management related
- **GS200: Owners have already been setup**
`setupOwners` can be called once.
If you want to add, swap or remove and owner use the correspond method:
`setupOwners` can only be called once.
If you want to add, swap or remove an owner use the corresponding method:
- `adOwnerWithThreshold`
- `swapOwner`
- `removeOwner`
Expand All @@ -91,15 +90,13 @@ Sender is trying to configure a threshold greater than the total of owners or tr
Sender is calling `changeThreshold` with 0.

- **GS203: Invalid owner address provided**
The owner address provided cannot be `Zero`, `SENTINEL` or the current `safe` address.
The owner address provided cannot be `address(0)`, sentinel address `address(1)` or the current `safe` address.

- **GS204: Address is already an owner**
Sender is trying to add an owner that was added before.
Review that are setting the correct owner address.

- **GS205: Invalid prevOwner, owner pair provided**
`prevOwner` is not linked with `owner` in the dynamic list.
Review that you are providing the correct values.
`prevOwner` is not the previous element to `owner` in the owner list.

### Guard management related
- `GS300`: `Guard does not implement IERC165`

0 comments on commit a848e5d

Please sign in to comment.