- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我尝试在 Aion 网络上发送交易时,我不断收到“configurationError”。我正在使用 Xcode 创建我的 IOS dApp。
我必须发送交易的代码是:
@IBAction func sendTxButton(_ sender: Any) {
//deleted my address and pk
let address = "0x0"
let privateKey = "0x0"
let nonce = BigInt.init(3)
let to = "0xa0d969df9232b45239b577c3790887081b5a22ffd5a46a8d82584ee560485624"
let value = BigInt.init(10000000)
let nrgPrice = BigInt.init(10000000000)
let nrg = BigInt.init(21000)
var txParams = [AnyHashable: Any]()
txParams["nonce"] = HexStringUtil.prependZeroX(hex: nonce.toString(radix: 16))
txParams["to"] = to
txParams["data"] = ""
txParams["value"] = HexStringUtil.prependZeroX(hex: value.toString(radix: 16))
txParams["nrgPrice"] = HexStringUtil.prependZeroX(hex: nrgPrice.toString(radix: 16))
txParams["nrg"] = HexStringUtil.prependZeroX(hex: nrg.toString(radix: 16))
do {
let importWallet = try PocketAion.importWallet(privateKey: privateKey, subnetwork: "32", address: address, data: nil)
try PocketAion.eth.sendTransaction(wallet: importWallet, nonce: nonce, to: to, data: "", value: value, nrgPrice: nrgPrice, nrg: nrg, handler: { (result, error) in
if error != nil {
print(error!)
return
} else {
print("the hash:", result!)
}
})
} catch{
print(error)
}
}
我已经满足发送交易的所有要求,但无法弄清楚哪里出了问题。(这是为了在 Aion 测试网“32”上发送测试代币)。
最佳答案
检查您的 AppDelegates 类。确保您已添加“配置”并将其指向正确的 URL,并在应用程序功能下确保您将配置设置为“ self ”。
class AppDelegate: UIResponder, UIApplicationDelegate, Configuration {
public var nodeURL: URL{
get {
return URL.init(string: "https://aion.pokt.network")!
}
}
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
PocketAion.shared.setConfiguration(config: self)
return true
}
关于ios - 在 Xcode 中发送交易时得到 "configurationError",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54914608/
我正在尝试通过logstash连接Oracle数据库,并遇到错误。 Error: oracle.jdbc.OracleDriver not loaded. Are you sure you've
我在 macOS Catalina 10.15.7 版本中使用 Xcode 12.4。预览 SwiftUI 代码时: import SwiftUI struct SwiftUINewView: Vie
当我尝试在 Aion 网络上发送交易时,我不断收到“configurationError”。我正在使用 Xcode 创建我的 IOS dApp。 我必须发送交易的代码是: @IBAction func
当我使用logstash_input_jdbc插件同步MySQL和本地 flex 搜索时, 出现以下错误,但是我搜索了很长时间,但是直到现在我还没有解决方法。 ./logstash -f ./logs
我创建了新的 plone 站点,之后我使用以下命令创建了新产品 ../bin/zopeskel plone_basic dummy.work 我在 ../dummy.work/src/dummy/w
I want to use log with ElectricSearch in Cucumber I create a class Logger var winston = require('win
我想从logstash调用剩余的api,并希望将其发送到 Elasticsearch 以在kibana仪表板中显示数据。但是im gettig错误- [2019-12-23T16:55:24,887
我正在尝试使用cubes workspace创建工作区时需要使用 ConfigParser 实例。我尝试如下: from cubes import Workspace import ConfigPar
我尝试使用 pymongo 连接 MongoDB。但是遇到了dnspython必须安装的错误即使在我安装了 pymongo 和 dnspython 之后。 我的代码是: import pymongo
我正在尝试使用 mongoDB 和 Python Flask 构建应用程序。运行应用程序时,出现以下错误: ConfigurationError: Server at 127.0.0.1:27017
我是一名优秀的程序员,十分优秀!