# Bugbash Guide
## Setup Indexer
1. Clone Indexer repo by
```bash
git clone https://github.com/alleslabs/osmosis-refactor-poc.git
// fill user whatever you want
// fill password -> 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
```
2. Follows [this instruction](https://hackmd.io/d_DQE58DQ1icnfghahu_KQ) for setup and run indexer
## Setup Celatone Frontend
1. Follow [Prerequisites](https://github.com/alleslabs/celatone-frontend/blob/support-local-2/README.md#prerequisites)
2. If there is any issue with node or nvm, try following this [guide](https://collabnix.com/how-to-install-and-configure-nvm-on-mac-os/)
3. Then, clone the Celatone Frontend repository by
```bash
git clone https://github.com/alleslabs/celatone-frontend.git
cd celatone-frontend
git checkout support-local-2
git pull
yarn
```
3. Follow [Local support documentation](https://hackmd.io/nskUeVyRR9uXW5_ocN9CrA) (only local osmosis section)
## Proposal to whitelist and store code testing
After finishing the indexer instructions and setup frontend on your workspace, there are a few necessary steps to take before proceeding with the testing of proposal whitelist and store code. Follow these steps:
1. Open Docker Application

2. Click on `indexer-node-1`, then click on `Terminal` tab

3. Add keys
```
osmosisd keys add indexer --recover --keyring-backend test
```

and then paste the mnemonic key
`smile stem oven genius cave resource better lunar nasty moon company ridge brass rather supply used horn three panic put venue analyst leader comic`
4. Then, do it again for delegator
```
osmosisd keys add delegator --recover --keyring-backend test
```
mnemonic is `jewel charge parrot outdoor become follow harbor ghost tonight expand able note oven pear into bench naive excuse loyal fog minute genius core radio`
you will see something like this, if not contact me.

5. Send uosmo to delegator by
```
osmosisd tx bank send osmo15d4apf20449ajvwycq8ruaypt7v6d345z36n9l osmo10868775s7hyraa8swlfkqj55t4086uar5nfhfs 10000000000uosmo --from indexer --chain-id localosmosis --gas auto --gas-adjustment 1.5 --gas-prices 0.025uosmo --keyring-backend test
```
6. Delegate to validator by
```
osmosisd tx staking delegate osmovaloper1r8u4m0wefrdyp7sdde7drtrt94qczggk8jur6t 1000000000uosmo --from delegator --chain-id localosmosis --gas auto --gas-adjustment 1.5 --gas-prices 0.025uosmo --keyring-backend test
```
Also, you can check sent transactions on http://localhost:3000/localosmosis/txs
** When you request osmo from faucet, please request twice or more. **
7. Now you can open your proposal either store code or whitelist
In case of proposal to whitelist, you can check current upload access param here http://localhost/rest/cosmwasm/wasm/v1/codes/params
8. After you opened proposal, you can vote by (please change proposal id before use it)
```
osmosisd tx gov vote 1 yes --from delegator --chain-id localosmosis --gas auto --gas-adjustment 1.5 --gas-prices 0.025uosmo --keyring-backend test
```