Skip to content

Call a onAbort hook when a CCTX v2 aborts #3168

@lumtis

Description

@lumtis

Describe the Issue

Depends on #2713 and https://github.com/zeta-chain/protocol-contracts/issues/429

When a cctx v2 is being aborted, we can call an onAbort function to allow different type of cleanup.

It is only called if abortAddress is not zero address.

I don't think it is important to add a callOnAbort option, in the protocol we can just try to call the function and ignore it if it fails

Overall workflow is

cctt aborts:
  if abortAddress is 0
    -> lock remaining amount (current behavior)
  if abortAddress defined
    -> send remaining funds to abortAddress
    -> call onAbort to the address, ignore failure

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions