Documentation
¶
Index ¶
- Variables
- func ContractStateKey(addr base.Address) string
- func DesignStateKey(addr base.Address) string
- func GetDesignFromState(st base.State) (types.Design, error)
- func IsDesignStateKey(key string) bool
- func IsRuntimeStateKey(key string) bool
- func IsSnapshotStateKey(key string) bool
- func RuntimeStateKey(addr base.Address) string
- func SnapshotStateKey(addr base.Address) string
- type DesignStateValue
- func (sv *DesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (sv *DesignStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (sv DesignStateValue) HashBytes() []byte
- func (sv DesignStateValue) Hint() hint.Hint
- func (sv DesignStateValue) IsValid([]byte) error
- func (sv DesignStateValue) MarshalBSON() ([]byte, error)
- func (sv DesignStateValue) MarshalJSON() ([]byte, error)
- type DesignStateValueBSONUnmarshaler
- type DesignStateValueJSONMarshaler
- type DesignStateValueJSONUnmarshaler
- type RuntimeEngine
- type RuntimeStateValue
- func (sv *RuntimeStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (sv *RuntimeStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (sv RuntimeStateValue) HashBytes() []byte
- func (sv RuntimeStateValue) Hint() hint.Hint
- func (sv RuntimeStateValue) IsValid([]byte) error
- func (sv RuntimeStateValue) MarshalBSON() ([]byte, error)
- func (sv RuntimeStateValue) MarshalJSON() ([]byte, error)
- type RuntimeStateValueBSONUnmarshaler
- type RuntimeStateValueJSONMarshaler
- type RuntimeStateValueJSONUnmarshaler
- type SnapshotStateValue
- func (sv *SnapshotStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (sv *SnapshotStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (sv SnapshotStateValue) HashBytes() []byte
- func (sv SnapshotStateValue) Hint() hint.Hint
- func (sv SnapshotStateValue) IsValid([]byte) error
- func (sv SnapshotStateValue) MarshalBSON() ([]byte, error)
- func (sv SnapshotStateValue) MarshalJSON() ([]byte, error)
- type SnapshotStateValueBSONUnmarshaler
- type SnapshotStateValueJSONMarshaler
- type SnapshotStateValueJSONUnmarshaler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DesignStateValueHint = hint.MustNewHint("mitum-contract-design-state-value-v0.0.1") ContractStateKeyPrefix = "contract" DesignStateKeySuffix = "design" )
View Source
var ( RuntimeStateValueHint = hint.MustNewHint("mitum-contract-runtime-state-value-v0.0.1") RuntimeStateKeySuffix = "runtime" SnapshotStateValueHint = hint.MustNewHint("mitum-contract-snapshot-state-value-v0.0.1") SnapshotStateKeySuffix = "snapshot" )
Functions ¶
func ContractStateKey ¶
func DesignStateKey ¶
func IsDesignStateKey ¶
func IsRuntimeStateKey ¶
func IsSnapshotStateKey ¶
func RuntimeStateKey ¶
func SnapshotStateKey ¶
Types ¶
type DesignStateValue ¶
type DesignStateValue struct {
hint.BaseHinter
Design types.Design
Schema *types.PersistedContractSchema
}
func GetDesignStateValueFromState ¶
func GetDesignStateValueFromState(st base.State) (DesignStateValue, error)
func NewDesignStateValue ¶
func NewDesignStateValue(design types.Design) DesignStateValue
func NewDesignStateValueWithSchema ¶
func NewDesignStateValueWithSchema( design types.Design, schema *types.PersistedContractSchema, ) DesignStateValue
func (*DesignStateValue) DecodeBSON ¶
func (sv *DesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*DesignStateValue) DecodeJSON ¶
func (sv *DesignStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
func (DesignStateValue) HashBytes ¶
func (sv DesignStateValue) HashBytes() []byte
func (DesignStateValue) Hint ¶
func (sv DesignStateValue) Hint() hint.Hint
func (DesignStateValue) IsValid ¶
func (sv DesignStateValue) IsValid([]byte) error
func (DesignStateValue) MarshalBSON ¶
func (sv DesignStateValue) MarshalBSON() ([]byte, error)
func (DesignStateValue) MarshalJSON ¶
func (sv DesignStateValue) MarshalJSON() ([]byte, error)
type DesignStateValueBSONUnmarshaler ¶
type DesignStateValueBSONUnmarshaler struct {
Hint string `bson:"_hint"`
Design bson.Raw `bson:"design"`
Schema *types.PersistedContractSchema `bson:"schema"`
}
type DesignStateValueJSONMarshaler ¶
type DesignStateValueJSONMarshaler struct {
hint.BaseHinter
Design types.Design `json:"design"`
Schema *types.PersistedContractSchema `json:"schema,omitempty"`
}
type DesignStateValueJSONUnmarshaler ¶
type DesignStateValueJSONUnmarshaler struct {
Hint hint.Hint `json:"_hint"`
Design json.RawMessage `json:"design"`
Schema *types.PersistedContractSchema `json:"schema"`
}
type RuntimeEngine ¶
type RuntimeEngine string
const (
RuntimeEngineGnoSnapshot RuntimeEngine = "gno-snapshot-v1"
)
type RuntimeStateValue ¶
type RuntimeStateValue struct {
hint.BaseHinter
Engine RuntimeEngine
ABIVersion string
PackageName string
PackagePath string
SnapshotVersion uint64
}
func GetRuntimeFromState ¶
func GetRuntimeFromState(st base.State) (RuntimeStateValue, error)
func NewRuntimeStateValue ¶
func NewRuntimeStateValue( engine RuntimeEngine, abiVersion string, packageName string, packagePath string, snapshotVersion uint64, ) RuntimeStateValue
func (*RuntimeStateValue) DecodeBSON ¶
func (sv *RuntimeStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*RuntimeStateValue) DecodeJSON ¶
func (sv *RuntimeStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
func (RuntimeStateValue) HashBytes ¶
func (sv RuntimeStateValue) HashBytes() []byte
func (RuntimeStateValue) Hint ¶
func (sv RuntimeStateValue) Hint() hint.Hint
func (RuntimeStateValue) IsValid ¶
func (sv RuntimeStateValue) IsValid([]byte) error
func (RuntimeStateValue) MarshalBSON ¶
func (sv RuntimeStateValue) MarshalBSON() ([]byte, error)
func (RuntimeStateValue) MarshalJSON ¶
func (sv RuntimeStateValue) MarshalJSON() ([]byte, error)
type RuntimeStateValueJSONMarshaler ¶
type RuntimeStateValueJSONMarshaler struct {
hint.BaseHinter
Engine RuntimeEngine `json:"engine"`
ABIVersion string `json:"abi_version"`
PackageName string `json:"package_name"`
PackagePath string `json:"package_path"`
SnapshotVersion uint64 `json:"snapshot_version"`
}
type SnapshotStateValue ¶
type SnapshotStateValue struct {
hint.BaseHinter
Version uint64
Codec string
Snapshot []byte
}
func GetSnapshotFromState ¶
func GetSnapshotFromState(st base.State) (SnapshotStateValue, error)
func NewSnapshotStateValue ¶
func NewSnapshotStateValue(version uint64, codec string, snapshot []byte) SnapshotStateValue
func (*SnapshotStateValue) DecodeBSON ¶
func (sv *SnapshotStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*SnapshotStateValue) DecodeJSON ¶
func (sv *SnapshotStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
func (SnapshotStateValue) HashBytes ¶
func (sv SnapshotStateValue) HashBytes() []byte
func (SnapshotStateValue) Hint ¶
func (sv SnapshotStateValue) Hint() hint.Hint
func (SnapshotStateValue) IsValid ¶
func (sv SnapshotStateValue) IsValid([]byte) error
func (SnapshotStateValue) MarshalBSON ¶
func (sv SnapshotStateValue) MarshalBSON() ([]byte, error)
func (SnapshotStateValue) MarshalJSON ¶
func (sv SnapshotStateValue) MarshalJSON() ([]byte, error)
type SnapshotStateValueJSONMarshaler ¶
type SnapshotStateValueJSONMarshaler struct {
hint.BaseHinter
Version uint64 `json:"version"`
Codec string `json:"codec"`
Snapshot []byte `json:"snapshot"`
}
Click to show internal directories.
Click to hide internal directories.