Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedDeploy = errors.New("error: failed deploy, expected successful deploys") ErrEventNameNotInSchema = errors.New("error: event name not found in Schema") ErrFailedToParseContractEventSchema = errors.New("error: failed to parse contract event Schema") ErrExpectContractStoredValue = errors.New("error: expect contract stored value") ErrExpectCLValueStoredValue = errors.New("error: expect clValue stored value") ErrMissingRequiredNamedKey = errors.New("error: missing required named key") ErrNoEventPrefixInEvent = errors.New("error: no event_ prefix in event") ErrNilDictionaryInTransform = errors.New("error: nil dictionary in transform") )
View Source
var ErrInvalidSchemaFormat = errors.New("invalid schema format")
Functions ¶
Types ¶
type ContractMetadata ¶
type ContractMetadata struct { Schemas Schemas ContractHash casper.Hash ContractPackageHash casper.Hash EventsSchemaURef casper.Uref EventsURef casper.Uref }
func LoadContractMetadataWithoutSchema ¶
func LoadContractMetadataWithoutSchema(contractResult casper.Contract) (ContractMetadata, error)
type EventMetadata ¶
func ParseEventMetadataFromTransform ¶
func ParseEventMetadataFromTransform(transform casper.TransformKey) (EventMetadata, error)
type EventParser ¶
type EventParser struct {
// contains filtered or unexported fields
}
func (*EventParser) FetchContractSchemasBytes ¶
func (p *EventParser) FetchContractSchemasBytes(contractHash casper.Hash) ([]byte, error)
FetchContractSchemasBytes accept contract hash to fetch stored contract schema
func (*EventParser) ParseExecutionResults ¶
func (p *EventParser) ParseExecutionResults(executionResult casper.ExecutionResult) ([]ParseResult, error)
ParseExecutionResults accept casper.ExecutionResult analyze its transforms and trying to parse events according to stored contract schema
type ParseResult ¶
type SchemaData ¶
func (*SchemaData) MarshalJSON ¶
func (t *SchemaData) MarshalJSON() ([]byte, error)
func (*SchemaData) UnmarshalJSON ¶
func (t *SchemaData) UnmarshalJSON(data []byte) error
type Schemas ¶
type Schemas map[EventName][]SchemaData
func NewSchemasFromBytes ¶
Click to show internal directories.
Click to hide internal directories.