@@ -32,65 +32,40 @@ pub enum ElysQuery {
3232 AmmPool { pool_id : u64 } ,
3333 #[ returns( AmmGetPoolsResponse ) ]
3434 AmmPoolAll { pagination : Option < PageRequest > } ,
35- // Define OracleQuery
36- #[ returns( OracleAllPriceResponse ) ]
37- OraclePriceAll { pagination : PageRequest } ,
38- #[ returns( OracleAssetInfoResponse ) ]
39- OracleAssetInfo { denom : String } ,
40- #[ returns( QueryGetPriceResponse ) ]
41- OraclePrice {
42- asset : String ,
43- source : String ,
44- timestamp : u64 ,
45- } ,
46- // Define PerpetualQuery
47- #[ returns( PerpetualQueryPositionsResponse ) ]
48- PerpetualQueryPositions { pagination : PageRequest } ,
49- #[ returns( PerpetualMtpResponse ) ]
50- PerpetualMtp { address : String , id : u64 } ,
51- #[ returns( PerpetualOpenEstimationResponse ) ]
52- PerpetualOpenEstimation {
53- position : i32 ,
54- leverage : SignedDecimal ,
55- trading_asset : String ,
56- collateral : Coin ,
57- take_profit_price : SignedDecimal256 ,
58- discount : Decimal ,
59- } ,
60- #[ returns( PerpetualGetPositionsForAddressResponse ) ]
61- PerpetualGetPositionsForAddress {
62- address : String ,
35+ #[ returns( Decimal ) ]
36+ AmmPriceByDenom { token_in : Coin , discount : Decimal } ,
37+ #[ returns( QueryEarnPoolResponse ) ]
38+ AmmEarnMiningPoolAll {
39+ pool_ids : Option < Vec < u64 > > ,
40+ filter_type : i32 ,
6341 pagination : Option < PageRequest > ,
6442 } ,
65- // Define AuthQuery
66- #[ returns( AuthAddressesResponse ) ]
67- AuthAddresses { pagination : Option < PageRequest > } ,
43+ #[ returns( QueryJoinPoolEstimationResponse ) ]
44+ AmmJoinPoolEstimation { pool_id : u64 , amounts_in : Vec < Coin > } ,
45+ #[ returns( QueryExitPoolEstimationResponse ) ]
46+ AmmExitPoolEstimation {
47+ pool_id : u64 ,
48+ share_amount_in : Uint128 ,
49+ token_out_denom : String ,
50+ } ,
51+
52+ // Define AssetProfil
6853 #[ returns( QueryGetEntryResponse ) ]
6954 AssetProfileEntry { base_denom : String } ,
7055 #[ returns( QueryGetEntryAllResponse ) ]
7156 AssetProfileEntryAll { pagination : Option < PageRequest > } ,
72- #[ returns( QueryAprResponse ) ]
73- IncentiveApr { withdraw_type : i32 , denom : String } ,
74- #[ returns( QueryAprsResponse ) ]
75- IncentiveAprs { } ,
76- #[ returns( BalanceAvailable ) ]
77- CommitmentRewardsSubBucketBalanceOfDenom {
78- address : String ,
79- denom : String ,
80- program : i32 ,
81- } ,
57+
58+ // Define AuthQuery
59+ #[ returns( AuthAddressesResponse ) ]
60+ AuthAddresses { pagination : Option < PageRequest > } ,
61+
62+ // Define Commitment
8263 #[ returns( BalanceAvailable ) ]
8364 CommitmentStakedBalanceOfDenom { address : String , denom : String } ,
84- #[ returns( Decimal ) ]
85- AmmPriceByDenom { token_in : Coin , discount : Decimal } ,
8665 #[ returns( QueryStakedPositionResponse ) ]
8766 CommitmentStakedPositions { delegator_address : String } ,
8867 #[ returns( QueryUnstakedPositionResponse ) ]
8968 CommitmentUnStakedPositions { delegator_address : String } ,
90- #[ returns( BalanceBorrowed ) ]
91- StableStakeBalanceOfBorrow { } ,
92- #[ returns( StableStakeParamsResp ) ]
93- StableStakeParams { } ,
9469 #[ returns( QueryDelegatorDelegationsResponse ) ]
9570 CommitmentDelegations { delegator_address : String } ,
9671 #[ returns( QueryDelegatorUnbondingDelegationsResponse ) ]
@@ -103,20 +78,28 @@ pub enum ElysQuery {
10378 CommitmentShowCommitments { creator : String } ,
10479 #[ returns( QueryVestingInfoResponse ) ]
10580 CommitmentVestingInfo { address : String } ,
106- #[ returns( QueryEarnPoolResponse ) ]
107- AmmEarnMiningPoolAll {
108- pool_ids : Option < Vec < u64 > > ,
109- filter_type : i32 ,
110- pagination : Option < PageRequest > ,
111- } ,
112- #[ returns( QueryJoinPoolEstimationResponse ) ]
113- AmmJoinPoolEstimation { pool_id : u64 , amounts_in : Vec < Coin > } ,
114- #[ returns( QueryExitPoolEstimationResponse ) ]
115- AmmExitPoolEstimation {
116- pool_id : u64 ,
117- share_amount_in : Uint128 ,
118- token_out_denom : String ,
119- } ,
81+ #[ returns( CommitmentNumberOfCommitmentsResponse ) ]
82+ CommitmentNumberOfCommitments { } ,
83+
84+ // Define Incentive
85+ #[ returns( QueryAprResponse ) ]
86+ IncentiveApr { withdraw_type : i32 , denom : String } ,
87+ #[ returns( QueryAprsResponse ) ]
88+ IncentiveAprs { } ,
89+
90+ // Define Masterchef
91+ #[ returns( MasterchefUserPendingRewardResponse ) ]
92+ MasterchefUserPendingReward { user : String } ,
93+ #[ returns( QueryPoolAprsResponse ) ]
94+ MasterchefPoolAprs { pool_ids : Vec < u64 > } ,
95+ #[ returns( QueryStableStakeAprResponse ) ]
96+ MasterchefStableStakeApr { denom : String } ,
97+
98+ // Define Estaking
99+ #[ returns( EstakingRewardsResponse ) ]
100+ EstakingRewards { address : String } ,
101+
102+ // Define Leveragelp
120103 #[ returns( LeveragelpParamsResponse ) ]
121104 LeveragelpParams { } ,
122105 #[ returns( LeveragelpPositionsResponse ) ]
@@ -143,16 +126,44 @@ pub enum ElysQuery {
143126 LeveragelpPools { pagination : Option < PageRequest > } ,
144127 #[ returns( LeveragelpPositionResponse ) ]
145128 LeveragelpPosition { address : String , id : u64 } ,
146- #[ returns( MasterchefUserPendingRewardResponse ) ]
147- MasterchefUserPendingReward { user : String } ,
148- #[ returns( EstakingRewardsResponse ) ]
149- EstakingRewards { address : String } ,
150- #[ returns( QueryPoolAprsResponse ) ]
151- MasterchefPoolAprs { pool_ids : Vec < u64 > } ,
152- #[ returns( QueryStableStakeAprResponse ) ]
153- MasterchefStableStakeApr { denom : String } ,
154- #[ returns( CommitmentNumberOfCommitmentsResponse ) ]
155- CommitmentNumberOfCommitments { } ,
129+
130+ // Define Perpetual
131+ #[ returns( PerpetualQueryPositionsResponse ) ]
132+ PerpetualQueryPositions { pagination : PageRequest } ,
133+ #[ returns( PerpetualMtpResponse ) ]
134+ PerpetualMtp { address : String , id : u64 } ,
135+ #[ returns( PerpetualOpenEstimationResponse ) ]
136+ PerpetualOpenEstimation {
137+ position : i32 ,
138+ leverage : SignedDecimal ,
139+ trading_asset : String ,
140+ collateral : Coin ,
141+ take_profit_price : SignedDecimal256 ,
142+ discount : Decimal ,
143+ } ,
144+ #[ returns( PerpetualGetPositionsForAddressResponse ) ]
145+ PerpetualGetPositionsForAddress {
146+ address : String ,
147+ pagination : Option < PageRequest > ,
148+ } ,
149+
150+ // Define Oracle
151+ #[ returns( OracleAllPriceResponse ) ]
152+ OraclePriceAll { pagination : PageRequest } ,
153+ #[ returns( OracleAssetInfoResponse ) ]
154+ OracleAssetInfo { denom : String } ,
155+ #[ returns( QueryGetPriceResponse ) ]
156+ OraclePrice {
157+ asset : String ,
158+ source : String ,
159+ timestamp : u64 ,
160+ } ,
161+
162+ // Define Stablestake
163+ #[ returns( BalanceBorrowed ) ]
164+ StableStakeBalanceOfBorrow { } ,
165+ #[ returns( StableStakeParamsResp ) ]
166+ StableStakeParams { } ,
156167}
157168
158169impl CustomQuery for ElysQuery { }
@@ -247,13 +258,6 @@ impl ElysQuery {
247258 pagination,
248259 }
249260 }
250- pub fn get_sub_bucket_rewards_balance ( address : String , denom : String , program : i32 ) -> Self {
251- ElysQuery :: CommitmentRewardsSubBucketBalanceOfDenom {
252- address,
253- denom,
254- program,
255- }
256- }
257261 pub fn get_oracle_price ( asset : String , source : String , timestamp : u64 ) -> Self {
258262 ElysQuery :: OraclePrice {
259263 asset,
0 commit comments