package
0.0.0-20210828034023-90f7a23f442d
Repository: https://github.com/kaikoh95/web3go.git
Documentation: pkg.go.dev

# Functions

CalcGasCost calculate gas cost given gas limit (units) and gas price (wei) example gasLimit := uint64(21000) gasPrice := new(big.Int) gasPrice.SetString("2000000000", 10) gasCost := util.CalcGasCost(gasLimit, gasPrice) fmt.Println(gasCost) // 42000000000000.
No description provided by the author
Generate a mnemonic, user-friendly seed.
No description provided by the author
Checks if address is valid, and also checks if it is a smart contract or account.
No description provided by the author
SigRSV signatures R S V returned as arrays sig := "0x789a80053e4927d0a898db8e065e948f5cf086e32f9ccaa54c1908e22ac430c62621578113ddbb62d509bf6049b8fb544ab06d36f916685a2eb8e57ffadde02301" r, s, v := util.SigRSV(sig) fmt.Println(hexutil.Encode(r[:])[2:]) // 789a80053e4927d0a898db8e065e948f5cf086e32f9ccaa54c1908e22ac430c6 fmt.Println(hexutil.Encode(s[:])[2:]) // 2621578113ddbb62d509bf6049b8fb544ab06d36f916685a2eb8e57ffadde023 fmt.Println(v) // 28.
No description provided by the author
ToDecimal wei to decimals.
ToWei decimals to wei.