Documentation ¶
Index ¶
- func AddressSliceToCadenceValue(addresses []common.Address) cadence.Value
- func CadenceValueToAddressSlice(value cadence.Value) (addresses []common.Address, ok bool)
- func CadenceValueToWeights(value cadence.Value) (map[uint]uint64, bool)
- func FlowAddressSliceToCadenceAddressSlice(addresses []flow.Address) []common.Address
- type MapLedger
- type SimpleView
- func (v *SimpleView) AllRegisters() []flow.RegisterID
- func (v *SimpleView) Delete(owner, key string) error
- func (v *SimpleView) DropDelta()
- func (v *SimpleView) Get(owner, key string) (flow.RegisterValue, error)
- func (v *SimpleView) MergeView(o state.View) error
- func (v *SimpleView) NewChild() state.View
- func (v *SimpleView) Payloads() []ledger.Payload
- func (v *SimpleView) RegisterUpdates() ([]flow.RegisterID, []flow.RegisterValue)
- func (v *SimpleView) Set(owner, key string, value flow.RegisterValue) error
- func (v *SimpleView) Touch(owner, key string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressSliceToCadenceValue ¶ added in v0.17.1
func CadenceValueToAddressSlice ¶ added in v0.25.0
func CadenceValueToWeights ¶ added in v0.25.2
CadenceValueToWeights converts a cadence value to a map of weights used for metering
Types ¶
type MapLedger ¶
type MapLedger struct { sync.RWMutex Registers map[flow.RegisterID]flow.RegisterValue RegisterTouches map[flow.RegisterID]struct{} RegisterUpdated map[flow.RegisterID]struct{} }
A MapLedger is a naive ledger storage implementation backed by a simple map.
This implementation is designed for testing and migration purposes.
func NewMapLedger ¶
func NewMapLedger() *MapLedger
NewMapLedger returns an instance of map ledger (should only be used for testing and migration)
func NewMapLedgerFromPayloads ¶ added in v0.29.0
NewMapLedger returns an instance of map ledger with entries loaded from payloads (should only be used for testing and migration)
type SimpleView ¶
type SimpleView struct { Parent *SimpleView Ledger *MapLedger }
SimpleView provides a simple view for testing and migration purposes.
func NewSimpleView ¶
func NewSimpleView() *SimpleView
func NewSimpleViewFromPayloads ¶ added in v0.29.0
func NewSimpleViewFromPayloads(payloads []ledger.Payload) *SimpleView
func (*SimpleView) AllRegisters ¶ added in v0.16.0
func (v *SimpleView) AllRegisters() []flow.RegisterID
returns all the registers that has been touched
func (*SimpleView) Delete ¶
func (v *SimpleView) Delete(owner, key string) error
func (*SimpleView) DropDelta ¶
func (v *SimpleView) DropDelta()
func (*SimpleView) Get ¶
func (v *SimpleView) Get(owner, key string) (flow.RegisterValue, error)
func (*SimpleView) NewChild ¶
func (v *SimpleView) NewChild() state.View
func (*SimpleView) Payloads ¶ added in v0.29.0
func (v *SimpleView) Payloads() []ledger.Payload
func (*SimpleView) RegisterUpdates ¶ added in v0.16.0
func (v *SimpleView) RegisterUpdates() ([]flow.RegisterID, []flow.RegisterValue)
func (*SimpleView) Set ¶
func (v *SimpleView) Set(owner, key string, value flow.RegisterValue) error
func (*SimpleView) Touch ¶
func (v *SimpleView) Touch(owner, key string) error
Click to show internal directories.
Click to hide internal directories.