zkLink X Documentaion
HomeGitHubBlogExplorer
  • 🙂Welcome
    • Introduction
  • ⚖️Architecture
    • Overview
    • Settlement Layer
      • Working Principal of A Multi-Chain ZK-Rollup
      • Nexus: Settlement on ETH L2s
      • Origin: Settlement on ETH and Alt-L1s
      • Multi-Chain State Synchronization
        • In-Detail: Nexus Multi-Chain State Synchronization
      • Supported Networks of zkLink Nexus and Origin
      • Security Assumptions of zkLink Nexus and Origin
    • Execution Layer
      • TS-zkVM for App Rollup
    • Sequencing Layer
    • DA Layer
  • 🛠️Developer
    • Developer Overview
    • Get Started
    • Examples
      • Base Demo
    • JSON RPC & Websocket & Kafka
      • JSON-RPC API
      • JSON-RPC Errors
      • Websocket
      • Kafka
    • Transactions
      • Basic Types
      • State Update
      • Transaction
        • Deposit
        • FullExit
        • ChangePubKey
        • Withdraw
        • Transfer
        • ForcedExit
        • OrderMatching
        • AutoDeleveraging
        • ContractMatching
        • Funding
        • Liquidation
        • UpdateGlobalVar
      • Private Key & Signature
        • Algorithm
        • ChangePubKey
        • Withdraw
        • Transfer
        • ForcedExit
        • OrderMatching
        • ContractMatching
        • Funding
        • Liquidation
        • AutoDeleveraging
        • UpdateGlobalVar
    • SDK
      • Go
        • Types
        • Signature
        • Utils
        • Transactions
          • ChangePubKey
          • Withdraw
          • Transfer
          • ForcedExit
          • OrderMatching
          • ContractMatching
          • AutoDeleveraging
          • Funding
          • Liquidation
          • UpdateGlobalVar
      • Js
        • Signature
        • Utils
        • Transactions
          • ChangePubKey
          • Withdraw
          • Transfer
          • ForcedExit
          • OrderMatching
          • ContractMatching
          • AutoDeleveraging
          • Funding
          • Liquidation
          • UpdateGlobalVar
      • Dart
        • Signature
        • Utils
        • Transactions
          • ChangePubKey
          • Withdraw
          • Transfer
          • ForcedExit
          • OrderMatching
          • ContractMatching
          • AutoDeleveraging
          • Funding
          • Liquidation
          • UpdateGlobalVar
  • ⚙️Network Information
    • Connected Networks
      • Mainnet
      • Testnet
    • DApps & Deployment Addresses
      • Mainnet
      • Testnet
  • Wallet & User Fund Streamline
    • Withdraw
    • Wallet Integration & AA Wallet
    • Deposit
  • Integration Cases
    • Heavyweight Integration (Multi-Chain Derivatives & Spot Exchange)
    • Simple Integration (Multi-Chain Spot Exchange)
  • Appendix
    • Audits
    • FAQ
    • glossary
Powered by GitBook
On this page
  • type ForcedExitBuilder
  • type ForcedExit

Was this helpful?

  1. Developer
  2. SDK
  3. Go
  4. Transactions

ForcedExit

PreviousTransferNextOrderMatching

Last updated 1 year ago

Was this helpful?

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

Create a new transaction.

Get the transaction hash of transaction.

Get the json string of the transaction.

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

Get the signature in the transaction.

signer:

Change the transaction to the

🛠️
ForcedExit
ForcedExit
ForcedExit
ForcedExit
Transfer
ZkLinkTx
ZkLinkSigner
ZkLinkSigner