Closed wangaojie001 closed 1 year ago
let newConfiguration = TransactionConfiguration(
gasPrice: configuration.gasPrice,
gasLimit: configuration.gasLimit,
maxPriorityFeePerGas:EtherNumberFormatter.full.number(from: String("30"), units: UnitConfiguration.gasPriceUnit) ?? BigInt(),
data: configuration.data,
nonce: configuration.nonce,
hasUserAdjustedGasPrice: true,
hasUserAdjustedGasLimit: true
)
I write for the value of the parameter maxPriorityFeePerGas
EtherNumberFormatter.full.number (from: String (" 30 "), units: UnitConfiguration.gasPriceUnit) ?? BigInt()
Is this to support EIP1559? If so, best to wait for #5172
TransactionConfirmationViewController
@objc func confirmButtonTapped(_ sender: UIButton) {
guard viewModel.canBeConfirmed else { return }
delegate?.controller(self, continueButtonTapped: sender)
}
then to. TransactionConfirmationCoordinator
func controller(_ controller: TransactionConfirmationViewController, continueButtonTapped sender: UIButton) {
sender.isEnabled = false
canBeDismissed = false
rootViewController.set(state: .pending)
firstly { () -> Promise<ConfirmResult> in
return sendTransaction()
}.done { result in
self.handleSendTransactionSuccessfully(result: result)
self.logCompleteActionSheetForTransactionConfirmationSuccessfully()
}.catch { error in
self.logActionSheetForTransactionConfirmationFailed()
//TODO remove delay which is currently needed because the starting animation may not have completed and internal state (whether animation is running) is in correct
DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) {
self.rootViewController.set(state: .done(withError: true)) {
self.handleSendTransactionError(error)
}
}
}.finally {
sender.isEnabled = true
self.canBeDismissed = true
}
}
Method is
sendTransaction()
返回错误
Is this to support EIP1559? If so, best to wait for #5172
Does this project support Moralis API to send transaction?
Is this to support EIP1559? If so, best to wait for #5172
Does this project support Moralis API to send transaction?
No, do you have a link to a doc so I can have a quick look? What's the advantage in doing it?
``
This is the original sign parameter
I want to add a new parameter "maxPriorityFeePerGas" like this
This will result in an error like the one below
responseError(JSONRPCKit.JSONRPCError.responseError(code: -32602, message: "transaction could not be decoded: unexpected EIP-155 V value", data: nil)) from: convertToUserFriendlyError(error:server:baseUrl:)
How can I add a new parameter "maxPriorityFeePerGas" to eth_sendRawTransaction?