Skip to content
Merged
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
12 changes: 10 additions & 2 deletions cmd/common/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,16 @@ func PrepareParatimeTransaction(ctx context.Context, npa *NPASelection, account
return 0, nil, "", fmt.Errorf("failed to estimate gas: %w", err)
}

// Inflate the estimate by 20% for good measure.
gas = (120 * gas) / 100
// Inflate the estimate for good measure.
var multiplier uint64
switch tx.Call.Method {
case "roflmarket.InstanceTopUp":
// Needs a higher buffer due to gas estimation returning early without simulating storage operations.
multiplier = 150 // 50%.
default:
multiplier = 120 // 20%.
}
gas = (multiplier * gas) / 100
}

// Compute fee.
Expand Down
Loading