Skip to content

Commit

Permalink
docs: feegrant edits
Browse files Browse the repository at this point in the history
  • Loading branch information
jcstein committed Mar 28, 2024
1 parent f1dd9e7 commit 3d508c0
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions developers/feegrant-for-blobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
## Overview

This guide provides developers with the knowledge to use the FeeGrant
module on the Celestia's mocha testnet chain for granting a data
module on the Celestia's Mocha testnet chain for granting a data
availability node's account to submit blobs without constantly
funding it, enabling a third-party account to cover the transaction fees.

## Pre-requisites

- Celestia application CLI installed.
- Celestia node and CLI tools installed.
- Access to a mocha's node (e.g., `https://rpc.celestia-mocha.com:443`).
- Running DA Light node on mocha testnet.
- Separate celestia account with sufficient funds.
- celestia-app CLI installed
- celestia-node and CLI tools installed
- Access to a Mocha node (e.g., `https://rpc.celestia-mocha.com:443`)
- Running DA Light node on Mocha testnet
- Separate Celestia account with sufficient funds

## Introduction

Each DA node contains a celestia account that is used to pay for blobs
Each DA node contains a Celestia account that is used to pay for blobs
submissions. In order to unify the fee payment process, the FeeGrant module
allows a third-party account to pay for the fees incurred by the DA node's
account. This module is useful for projects that require a third-party to
Expand All @@ -31,7 +31,7 @@ To grant fee allowances, allowing a third-party (granter) account to pay
for the fees incurred by a Celestia data availability node (grantee)
account, use the following command:

```shell
```bash
celestia-appd tx feegrant grant \
[grantee_address] [granter_address] \
--home [path_to_grantee] \
Expand All @@ -46,13 +46,13 @@ celestia-appd tx feegrant grant \
```

Example transaction:
[Fee Grant Transaction on Mocha](https://mocha.celenium.io/tx/802a17777fbeab416f6fa2c25f0c56dd9cc8a92afc2a96293d114ac7c22efb5c)
[FeeGrant transaction on Mocha](https://mocha.celenium.io/tx/802a17777fbeab416f6fa2c25f0c56dd9cc8a92afc2a96293d114ac7c22efb5c)

## Verifying balances and transactions

Before diving into the specifics of verifying balances and transactions,
it's important to note that currently, it's necessary to fund the light node
in order for its transactions to be included in the state. We recognize
in order for its transactions to be included in the state of the chain. We recognize
this step as a extra layer of complexity and are actively working on improving
the user experience. Future updates to the nodes implementations will aim to
make this step non-mandatory for the FeeGrant module to function effectively,
Expand All @@ -62,8 +62,8 @@ streamlining the process for developers and users alike.

To check the balance of a new light node, use the following command:
<!-- markdownlint-disable MD013 -->
```shell
celestia state balance --token $CEL_AUTH_TOKEN --node.store ~/.celestia-light-mocha-4/
```bash
celestia state balance --node.store ~/.celestia-light-mocha-4/
```
<!-- markdownlint-enable MD013 -->

Expand All @@ -86,34 +86,34 @@ As of now, to ensure the light node's transactions are included in the
state, you must initially fund the light node with the least amount
of funds using the following command:

```shell
```bash
celestia-appd tx bank send [granter_address] [grantee_address] 10000utia \
--node https://rpc.celestia-mocha.com:443 \
--chain-id mocha-4 \
--keyring-backend test \
--fees 20000utia \
--broadcast-mode block \
--yes \
--home ~/.celestia-app-devops/
--home ~/.celestia-app/
```

### Submitting a blob

To submit a blob, utilize the following command:
<!-- markdownlint-disable MD013 -->
```shell
celestia blob submit --input-file blob.json --token $CEL_AUTH_TOKEN --node.store ~/.celestia-light-mocha-4/
```bash
celestia blob submit 0x6B656B 'nice' --node.store $NODE_STORE
```
<!-- markdownlint-enable MD013 -->

### Checking account balances after submission

Light Node Account:
Light node account:
After submitting a blob, you can check the light node account's balance
to verify that the fees have been deducted:
<!-- markdownlint-disable MD013 -->
```shell
celestia state balance --token $CEL_AUTH_TOKEN --node.store ~/.celestia-light-mocha-4/
```bash
celestia state balance --node.store ~/.celestia-light-mocha-4/
```
<!-- markdownlint-enable MD013 -->

Expand All @@ -133,7 +133,7 @@ Example output showing fees are not deducted:
To confirm that the fees have been deducted from the third-party account that
granted the fee allowance, run:

```shell
```bash
celestia-appd query bank balances [granter_address] \
--node https://rpc.celestia-mocha.com:443 --denom utia
```
Expand Down

0 comments on commit 3d508c0

Please sign in to comment.