Documentation
¶
Index ¶
- Variables
- type ABI
- type AccountID
- type Argument
- type Arguments
- type ArgumentsString
- type ArgumentsUint
- type Contract
- type ContractAddress
- type ContractDetails
- type ContractID
- type ContractSource
- type ContractStack
- type Core
- type DecodedArgument
- type DecodedCallData
- type DeploymentInformation
- type Event
- type Exception
- type Frame
- type InstructionMapping
- type Method
- type NetworkID
- type SourceMap
- type StackFrame
- type StackTrace
- type TenderlyContractSource
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EnableDebugLogging bool = false
)
View Source
var (
ErrNotExist = errors.New("contract does not exist")
)
Functions ¶
This section is empty.
Types ¶
type ArgumentsString ¶
type ArgumentsUint ¶
type Contract ¶
type Contract struct {
ID ContractID
AccountID *AccountID `json:"account_id"`
Name string `json:"contract_name"`
LowercaseName string `json:"lowercase_contract_name"`
Abi string `json:"abi"`
Bytecode string `json:"bytecode"`
SourceMap string `json:"source_map"`
Source string `json:"source"`
NumberOfExceptions int `json:"number_of_exceptions"`
LastEventOccurredAt *time.Time `json:"last_event_occurred_at"`
VerificationDate time.Time `json:"verification_date"`
CreatedAt time.Time `json:"created_at"`
}
type ContractAddress ¶
type ContractAddress string
func NewContractAddress ¶
func NewContractAddress(address string) ContractAddress
func (ContractAddress) String ¶
func (address ContractAddress) String() string
type ContractDetails ¶
type ContractID ¶
type ContractID string
func (ContractID) String ¶
func (id ContractID) String() string
type ContractSource ¶
type ContractSource interface {
Get(id string) (*ContractDetails, error)
}
type ContractStack ¶
type ContractStack struct {
// contains filtered or unexported fields
}
func NewContractStack ¶
func NewContractStack(initialContract *ContractDetails) *ContractStack
func (*ContractStack) Get ¶
func (cs *ContractStack) Get() *ContractDetails
func (*ContractStack) Pop ¶
func (cs *ContractStack) Pop()
func (*ContractStack) Push ¶
func (cs *ContractStack) Push(contract *ContractDetails)
type Core ¶
type Core struct {
Contracts ContractSource
// contains filtered or unexported fields
}
func NewCore ¶
func NewCore(contracts ContractSource) *Core
func (*Core) GenerateStackTrace ¶
func (c *Core) GenerateStackTrace(contractHash string, txTrace ethereum.TransactionStates) ([]*StackFrame, error)
Process a single transaction @TODO: remove client!
type DecodedArgument ¶
type DecodedArgument struct {
Soltype Argument
Value interface{}
}
type DecodedCallData ¶
type DecodedCallData struct {
Signature string
Name string
Inputs []DecodedArgument
}
type DeploymentInformation ¶
type DeploymentInformation struct {
NetworkID NetworkID `json:"network_id"`
Address ContractAddress `json:"address"`
}
func (DeploymentInformation) String ¶
func (deployment DeploymentInformation) String() string
type Exception ¶
type Exception struct {
ContractID ContractID `json:"contract_id"`
BlockNumber int64 `json:"block_number"`
TransactionID string `json:"transaction_id"`
Method string
Parameters []DecodedArgument
StackTrace []*StackFrame
CreatedAt time.Time
Projects []string
}
type Frame ¶
type InstructionMapping ¶
type SourceMap ¶
type SourceMap map[int]*InstructionMapping
SourceMap is the memory address to instruction information map.
type StackFrame ¶
type StackFrame struct {
ContractAddress ContractAddress `json:"contract"`
ContractName string `json:"name"`
Line int `json:"line"`
Code string `json:"code",firestore:"-"`
Op string `json:"op",firestore:"-"`
Start int `json:"start"`
Length int `json:"length"`
}
@TODO: Figure out if this is how we want to name it.
func (StackFrame) String ¶
func (f StackFrame) String() string
type StackTrace ¶
type StackTrace struct {
Frames []*Frame
}
func (*StackTrace) PopFrame ¶
func (st *StackTrace) PopFrame() *Frame
func (*StackTrace) PushFrame ¶
func (st *StackTrace) PushFrame(frame *Frame)
type TenderlyContractSource ¶
type TenderlyContractSource struct {
// contains filtered or unexported fields
}
func (*TenderlyContractSource) Get ¶
func (cs *TenderlyContractSource) Get(id string) (*ContractDetails, error)
Click to show internal directories.
Click to hide internal directories.