Documentation ¶
Index ¶
- func CanSkipCapabilityValueMigration(valueType interpreter.StaticType) bool
- type CapabilityEntry
- type CapabilityEntryMap
- type CapabilityMapping
- type CapabilityMigrationReporter
- type CapabilityValueMigration
- func (m *CapabilityValueMigration) CanSkip(valueType interpreter.StaticType) bool
- func (*CapabilityValueMigration) Domains() map[string]struct{}
- func (m *CapabilityValueMigration) Migrate(storageKey interpreter.StorageKey, _ interpreter.StorageMapKey, ...) (interpreter.Value, error)
- func (*CapabilityValueMigration) Name() string
- type CyclicLinkError
- type LinkMigrationReporter
- type LinkValueMigration
- func (m *LinkValueMigration) CanSkip(valueType interpreter.StaticType) bool
- func (m *LinkValueMigration) Domains() map[string]struct{}
- func (m *LinkValueMigration) Migrate(storageKey interpreter.StorageKey, storageMapKey interpreter.StorageMapKey, ...) (interpreter.Value, error)
- func (*LinkValueMigration) Name() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanSkipCapabilityValueMigration ¶
func CanSkipCapabilityValueMigration(valueType interpreter.StaticType) bool
Types ¶
type CapabilityEntry ¶
type CapabilityEntry struct { CapabilityID interpreter.UInt64Value BorrowType *sema.ReferenceType }
type CapabilityEntryMap ¶
type CapabilityEntryMap map[interpreter.PathValue]CapabilityEntry
type CapabilityMapping ¶
type CapabilityMapping struct {
// contains filtered or unexported fields
}
func (*CapabilityMapping) Get ¶
func (m *CapabilityMapping) Get(addressPath interpreter.AddressPath) (interpreter.UInt64Value, sema.Type, bool)
func (*CapabilityMapping) Record ¶
func (m *CapabilityMapping) Record( addressPath interpreter.AddressPath, capabilityID interpreter.UInt64Value, borrowType *sema.ReferenceType, )
type CapabilityMigrationReporter ¶
type CapabilityMigrationReporter interface { MigratedPathCapability( accountAddress common.Address, addressPath interpreter.AddressPath, borrowType *interpreter.ReferenceStaticType, ) MissingCapabilityID( accountAddress common.Address, addressPath interpreter.AddressPath, ) }
type CapabilityValueMigration ¶
type CapabilityValueMigration struct { CapabilityMapping *CapabilityMapping Reporter CapabilityMigrationReporter }
CapabilityValueMigration migrates all path capabilities to ID capabilities, using the path to ID capability controller mapping generated by LinkValueMigration.
func (*CapabilityValueMigration) CanSkip ¶
func (m *CapabilityValueMigration) CanSkip(valueType interpreter.StaticType) bool
func (*CapabilityValueMigration) Domains ¶
func (*CapabilityValueMigration) Domains() map[string]struct{}
func (*CapabilityValueMigration) Migrate ¶
func (m *CapabilityValueMigration) Migrate( storageKey interpreter.StorageKey, _ interpreter.StorageMapKey, value interpreter.Value, _ *interpreter.Interpreter, ) (interpreter.Value, error)
Migrate migrates a path capability to an ID capability in the given value. If a value is returned, the value must be updated with the replacement in the parent. If nil is returned, the value was not updated and no operation has to be performed.
func (*CapabilityValueMigration) Name ¶
func (*CapabilityValueMigration) Name() string
type CyclicLinkError ¶
type CyclicLinkError struct { Paths []interpreter.PathValue Address common.Address }
CyclicLinkError
func (CyclicLinkError) Error ¶
func (e CyclicLinkError) Error() string
func (CyclicLinkError) IsUserError ¶
func (CyclicLinkError) IsUserError()
type LinkMigrationReporter ¶
type LinkMigrationReporter interface { MigratedLink( accountAddressPath interpreter.AddressPath, capabilityID interpreter.UInt64Value, ) CyclicLink(err CyclicLinkError) MissingTarget(accountAddressPath interpreter.AddressPath) }
type LinkValueMigration ¶
type LinkValueMigration struct { CapabilityMapping *CapabilityMapping AccountIDGenerator stdlib.AccountIDGenerator Reporter LinkMigrationReporter }
LinkValueMigration migrates all links to capability controllers.
func (*LinkValueMigration) CanSkip ¶
func (m *LinkValueMigration) CanSkip(valueType interpreter.StaticType) bool
func (*LinkValueMigration) Domains ¶
func (m *LinkValueMigration) Domains() map[string]struct{}
func (*LinkValueMigration) Migrate ¶
func (m *LinkValueMigration) Migrate( storageKey interpreter.StorageKey, storageMapKey interpreter.StorageMapKey, value interpreter.Value, inter *interpreter.Interpreter, ) (interpreter.Value, error)
func (*LinkValueMigration) Name ¶
func (*LinkValueMigration) Name() string
Click to show internal directories.
Click to hide internal directories.