ForcedExit

type ForcedExitBuilder

type ForcedExitBuilder struct {
    ToChainId             ChainId
    InitiatorAccountId    AccountId
    InitiatorSubAccountId SubAccountId
    Target                ZkLinkAddress
    TargetSubAccountId    SubAccountId
    L2SourceToken         TokenId
    L1TargetToken         TokenId
    InitiatorNonce        Nonce
    ExitAmount            BigUint
    WithdrawToL1          bool
    Timestamp             TimeStamp
}

Builder used to create ForcedExit transaction.

type ForcedExit

ForcedExit transaction type, it's a opaque data type.

func NewForcedExit

Create a new ForcedExit transaction.

func (*ForcedExit) GetBytes

Get the encoded bytes used to create the L3 signature.

func (*ForcedExit) TxHash

Get the transaction hash of ForcedExit transaction.

func (*ForcedExit) JsonStr

Get the json string of the ForcedExit transaction.

func (*ForcedExit) IsValid

Check if all the fields in Withdraw are valid. For example, if the ChainId is exceeded the maximum ChainId, it will return false.

func (*ForcedExit) CreateSignedTx

Sign the Transfer transaction with the ZkLinkSigner, L1 signature and L3 signature will be created.

func (*ForcedExit) GetSignature

Get the signature in the Transfer transaction.

func (*ForcedExit) IsSignatureValid

Check if the L3 signature in the Transfer transaction is valid or not.

func (*ForcedExit) SubmitterSignature

Create the submitter signature.

input:

func (*ForcedExit) ToZklinkTx

Change the transaction to the ZkLinkTx

Last updated

Was this helpful?