ContractPrice(
int pairId,
String marketPrice,
)
input:
- pairId: The contract pair id defined by zkLink.
- marketPrice: The market price of the contract pair
SpotPriceInfo(
int tokenId,
String price,
)
input:
- tokenId: The token id defined by zkLink.
- price: The spot price of the token.
FundingInfo(
int pairId,
String price,
int fundingRate,
)
The Parameter struct of UpdateGlobalVar.
insuranceFundAccount(int accountId)
feeAccount(int accountId)
marginInfo(
int marginId,
String? symbol,
int tokenId,
int ratio,
)
contractInfo(
int pairId,
String symbol,
int initialMarginRate,
int maintenanceMarginRate,
)
feeAccount(int accountId)
fundingInfos(List<FundingInfo> infos)
UpdateGlobalVar transaction type.
UpdateGlobalVar(
int fromChainId,
int subAccountId,
Parameter parameter,
double serialId,
)
String toJson()
Get the json str of UpdateGlobalVar
var tx = UpdateGlobalVar(
fromChainId: 1,
subAccountId: 2,
parameter: Parameter.feeAccount(accountId: 8),
serialId: 101
);
print(tx.toJson());