Documentation
¶
Index ¶
- Variables
- type EmulationResult
- type Emulator
- func (e *Emulator) Emulate(shardAccount tlb.ShardAccount, message tlb.Message) (EmulationResult, error)
- func (e *Emulator) SetConfig(config *boc.Cell) error
- func (e *Emulator) SetIgnoreSignatureCheck(ignore bool) error
- func (e *Emulator) SetLT(lt uint64) error
- func (e *Emulator) SetLibs(libs *boc.Cell) error
- func (e *Emulator) SetRandomSeed(seed [32]byte) error
- func (e *Emulator) SetUnixtime(utime uint32) error
- func (e *Emulator) SetVerbosityLevel(level int) error
- type ErrorWithExitCode
- type TraceOption
- func WithAccounts(accounts ...tlb.ShardAccount) TraceOption
- func WithAccountsMap(m map[ton.AccountID]tlb.ShardAccount) TraceOption
- func WithAccountsSource(b accountGetter) TraceOption
- func WithConfig(c *boc.Cell) TraceOption
- func WithConfigBase64(c string) TraceOption
- func WithLimit(l int) TraceOption
- func WithSignatureCheck() TraceOption
- func WithSoftLimit(l int) TraceOption
- func WithTestnet() TraceOption
- func WithTime(t int64) TraceOption
- type TraceOptions
- type Tracer
- type TxTree
- type VerbosityLevel
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = `` /* 1500-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type EmulationResult ¶
type EmulationResult struct { Success bool Emulation *struct { ShardAccount tlb.ShardAccount Transaction tlb.Transaction RawTransaction string } Logs string Error *struct { ExitCode int Text string } }
type Emulator ¶
type Emulator struct {
// contains filtered or unexported fields
}
func NewEmulator ¶
func NewEmulator(config *boc.Cell, verbosityLevel VerbosityLevel) (*Emulator, error)
NewEmulator Verbosity level of VM log. 0 - log truncated to last 256 characters. 1 - unlimited length log. 2 - for each command prints its cell hash and offset. 3 - for each command log prints all stack values.
func (*Emulator) Emulate ¶
func (e *Emulator) Emulate(shardAccount tlb.ShardAccount, message tlb.Message) (EmulationResult, error)
func (*Emulator) SetIgnoreSignatureCheck ¶
func (*Emulator) SetRandomSeed ¶
func (*Emulator) SetUnixtime ¶
func (*Emulator) SetVerbosityLevel ¶
SetVerbosityLevel verbosity level (0 - never, 1 - error, 2 - warning, 3 - info, 4 - debug)
type ErrorWithExitCode ¶ added in v1.4.2
ErrorWithExitCode is an error returned when emulation failed with exit code.
func (ErrorWithExitCode) Error ¶ added in v1.4.2
func (e ErrorWithExitCode) Error() string
func (ErrorWithExitCode) Is ¶ added in v1.4.2
func (e ErrorWithExitCode) Is(err error) bool
type TraceOption ¶ added in v1.1.0
type TraceOption func(o *TraceOptions) error
func WithAccounts ¶ added in v1.1.0
func WithAccounts(accounts ...tlb.ShardAccount) TraceOption
func WithAccountsMap ¶ added in v1.1.0
func WithAccountsMap(m map[ton.AccountID]tlb.ShardAccount) TraceOption
func WithAccountsSource ¶ added in v1.1.0
func WithAccountsSource(b accountGetter) TraceOption
func WithConfig ¶ added in v1.1.0
func WithConfig(c *boc.Cell) TraceOption
func WithConfigBase64 ¶ added in v1.1.0
func WithConfigBase64(c string) TraceOption
func WithLimit ¶ added in v1.1.0
func WithLimit(l int) TraceOption
func WithSignatureCheck ¶ added in v1.1.0
func WithSignatureCheck() TraceOption
func WithSoftLimit ¶ added in v1.8.0
func WithSoftLimit(l int) TraceOption
func WithTestnet ¶ added in v1.1.0
func WithTestnet() TraceOption
func WithTime ¶ added in v1.1.0
func WithTime(t int64) TraceOption
type TraceOptions ¶ added in v1.1.0
type TraceOptions struct {
// contains filtered or unexported fields
}
type Tracer ¶ added in v1.1.0
type Tracer struct {
// contains filtered or unexported fields
}
func NewTraceBuilder ¶ added in v1.1.0
func NewTraceBuilder(options ...TraceOption) (*Tracer, error)
func (*Tracer) FinalStates ¶ added in v1.1.0
func (t *Tracer) FinalStates() map[ton.AccountID]tlb.ShardAccount
type TxTree ¶ added in v1.1.0
type TxTree struct { TX tlb.Transaction Children []*TxTree }
type VerbosityLevel ¶
type VerbosityLevel int
const ( LogTruncated VerbosityLevel = iota LogUnlimited CellHashAndOffsetForCommand PrintsAllStackValuesForCommand )
Click to show internal directories.
Click to hide internal directories.