Skip to content

Commit

Permalink
cleanup and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
99adarsh committed Dec 27, 2024
1 parent d216e73 commit c244b4a
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 61 deletions.
6 changes: 3 additions & 3 deletions x/amm/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
RpcMethod: "JoinPoolEstimation",
Use: "join-pool-estimation [pool_id] [tokens-in]",
Short: "Query JoinPoolEstimation",
Example: "elysd q amm join-pool-estimation 1 100token,100token2",
Example: "elysd q amm join-pool-estimation 1 100token 100token2",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "pool_id"}, {ProtoField: "amounts_in", Varargs: true}},
},
{
Expand Down Expand Up @@ -155,11 +155,11 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "UpdatePoolParams",
Skip: true,
Skip: true, // authority gated
},
{
RpcMethod: "UpdateParams",
Skip: true,
Skip: true, // authority gated
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion x/burner/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "UpdateParams",
Skip: true,
Skip: true, // authority gated
},
},
},
Expand Down
25 changes: 12 additions & 13 deletions x/commitment/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "amount"}, {ProtoField: "denom"}},
},
{
RpcMethod: "VestNow",
Use: "vest-now [amount] [denom]",
Short: "Broadcast message vest-now",
// Example: `elysd tx amm swap-by-denom 0 1000uatom uusdc --from=bob --yes --gas=1000000`,
RpcMethod: "VestNow",
Use: "vest-now [amount] [denom]",
Short: "Broadcast message vest-now",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "amount"}, {ProtoField: "denom"}},
},
{
Expand All @@ -103,19 +102,20 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "ClaimVesting",
Skip: true,
Use: "claim-vesting",
Short: "Broadcast message claim_vesting",
},
{
RpcMethod: "UpdateVestingInfo",
Skip: true, // authority gated
},
{
RpcMethod: "UpdateEnableVestNow",
Skip: true,
Skip: true, // authority gated
},
{
RpcMethod: "UpdateAirdropParams",
Skip: true,
Skip: true, // authority gated
},
{
RpcMethod: "Stake",
Expand All @@ -130,16 +130,15 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "amount"}, {ProtoField: "asset"}, {ProtoField: "validator_address"}},
},
{
RpcMethod: "ClaimAirdrop",
Use: "claim-airdrop [claim-address]",
Short: "Broadcast message claim_airdrop",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "claim_address"}},
RpcMethod: "ClaimAirdrop",
Use: "claim-airdrop",
Short: "Broadcast message claim_airdrop",
},
{
RpcMethod: "ClaimKol",
Use: "claim-kol [claim-address] [refund]",
Use: "claim-kol [refund]",
Short: "Broadcast message claim_kol",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "claim_address"}, {ProtoField: "refund"}},
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "refund"}},
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion x/epochs/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "CurrentEpoch",
Use: "current-epoch",
Use: "current-epoch [identifier]",
Short: "Query current epoch by specified identifier",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "identifier"}},
},
Expand Down
20 changes: 10 additions & 10 deletions x/estaking/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
EnhanceCustomCommand: false, // use custom commands only until cosmos sdk v0.51
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "WithdrawReward",
Skip: true,
RpcMethod: "WithdrawReward",
Use: "withdraw-rewards [validator-address]",
Short: "Withdraw rewards",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}},
},
{
RpcMethod: "WithdrawAllRewards",
Use: "withdraw-all-rewards [delegator-address]",
Short: "Withdraw all rewards for delegations and Eden/EdenB commit",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "delegator_address"}},
RpcMethod: "WithdrawAllRewards",
Use: "withdraw-all-rewards",
Short: "Withdraw all rewards for delegations and Eden/EdenB commit",
},
{
RpcMethod: "WithdrawElysStakingRewards",
Use: "withdraw-elys-staking-rewards [delegator-address]",
Short: "Withdraw rewards for delegations",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "delegator_address"}},
RpcMethod: "WithdrawElysStakingRewards",
Use: "withdraw-elys-staking-rewards",
Short: "Withdraw rewards for delegations",
},
{
RpcMethod: "UpdateParams",
Expand Down
8 changes: 3 additions & 5 deletions x/leveragelp/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,16 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "position"}, {ProtoField: "price"}},
},
{
RpcMethod: "ClosePositions",
Use: "close-positions [liquidate-position] [stoploss-position]",
Short: "Broadcast message close-positions",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "liquidate"}, {ProtoField: "stop_loss"}},
RpcMethod: "ClosePositions",
Skip: true, // use custom command
},
{
RpcMethod: "UpdateParams",
Skip: true, // authority gated
},
{
RpcMethod: "AddPool",
Skip: true,
Skip: true, // authority gated
},
},
},
Expand Down
18 changes: 9 additions & 9 deletions x/masterchef/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,49 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "ExternalIncentive",
Use: "external-incentive",
Use: "external-incentive [id]",
Short: "shows external incentive",
Example: "elysd q masterchef external-incentive [id]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}},
},
{
RpcMethod: "PoolInfo",
Use: "pool-info",
Use: "pool-info [id]",
Short: "shows pool info",
Example: "elysd q masterchef pool-info [id]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "pool_id"}},
},
{
RpcMethod: "PoolRewardInfo",
Use: "pool-reward-info",
Use: "pool-reward-info [id] [reward-denom]",
Short: "shows pool reward info",
Example: "elysd q masterchef pool-reward-info [id] [reward-denom]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "pool_id"}, {ProtoField: "reward_denom"}},
},
{
RpcMethod: "UserRewardInfo",
Use: "user-reward-info",
Use: "user-reward-info [user] [pool-id] [reward-denom]",
Short: "shows user reward info",
Example: "elysd q masterchef user-reward-info [user] [pool-id] [reward-denom]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "user"}, {ProtoField: "pool_id"}, {ProtoField: "reward_denom"}},
},
{
RpcMethod: "UserPendingReward",
Use: "user-pending-reward",
Use: "user-pending-reward [user]",
Short: "shows user pending reward",
Example: "elysd q masterchef user-pending-reward [user]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "user"}},
},
{
RpcMethod: "StableStakeApr",
Use: "stable-stake-apr",
Use: "stable-stake-apr [denom]",
Short: "calculate Stable Stake APR",
Example: "elysd q masterchef stable-stake-apr [denom]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}},
},
{
RpcMethod: "PoolAprs",
Use: "pool-aprs",
Use: "pool-aprs [ids]",
Short: "calculate pool APRs",
Example: "elysd q masterchef pool-aprs [ids]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "pool_ids", Varargs: true}},
Expand All @@ -80,7 +80,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "Apr",
Use: "apr",
Use: "apr [withdraw-type] [denom]",
Short: "calculate APR",
Example: "elysd q masterchef apr [withdraw-type] [denom]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "withdraw_type"}, {ProtoField: "denom"}},
Expand All @@ -93,7 +93,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "PoolRewards",
Use: "pool-rewards",
Use: "pool-rewards [pool-ids]",
Short: "calculate pool rewards",
Example: "elysd q masterchef pool-rewards [ids]",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "pool_ids", Varargs: true}},
Expand Down
18 changes: 10 additions & 8 deletions x/oracle/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "Price",
Use: "show-price [asset]",
Use: "show-price [asset] [source] [timestamp]",
Short: "shows a price",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "asset"}, {ProtoField: "source"}, {ProtoField: "timestamp"}},
},
Expand All @@ -53,7 +53,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "PriceFeeder",
Use: "show-price-feeder [index]",
Use: "show-price-feeder [feeder]",
Short: "shows a priceFeeder",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "feeder"}},
},
Expand Down Expand Up @@ -92,24 +92,26 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Short: "Delete a priceFeeder",
},
{
RpcMethod: "FeedMultiplePrices",
Skip: true,
RpcMethod: "FeedMultiplePrices",
Use: "feed-multiple-price [prices]",
Short: "Feed multiple prices",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "feed_prices"}},
},
{
RpcMethod: "RemoveAssetInfo",
Skip: true,
Skip: true, //authority gated
},
{
RpcMethod: "AddPriceFeeders",
Skip: true,
Skip: true, //authority gated
},
{
RpcMethod: "RemovePriceFeeders",
Skip: true,
Skip: true, //authority gated
},
{
RpcMethod: "UpdateParams",
Skip: true,
Skip: true, //authority gated
},
},
},
Expand Down
8 changes: 3 additions & 5 deletions x/perpetual/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ elysd tx perpetual open short 5 1 uatom 100000000uusdc --take-profit 100 --stop-
},
{
RpcMethod: "Close",
Use: "close [mtp-id] [amount] [flags]",
Use: "close [mtp-id] [amount]",
Short: "Close perpetual position",
Example: `elysd tx perpetual close 1 10000000 --from=bob --yes --gas=1000000`,
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}, {ProtoField: "amount"}},
Expand All @@ -123,10 +123,8 @@ elysd tx perpetual open short 5 1 uatom 100000000uusdc --take-profit 100 --stop-
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "price"}, {ProtoField: "id"}},
},
{
RpcMethod: "ClosePositions",
Use: "close-positions [liquidate] [stoploss] [take-profit]",
Short: "Broadcast message close-positions",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "liquidate", Varargs: true}, {ProtoField: "stop_loss", Varargs: true}, {ProtoField: "take_profit", Varargs: true}},
RpcMethod: "ClosePositions",
Skip: true, // use custom command
},
{
RpcMethod: "UpdateTakeProfitPrice",
Expand Down
39 changes: 39 additions & 0 deletions x/tokenomics/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,44 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
},
},
Tx: &autocliv1.ServiceCommandDescriptor{
Service: tokenomics.Msg_ServiceDesc.ServiceName,
EnhanceCustomCommand: false, // use custom commands only until cosmos sdk v0.51
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "CreateAirdrop",
Skip: true,
},
{
RpcMethod: "UpdateAirdrop",
Skip: true,
},
{
RpcMethod: "DeleteAirdrop",
Skip: true,
},
{
RpcMethod: "UpdateGenesisInflation",
Skip: true,
},
{
RpcMethod: "CreateTimeBasedInflation",
Skip: true,
},
{
RpcMethod: "UpdateTimeBasedInflation",
Skip: true,
},
{
RpcMethod: "DeleteTimeBasedInflation",
Skip: true,
},
{
RpcMethod: "ClaimAirdrop",
Use: "claim-airdrop",
Short: "Broadcast message claim-airdrop",
},
},
},
}

Check warning on line 89 in x/tokenomics/autocli.go

View check run for this annotation

Codecov / codecov/patch

x/tokenomics/autocli.go#L11-L89

Added lines #L11 - L89 were not covered by tests
}
10 changes: 4 additions & 6 deletions x/tradeshield/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "CreateSpotOrder",
Use: "create-spot-order [order-type] [order-amount] [order-target-denom] [order-price] [owner-address]",
Use: "create-spot-order [order-type] [order-amount] [order-target-denom] [order-price]",
Short: "Create a new spot order",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "order_type"}, {ProtoField: "order_amount"}, {ProtoField: "order_target_denom"}, {ProtoField: "order_price"}, {ProtoField: "owner_address"}},
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "order_type"}, {ProtoField: "order_amount"}, {ProtoField: "order_target_denom"}, {ProtoField: "order_price"}},
},
{
RpcMethod: "UpdateSpotOrder",
Expand Down Expand Up @@ -118,10 +118,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Skip: true, // authority gated
},
{
RpcMethod: "ExecuteOrders",
Use: "execute-orders [perpetual-order-ids] [spot-order-ids]",
Short: "Verify that submitted orders meet the criteria for execution and process those that do, while skipping those that don't.",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "perpetual_order_ids", Varargs: true}, {ProtoField: "spot_order_ids", Varargs: true}},
RpcMethod: "ExecuteOrders",
Skip: true, // use custom command
},
},
},
Expand Down

0 comments on commit c244b4a

Please sign in to comment.