operations

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpEVMAcceptOwnership = operations.NewOperation(
	"evm-accept-ownership",
	semver.MustParse("1.0.0"),
	"Accepts ownership of an ownable contract Via the Timelock contract",
	func(b operations.Bundle, deps OpEVMOwnershipDeps, in OpEVMTransferOwnershipInput) (OpEVMOwnershipOutput, error) {
		tx, err := deps.OwnableC.AcceptOwnership(cldf.SimTransactOpts())
		if err != nil {
			return OpEVMOwnershipOutput{Tx: tx}, fmt.Errorf(
				"failed to Accept ownership of contract %T: %w",
				in.Address.Hex(),
				err,
			)
		}

		return OpEVMOwnershipOutput{
			Tx: tx,
		}, nil
	})

This function is deprecated. Use opevm.OpTransferOwnership instead.

This has been kept for backwards compatibility as the keystone and data streams domain still uses this operation.

Deprecated: To be removed once the keystone and data streams domains is updated to use operations.OpEVMAcceptOwnership in the legacy package.

View Source
var OpEVMTransferOwnership = operations.NewOperation(
	"evm-transfer-ownership",
	semver.MustParse("1.0.0"),
	"Transfer ownership of an ownable contract to the specified address",
	func(b operations.Bundle, deps OpEVMOwnershipDeps, in OpEVMTransferOwnershipInput) (OpEVMOwnershipOutput, error) {
		tx, err := deps.OwnableC.TransferOwnership(deps.Chain.DeployerKey, common.HexToAddress(in.TimelockAddress.Hex()))
		_, err = cldf.ConfirmIfNoError(deps.Chain, tx, err)
		if err != nil {
			return OpEVMOwnershipOutput{Tx: tx}, fmt.Errorf(
				"failed to transfer ownership of contract %T: %w",
				in.Address.Hex(),
				err,
			)
		}

		return OpEVMOwnershipOutput{
			Tx: tx,
		}, nil
	})

This function is deprecated. Use opevm.OpTransferOwnership instead.

This has been kept for backwards compatibility as the keystone domain still uses this operation.

Deprecated: To be removed once the keystone domain is updated to use operations.OpEVMAcceptOwnership in the legacy package.

Functions

This section is empty.

Types

type OpEVMOwnershipDeps added in v0.4.0

type OpEVMOwnershipDeps struct {
	Chain    cldf_evm.Chain
	OwnableC evmstate.Ownable // Ownable contract interface
}

type OpEVMOwnershipOutput added in v0.4.0

type OpEVMOwnershipOutput struct {
	Tx *gethtypes.Transaction `json:"tx"`
}

type OpEVMTransferOwnershipInput added in v0.4.0

type OpEVMTransferOwnershipInput struct {
	ChainSelector   uint64         `json:"chainSelector"`   // Chain selector for the EVM chain
	TimelockAddress common.Address `json:"timelockAddress"` // Address of the EVM Timelock contract
	Address         common.Address `json:"address"`         // Address to Contract for which ownership is being transferred
}

Jump to

Keyboard shortcuts

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