Skip to content

Commit

Permalink
ALL-5628 - Added Base estimate gas
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel committed Mar 19, 2024
1 parent 4befc87 commit c0a64b9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tatumio",
"version": "2.2.64",
"version": "2.2.65",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/api-client/src/api_schema.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseEstimateGas } from '../models/BaseEstimateGas';
import type { BlockchainFee } from '../models/BlockchainFee';
import type { BscEstimateGas } from '../models/BscEstimateGas';
import type { CeloEstimateGas } from '../models/CeloEstimateGas';
Expand Down Expand Up @@ -411,6 +412,33 @@ export class BlockchainFeesService {
});
}

/**
* Estimate the fee for a Cronos transaction
* <p><b>2 credits per API call</b></p>
* <p>Get an estimated gas price and the number of gas units needed for a Base transaction.</p>
* <p style="border:4px solid DeepSkyBlue;"><b>NOTE:</b> The estimated gas price is returned in <b>wei</b>. However, when <a href="https://apidoc.tatum.io/tag/Cronos#operation/CronosBlockchainTransfer" target="_blank">making the transaction itself</a> and providing the custom fee, you have to provide the gas price in <b>Gwei</b>. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.</p>
*
* @param requestBody
* @returns GasEstimated OK
* @throws ApiError
*/
public static baseEstimateGas(
requestBody: BaseEstimateGas,
): CancelablePromise<GasEstimated> {
return __request({
method: 'POST',
path: `/v3/base/gas`,
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`,
401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`,
403: `Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.`,
500: `Internal server error. There was an error on the server while processing the request.`,
},
});
}

/**
* Estimate the fee for a Polygon transaction
* <p><b>2 credits per API call</b></p>
Expand Down

0 comments on commit c0a64b9

Please sign in to comment.