Documentation ¶
Overview ¶
Package standard contains interfaces for well-defined standards and function for checking if arbitrary manifest complies with them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMethodMissing = errors.New("method missing") ErrEventMissing = errors.New("event missing") ErrInvalidReturnType = errors.New("invalid return type") ErrInvalidParameterCount = errors.New("invalid parameter count") ErrInvalidParameterName = errors.New("invalid parameter name") ErrInvalidParameterType = errors.New("invalid parameter type") ErrSafeMethodMismatch = errors.New("method has wrong safe flag") )
Various validation errors.
Functions ¶
func Check ¶
Check checks if manifest complies with all provided standards. Currently only NEP-17 is supported.
Types ¶
type Standard ¶ added in v0.94.0
type Standard struct { // Manifest describes mandatory methods and events. manifest.Manifest // Base contains base standard. Base *Standard // Optional contains optional contract methods. // If contract contains method with the same name and parameter count, // it must have signature declared by this contract. Optional []manifest.Method }
Standard represents smart-contract standard.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.