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
Attached is the proper code, and this is my method; I've gone through the recent case and tried everything and it doesn't work, can someone help me?
` */
let value: String = "0.000000033" // In Ether
let walletAddress = EthereumAddress(self.AccountNumber)! // Your wallet address
let toAdres = EthereumAddress(/To Address/)!
let contract = Web3.InfuraMainnetWeb3().contract(Web3.Utils.coldWalletABI, at: toAdres, abiVersion: 2)!
let amount = Web3.Utils.parseToBigUInt(value, units: .eth)
var options = TransactionOptions.defaultOptions
options.value = amount
options.from = walletAddress
options.gasPrice = .automatic
options.gasLimit = .automatic
// @@@ use [fallback](see [web3swift/Web3/Web3+Utils.swift])
let tx = contract.write("fallback"/*"transfer"*/, parameters: [AnyObject](), extraData: Data(), transactionOptions: options)
do {
// @@@ write transaction requires password, because it consumes gas
let transaction = try tx?.send( password: self.Password )
print("output", transaction?.transaction.description as Any)
} catch(let err) {
print("err", err)
}
}
}`
The text was updated successfully, but these errors were encountered:
Attached is the proper code, and this is my method; I've gone through the recent case and tried everything and it doesn't work, can someone help me?
` */
let value: String = "0.000000033" // In Ether
let walletAddress = EthereumAddress(self.AccountNumber)! // Your wallet address
let toAdres = EthereumAddress(/To Address/)!
let contract = Web3.InfuraMainnetWeb3().contract(Web3.Utils.coldWalletABI, at: toAdres, abiVersion: 2)!
The text was updated successfully, but these errors were encountered: