-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IOS-7720 Mantle token (Express): error when get fee for permission (#815
- Loading branch information
1 parent
b81a6ce
commit 7e265cd
Showing
5 changed files
with
77 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// MantleUtils.swift | ||
// BlockchainSdk | ||
// | ||
// Created by Aleksei Muraveinik on 26.08.24. | ||
// Copyright © 2024 Tangem AG. All rights reserved. | ||
// | ||
|
||
import BigInt | ||
|
||
public enum MantleUtils { | ||
public static let feeGasLimitMultiplier = 1.6 | ||
static let signGasLimitMultiplier = 0.7 | ||
|
||
public static func multiplyGasLimit(_ gasLimit: Int, with multiplier: Double) -> BigUInt { | ||
multiplyGasLimit(BigUInt(gasLimit), with: multiplier) | ||
} | ||
|
||
static func multiplyGasLimit(_ gasLimit: BigUInt, with multiplier: Double) -> BigUInt { | ||
BigUInt(ceil(Double(gasLimit) * multiplier)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters