摘要:
// gin.go // HandlerFunc defines the handler used by gin middleware as return value. type HandlerFunc func(*Context) // HandlersChain defines a Handle 阅读全文
摘要:
gin.H 中的 H 是对 map[string]interface{} 定义的新类型,用来简化生成 map 数据时的书写。 // H is a shortcut for map[string]interface{} type H map[string]interface{} map[string] 阅读全文
摘要:
using A for *; # 把 A 的函数附给任意类型使用 using A for B; # 意思是把 A 中的方法附给 B 使用 使用上面的方式,那么在我们的合约中定义了 B 类型的变量后,就可以像 B.xx() 这样使用 A 库的函数了。 举个局部例子:_miners 可以直接使用 has 阅读全文
摘要:
以太坊网络每天的平均气价(Gas)是变化,有一张价格表:https://etherscan.io/chart/gasprice 然后你可以知道 1 Gas = xx Gwei,再换算一下 1 ETH = xx Gas 即可。 另外你需要 搞懂 ETH Gas, GasPrice, GasLimit 阅读全文