You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
depositAward is a function in my contract, it doen't need arguments and it is payable so when i try to interact with my contract in iOS, it have an error that is Failed to fetch gas estimate, but it ok in web3.js . So can anyone help me ?
Here is my code :
...
web3.keystoreManager = bip32keystoreManager
do {
let challengeAddress = Address(address) // this is my contract address
var options = Web3Options.default
options.value = BigUInt(1000000000000000) // this is value i want to send to contract
let gasPrice = try web3.eth.getGasPrice()
options.gasPrice = gasPrice
options.from = bip32keystoreManager.addresses[0] // this function for geting my current account
options.to = challengeAddress // i want to send tx to my contract
let contract = try web3.contract(Web3.Utils.customABI, at: challengeAddress)
let transactionIntermediate = try contract.method("depositAward", options: options)
let transaction = try transactionIntermediate.send(password: Constant.password, options: options, onBlock: "latest")
let txid = transaction.hash
print(transaction)
resultHandler(.success(txid))
} catch {
Logger.error(message: error)
resultHandler(.failure(error))
}
The text was updated successfully, but these errors were encountered:
depositAward is a function in my contract, it doen't need arguments and it is payable so when i try to interact with my contract in iOS, it have an error that is
Failed to fetch gas estimate
, but it ok in web3.js . So can anyone help me ?Here is my code :
The text was updated successfully, but these errors were encountered: