Skip to content

Commit

Permalink
Update CLI examples to use 'bob' as the default user and fix release … (
Browse files Browse the repository at this point in the history
#1048)

Update CLI examples to use 'bob' as the default user and fix release workflow chain ID

- Changed the default user in CLI command examples from 'treasury' to 'bob' across multiple files for consistency.
- Updated the chain ID in the release workflow from 'elystestnet-1' to 'elysicstestnet-1' to reflect the correct test network.
  • Loading branch information
cosmic-vagabond authored Dec 8, 2024
1 parent 806db01 commit b88bc5b
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# environment variables
ELYSD=dist/elysd-linux-amd64_linux_amd64_v1/elysd
NODE=https://rpc.testnet.elys.network:443
OPTIONS="--node $NODE --chain-id elystestnet-1 --keyring-backend=test -b=sync --fees=100000uelys --gas=300000 -y"
OPTIONS="--node $NODE --chain-id elysicstestnet-1 --keyring-backend=test -b=sync --fees=100000uelys --gas=300000 -y"
# save private keys to files
echo "${{ secrets.PRIVATE_KEY_1 }}" > /tmp/private_key_1.txt
Expand Down
5 changes: 3 additions & 2 deletions x/amm/client/cli/tx_create_pool.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package cli

import (
sdkmath "cosmossdk.io/math"
"errors"

sdkmath "cosmossdk.io/math"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand All @@ -21,7 +22,7 @@ func CmdCreatePool() *cobra.Command {
cmd := &cobra.Command{
Use: "create-pool [weights] [initial-deposit] [fee-denom]",
Short: "create a new pool and provide the liquidity to it",
Example: `elysd tx amm create-pool 100uatom,100uusdc 100000000000uatom,100000000000uusdc --swap-fee=0.00 --use-oracle=false --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx amm create-pool 100uatom,100uusdc 100000000000uatom,100000000000uusdc --swap-fee=0.00 --use-oracle=false --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argWeights, err := sdk.ParseCoinsNormalized(args[0])
Expand Down
2 changes: 1 addition & 1 deletion x/amm/client/cli/tx_exit_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func CmdExitPool() *cobra.Command {
cmd := &cobra.Command{
Use: "exit-pool [pool-id] [min-amounts-out] [share-amount-in]",
Short: "exit a new pool and withdraw the liquidity from it",
Example: `elysd tx amm exit-pool 0 1000uatom,1000uusdc 200000000000000000 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx amm exit-pool 0 1000uatom,1000uusdc 200000000000000000 --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argPoolId, err := cast.ToUint64E(args[0])
Expand Down
2 changes: 1 addition & 1 deletion x/amm/client/cli/tx_join_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func CmdJoinPool() *cobra.Command {
cmd := &cobra.Command{
Use: "join-pool [pool-id] [max-amounts-in] [share-amount-out]",
Short: "join a new pool and provide the liquidity to it",
Example: `elysd tx amm join-pool 0 2000uatom,2000uusdc 200000000000000000 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx amm join-pool 0 2000uatom,2000uusdc 200000000000000000 --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) (err error) {
poolId, err := cast.ToUint64E(args[0])
Expand Down
2 changes: 1 addition & 1 deletion x/amm/client/cli/tx_swap_exact_amount_in.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func CmdSwapExactAmountIn() *cobra.Command {
cmd := &cobra.Command{
Use: "swap-exact-amount-in [token-in] [token-out-min-amount] [swap-route-pool-ids] [swap-route-denoms]",
Short: "Swap an exact amount of tokens for a minimum of another token, similar to swapping a token on the trade screen GUI.",
Example: `elysd tx amm swap-exact-amount-in 100000uusdc 10000 0 uatom --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx amm swap-exact-amount-in 100000uusdc 10000 0 uatom --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(4),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argTokenIn, err := sdk.ParseCoinNormalized(args[0])
Expand Down
2 changes: 1 addition & 1 deletion x/amm/client/cli/tx_swap_exact_amount_out.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func CmdSwapExactAmountOut() *cobra.Command {
cmd := &cobra.Command{
Use: "swap-exact-amount-out [token-out] [token-out-max-amount] [swap-route-pool-ids] [swap-route-denoms]",
Short: "Swap a maximum amount of tokens for an exact amount of another token, similar to swapping a token on the trade screen GUI.",
Example: `elysd tx amm swap-exact-amount-out 100000uatom 200000 0 uusdc --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx amm swap-exact-amount-out 100000uatom 200000 0 uusdc --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(4),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argTokenOut, err := sdk.ParseCoinNormalized(args[0])
Expand Down
2 changes: 1 addition & 1 deletion x/amm/client/cli/tx_update_pool_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func CmdUpdatePoolParams() *cobra.Command {
cmd := &cobra.Command{
Use: "update-pool-params [pool-id] [flags]",
Short: "Update pool params",
Example: "elysd tx amm update-pool-params 1 --swap-fee=0.00 --exit-fee=0.00 --use-oracle=false --from=jack --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000",
Example: "elysd tx amm update-pool-params 1 --swap-fee=0.00 --exit-fee=0.00 --use-oracle=false --from=bob --yes --gas=1000000",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argPoolId, err := cast.ToUint64E(args[0])
Expand Down
2 changes: 1 addition & 1 deletion x/leveragelp/client/cli/tx_claim_rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func CmdClaimRewards() *cobra.Command {
cmd := &cobra.Command{
Use: "claim-rewards [position-ids] [flags]",
Short: "Claim rewards from leveragelp position",
Example: `elysd tx leveragelp claim-rewards 1,2 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx leveragelp claim-rewards 1,2 --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down
5 changes: 3 additions & 2 deletions x/leveragelp/client/cli/tx_close.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cli

import (
"cosmossdk.io/math"
"errors"
"strconv"

"cosmossdk.io/math"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand All @@ -16,7 +17,7 @@ func CmdClose() *cobra.Command {
cmd := &cobra.Command{
Use: "close [position-id] [amount] [flags]",
Short: "Close leveragelp position",
Example: `elysd tx leveragelp close 1 10000000 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx leveragelp close 1 10000000 --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down
5 changes: 3 additions & 2 deletions x/leveragelp/client/cli/tx_open.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cli

import (
sdkmath "cosmossdk.io/math"
"errors"
"strconv"

sdkmath "cosmossdk.io/math"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand All @@ -16,7 +17,7 @@ func CmdOpen() *cobra.Command {
cmd := &cobra.Command{
Use: "open [leverage] [collateral-asset] [collateral-amount] [amm-pool-id] [stop-loss-price] [flags]",
Short: "Open leveragelp position",
Example: `elysd tx leveragelp open 5 uusdc 100000000 1 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx leveragelp open 5 uusdc 100000000 1 --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(5),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down
5 changes: 3 additions & 2 deletions x/perpetual/client/cli/tx_close.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cli

import (
"cosmossdk.io/math"
"errors"
"strconv"

"cosmossdk.io/math"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand All @@ -16,7 +17,7 @@ func CmdClose() *cobra.Command {
cmd := &cobra.Command{
Use: "close [mtp-id] [amount] [flags]",
Short: "Close perpetual position",
Example: `elysd tx perpetual close 1 10000000 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
Example: `elysd tx perpetual close 1 10000000 --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down
7 changes: 4 additions & 3 deletions x/perpetual/client/cli/tx_open.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cli

import (
sdkmath "cosmossdk.io/math"
"errors"
"strconv"

sdkmath "cosmossdk.io/math"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand All @@ -18,9 +19,9 @@ func CmdOpen() *cobra.Command {
Use: "open [position] [leverage] [pool-id] [trading-asset] [collateral] [flags]",
Short: "Open perpetual position",
Example: `Infinte profitability:
elysd tx perpetual open long 5 1 uatom 100000000uusdc --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000
elysd tx perpetual open long 5 1 uatom 100000000uusdc --from=bob --yes --gas=1000000
Finite profitability:
elysd tx perpetual open short 5 1 uatom 100000000uusdc --take-profit 100 --stop-loss 10 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000`,
elysd tx perpetual open short 5 1 uatom 100000000uusdc --take-profit 100 --stop-loss 10 --from=bob --yes --gas=1000000`,
Args: cobra.ExactArgs(5),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down
5 changes: 3 additions & 2 deletions x/tradeshield/client/cli/tx_perpetual_order.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cli

import (
"cosmossdk.io/math"
"errors"
"strconv"

"cosmossdk.io/math"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand Down Expand Up @@ -215,7 +216,7 @@ func CmdCancelPerpetualOrders() *cobra.Command {
cmd := &cobra.Command{
Use: "cancel-perpetual-orders [ids.json]",
Short: "Cancel a perpetual orders by ids",
Example: "elysd tx perpetual cancel-perpetual-orders ids.json --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000",
Example: "elysd tx perpetual cancel-perpetual-orders ids.json --from=bob --yes --gas=1000000",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
ids, err := readPositionRequestJSON(args[0])
Expand Down
2 changes: 1 addition & 1 deletion x/tradeshield/client/cli/tx_spot_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func CmdCancelSpotOrders() *cobra.Command {
cmd := &cobra.Command{
Use: "cancel-spot-orders [ids.json]",
Short: "Cancel spot-orders",
Example: "elysd tx perpetual cancel-spot-orders ids.json --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000",
Example: "elysd tx perpetual cancel-spot-orders ids.json --from=bob --yes --gas=1000000",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
ids, err := readPositionRequestJSON(args[0])
Expand Down

0 comments on commit b88bc5b

Please sign in to comment.