Change multiplier to 1.4
This commit is contained in:
@@ -95,7 +95,7 @@ const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet
|
||||
},
|
||||
};
|
||||
const memo = "With simulate";
|
||||
const result = await client.signAndBroadcast(account.address, [sendMsg], 1.4, memo);
|
||||
const result = await client.signAndBroadcast(account.address, [sendMsg], 1.55, memo);
|
||||
assertIsDeliverTxSuccess(result);
|
||||
console.log("Successfully broadcasted:", result);
|
||||
}
|
||||
|
||||
@@ -604,7 +604,9 @@ 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 : 1.3;
|
||||
// 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
|
||||
const multiplier = typeof fee === "number" ? fee : 1.4;
|
||||
usedFee = calculateFee(Math.round(gasEstimation * multiplier), this.gasPrice);
|
||||
} else {
|
||||
usedFee = fee;
|
||||
|
||||
@@ -318,7 +318,9 @@ 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 : 1.3;
|
||||
// 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
|
||||
const multiplier = typeof fee === "number" ? fee : 1.4;
|
||||
usedFee = calculateFee(Math.round(gasEstimation * multiplier), this.gasPrice);
|
||||
} else {
|
||||
usedFee = fee;
|
||||
|
||||
Reference in New Issue
Block a user