Skip to content

Latest commit

 

History

History
137 lines (85 loc) · 3.04 KB

GasAPI.md

File metadata and controls

137 lines (85 loc) · 3.04 KB

\GasAPI

All URIs are relative to https://api-mainnet.celenium.io/v1

Method HTTP request Description
GasEstimateForPfb Get /gas/estimate_for_pfb Get estimated gas for pay for blob
GasPrice Get /gas/price Get estimated gas price

GasEstimateForPfb

int32 GasEstimateForPfb(ctx).Sizes(sizes).Execute()

Get estimated gas for pay for blob

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/celenium-io/celenium-api-go"
)

func main() {
	sizes := "sizes_example" // string | Comma-separated array of blob sizes

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.GasAPI.GasEstimateForPfb(context.Background()).Sizes(sizes).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `GasAPI.GasEstimateForPfb``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GasEstimateForPfb`: int32
	fmt.Fprintf(os.Stdout, "Response from `GasAPI.GasEstimateForPfb`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGasEstimateForPfbRequest struct via the builder pattern

Name Type Description Notes
sizes string Comma-separated array of blob sizes

Return type

int32

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GasPrice

ResponsesGasPrice GasPrice(ctx).Execute()

Get estimated gas price

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/celenium-io/celenium-api-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.GasAPI.GasPrice(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `GasAPI.GasPrice``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GasPrice`: ResponsesGasPrice
	fmt.Fprintf(os.Stdout, "Response from `GasAPI.GasPrice`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGasPriceRequest struct via the builder pattern

Return type

ResponsesGasPrice

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]