|
1 | | -# push |
2 | | -**push** is a blockchain built using Cosmos SDK and Tendermint and created with [Ignite CLI](https://ignite.com/cli). |
3 | | - |
4 | | -## Get started |
5 | | - |
6 | | -``` |
7 | | -ignite chain serve |
8 | | -``` |
9 | | - |
10 | | -`serve` command installs dependencies, builds, initializes, and starts your blockchain in development. |
11 | | - |
12 | | -### Configure |
13 | | - |
14 | | -Your blockchain in development can be configured with `config.yml`. To learn more, see the [Ignite CLI docs](https://docs.ignite.com). |
15 | | - |
16 | | -### Web Frontend |
17 | | - |
18 | | -Additionally, Ignite CLI offers both Vue and React options for frontend scaffolding: |
19 | | - |
20 | | -For a Vue frontend, use: `ignite scaffold vue` |
21 | | -For a React frontend, use: `ignite scaffold react` |
22 | | -These commands can be run within your scaffolded blockchain project. |
23 | | - |
24 | | - |
25 | | -For more information see the [monorepo for Ignite front-end development](https://github.com/ignite/web). |
26 | | - |
27 | | -## Release |
28 | | -To release a new version of your blockchain, create and push a new tag with `v` prefix. A new draft release with the configured targets will be created. |
29 | | - |
30 | | -``` |
31 | | -git tag v0.1 |
32 | | -git push origin v0.1 |
33 | | -``` |
34 | | - |
35 | | -After a draft release is created, make your final changes from the release page and publish it. |
36 | | - |
37 | | -### Install |
38 | | -To install the latest version of your blockchain node's binary, execute the following command on your machine: |
39 | | - |
40 | | -``` |
41 | | -curl https://get.ignite.com/username/push@latest! | sudo bash |
42 | | -``` |
43 | | -`username/push` should match the `username` and `repo_name` of the Github repository to which the source code was pushed. Learn more about [the install process](https://github.com/allinbits/starport-installer). |
44 | | - |
45 | | -## Learn more |
46 | | - |
47 | | -- [Ignite CLI](https://ignite.com/cli) |
48 | | -- [Tutorials](https://docs.ignite.com/guide) |
49 | | -- [Ignite CLI docs](https://docs.ignite.com) |
50 | | -- [Cosmos SDK docs](https://docs.cosmos.network) |
51 | | -- [Developer Chat](https://discord.gg/ignite) |
| 1 | +### **System Requirements** |
| 2 | + |
| 3 | +- **OS:** macOS, Linux, or WSL on Windows |
| 4 | +- **Go:** `>=1.21` (Check with `go version`) |
| 5 | +- **Node.js** |
| 6 | + |
| 7 | +## Steps: |
| 8 | + |
| 9 | +1. [Install Ignite CLI](https://docs.ignite.com/welcome/install) |
| 10 | +2. Clone the repo: |
| 11 | + |
| 12 | + ```sh |
| 13 | + git clone https://github.com/push-protocol/push-cosmos-devnet |
| 14 | + ``` |
| 15 | +3. Install the dependencies: |
| 16 | + |
| 17 | + ```sh |
| 18 | + make install |
| 19 | + ``` |
| 20 | +4. To start the chain: |
| 21 | + |
| 22 | + ```sh |
| 23 | + ignite chain serve |
| 24 | + ``` |
| 25 | + |
| 26 | +#### After this command runs successfully, you shall notice two addresses given, alice and bob, these can be used for all the testing and simulations. Also note that Alice is the default Validator, and Bob is the faucet, configured in the config.yml. |
| 27 | + |
| 28 | +# Common CLI Commands |
| 29 | + |
| 30 | +### **1. Bank** |
| 31 | +#### **Query balance:** |
| 32 | + |
| 33 | + |
| 34 | + pushchaind query bank balances [address] |
| 35 | + |
| 36 | + |
| 37 | +#### **Send tokens:** |
| 38 | + |
| 39 | + |
| 40 | + pushchaind tx bank send [from-address] [to-address] [amount] |
| 41 | + |
| 42 | + |
| 43 | +### **2. Tx Hash Info** |
| 44 | + |
| 45 | + |
| 46 | + pushchaind query tx [tx-hash] |
| 47 | + |
| 48 | + |
| 49 | +### **3. Fee Grant** |
| 50 | +#### **For a transaction to use granter allowance, add this flag in the tx command:** |
| 51 | + |
| 52 | + |
| 53 | + --fee-granter=[granter-address] |
| 54 | + |
| 55 | + |
| 56 | +#### **Grant allowance:** |
| 57 | + |
| 58 | + |
| 59 | + pushchaind tx feegrant grant [granter] [grantee] |
| 60 | + |
| 61 | + |
| 62 | +##### **Flags:** |
| 63 | + |
| 64 | + --spend-limit # The maximum amount of tokens the grantee can spend |
| 65 | + --period # The time duration in seconds for periodic allowance |
| 66 | + --period-limit # The maximum amount of tokens the grantee can spend within each period |
| 67 | + --expiration # The date and time when the grant expires (RFC3339 format) |
| 68 | + --allowed-messages # Comma-separated list of allowed message type URLs |
| 69 | + |
| 70 | + |
| 71 | +#### **Query Fee Grants** |
| 72 | +##### **All grants of a granter:** |
| 73 | + |
| 74 | + pushchaind query feegrant grants-by-granter [granter-address] |
| 75 | + |
| 76 | +##### **All grants of a grantee:** |
| 77 | + |
| 78 | + pushchaind query feegrant grants-by-grantee [grantee-address] |
| 79 | + |
| 80 | +##### **Specific grant:** |
| 81 | + |
| 82 | + pushchaind query feegrant grant [granter-addr] [grantee-addr] |
| 83 | + |
| 84 | + |
| 85 | +### **4. Gas Prices** |
| 86 | +##### **Add this flag to the transaction:** |
| 87 | + --gas-prices="[amount]" |
| 88 | + |
| 89 | + |
| 90 | +### **5. Gas Limit** |
| 91 | +##### **Add this flag to the transaction:** |
| 92 | + --gas [amount] |
| 93 | + |
0 commit comments