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
}

The builder is used to build new UpdateGlobalVar transaction.

type UpdateGlobalVar

UpdateGlobalVar transaction type, it's a opaque data type.

func NewUpdateGlobalVar

func NewUpdateGlobalVar(builder UpdateGlobalVarBuilder) *UpdateGlobalVar

Create a new UpdateGlobalVar transaction.

func (*UpdateGlobalVar) GetBytes

func (*UpdateGlobalVar) GetBytes() []uint8

Get the encoded bytes to create the L3 signature. See more in Private Key and Signature

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

Change the transaction to the ZkLinkTx

Last updated