Using go-ethereum iOS framework I'm trying to create a new transaction. Using GethNewTransaction i get an error (Use of unresolved identifier GethNewTransaction).
An example is found here: https://github.com/ethereum/go-ethereum/wiki/Mobile:-Account-management
// Create a new account to sign transactions with
var error: NSError?
let signer = try! ks?.newAccount("Signer password")
let to = GethNewAddressFromHex("0x0000000000000000000000000000000000000000", &error)
let tx = GethNewTransaction(1, to, GethNewBigInt(0),
GethNewBigInt(0), GethNewBigInt(0), nil) // Random empty transaction
let chain = GethNewBigInt(1) // Chain identifier of the main net
My code:
// Create a new account to sign transactions with
var error: NSError?
var signer: GEGethAccount?; try! ks?.newAccount("Signer password", ret0_: &signer)
var to: GEGethAddress?; GEGethNewAddressFromHex("0x0000000000000000000000000000000000000000", &to, &error)
let tx = GethNewTransaction(1, to, GEGethNewBigInt(0), GEGethNewBigInt(0), GEGethNewBigInt(0), nil) // Random empty transaction
let chain = GEGethNewBigInt(1) // Chain identifier of the main net
This line is wrong:
let tx = GethNewTransaction(1, to, GEGethNewBigInt(0), GEGethNewBigInt(0), GEGethNewBigInt(0), nil) // Random empty transaction
How do i write this line to create a new transaction?