cethacea

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAccountFileName = ".accounts.yaml"
View Source
var RootCmd = cobra.Command{
	Use: "cethacea",
}

Functions

func LogAsTypedItem

func LogAsTypedItem(event abi.Event, l ethtypes.Log) (types.Item, error)

func PrintAmount

func PrintAmount(amount *big.Int, dec uint8, symbol string) string

func PrintEthFromDecimal added in v1.1.2

func PrintEthFromDecimal(dec decimal.Decimal) string

func PrintGWei

func PrintGWei(wei *big.Int) string

func PrintItem

func PrintItem(item types.Item, format string) error

func PrintRawLog

func PrintRawLog(l ethtypes.Log)

func PrintStruct added in v1.2.0

func PrintStruct(str interface{}, format string) error

func PrintTransaction

func PrintTransaction(tx *ethtypes.Transaction, receipt *ethtypes.Receipt)

Types

type Ceth

type Ceth struct {
	AccountRepo  *config.AccountRepo
	ContractRepo *config.ContractRepo
	ChainManager *config.ChainRepo
	Settings     *CethSettings
}

func NewCethContext

func NewCethContext(settings *CethSettings) (*Ceth, error)

func (*Ceth) AccountClient

func (c *Ceth) AccountClient() (types.Account, *chain.Eth, error)

func (*Ceth) AccountContractClient

func (c *Ceth) AccountContractClient() (types.Account, types.Contract, *chain.Eth, error)

func (*Ceth) GetChainClient

func (c *Ceth) GetChainClient() (chain.ChainClient, error)

func (*Ceth) GetClient

func (c *Ceth) GetClient() (*chain.Eth, error)

func (*Ceth) GetCurrentContract

func (c *Ceth) GetCurrentContract() (types.Contract, error)

func (*Ceth) GetRpcClient

func (c *Ceth) GetRpcClient(ctx context.Context) (*rpc.Client, error)

func (*Ceth) ResolveAddress

func (c *Ceth) ResolveAddress(address string) (common.Address, error)

func (*Ceth) SetDefaultAccount

func (c *Ceth) SetDefaultAccount(s string) error

func (*Ceth) SetDefaultChain

func (c *Ceth) SetDefaultChain(s string) error

func (*Ceth) SetDefaultContract

func (c *Ceth) SetDefaultContract(name string) error

type CethSettings

type CethSettings struct {
	Contract  string
	Chain     string
	Account   string
	Abi       string
	Format    string
	All       bool
	Debug     bool
	Confirm   bool
	GasTipCap string
	Gas       uint64
}
var Settings CethSettings

type EncryptionEnvelope

type EncryptionEnvelope struct {
	Data string `json:"data"`
	Iv   string `json:"iv"`
	Hmac string `json:"hmac"`
}

type JsonRpcRequest

type JsonRpcRequest struct {
	Id      int64       `json:"id"`
	JsonRPC string      `json:"jsonrpc"`
	Method  string      `json:"method"`
	Params  interface{} `json:"params"`
}

type JsonRpcResponse

type JsonRpcResponse struct {
	Id      int64       `json:"id"`
	JsonRPC string      `json:"jsonrpc"`
	Result  interface{} `json:"result"`
}

type Message

type Message struct {
	Topic   string `json:"topic"`
	Type    string `json:"type"`
	Payload string `json:"payload"`
}

type UniPair

type UniPair struct {
	Contract string
	Token0   string
	Token1   string
	Symbol0  string
	Symbol1  string
	Name     string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL