mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 13:47:12 +00:00
📝 Update changelog & rename gasMultiplier
to defaultGasMultiplier
This commit is contained in:
parent
4d1f2e1a0e
commit
26258f8d52
@ -6,6 +6,12 @@ and this project adheres to
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- @cosmjs/stargate, @cosmjs/cosmwasm-stargate: Synchronize the default gas
|
||||
multiplier value between the `signAndBroadcast` and `signAndBroadcastSync`
|
||||
methods so that it is equal to 1.4 everywhere. ([#1584])
|
||||
|
||||
## [0.32.3] - 2024-03-08
|
||||
|
||||
### Changed
|
||||
|
@ -204,7 +204,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
private readonly gasPrice: GasPrice | undefined;
|
||||
// Starting with Cosmos SDK 0.47, we see many cases in which 1.3 is not enough anymore
|
||||
// E.g. https://github.com/cosmos/cosmos-sdk/issues/16020
|
||||
private readonly gasMultiplier = 1.4;
|
||||
private readonly defaultGasMultiplier = 1.4;
|
||||
|
||||
/**
|
||||
* Creates an instance by connecting to the given CometBFT RPC endpoint.
|
||||
@ -617,7 +617,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
if (fee == "auto" || typeof fee === "number") {
|
||||
assertDefined(this.gasPrice, "Gas price must be set in the client options when auto gas is used.");
|
||||
const gasEstimation = await this.simulate(signerAddress, messages, memo);
|
||||
const multiplier = typeof fee === "number" ? fee : this.gasMultiplier;
|
||||
const multiplier = typeof fee === "number" ? fee : this.defaultGasMultiplier;
|
||||
usedFee = calculateFee(Math.round(gasEstimation * multiplier), this.gasPrice);
|
||||
} else {
|
||||
usedFee = fee;
|
||||
@ -653,7 +653,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
if (fee == "auto" || typeof fee === "number") {
|
||||
assertDefined(this.gasPrice, "Gas price must be set in the client options when auto gas is used.");
|
||||
const gasEstimation = await this.simulate(signerAddress, messages, memo);
|
||||
const multiplier = typeof fee === "number" ? fee : this.gasMultiplier;
|
||||
const multiplier = typeof fee === "number" ? fee : this.defaultGasMultiplier;
|
||||
usedFee = calculateFee(Math.round(gasEstimation * multiplier), this.gasPrice);
|
||||
} else {
|
||||
usedFee = fee;
|
||||
|
@ -112,7 +112,7 @@ export class SigningStargateClient extends StargateClient {
|
||||
private readonly gasPrice: GasPrice | undefined;
|
||||
// Starting with Cosmos SDK 0.47, we see many cases in which 1.3 is not enough anymore
|
||||
// E.g. https://github.com/cosmos/cosmos-sdk/issues/16020
|
||||
private readonly gasMultiplier = 1.4;
|
||||
private readonly defaultGasMultiplier = 1.4;
|
||||
|
||||
/**
|
||||
* Creates an instance by connecting to the given CometBFT RPC endpoint.
|
||||
@ -311,7 +311,7 @@ export class SigningStargateClient extends StargateClient {
|
||||
if (fee == "auto" || typeof fee === "number") {
|
||||
assertDefined(this.gasPrice, "Gas price must be set in the client options when auto gas is used.");
|
||||
const gasEstimation = await this.simulate(signerAddress, messages, memo);
|
||||
const multiplier = typeof fee === "number" ? fee : this.gasMultiplier;
|
||||
const multiplier = typeof fee === "number" ? fee : this.defaultGasMultiplier;
|
||||
usedFee = calculateFee(Math.round(gasEstimation * multiplier), this.gasPrice);
|
||||
} else {
|
||||
usedFee = fee;
|
||||
@ -338,7 +338,7 @@ export class SigningStargateClient extends StargateClient {
|
||||
if (fee == "auto" || typeof fee === "number") {
|
||||
assertDefined(this.gasPrice, "Gas price must be set in the client options when auto gas is used.");
|
||||
const gasEstimation = await this.simulate(signerAddress, messages, memo);
|
||||
const multiplier = typeof fee === "number" ? fee : this.gasMultiplier;
|
||||
const multiplier = typeof fee === "number" ? fee : this.defaultGasMultiplier;
|
||||
usedFee = calculateFee(Math.round(gasEstimation * multiplier), this.gasPrice);
|
||||
} else {
|
||||
usedFee = fee;
|
||||
|
Loading…
x
Reference in New Issue
Block a user