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 ContractPrice
  • type SpotPriceInfo
  • type FundingInfo
  • type Parameter
  • type UpdateGlobalVar

Was this helpful?

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

UpdateGlobalVar

type ContractPrice

ContractPrice(
    int pairId,
    String marketPrice,
)

input:

  • pairId: The contract pair id defined by zkLink.

  • marketPrice: The market price of the contract pair

type SpotPriceInfo

SpotPriceInfo(
    int tokenId,
    String price,
)

input:

  • tokenId: The token id defined by zkLink.

  • price: The spot price of the token.

type FundingInfo

FundingInfo(
    int pairId,
    String price,
	int fundingRate,
)

type Parameter

func insuranceFundAccount

insuranceFundAccount(int accountId)

func feeAccount

feeAccount(int accountId)

func marginInfo

marginInfo(
	int marginId,
	String? symbol,
	int tokenId,
	int ratio,
)

func contractInfo

contractInfo(
	int pairId,
    String symbol,
	int initialMarginRate,
	int maintenanceMarginRate,
)

func feeAccount

feeAccount(int accountId)

func fundingInfos

fundingInfos(List<FundingInfo> infos)

type UpdateGlobalVar

UpdateGlobalVar(
    int fromChainId,
	int subAccountId,
	Parameter parameter,
	double serialId,
)

func toJson

String toJson()

Example

var tx = UpdateGlobalVar(
	fromChainId: 1,
	subAccountId: 2,
	parameter: Parameter.feeAccount(accountId: 8),
	serialId: 101
);
print(tx.toJson());
PreviousLiquidationNextConnected Networks

Last updated 1 year ago

Was this helpful?

The struct of .

transaction type.

Get the json str of

🛠️
UpdateGlobalVar
Parameter
UpdateGlobalVar
UpdateGlobalVar