Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilityIDMapping ¶
type CapabilityIDMapping struct {
// contains filtered or unexported fields
}
func (*CapabilityIDMapping) Get ¶
func (m *CapabilityIDMapping) Get(addressPath interpreter.AddressPath) (interpreter.UInt64Value, bool)
func (*CapabilityIDMapping) Record ¶
func (m *CapabilityIDMapping) Record(addressPath interpreter.AddressPath, capabilityID interpreter.UInt64Value)
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 { CapabilityIDs *CapabilityIDMapping Reporter CapabilityMigrationReporter }
CapabilityValueMigration migrates all path capabilities to ID capabilities, using the path to ID capability controller mapping generated by LinkValueMigration.
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 { CapabilityIDs *CapabilityIDMapping AccountIDGenerator stdlib.AccountIDGenerator Reporter LinkMigrationReporter }
LinkValueMigration migrates all links to capability controllers.
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.