Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tutorials/golang-client-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import (
client "github.com/celestiaorg/celestia-node/api/rpc/client"
"github.com/celestiaorg/celestia-node/blob"
share "github.com/celestiaorg/go-square/v2/share"
"github.com/celestiaorg/celestia-node/state"
)

// SubmitBlob submits a blob containing "Hello, World!" to the 0xDEADBEEF namespace. It uses the default signer on the running node.
Expand All @@ -79,8 +80,12 @@ func SubmitBlob(ctx context.Context, url string, token string) error {
return err
}

// Use a default TxConfig instead of passing nil,
// to ensure safe defaults for gas pricing and transaction behavior.
options := state.NewTxConfig()

// submit the blob to the network
height, err := client.Blob.Submit(ctx, []*blob.Blob{helloWorldBlob}, nil)
height, err := client.Blob.Submit(ctx, []*blob.Blob{helloWorldBlob}, options)
if err != nil {
return err
}
Expand Down Expand Up @@ -305,7 +310,8 @@ func SubmitBlob(ctx context.Context, url string, token string) error {

fmt.Println("Submitting blob to the network...")

// Create basic TxConfig instead of passing nil
// Use a default TxConfig instead of passing nil,
// to ensure safe defaults for gas pricing and transaction behavior.
options := state.NewTxConfig()

// Submit the blob to the network with the options
Expand Down