operations

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CCIPDVPCoordinatorABI added in v0.0.10

func CCIPDVPCoordinatorABI() *abi.ABI

CCIPDVPCoordinatorABI returns the parsed CCIPDVPCoordinator ABI.

func HashSettlement

func HashSettlement(settlement *events.Settlement) (common.Hash, error)

HashSettlement computes the hash of a DvP settlement.

Types

type Extension

type Extension struct {
	// contains filtered or unexported fields
}

Extension provides methods for preparing operations.

func New

func New(opts *Options) (*Extension, error)

New creates a new extension with the provided options.

func (*Extension) HashSettlement

func (e *Extension) HashSettlement(settlement *events.Settlement) (common.Hash, error)

HashSettlement computes the hash of a DvP settlement (method form for backward compatibility).

func (*Extension) PrepareAcceptSettlementOperation

func (e *Extension) PrepareAcceptSettlementOperation(settlementHash [32]byte) (*transactTypes.Operation, error)

PrepareAcceptSettlementOperation prepares a acceptSettlement operation on CCIPDVPCoordinator.

func (*Extension) PrepareCCIPDVPCoordinatorOperation added in v0.0.10

func (e *Extension) PrepareCCIPDVPCoordinatorOperation(method string, args ...interface{}) (*transactTypes.Operation, error)

PrepareCCIPDVPCoordinatorOperation prepares a generic operation on CCIPDVPCoordinator. Use this for methods not covered by the type-safe Prepare* functions.

func (*Extension) PrepareCancelOperation

func (e *Extension) PrepareCancelOperation(settlementHash [32]byte) (*transactTypes.Operation, error)

PrepareCancelOperation prepares a cancel operation on CCIPDVPCoordinator.

func (*Extension) PrepareExecuteSettlementOperation

func (e *Extension) PrepareExecuteSettlementOperation(settlementHash [32]byte) (*transactTypes.Operation, error)

PrepareExecuteSettlementOperation prepares a executeSettlement operation on CCIPDVPCoordinator.

func (*Extension) PrepareExecuteSettlementWithTokenDataOperation

func (e *Extension) PrepareExecuteSettlementWithTokenDataOperation(settlementHash [32]byte, tokenData []byte) (*transactTypes.Operation, error)

PrepareExecuteSettlementWithTokenDataOperation prepares a executeSettlementWithTokenData operation on CCIPDVPCoordinator.

func (*Extension) PrepareProposeSettlementOperation

func (e *Extension) PrepareProposeSettlementOperation(settlement *events.Settlement) (*transactTypes.Operation, error)

PrepareProposeSettlementOperation prepares a DvP propose settlement operation. It assumes a token approval has already been issued for the asset token.

func (*Extension) PrepareProposeSettlementWithTokenApprovalOperation

func (e *Extension) PrepareProposeSettlementWithTokenApprovalOperation(settlement *events.Settlement) (*transactTypes.Operation, error)

PrepareProposeSettlementWithTokenApprovalOperation prepares a DvP propose settlement operation, including a token approval transaction.

func (*Extension) PrepareProposeSettlementWithTokenHoldOperation

func (e *Extension) PrepareProposeSettlementWithTokenHoldOperation(
	settlement *events.Settlement, holdManagerAddress common.Address,
) (*transactTypes.Operation, error)

PrepareProposeSettlementWithTokenHoldOperation prepares a DvP propose settlement operation, including issuing a token hold for the asset token. Only supported for ERC3643 asset tokens.

func (*Extension) PrepareRenounceOwnershipOperation

func (e *Extension) PrepareRenounceOwnershipOperation() (*transactTypes.Operation, error)

PrepareRenounceOwnershipOperation prepares a renounceOwnership operation on CCIPDVPCoordinator.

func (*Extension) PrepareSetDVPCoordinatorOperation

func (e *Extension) PrepareSetDVPCoordinatorOperation(chainSelector uint64, coordinator common.Address) (*transactTypes.Operation, error)

PrepareSetDVPCoordinatorOperation prepares a setDVPCoordinator operation on CCIPDVPCoordinator.

func (*Extension) PrepareTransferOwnershipOperation

func (e *Extension) PrepareTransferOwnershipOperation(newOwner common.Address) (*transactTypes.Operation, error)

PrepareTransferOwnershipOperation prepares a transferOwnership operation on CCIPDVPCoordinator.

type Options

type Options struct {
	Logger         *slog.Logger
	AccountAddress string

	// Deadline is the default deadline applied to every prepared operation.
	// If nil, the SDK emits deadline 0 so the field is always present in the
	// signed payload while remaining backwards-compatible with no-expiry flows.
	Deadline *big.Int

	CCIPDVPCoordinatorAddress string
}

Options defines the configuration for creating a new extension.

Jump to

Keyboard shortcuts

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