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
transaction type, it's a opaque data type.
func NewForcedExit
func NewForcedExit(builder ForcedExitBuilder) *ForcedExit
func (*ForcedExit) GetBytes
func (_self *ForcedExit) GetBytes() []uint8
Get the encoded bytes used to create the L3 signature.
func (*ForcedExit) TxHash
func (*ForcedExit) TxHash() []uint8
func (*ForcedExit) JsonStr
func (*ForcedExit) JsonStr() string
func (*ForcedExit) IsValid
func (_self *ForcedExit) IsValid() bool
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
func (*ForcedExit) CreateSignedTx(signer *ZkLinkSigner) (*ForcedExit, error)
func (*ForcedExit) GetSignature
func (*ForcedExit) GetSignature() ZkLinkSignature
func (*ForcedExit) IsSignatureValid
func (*ForcedExit) IsSignatureValid() bool
Check if the L3 signature in the Transfer transaction is valid or not.
func (*ForcedExit) SubmitterSignature
func (*ForcedExit) SubmitterSignature(signer *ZkLinkSigner) (ZkLinkSignature, error)
Create the submitter signature.
input:
func (*ForcedExit) ToZklinkTx
func (*ForcedExit) ToZklinkTx() ZkLinkTx