Skip to content

Commit

Permalink
feat(explorer): add drift queries (#83)
Browse files Browse the repository at this point in the history
* feat: add drift queries

* fix: add order direction

* feat: add fillable quantity

* chore: align types

* chore: align types

* feat: add listDriftOrders, listFillableDriftJITOrders, streamDriftOrders

* chore: clear clg

* feat: add exclude owner field

* chore: align types

* feat: add current height to check snapshot time better

---------

Co-authored-by: 5708646fe8691f1cf581b133aa0b806ac8de5396 <5708646fe8691f1cf581b133aa0b806ac8de5396>
  • Loading branch information
vinhphuctadang authored Nov 8, 2024
1 parent c7451ac commit 147a3e0
Show file tree
Hide file tree
Showing 3 changed files with 1,174 additions and 152 deletions.
2 changes: 1 addition & 1 deletion chain/codec_type_map.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"/cosmos.auth.v1beta1.MsgUpdateParams":"cosmos-sdk/x/auth/MsgUpdateParams","/cosmos.authz.v1beta1.MsgExec":"cosmos-sdk/MsgExec","/cosmos.authz.v1beta1.MsgGrant":"cosmos-sdk/MsgGrant","/cosmos.authz.v1beta1.MsgRevoke":"cosmos-sdk/MsgRevoke","/cosmos.bank.v1beta1.MsgMultiSend":"cosmos-sdk/MsgMultiSend","/cosmos.bank.v1beta1.MsgSend":"cosmos-sdk/MsgSend","/cosmos.bank.v1beta1.MsgSetSendEnabled":"cosmos-sdk/MsgSetSendEnabled","/cosmos.bank.v1beta1.MsgUpdateParams":"cosmos-sdk/x/bank/MsgUpdateParams","/cosmos.consensus.v1.MsgUpdateParams":"cosmos-sdk/x/consensus/MsgUpdateParams","/cosmos.crisis.v1beta1.MsgUpdateParams":"cosmos-sdk/x/crisis/MsgUpdateParams","/cosmos.crisis.v1beta1.MsgVerifyInvariant":"cosmos-sdk/MsgVerifyInvariant","/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":"cosmos-sdk/distr/MsgCommunityPoolSpend","/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool":"cosmos-sdk/distr/MsgDepositValRewards","/cosmos.distribution.v1beta1.MsgFundCommunityPool":"cosmos-sdk/MsgFundCommunityPool","/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":"cosmos-sdk/MsgModifyWithdrawAddress","/cosmos.distribution.v1beta1.MsgUpdateParams":"cosmos-sdk/distribution/MsgUpdateParams","/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":"cosmos-sdk/MsgWithdrawDelegationReward","/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":"cosmos-sdk/MsgWithdrawValCommission","/cosmos.evidence.v1beta1.MsgSubmitEvidence":"cosmos-sdk/MsgSubmitEvidence","/cosmos.feegrant.v1beta1.MsgGrantAllowance":"cosmos-sdk/MsgGrantAllowance","/cosmos.feegrant.v1beta1.MsgRevokeAllowance":"cosmos-sdk/MsgRevokeAllowance","/cosmos.gov.v1.MsgDeposit":"cosmos-sdk/v1/MsgDeposit","/cosmos.gov.v1.MsgExecLegacyContent":"cosmos-sdk/v1/MsgExecLegacyContent","/cosmos.gov.v1.MsgSubmitProposal":"cosmos-sdk/v1/MsgSubmitProposal","/cosmos.gov.v1.MsgUpdateParams":"cosmos-sdk/x/gov/v1/MsgUpdateParams","/cosmos.gov.v1.MsgVote":"cosmos-sdk/v1/MsgVote","/cosmos.gov.v1.MsgVoteWeighted":"cosmos-sdk/v1/MsgVoteWeighted","/cosmos.gov.v1beta1.MsgDeposit":"cosmos-sdk/MsgDeposit","/cosmos.gov.v1beta1.MsgSubmitProposal":"cosmos-sdk/MsgSubmitProposal","/cosmos.gov.v1beta1.MsgVote":"cosmos-sdk/MsgVote","/cosmos.gov.v1beta1.MsgVoteWeighted":"cosmos-sdk/MsgVoteWeighted","/cosmos.group.v1.MsgCreateGroup":"cosmos-sdk/MsgCreateGroup","/cosmos.group.v1.MsgCreateGroupPolicy":"cosmos-sdk/MsgCreateGroupPolicy","/cosmos.group.v1.MsgCreateGroupWithPolicy":"cosmos-sdk/MsgCreateGroupWithPolicy","/cosmos.group.v1.MsgExec":"cosmos-sdk/group/MsgExec","/cosmos.group.v1.MsgLeaveGroup":"cosmos-sdk/group/MsgLeaveGroup","/cosmos.group.v1.MsgSubmitProposal":"cosmos-sdk/group/MsgSubmitProposal","/cosmos.group.v1.MsgUpdateGroupAdmin":"cosmos-sdk/MsgUpdateGroupAdmin","/cosmos.group.v1.MsgUpdateGroupMembers":"cosmos-sdk/MsgUpdateGroupMembers","/cosmos.group.v1.MsgUpdateGroupMetadata":"cosmos-sdk/MsgUpdateGroupMetadata","/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":"cosmos-sdk/MsgUpdateGroupPolicyAdmin","/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":"cosmos-sdk/MsgUpdateGroupDecisionPolicy","/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":"cosmos-sdk/MsgUpdateGroupPolicyMetadata","/cosmos.group.v1.MsgVote":"cosmos-sdk/group/MsgVote","/cosmos.group.v1.MsgWithdrawProposal":"cosmos-sdk/group/MsgWithdrawProposal","/cosmos.mint.v1beta1.MsgUpdateParams":"cosmos-sdk/x/mint/MsgUpdateParams","/cosmos.slashing.v1beta1.MsgUnjail":"cosmos-sdk/MsgUnjail","/cosmos.slashing.v1beta1.MsgUpdateParams":"cosmos-sdk/x/slashing/MsgUpdateParams","/cosmos.staking.v1beta1.MsgBeginRedelegate":"cosmos-sdk/MsgBeginRedelegate","/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation":"cosmos-sdk/MsgCancelUnbondingDelegation","/cosmos.staking.v1beta1.MsgCreateValidator":"cosmos-sdk/MsgCreateValidator","/cosmos.staking.v1beta1.MsgDelegate":"cosmos-sdk/MsgDelegate","/cosmos.staking.v1beta1.MsgEditValidator":"cosmos-sdk/MsgEditValidator","/cosmos.staking.v1beta1.MsgUndelegate":"cosmos-sdk/MsgUndelegate","/cosmos.staking.v1beta1.MsgUpdateParams":"cosmos-sdk/x/staking/MsgUpdateParams","/cosmos.upgrade.v1beta1.MsgCancelUpgrade":"cosmos-sdk/MsgCancelUpgrade","/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":"cosmos-sdk/MsgSoftwareUpgrade","/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount":"cosmos-sdk/MsgCreatePeriodVestAccount","/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount":"cosmos-sdk/MsgCreatePermLockedAccount","/cosmos.vesting.v1beta1.MsgCreateVestingAccount":"cosmos-sdk/MsgCreateVestingAccount","/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":"wasm/MsgAddCodeUploadParamsAddresses","/cosmwasm.wasm.v1.MsgClearAdmin":"wasm/MsgClearAdmin","/cosmwasm.wasm.v1.MsgExecuteContract":"wasm/MsgExecuteContract","/cosmwasm.wasm.v1.MsgInstantiateContract":"wasm/MsgInstantiateContract","/cosmwasm.wasm.v1.MsgInstantiateContract2":"wasm/MsgInstantiateContract2","/cosmwasm.wasm.v1.MsgMigrateContract":"wasm/MsgMigrateContract","/cosmwasm.wasm.v1.MsgPinCodes":"wasm/MsgPinCodes","/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":"wasm/MsgRemoveCodeUploadParamsAddresses","/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":"wasm/MsgStoreAndInstantiateContract","/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":"wasm/MsgStoreAndMigrateContract","/cosmwasm.wasm.v1.MsgStoreCode":"wasm/MsgStoreCode","/cosmwasm.wasm.v1.MsgSudoContract":"wasm/MsgSudoContract","/cosmwasm.wasm.v1.MsgUnpinCodes":"wasm/MsgUnpinCodes","/cosmwasm.wasm.v1.MsgUpdateAdmin":"wasm/MsgUpdateAdmin","/cosmwasm.wasm.v1.MsgUpdateContractLabel":"wasm/MsgUpdateContractLabel","/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":"wasm/MsgUpdateInstantiateConfig","/cosmwasm.wasm.v1.MsgUpdateParams":"wasm/MsgUpdateParams","/flux.astromesh.v1beta1.MsgAstroTransfer":"astromesh/MsgAstroTransfer","/flux.astromesh.v1beta1.MsgChargeVmAccount":"astromesh/MsgChargeVmAccount","/flux.astromesh.v1beta1.MsgFISTransaction":"astromesh/MsgFISTransaction","/flux.bazaar.v1beta1.MsgCreateProduct":"bazaar/MsgCreateProduct","/flux.bazaar.v1beta1.MsgPurchaseOffering":"bazaar/MsgPurchaseOffering","/flux.bazaar.v1beta1.MsgVerifyProduct":"bazaar/MsgVerifyProduct","/flux.evm.v1beta1.MsgDeployContract":"evm/MsgDeployContract","/flux.evm.v1beta1.MsgExecuteContract":"evm/MsgExecuteContract","/flux.fnft.v1beta1.MsgCreate":"fnft/MsgCreate","/flux.fnft.v1beta1.MsgDepositShares":"fnft/MsgDepositShares","/flux.fnft.v1beta1.MsgPurchaseShares":"fnft/MsgPurchaseShares","/flux.fnft.v1beta1.MsgSponsor":"fnft/MsgSponsor","/flux.fnft.v1beta1.MsgTransferShares":"fnft/MsgTransferShares","/flux.fnft.v1beta1.MsgWithdrawShares":"fnft/MsgWithdrawShares","/flux.oracle.v1beta1.MsgPushSimpleEntry":"oracle/MsgPushSimpleEntry","/flux.strategy.v1beta1.MsgConfigStrategy":"strategy/MsgConfigStrategy","/flux.strategy.v1beta1.MsgSetVerifier":"strategy/MsgSetVerifier","/flux.strategy.v1beta1.MsgTriggerStrategies":"strategy/MsgTriggerStrategies","/flux.strategy.v1beta1.MsgVerifyStrategy":"strategy/MsgVerifyStrategy","/flux.svm.v1beta1.MsgLinkSVMAccount":"svm/MsgLinkSVMAccount","/flux.svm.v1beta1.MsgTransaction":"svm/MsgTransaction"}
{"/cosmos.auth.v1beta1.MsgUpdateParams":"cosmos-sdk/x/auth/MsgUpdateParams","/cosmos.authz.v1beta1.MsgExec":"cosmos-sdk/MsgExec","/cosmos.authz.v1beta1.MsgGrant":"cosmos-sdk/MsgGrant","/cosmos.authz.v1beta1.MsgRevoke":"cosmos-sdk/MsgRevoke","/cosmos.bank.v1beta1.MsgMultiSend":"cosmos-sdk/MsgMultiSend","/cosmos.bank.v1beta1.MsgSend":"cosmos-sdk/MsgSend","/cosmos.bank.v1beta1.MsgSetSendEnabled":"cosmos-sdk/MsgSetSendEnabled","/cosmos.bank.v1beta1.MsgUpdateParams":"cosmos-sdk/x/bank/MsgUpdateParams","/cosmos.consensus.v1.MsgUpdateParams":"cosmos-sdk/x/consensus/MsgUpdateParams","/cosmos.crisis.v1beta1.MsgUpdateParams":"cosmos-sdk/x/crisis/MsgUpdateParams","/cosmos.crisis.v1beta1.MsgVerifyInvariant":"cosmos-sdk/MsgVerifyInvariant","/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":"cosmos-sdk/distr/MsgCommunityPoolSpend","/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool":"cosmos-sdk/distr/MsgDepositValRewards","/cosmos.distribution.v1beta1.MsgFundCommunityPool":"cosmos-sdk/MsgFundCommunityPool","/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":"cosmos-sdk/MsgModifyWithdrawAddress","/cosmos.distribution.v1beta1.MsgUpdateParams":"cosmos-sdk/distribution/MsgUpdateParams","/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":"cosmos-sdk/MsgWithdrawDelegationReward","/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":"cosmos-sdk/MsgWithdrawValCommission","/cosmos.evidence.v1beta1.MsgSubmitEvidence":"cosmos-sdk/MsgSubmitEvidence","/cosmos.feegrant.v1beta1.MsgGrantAllowance":"cosmos-sdk/MsgGrantAllowance","/cosmos.feegrant.v1beta1.MsgRevokeAllowance":"cosmos-sdk/MsgRevokeAllowance","/cosmos.gov.v1.MsgDeposit":"cosmos-sdk/v1/MsgDeposit","/cosmos.gov.v1.MsgExecLegacyContent":"cosmos-sdk/v1/MsgExecLegacyContent","/cosmos.gov.v1.MsgSubmitProposal":"cosmos-sdk/v1/MsgSubmitProposal","/cosmos.gov.v1.MsgUpdateParams":"cosmos-sdk/x/gov/v1/MsgUpdateParams","/cosmos.gov.v1.MsgVote":"cosmos-sdk/v1/MsgVote","/cosmos.gov.v1.MsgVoteWeighted":"cosmos-sdk/v1/MsgVoteWeighted","/cosmos.gov.v1beta1.MsgDeposit":"cosmos-sdk/MsgDeposit","/cosmos.gov.v1beta1.MsgSubmitProposal":"cosmos-sdk/MsgSubmitProposal","/cosmos.gov.v1beta1.MsgVote":"cosmos-sdk/MsgVote","/cosmos.gov.v1beta1.MsgVoteWeighted":"cosmos-sdk/MsgVoteWeighted","/cosmos.group.v1.MsgCreateGroup":"cosmos-sdk/MsgCreateGroup","/cosmos.group.v1.MsgCreateGroupPolicy":"cosmos-sdk/MsgCreateGroupPolicy","/cosmos.group.v1.MsgCreateGroupWithPolicy":"cosmos-sdk/MsgCreateGroupWithPolicy","/cosmos.group.v1.MsgExec":"cosmos-sdk/group/MsgExec","/cosmos.group.v1.MsgLeaveGroup":"cosmos-sdk/group/MsgLeaveGroup","/cosmos.group.v1.MsgSubmitProposal":"cosmos-sdk/group/MsgSubmitProposal","/cosmos.group.v1.MsgUpdateGroupAdmin":"cosmos-sdk/MsgUpdateGroupAdmin","/cosmos.group.v1.MsgUpdateGroupMembers":"cosmos-sdk/MsgUpdateGroupMembers","/cosmos.group.v1.MsgUpdateGroupMetadata":"cosmos-sdk/MsgUpdateGroupMetadata","/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":"cosmos-sdk/MsgUpdateGroupPolicyAdmin","/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":"cosmos-sdk/MsgUpdateGroupDecisionPolicy","/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":"cosmos-sdk/MsgUpdateGroupPolicyMetadata","/cosmos.group.v1.MsgVote":"cosmos-sdk/group/MsgVote","/cosmos.group.v1.MsgWithdrawProposal":"cosmos-sdk/group/MsgWithdrawProposal","/cosmos.mint.v1beta1.MsgUpdateParams":"cosmos-sdk/x/mint/MsgUpdateParams","/cosmos.slashing.v1beta1.MsgUnjail":"cosmos-sdk/MsgUnjail","/cosmos.slashing.v1beta1.MsgUpdateParams":"cosmos-sdk/x/slashing/MsgUpdateParams","/cosmos.staking.v1beta1.MsgBeginRedelegate":"cosmos-sdk/MsgBeginRedelegate","/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation":"cosmos-sdk/MsgCancelUnbondingDelegation","/cosmos.staking.v1beta1.MsgCreateValidator":"cosmos-sdk/MsgCreateValidator","/cosmos.staking.v1beta1.MsgDelegate":"cosmos-sdk/MsgDelegate","/cosmos.staking.v1beta1.MsgEditValidator":"cosmos-sdk/MsgEditValidator","/cosmos.staking.v1beta1.MsgUndelegate":"cosmos-sdk/MsgUndelegate","/cosmos.staking.v1beta1.MsgUpdateParams":"cosmos-sdk/x/staking/MsgUpdateParams","/cosmos.upgrade.v1beta1.MsgCancelUpgrade":"cosmos-sdk/MsgCancelUpgrade","/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":"cosmos-sdk/MsgSoftwareUpgrade","/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount":"cosmos-sdk/MsgCreatePeriodVestAccount","/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount":"cosmos-sdk/MsgCreatePermLockedAccount","/cosmos.vesting.v1beta1.MsgCreateVestingAccount":"cosmos-sdk/MsgCreateVestingAccount","/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":"wasm/MsgAddCodeUploadParamsAddresses","/cosmwasm.wasm.v1.MsgClearAdmin":"wasm/MsgClearAdmin","/cosmwasm.wasm.v1.MsgExecuteContract":"wasm/MsgExecuteContract","/cosmwasm.wasm.v1.MsgInstantiateContract":"wasm/MsgInstantiateContract","/cosmwasm.wasm.v1.MsgInstantiateContract2":"wasm/MsgInstantiateContract2","/cosmwasm.wasm.v1.MsgMigrateContract":"wasm/MsgMigrateContract","/cosmwasm.wasm.v1.MsgPinCodes":"wasm/MsgPinCodes","/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":"wasm/MsgRemoveCodeUploadParamsAddresses","/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":"wasm/MsgStoreAndInstantiateContract","/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":"wasm/MsgStoreAndMigrateContract","/cosmwasm.wasm.v1.MsgStoreCode":"wasm/MsgStoreCode","/cosmwasm.wasm.v1.MsgSudoContract":"wasm/MsgSudoContract","/cosmwasm.wasm.v1.MsgUnpinCodes":"wasm/MsgUnpinCodes","/cosmwasm.wasm.v1.MsgUpdateAdmin":"wasm/MsgUpdateAdmin","/cosmwasm.wasm.v1.MsgUpdateContractLabel":"wasm/MsgUpdateContractLabel","/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":"wasm/MsgUpdateInstantiateConfig","/cosmwasm.wasm.v1.MsgUpdateParams":"wasm/MsgUpdateParams","/flux.astromesh.v1beta1.MsgAstroTransfer":"astromesh/MsgAstroTransfer","/flux.astromesh.v1beta1.MsgChargeVmAccount":"astromesh/MsgChargeVmAccount","/flux.astromesh.v1beta1.MsgFISTransaction":"astromesh/MsgFISTransaction","/flux.bazaar.v1beta1.MsgCreateProduct":"bazaar/MsgCreateProduct","/flux.bazaar.v1beta1.MsgPurchaseOffering":"bazaar/MsgPurchaseOffering","/flux.bazaar.v1beta1.MsgVerifyProduct":"bazaar/MsgVerifyProduct","/flux.evm.v1beta1.MsgDeployContract":"evm/MsgDeployContract","/flux.evm.v1beta1.MsgExecuteContract":"evm/MsgExecuteContract","/flux.fnft.v1beta1.MsgCreate":"fnft/MsgCreate","/flux.fnft.v1beta1.MsgDepositShares":"fnft/MsgDepositShares","/flux.fnft.v1beta1.MsgPurchaseShares":"fnft/MsgPurchaseShares","/flux.fnft.v1beta1.MsgSponsor":"fnft/MsgSponsor","/flux.fnft.v1beta1.MsgTransferShares":"fnft/MsgTransferShares","/flux.fnft.v1beta1.MsgWithdrawShares":"fnft/MsgWithdrawShares","/flux.oracle.v1beta1.MsgPushSimpleEntry":"oracle/MsgPushSimpleEntry","/flux.strategy.v1beta1.MsgConfigStrategy":"oracle/MsgConfigStrategy","/flux.strategy.v1beta1.MsgTriggerStrategies":"oracle/MsgTriggerStrategies","/flux.svm.v1beta1.MsgLinkSVMAccount":"svm/MsgLinkSVMAccount","/flux.svm.v1beta1.MsgTransaction":"svm/MsgTransaction"}
Loading

0 comments on commit 147a3e0

Please sign in to comment.