capcons

package
v1.0.0-M6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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 (*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

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

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 (*LinkValueMigration) Name

func (*LinkValueMigration) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL