Week 2 Ignite CLI

박근수·2023년 5월 30일
0

아 롤붕이는 Ignite보고 점화만 생각이 나서 CLI 사용하는데 너무 힘들었다....
그냥 이름인것을....

Ignite CLI

Ignite CLI는 쉽게 블록체인 관련 모듈이나 서비스의 기본 뼈대를 만들어주는 커맨드 라인이다.

Ignite CLI is a tool for creating sovereign blockchains built with Cosmos SDK, the world’s
most popular modular blockchain framework. Ignite CLI offers everything you need to scaffold,
test, build, and launch your blockchain.

To get started, create a blockchain:

ignite scaffold chain github.com/username/mars

Usage:
  ignite [command]

Available Commands:
  scaffold    Scaffold a new blockchain, module, message, query, and more
  chain       Build, initialize and start a blockchain node or perform other actions on the blockchain
  generate    Generate clients, API docs from source code
  account     Commands for managing accounts
  relayer     Connect blockchains by using IBC protocol
  tools       Tools for advanced users
  docs        Show Ignite CLI docs
  version     Print the current build information
  help        Help about any command
  completion  Generate the autocompletion script for the specified shell

Flags:
  -h, --help   help for ignite

Use "ignite [command] --help" for more information about a command.

docker를 사용해도 되고 로컬에서 쓸 수도 있다. 처음엔 docker로 따라하다가 소스코드 보고 싶어서 그냥 로컬에서 다시 만들었다.

ignite scaffold chain [chain-name]

블록체인 하나 만들어준다. x/module... , proto 등 필요한 것들을 세팅해줌

ignite chain serve

그 체인을 실행해서 엔드포인트에 접근 할 수 있다. npm run server 이런 느낌인듯.

🌍 Tendermint node: http://0.0.0.0:26657
🌍 Blockchain API: http://0.0.0.0:1317
🌍 Token faucet: http://0.0.0.0:450
ignite scaffold message createPost title body

message도 만들어주는 우리의 친구 CLI
첫번째 인수 createPost는 메세지 이름 나머지 인수는 메세지 필드

create,modify 된 부분 소스코드 열어보면 수정된 것들 확인 할 수 있음.

웹서비스나 간단한 프로그램과 달리 블록체인은 뭔가 어렵고 복잡하고 이것저것 해야할 것 같은 생각이 있었는데 CLI로 빨리 빌딩이 되니까 뭔가 어색하기도 하고 생각과 달라서 이 CLI가 내가 아는게 맞나 생각이 들었다.(왜 CLI에 점화를 붙이는가... 롤 점화 때매 ignite 의미가 뭘까 생각이 계속 났다) 일반적인 MVC 백앤드 서비스와 다른 단어들과 익숙치 않은 것들이 많아서 이게 뭔가 하고 계속 읽어봤던 것 같다. 처음에는 터미널에서 따라하기 만해서 답답했는데 본문 하단에 영상 보니까 VS키고 소스 코드 보길래 그제서야 이해가 갔다. CLI는 CLI다.

profile
개성이 확실한편

0개의 댓글