Transaction object for sending Ethereum transactions.
Copy
Ask AI
public struct EthereumTransaction { public let from: EthereumAddress public let to: EthereumAddress public let value: BigUInt public let data: Data public let nonce: BigUInt? public let gasPrice: BigUInt public let gasLimit: BigUInt public let chainId: BigUInt public init( from: EthereumAddress, to: EthereumAddress, value: BigUInt, data: Data, nonce: BigUInt?, gasPrice: BigUInt, gasLimit: BigUInt, chainId: BigUInt )}
let networkClient: BaseEthereumClient = try await ethereumWallet.getNetworkClient(for: chainId)do { let gasPrice = try await networkClient.eth_gasPriceBigInt() print("Current gas price: \(gasPrice) wei")} catch { print("Failed to get gas price: \(error)")}