This repo hosts the code for the Gas Tank Manager Safe App.
To demonstrate the feature, we'll use two Safes.
One will serve as a Gas Tank, while the other (a Regular Safe) will execute its transaction without requiring signers to hold gas token to pay for the network fee. The fee will be paid from the Gas Tank Safe.
You'll also need a wallet that will function as the Owner of the Regular Safe and as delegate of the Gas Tank Safe. The delegate will be able to request the Gas Tank Safe to pay for the gas on its behalf.
- Create two Safes:
- a Safe paying for gas (Gas Tank Safe);
- a Safe that won't pay for gas (Regular Safe).
- Enable the GasTank Module in the Gas Tank Safe.
- To do this, you can use the GasTank Manager Safe App and click "Enable GasTank Module".
add Safe App | Safe App view |
---|---|
- Add the Owner of the Regular Safe as a delegate of the GasTank Module in the Gas Tank Safe.
- This can be done through the GasTank Manager Safe App by pasting the owner's address in the input field and clicking "Add Delegate".
- Transfer some ETH (or the native gas token) to the Gas Tank Safe to ensure it has sufficient funds to pay for the transactions.
- Access your Regular Safe.
- Connect to it using the delegated owner (Setup.3).
- Trigger a transaction execution. For example:
- add an owner (
0x000000000000000000000000000000000000dEaD
) - change confirmation policy
- add an owner (
- In the execution modal, choose "Gas Tank".
- From the dropdown menu "GasTank to use", select the Gas Tank Safe, which should appear since the connected user was delegated in step 3 of the Setup process.
Transaction Modal |
---|
- Execute: only signatures will be required, no transactions requiring gas from the Owner account.
(I) Safe's Tx | (II) Gelato's Fee | (III) Tx Execution |
---|---|---|