description |
---|
Quick guide on how to create a channel using a gnosis safe |
While you can use an EOA for creating a channel, that's not the only option.
Channels, on the Push protocol, can also be created using a multi-sig contract. Once created, that contract shall be the owner of that channel and any channel action can be performed after the approval of the required signers of that particular multi-sig contract.
In this quick example, we shall learn to create a channel on Push using a Gnosis Safe (instead of a simple EOA).
Before we proceed with the actual steps of connecting the safe to the Push dapp and creating a channel, let's quickly understand the prerequisites:
-
Create your own gnosis safe with the right set of owners and policies.
-
Fund your safe with at least 50 PUSH tokens. This amount of PUSH is required for channel creation.
-
Initiate a contract interaction from your safe itself to trigger the approve() function of the PUSH Token with the following values for the argument:
a.``
spender (address) :
0x66329Fdd4042928BfCAB60b179e1538D56eeeeeE - EPNSCore Contract
b.
rawAmount(uint256) - 50 * 10^18 PUSH tokens -> Channel Creation Fees
This is important to ensure that the EPNSCore contract is allowed to use 50 PUSH tokens from the safe for the successful creation of the channel.
A sample of how PUSH approval transaction looks like from SAFE
{% hint style="info" %} If you are setting up a Channel on Prod dApp (Ethereum Mainnet), you can request for channel creation gas fee reimbursement within 24 hrs by filling out this form. See this medium article for more information. {% endhint %}
Alright, once you have ensured all the prerequisites are completed, let's move forward with creating a channel with the Gnosis safe using the following steps.
Step 1: Connect to the Push dApp using your Gnosis safe.
Follow the steps mentioned below:
a. Go to https://app.push.org/
b. Select Wallet Connect as an option to connect your wallet to the dapp and Copy the connection link. (Keep this link handy as we will use it soon)
c. Open a new tab and go to https://gnosis-safe.io/
d. Once you have connected with your safe on the gnosis safe app, go to the apps section at the left sidebar of the gnosis safe app.
e. Search for the Wallet connect app and click on it.
f. Paste the connection link (from step b) in the given Wallet connect box.
And that's it. Once the connection link is provided your safe is automatically logged in with the Push dapp.
Here is a quick video of the entire process of connecting your safe to Push dapp.
{% embed url="https://www.loom.com/share/a08d946e81bc48e88f24874ebbfd0939" %} Connecting to Push dapp using your gnosis safe {% endembed %}
Step 2: Create the Channel
Once you have successfully connected your gnosis safe to the Push dapp, it basically gets easier from now on.
Now that you are connected to the dapp, creating a channel using a safe is an exactly similar process as it was using an EOA account.
Follow the steps mentioned in the following section to create a channel 👇
{% content-ref url="../../examples/deploying-your-first-channel.md" %} deploying-your-first-channel.md {% endcontent-ref %}
Step 3: Signing and Initiating channel creation transaction.
The only difference in creating a channel with Gnosis safe is the fact that every transaction must be signed and executed on the gnosis safe app itself.
Therefore, once the channel details are entered and the transaction is initiated, it's time for the required number of owners to sign and approve this transaction from the gnosis safe app to execute it.
After the successful execution of the transaction, your channel will be created on the Push dapp and will be owned by the safe(and its owners).
{% hint style="info" %} Remember in order to access the channel's profile page, you must log in to the dapp from the safe itself. {% endhint %}
{% embed url="https://loom.com/share/388b7a807f5c4bc3b8e7538c90a717a8" %} Accessing the Channel Dashboard {% endembed %}