# ๐Ÿงช Preparing your Labs --- ## ๐Ÿ Our Goal Okay! Now we know what Osmosis is and what we are going to build. Let's get start by preparing our workspace on local environment. Luckily, Osmosis Labs provide us with a wonderful tool called **LocalOsmosis** which already pre-configured standard environment for developing on Osmosis for us. For more information about LocalOsmosis please refer to its official documentation here -> https://docs.osmosis.zone/developing/tools/localosmosis.htm Also, We're going to install a tool call **Beaker** which is a tool that's going to help us scaffolding and do a lot of heavy tasks for us when developing smart contracts (think of hardhat for cosmwasm) --- ## ๐Ÿชš Let's Install it! Before installing LocalOsmosis you'll need to installed its prerequisites first. Let's look into it one-by-one now! #### ๐Ÿณ Docker & docker-compose So, In case you didnโ€™t have Docker install in your local machine already. It's a tool that help containerize a lot of components together. thus, make it easier to work on things. You can install it by go to this [Link](https://www.docker.com/) Also, One more thing after you finished installed Docker. Its default resourses limit is pretty small. So it's not bad if we pump that number up a little bit. Here's what I using. ![[Pasted image 20220813161224.png]] #### ๐Ÿค“ Node.js Next, is our beloved Node.js if you have no Node.js installed just head to their official website [here](https://nodejs.org/en/) Currently (As I writing this), The LTS version is on **NodeJS v16** just get that version if you didn't have it yet! ![[Pasted image 20220813161638.png]] #### โš™๏ธ Rust And now, It's Rust which you may notice we're going to write it in the smart contract. (But it's also used in a lot of place) to install it is really easy. You can do it by using **rustup** ([docs](https://www.rust-lang.org/tools/install)) `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` then do ``` rustup default stable rustup target add wasm32-unknown-unknown ``` `` Also, you need to install the following cargo packages as well ``` cargo install cargo-generate --features vendored-openssl cargo install cargo-run-scrip ``` #### ๐Ÿงช LocalOsmosis Alright, Finally here's the time for LocalOsmosis. So actually there's number of ways to install LocalOsmosis in your local machine. The first one is you can use their official command line to install it. https://get.osmosis.zone/ Just check out the link on the top. You can install LocalOsmosis by choose choice 3. and it should be simple and straightforward just follow its instructions and you're good to go! Another way to do is to clone their repo into your local machine. `git clone https://github.com/osmosis-labs/LocalOsmosis` Then, You should be able to start, stop, and reset chain using this commands Start Env: `make start` or `make localnet-start` if you're using the git clone one Stop Env: `make stop` or `make localnet-stop` if you're using the git clone one Stop Env (And remove all data stored on the chain): `make restart` After your LocalOsmosis is run. You should be able to see the process on Docker Desktop with something similar to this. ![[Pasted image 20220813163114.png]] #### โš—๏ธ Beaker (I find no emoji for beaker please let me use alembic here ๐Ÿ˜‚) As we discuss earlier **Beaker** is a tool to scaffold cosmwasm app. Which is really helpful for us. And make it really to get start developing it. Learn more about Beaker [here](https://github.com/osmosis-labs/beaker) Sooo, Let's just install it now! `cargo install -f beaker` After Beaker installed we should be able to see something like this. ![[Pasted image 20220813164837.png]] --- ## Automatic install If the above installation process is too hard to follow along, you can also use the automatic setup option as well by doing the following command. ``` bash <(curl -sL https://get.osmosis.zone/run) ``` This command will setup everything you need for the smart contract development for you. Including Rust, Beaker, localosmosis command line tool, and additional configurations.