Documentation ¶
Index ¶
- func BigToFloat(b *big.Int, decimal int64) float64
- func BuildContractCreationTx(nonce uint64, ethAmount *big.Int, gasLimit uint64, priceGwei float64, ...) (tx *types.Transaction)
- func BuildExactSendETHTx(nonce uint64, to string, ethAmount *big.Int, priceGwei float64) (tx *types.Transaction)
- func BuildExactTx(nonce uint64, to string, ethAmount *big.Int, gasLimit uint64, ...) (tx *types.Transaction)
- func BuildSendETHTx(nonce uint64, to string, ethAmount float64, priceGwei float64) (tx *types.Transaction)
- func BuildTx(nonce uint64, to string, ethAmount float64, gasLimit uint64, priceGwei float64, ...) (tx *types.Transaction)
- func EthToWei(n float64) *big.Int
- func FloatToBigInt(amount float64, decimal int64) *big.Int
- func FloatToInt(amount float64) int64
- func GetERC20ABI() (*abi.ABI, error)
- func GweiToWei(n float64) *big.Int
- func HexToAddress(hex string) common.Address
- func HexToAddresses(hexes []string) []common.Address
- func HexToBig(hex string) *big.Int
- func HexToHash(hex string) common.Hash
- func PackERC20Data(function string, params ...interface{}) ([]byte, error)
- func RawTxToHash(data string) string
- func StringToBig(input string) *big.Int
- func StringToFloat(input string, decimal int64) float64
- type InternalTx
- type Transaction
- type TxExtraInfo
- type TxInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigToFloat ¶
BigToFloat converts a big int to float according to its number of decimal digits Example: - BigToFloat(1100, 3) = 1.1 - BigToFloat(1100, 2) = 11 - BigToFloat(1100, 5) = 0.11
func BuildContractCreationTx ¶
func BuildExactSendETHTx ¶
func BuildExactTx ¶
func BuildSendETHTx ¶
func FloatToBigInt ¶
FloatToBigInt converts a float to a big int with specific decimal Example: - FloatToBigInt(1, 4) = 10000 - FloatToBigInt(1.234, 4) = 12340
func FloatToInt ¶
func GetERC20ABI ¶
func HexToAddress ¶
func HexToAddresses ¶
func PackERC20Data ¶
func RawTxToHash ¶
RawTxToHash returns valid hex data of a transaction to transaction hash
func StringToBig ¶
func StringToFloat ¶
Types ¶
type InternalTx ¶
type Transaction ¶
type Transaction struct { *types.Transaction Extra TxExtraInfo `json:"extra"` }
func (*Transaction) MarshalJSON ¶
func (tx *Transaction) MarshalJSON() ([]byte, error)
func (*Transaction) UnmarshalJSON ¶
func (tx *Transaction) UnmarshalJSON(msg []byte) error
type TxExtraInfo ¶
Click to show internal directories.
Click to hide internal directories.