Versions in this module Expand all Collapse all v0 v0.1.0 Aug 30, 2022 Changes in this version + const ADMIN_KEY_NAME + const ALICE_KEY_NAME + const BOB_KEY_NAME + const CHAIN_ID + const KEY_SERVER + const NODE_URI + const ORACLE_HASH + const VOTE_WAIT_SECONDS + func GetAddress(accountName string) string + func GetKey(accountName string) cryptotypes.PrivKey + func SanitizeFilename(filename string) string + func ToOrderPlacementExecuteMsg(fundedOrder FundedOrder) []byte + func ToSeiOrderPlacement(fundedOrder FundedOrder) dextypes.Order + func ToUpdateMultiCollateralWhitelistExecuteMsg(whitelistedAccounts []string) []byte + type Balance struct + Account string + Amount string + Denom string + Negative bool + type BankBalanceExpectation struct + Account string + Delta sdk.Int + Denom string + type Cancel struct + Account string + Moniker string + func ParseCancel(raw json.RawMessage) Cancel + type Client struct + func NewClient(key cryptotypes.PrivKey, txConfig *TxConfig, encodingConfig *EncodingConfig) *Client + func NewClientWithDefaultConfig(key cryptotypes.PrivKey) *Client + func (c *Client) ExecuteContract(contractAddr string, code uint64, executeMsg string, fund string) (*sdk.TxResponse, error) + func (c *Client) GetBankBalance(account string, denom string) sdk.Coin + func (c *Client) GetCurrentEpoch() uint64 + func (c *Client) GetOracleWhitelist() oracletypes.DenomList + func (c *Client) InstantiateContract(code uint64, instantiateMsg string) (*sdk.TxResponse, error) + func (c *Client) IsProposalHandled(proposalId string) bool + func (c *Client) QueryContract(queryMsg string, contractAddr string) (*wasmdtypes.QuerySmartContractStateResponse, error) + func (c *Client) RegisterOracleDenom(title string, denoms []string) string + func (c *Client) RegisterOracleDenomAndWaitForApproval(filename string) + func (c *Client) RegisterPair(title string, contractAddr string, pairs []*dextypes.Pair) (*sdk.TxResponse, error) + func (c *Client) RegisterPairAndWaitForApproval(title string, contractAddr string, pairs []*dextypes.Pair) error + func (c *Client) SendCancel(order Cancel, contractAddr string, monikerToOrderIds map[string]uint64) error + func (c *Client) SendOracleDenomProposal(title string, denoms []string) string + func (c *Client) SendOraclePrice(coins sdk.DecCoins) error + func (c *Client) SendOrder(order FundedOrder, contractAddr string) (dextypes.MsgPlaceOrdersResponse, error) + func (c *Client) SendPairsProposal(title string, contractAddr string, pairs []*dextypes.Pair) (*sdk.TxResponse, error) + func (c *Client) SendRegisterContract(contractAddr string, codeId uint64, needHook bool) (*sdk.TxResponse, error) + func (c *Client) Vote(proposalId string) error + type ContractBalance struct + Amount ContractSignedDecimal + func ParseContractBalance(balanceBytes []byte) ContractBalance + type ContractGetOrderResponse struct + Orders []ContractOrder + func ParseContractGetOrderResponse(orderBytes []byte) ContractGetOrderResponse + type ContractOrder struct + Account string + AssetDenom string + Direction string + Effect string + Id uint64 + Leverage ContractSignedDecimal + OrderType string + Price ContractSignedDecimal + PriceDenom string + Quantity ContractSignedDecimal + RemainingQuantity ContractSignedDecimal + type ContractPosition struct + LongPositioLastFundingPaymentEpoch int64 + LongPosition ContractSignedDecimal + LongPositionMarginDebt ContractSignedDecimal + ShortPositioLastFundingPaymentEpoch int64 + ShortPosition ContractSignedDecimal + ShortPositionMarginDebt ContractSignedDecimal + func ParseContractPosition(positionBytes []byte) ContractPosition + type ContractSignedDecimal struct + Decimal string + Negative bool + func (c *ContractSignedDecimal) Multiply(multiplier float64) ContractSignedDecimal + type Deposit struct + Account string + Fund string + func ParseDeposit(raw json.RawMessage) Deposit + type EncodingConfig struct + Amino *codec.LegacyAmino + InterfaceRegistry types.InterfaceRegistry + Marshaler codec.Codec + TxConfig client.TxConfig + func NewDefaultEncodingConfig() *EncodingConfig + type Expectations struct + Balances []Balance + BankBalances []BankBalanceExpectation + Orders []Order + PortfolioSpecs []PortfolioSpecs + Positions []Position + type FundedOrder struct + Account string + Fund string + Moniker string + Order OrderPlacement + func ParseFundedOrder(raw json.RawMessage) FundedOrder + type Input struct + Details json.RawMessage + InputType string + type LiquidationRequest struct + AccountToBeLiquidated string + Fund string + func ParseLiquidation(raw json.RawMessage) LiquidationRequest + type MultiCollateralAccounts struct + Accounts []string + func ParseMultiCollateralAccounts(raw json.RawMessage) MultiCollateralAccounts + type OracleUpdate struct + ExchangeRates sdk.DecCoins + func ParseOracleUpdate(raw json.RawMessage) OracleUpdate + type Order struct + Account string + AssetDenom string + ExpectedOrders []OrderDetails + PriceDenom string + type OrderData struct + Leverage string + PositionEffect string + type OrderDetails struct + Direction string + Effect string + Leverage ContractSignedDecimal + OrderType string + Price ContractSignedDecimal + Quantity ContractSignedDecimal + RemainingQuantity ContractSignedDecimal + type OrderPlacement struct + AssetDenom string + Leverage string + OrderType string + PositionDirection string + PositionEffect string + Price string + PriceDenom string + Quantity string + type Pair struct + AssetDenom string + Contract string + PriceDenom string + Ticksize sdk.Dec + type PortfolioSpecs struct + Account string + BuyingPower ContractSignedDecimal + Equity ContractSignedDecimal + Leverage ContractSignedDecimal + TotalPositionValue ContractSignedDecimal + UnrealizedPnl ContractSignedDecimal + func ParsePortfolioSpecs(specsBytes []byte) PortfolioSpecs + type Position struct + Account string + AssetDenom string + LongPositioLastFundingPaymentEpoch int64 + LongPosition ContractSignedDecimal + LongPositionMarginDebt ContractSignedDecimal + PriceDenom string + ShortPositioLastFundingPaymentEpoch int64 + ShortPosition ContractSignedDecimal + ShortPositionMarginDebt ContractSignedDecimal + type Sleep struct + TillNextEpoch bool + func ParseSleep(raw json.RawMessage) Sleep + type StartingBalance struct + Account string + Denom string + func ParseStartingBalance(raw json.RawMessage) StartingBalance + type SwapMulticollateralToBase struct + Orders []dextypes.Order + type SwapMulticollateralToBaseMsg struct + SwapMulticollateralToBase SwapMulticollateralToBase + type Test struct + Expectations Expectations + Inputs []Input + Pairs []Pair + func ParseTestFile(filename string) Test + type TxConfig struct + func NewTxConfig(nodeURI string, keyServer string, chainId string, gasLimit uint64, ...) *TxConfig + type UpdateMultiCollateralWhitelist struct + Whitelist []string + WhitelistEnable bool + type UpdateMultiCollateralWhitelistMsg struct + UpdateMultiCollateralWhitelist UpdateMultiCollateralWhitelist