Cosmos Blockchain with Starport
Posted By : Aman Mourya | 31-Jan-2022
Starport blockchain generation steps
- Install go version 1.17.x
$ wget https://go.dev/dl/go1.17.5.linux-amd64.tar.gz
$ sudo rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.5.linux-amd64.tar.gz
Edit the .bashrc file on the Root Directory
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
Source .bashrc
$ go version
- Install NodeJs :
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ apt install nodejs -y
$ node --version
- Install protoc
$ apt install -y protobuf-compiler
$ sudo apt install protobuf-compiler
$ protoc --version # Ensure compiler version is 3+
- Install starport:-
$ curl https://get.starport.network/starport | bash
sudo mv starport /usr/local/bin/
$ starport version
- Run starport:-
starport scaffold chain github.com/example/oodles --address-prefix OOD
Here, you can change "oodles" string according to your need.
(A) cd oodles (scaffolded directory)
- Change directory to oodles
$ cd ~/oodles/
$ nano config.yml
Change setting with the following configuration
- oodles is coins
- Users denotes users who are validator and seed wallets.
accounts:
- name: user1
coins: ["10000000000000000OOD"]
- name: user2
coins: ["10000000000000000OOD"]
validator:
name: user1
staked: "1000000000000OOD"
client:
vuex:
path: "vue/src/store"
openapi:
path: "docs/static/openapi.yml"
faucet:
name: user2
coins: ["100000000OOD"]
genesis:
app_state:
staking:
params:
bond_denom: "OOD"
With this and add respective values
Created a binary of oodles in the firstnode or start starport service
NOTE:- Run the starport service in background jobs i.e., Nohup or Tmux
$ starport chain serve
cd ~/oddles
starport chain build
oodlesd start
Now,
- Blockchain will be up.
- Mnemonics will be generated in cmd for seed wallet for login
- Apis URL http://0.0.0.0:26657,http://0.0.0.0:26656
Push app code to your GitHub or GitLab account by creating a new project repo and providing public access to it.
Create a Github repo and push the code to it. This step is quite important. I will use the automatic actions from GitHub to build a public release of the blockchain.
Create an empty GitHub repo
Add remote and push changes
git remote add origin https://github.com/oodlestechnologies/oodles-new.git
git push -u origin master
A repo with the base Starport app is now ready.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Aman Mourya
Aman is a highly experienced Backend Developer with a specialization in Python. In his role, he is responsible for overseeing and managing the successful execution of software development projects with a strong background in Python, Odoo, Micro Services and DevOps. Aman utilizes his technical knowledge to effectively lead and guide development teams. He excels in providing technical guidance and support, assisting the team in complex problem-solving and conducting thorough code reviews. Aman's expertise extends to analyzing and resolving complex technical challenges. He is known for offering innovative solutions and guiding the team through the entire development process. His proficiency in Python programming enables him to contribute significantly to the success of multiple projects. Some notable contributions include Mobineers - Phase 2, Scaffold E-commerce, Odoo Infrastructure Implementations, Toosi WhatsApp Chatbot Integration, Hatrik Marketplace, MyMandi, Tutorx, Musical School, Pandojo, Odoo Inventory Management, Crypstarter, Monarch, Tundra, Pando Mall, Wegosu, Moralis_test, Mobile App Wallet Developer - Trust Wallet Source Code, Verification Module, Mobineers, Ecar website, Metaverse, Accounting System Customization, Markivia phase 2- Odoo, Veto, Invoicing.Platform, and TRO Platform. With a combination of technical expertise, project management skills, and effective communication, Aman ensures the successful delivery of software projects. His valuable contributions and dedication make him a valuable asset to any development team.