Documentation ¶
Index ¶
- Constants
- Variables
- func AnalyzeAndPrint(reader *reader.EthReader, analyzer TxAnalyzer, tx string, network Network, ...) *TxResult
- func AnalyzeMethodCallAndPrint(analyzer TxAnalyzer, value *big.Int, destination string, data []byte, ...) (fc *FunctionCall)
- func CalculateTimeDurationFromBlock(network Network, from, to uint64) time.Duration
- func ConfigToABI(address string, forceERC20ABI bool, customABI string, network Network) (*abi.ABI, error)
- func ConvertEthereumTypeToInputString(t abi.Type, value interface{}) (string, error)
- func ConvertParamStrToArray(name string, t abi.Type, str string, network Network) ([]interface{}, error)
- func ConvertParamStrToFixedByteType(name string, t abi.Type, strs []string, network Network) (interface{}, error)
- func ConvertParamStrToTupleType(name string, t abi.Type, str string, network Network) (interface{}, error)
- func ConvertParamStrToType(name string, t abi.Type, str string, network Network) (interface{}, error)
- func ConvertToAddress(str string) (common.Address, error)
- func ConvertToBig(str string, network Network) (*big.Int, error)
- func ConvertToBool(str string) (bool, error)
- func ConvertToBytes(str string) ([]byte, error)
- func ConvertToFixedBytes(str string, size int) (interface{}, error)
- func ConvertToHash(str string) (common.Hash, error)
- func ConvertToInt(str string, size int) (interface{}, error)
- func ConvertToIntOrBig(str string, size int, network Network) (interface{}, error)
- func ConvertToString(str string) (string, error)
- func ConvertToUint(str string, size int) (interface{}, error)
- func ConvertToUintOrBig(str string, size int, network Network) (interface{}, error)
- func DisplayBroadcastedTx(t *types.Transaction, broadcasted bool, err error, network Network)
- func DisplayWaitAnalyze(reader *reader.EthReader, analyzer TxAnalyzer, t *types.Transaction, ...)
- func EthBroadcaster(network Network) (*broadcaster.Broadcaster, error)
- func EthReader(network Network) (*reader.EthReader, error)
- func EthTxMonitor(network Network) (*monitor.TxMonitor, error)
- func GetABI(addr string, network Network) (*abi.ABI, error)
- func GetABIFromBytes(abiBytes []byte) (*abi.ABI, error)
- func GetABIFromString(abiStr string) (*abi.ABI, error)
- func GetABIString(addr string, network Network) (string, error)
- func GetABIStringBypassCache(addr string, network Network) (string, error)
- func GetABIStringFromFile(filepath string) (string, error)
- func GetABIStringFromURL(url string) (string, error)
- func GetAddressFromString(str string) (addr string, name string, err error)
- func GetBalances(wallets []string, tokens []string, network Network) (balances map[common.Address][]*big.Int, block int64, err error)
- func GetCoinGeckoRateInUSD(token string) (float64, error)
- func GetERC20Decimal(addr string, network Network) (uint64, error)
- func GetERC20Symbol(addr string, network Network) (string, error)
- func GetETHPriceInUSD() (float64, error)
- func GetExactAddressFromDatabases(str string) (addrs []string, names []string, scores []int)
- func GetGnosisMsigABI() *abi.ABI
- func GetGnosisMsigDeployByteCode(ctorBytes []byte) ([]byte, error)
- func GetHistoryBalances(atBlock int64, wallets []string, tokens []string, network Network) (balances map[common.Address][]*big.Int, block int64, err error)
- func GetJarvisAddress(addr string, network Network) Address
- func GetJarvisValue(value string, network Network) Value
- func GetMatchingAddress(str string) (addr string, name string, err error)
- func GetMatchingAddresses(str string) (addrs []string, names []string, scores []int)
- func GetNodes(network Network) (map[string]string, error)
- func InterpretInput(input string, network Network) (string, error)
- func IsAddress(addr string) bool
- func IsContract(addr string, network Network) (bool, error)
- func IsERC20(addr string, network Network) (bool, error)
- func IsERC20ABI(a *abi.ABI) bool
- func IsGnosisMultisig(a *abi.ABI) (bool, error)
- func IsInlineScript(input string) bool
- func IsProxyABI(a *abi.ABI) bool
- func NewMultiCall(network Network) (*reader.MultipleCall, error)
- func ParamToBigInt(param string) (*big.Int, error)
- func PathToAddress(path string) (string, error)
- func ReadCustomABI(addr string, pathOrAddress string, network Network) (a *abi.ABI, err error)
- func ReadCustomABIString(addr string, pathOrAddress string, network Network) (str string, err error)
- func ScanForAddresses(para string) []string
- func ScanForTxs(para string) []string
- func SplitInputParamStr(input string) (result []string, err error)
- func ValueToAmountAndCurrency(value string) (string, string, error)
- type CMD
- type GrammarTree
- type TxAnalyzer
Constants ¶
View Source
const ( ETH_ADDR string = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" MAX_ADDR string = "0xffffffffffffffffffffffffffffffffffffffff" MIN_ADDR string = "0x00000000000000ffffffffffffffffffffffffff" ETHEREUM_MAINNET_NODE_VAR string = "ETHEREUM_MAINNET_NODE" ETHEREUM_ROPSTEN_NODE_VAR string = "ETHEREUM_ROPSTEN_NODE" TOMO_MAINNET_NODE_VAR string = "TOMO_MAINNET_NODE" ETHEREUM_KOVAN_NODE_VAR string = "ETHEREUM_KOVAN_NODE" ETHEREUM_RINKEBY_NODE_VAR string = "ETHEREUM_RINKEBY_NODE" BSC_MAINNET_NODE_VAR string = "BSC_MAINNET_NODE" BSC_TESTNET_NODE_VAR string = "BSC_TESTNET_NODE" ETHERSCAN_API_KEY_VAR string = "ETHERSCAN_API_KEY" BSCSCAN_API_KEY_VAR string = "BSCSCAN_API_KEY" )
Variables ¶
View Source
var ERC20_METHODS = [...]string{
"name",
"symbol",
"decimals",
"totalSupply",
"balanceOf",
"transfer",
"transferFrom",
"approve",
"allowance",
}
View Source
var PROXY_METHODS = [...]string{
"implementation",
"upgradeTo",
"upgradeToAndCall",
}
Functions ¶
func AnalyzeAndPrint ¶ added in v0.0.9
func AnalyzeMethodCallAndPrint ¶ added in v0.0.9
func CalculateTimeDurationFromBlock ¶ added in v0.0.9
func ConfigToABI ¶ added in v0.0.18
func ConvertEthereumTypeToInputString ¶ added in v0.0.20
func ConvertParamStrToArray ¶ added in v0.0.30
func ConvertParamStrToFixedByteType ¶ added in v0.0.15
func ConvertParamStrToTupleType ¶ added in v0.0.30
func ConvertParamStrToType ¶ added in v0.0.10
func ConvertToBig ¶ added in v0.0.10
func ConvertToBool ¶ added in v0.0.10
func ConvertToBytes ¶ added in v0.0.10
func ConvertToFixedBytes ¶ added in v0.0.10
func ConvertToInt ¶ added in v0.0.10
func ConvertToIntOrBig ¶ added in v0.0.10
func ConvertToString ¶ added in v0.0.10
func ConvertToUint ¶ added in v0.0.10
func ConvertToUintOrBig ¶ added in v0.0.10
func DisplayBroadcastedTx ¶ added in v0.0.9
func DisplayBroadcastedTx(t *types.Transaction, broadcasted bool, err error, network Network)
func DisplayWaitAnalyze ¶
func EthBroadcaster ¶ added in v0.0.9
func EthBroadcaster(network Network) (*broadcaster.Broadcaster, error)
func EthTxMonitor ¶ added in v0.0.9
func GetABIString ¶ added in v0.0.18
func GetABIStringBypassCache ¶ added in v0.0.20
func GetABIStringFromFile ¶ added in v0.0.17
func GetABIStringFromURL ¶ added in v0.0.17
func GetAddressFromString ¶ added in v0.0.9
func GetBalances ¶ added in v0.0.21
func GetCoinGeckoRateInUSD ¶ added in v0.0.18
func GetERC20Decimal ¶ added in v0.0.2
func GetERC20Symbol ¶ added in v0.0.27
func GetETHPriceInUSD ¶ added in v0.0.19
func GetExactAddressFromDatabases ¶ added in v0.0.18
func GetGnosisMsigABI ¶ added in v0.0.20
func GetGnosisMsigDeployByteCode ¶ added in v0.0.20
func GetHistoryBalances ¶ added in v0.0.21
func GetJarvisAddress ¶ added in v0.0.18
func GetJarvisAddress(addr string, network Network) Address
func GetJarvisValue ¶ added in v0.0.18
func GetJarvisValue(value string, network Network) Value
func GetMatchingAddress ¶ added in v0.0.17
func GetMatchingAddresses ¶ added in v0.0.17
func InterpretInput ¶ added in v0.0.20
func IsContract ¶ added in v0.0.20
func IsERC20ABI ¶ added in v0.0.27
func IsInlineScript ¶ added in v0.0.20
func IsProxyABI ¶ added in v0.0.30
func NewMultiCall ¶ added in v0.0.21
func NewMultiCall(network Network) (*reader.MultipleCall, error)
func PathToAddress ¶
func ReadCustomABI ¶ added in v0.0.16
func ReadCustomABIString ¶ added in v0.0.17
func ScanForAddresses ¶
func ScanForTxs ¶
func SplitInputParamStr ¶ added in v0.0.30
func ValueToAmountAndCurrency ¶
Split value by space, if the lowercase of first element is 'all', the amount will be "ALL", indicating a balance query is needed else, return the string as the amount. Join whats left by space and trim by space, if it is empty, interpret it as ETH. Error will not be nil if it fails to proceed all of above steps.
Types ¶
type GrammarTree ¶ added in v0.0.20
type GrammarTree struct { Cmd CMD Params []GrammarTree }
func ParseGrammarTree ¶ added in v0.0.20
func ParseGrammarTree(input string) (*GrammarTree, error)
type TxAnalyzer ¶ added in v0.0.18
type TxAnalyzer interface { AnalyzeFunctionCallRecursively(lookupABI ABIDatabase, value *big.Int, destination string, data []byte, customABIs map[string]*abi.ABI) (fc *FunctionCall) AnalyzeMethodCall(a *abi.ABI, data []byte) (method string, params []ParamResult, err error) AnalyzeOffline(txinfo *TxInfo, lookupABI ABIDatabase, customABIs map[string]*abi.ABI, isContract bool, network Network) *TxResult ParamAsJarvisValues(t abi.Type, value interface{}) []Value }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
trezoreum/trezor
Package trezor contains the wire protocol.
|
Package trezor contains the wire protocol. |
usb
Package usb provide interfaces for generic USB devices.
|
Package usb provide interfaces for generic USB devices. |
Click to show internal directories.
Click to hide internal directories.