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
  • Parameter
  • type UpdateGlobalVarBuilder
  • type UpdateGlobalVar

Was this helpful?

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

UpdateGlobalVar

Parameter

Parameter is an interface which contains 5 types of struct

type ParameterFeeAccount

type ParameterFeeAccount struct {
	AccountId AccountId
}

This parameter is used to modify the collect-fee account.

type ParameterInsuranceFundAccount

type ParameterInsuranceFundAccount struct {
	AccountId AccountId
}

This parameter is used to modify the insurance fund account.

type ParameterMarginInfo

type ParameterMarginInfo struct {
	MarginId MarginId
	TokenId  TokenId
	Ratio    uint8
}

This parameter is used to modify the margin info in the specified index.

type ParameterFundingInfos

type ParameterFundingInfos struct {
	Infos []FundingInfo
}

This parameter is used to ppdate the funding rates to accumulated funding rates of the Global Vars for all position(contract pair) in this period.

type FundingInfo

type FundingInfo struct {
	PairId      PairId
	Price       BigUint
	FundingRate int16
}

type ParameterContractInfo

type ParameterContractInfo struct {
	PairId                PairId
	Symbol                string
	InitialMarginRate     uint16
	MaintenanceMarginRate uint16
}

This parameter is used to modify the info of every perpetual contract pair.

type UpdateGlobalVarBuilder

type UpdateGlobalVarBuilder struct {
    FromChainId  ChainId
    SubAccountId SubAccountId
    Parameter    Parameter
    SerialId     uint64
}

type UpdateGlobalVar

func NewUpdateGlobalVar

func NewUpdateGlobalVar(builder UpdateGlobalVarBuilder) *UpdateGlobalVar

func (*UpdateGlobalVar) GetBytes

func (*UpdateGlobalVar) GetBytes() []uint8

func (*UpdateGlobalVar) TxHash

func (*UpdateGlobalVar) TxHash() []uint8

Get the transaction hash of the transaction.

func (*UpdateGlobalVar) JsonStr

func (*UpdateGlobalVar) JsonStr() string

Get the json string of the transaction.

func (*UpdateGlobalVar) IsValid

func (*UpdateGlobalVar) IsValid() bool

Check if the transaction is valid or not.

func (*UpdateGlobalVar) ToZklinkTx

func (*UpdateGlobalVar) ToZklinkTx() ZkLinkTx
PreviousLiquidationNextJs

Last updated 1 year ago

Was this helpful?

The builder is used to build new transaction.

transaction type, it's a opaque data type.

Create a new transaction.

Get the encoded bytes to create the L3 signature. See more in

Change the transaction to the

🛠️
UpdateGlobalVar
Private Key and Signature
UpdateGlobalVar
UpdateGlobalVar
ZkLinkTx