Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TransferTracer = `` /* 6553-byte string literal not displayed */
Functions ¶
func ReadTracer ¶
ReadTracer reads a tracer file from the filesystem
Types ¶
type DebugClient ¶
type DebugClient struct {
// contains filtered or unexported fields
}
DebugClient defines typed wrappers for the Debug RPC API.
func NewClient ¶
func NewClient(c *rpc.Client) *DebugClient
NewClient creates a client that uses the given RPC client.
func (*DebugClient) TraceTransaction ¶
func (dc *DebugClient) TraceTransaction(ctx context.Context, result interface{}, txhash common.Hash, traceConfig *tracers.TraceConfig) error
TraceTransactions performs a tracer over a transaction. Can use a custom tracer or default one result type depends on the tracer, and it's the caller reponsability to use the proper one
func (*DebugClient) TransactionTransfers ¶
func (dc *DebugClient) TransactionTransfers(ctx context.Context, txhash common.Hash) ([]Transfer, error)
TransactionTransfers is deprecated, use DebugClient.TraceTransaction with TransferTracer and TransferTracerResponse instead. e.g.
var res TransferTracerResponse var timeout = "50s" conf := ð.TraceConfig{Tracer: &TransferTracer, Timeout: &timeout} err := dc.TraceTransaction(ctx, &res, txhash, conf)
type Transfer ¶
type Transfer struct { From common.Address `json:"from"` To common.Address `json:"to"` Value *big.Int `json:"value"` Status TransferStatus `json:"status"` }
func (*Transfer) UnmarshalJSON ¶
UnmarshalJSON unmarshals from JSON.
type TransferStatus ¶
type TransferStatus string
const ( TransferStatusSuccess TransferStatus = "success" TransferStatusRevert TransferStatus = "revert" )
func (TransferStatus) String ¶
func (ts TransferStatus) String() string
type TransferTracerResponse ¶ added in v0.2.2
type TransferTracerResponse struct {
Transfers []Transfer `json:"transfers"`
}
Click to show internal directories.
Click to hide internal directories.