使用围棋iOS框架,我试图创建一个新的事务。使用GethNewTransaction,我得到一个错误(使用未解析的标识符GethNewTransaction)。
这里有一个例子: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我的代码:
// 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这句话是错的:
let tx = GethNewTransaction(1, to, GEGethNewBigInt(0), GEGethNewBigInt(0), GEGethNewBigInt(0), nil) // Random empty transaction如何编写这一行以创建新事务?
发布于 2018-04-26 20:10:00
你进口吉斯了吗?我打给GethNewTransaction的电话如下所示:
let tx = GethNewTransaction(wallet.transactionCount, to, GethNewBigInt(amount), self.gasLimit, self.gasPrice, nil)gasLimit是Int64,gasPrice是GethBigInt
https://ethereum.stackexchange.com/questions/18078
复制相似问题