Documentation ¶
Index ¶
- Variables
- func AlertColor(str string) string
- func BigToFloat(b *big.Int, decimal uint64) float64
- func BigToFloatString(value *big.Int, decimal uint64) string
- func BuildContractCreationTx(txType uint8, nonce uint64, ethAmount *big.Int, gasLimit uint64, ...) (tx *types.Transaction)
- func BuildExactSendETHTx(txType uint8, nonce uint64, to string, ethAmount *big.Int, gasLimit uint64, ...) (tx *types.Transaction)
- func BuildExactTx(txType uint8, nonce uint64, to string, ethAmount *big.Int, gasLimit uint64, ...) (tx *types.Transaction)
- func BuildTx(txType uint8, nonce uint64, to string, ethAmount float64, gasLimit uint64, ...) (tx *types.Transaction)
- func DebugObjPrint(obj interface{})
- func DebugPrintf(format string, a ...any) (n int, err error)
- func EthToWei(n float64) *big.Int
- func FloatStringToBig(value string, decimal uint64) (*big.Int, error)
- func FloatToBigInt(amount float64, decimal uint64) *big.Int
- func FloatToInt(amount float64) int64
- func GetEIP1967BeaconABI() *abi.ABI
- func GetERC20ABI() *abi.ABI
- func GetMultiCallABI() *abi.ABI
- func GetSignerAddressFromTx(tx *types.Transaction, chainID *big.Int) (common.Address, 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 InfoColor(str string) string
- func NameWithColor(name string) string
- func PackERC20Data(function string, params ...interface{}) ([]byte, error)
- func PrintElapseTime(start time.Time, str string)
- func PrintFunctionCall(fc *FunctionCall)
- func PrintTxDetails(result *TxResult, network Network, writer io.Writer)
- func PrintTxSuccessSummary(result *TxResult, network Network, writer io.Writer)
- func PrintVerboseValueToWriter(writer io.Writer, values []Value)
- func RawTxToHash(data string) string
- func ReadableNumber(value string) string
- func StringToBig(input string) *big.Int
- func StringToBigInt(str string) (*big.Int, error)
- func StringToFloat(input string, decimal uint64) float64
- func VerboseAddress(addr Address) string
- func VerboseValues(values []Value) []string
- type ABIDatabase
- type Address
- type FunctionCall
- type InternalTx
- type LogResult
- type ParamResult
- type TopicResult
- type Transaction
- type TxExtraInfo
- type TxInfo
- type TxResult
- type TxResults
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var Start time.Time
Functions ¶
func AlertColor ¶
func BigToFloat ¶ added in v0.0.25
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 BigToFloatString ¶ added in v0.0.25
func BuildContractCreationTx ¶ added in v0.0.25
func BuildExactSendETHTx ¶ added in v0.0.25
func BuildExactTx ¶ added in v0.0.25
func DebugObjPrint ¶ added in v0.0.30
func DebugObjPrint(obj interface{})
func FloatStringToBig ¶ added in v0.0.25
func FloatToBigInt ¶ added in v0.0.25
FloatToBigInt converts a float to a big int with specific decimal Example: - FloatToBigInt(1, 4) = 10000 - FloatToBigInt(1.234, 4) = 12340
func FloatToInt ¶ added in v0.0.25
func GetEIP1967BeaconABI ¶ added in v0.0.30
func GetERC20ABI ¶ added in v0.0.25
func GetMultiCallABI ¶ added in v0.0.25
func GetSignerAddressFromTx ¶ added in v0.0.30
func HexToAddress ¶ added in v0.0.25
func HexToAddresses ¶ added in v0.0.25
func NameWithColor ¶
func PackERC20Data ¶ added in v0.0.25
func PrintElapseTime ¶ added in v0.0.30
func PrintFunctionCall ¶ added in v0.0.20
func PrintFunctionCall(fc *FunctionCall)
func PrintTxDetails ¶
func PrintTxSuccessSummary ¶ added in v0.0.27
func PrintVerboseValueToWriter ¶ added in v0.0.20
func RawTxToHash ¶ added in v0.0.25
RawTxToHash returns valid hex data of a transaction to transaction hash
func ReadableNumber ¶
func StringToBig ¶ added in v0.0.25
func StringToFloat ¶ added in v0.0.25
func VerboseAddress ¶
func VerboseValues ¶
Types ¶
type ABIDatabase ¶ added in v0.0.20
type FunctionCall ¶ added in v0.0.20
type FunctionCall struct { Destination Address Value *big.Int Method string Params []ParamResult DecodedFunctionCalls []*FunctionCall Error string }
type InternalTx ¶ added in v0.0.25
type LogResult ¶
type LogResult struct { Name string Topics []TopicResult Data []ParamResult }
type ParamResult ¶
type ParamResult struct { Name string Type string Value []Value Tuple []ParamResult }
type TopicResult ¶
type Transaction ¶ added in v0.0.25
type Transaction struct { *types.Transaction Extra TxExtraInfo `json:"extra"` }
func (*Transaction) MarshalJSON ¶ added in v0.0.25
func (tx *Transaction) MarshalJSON() ([]byte, error)
func (*Transaction) UnmarshalJSON ¶ added in v0.0.25
func (tx *Transaction) UnmarshalJSON(msg []byte) error
type TxExtraInfo ¶ added in v0.0.25
type TxInfo ¶ added in v0.0.25
type TxInfo struct { Status string Tx *Transaction InternalTxs []InternalTx Receipt *types.Receipt }
type TxResult ¶
type TxResult struct { Hash string Network string Status string From Address Value string To Address Nonce string GasPrice string GasLimit string GasUsed string GasCost string Timestamp string TxType string FunctionCall *FunctionCall Logs []LogResult Completed bool Error string }
func NewTxResult ¶
func NewTxResult() *TxResult
Click to show internal directories.
Click to hide internal directories.