CLI 도구 사용

2405 단어 Solanatech

소위 Solana

  • 블록 체인 기술의 일종
  • Dapps(분산형 어플리케이션) 및 지능형 구성을 위한 플랫폼 구축
  • 블록체인 중 가장 유명한 것은 이더넷
  • 최근 Solana가'이더넷 킬러'로 유행하기 시작했다
  • 특징은 "빠르고 저렴함"
  • 처리 능력이 뛰어나고 거래 처리량이 높다
  • 처리가 빠르고 거래 수수료가 싸다
  • 스마트 구조기는 Rust로 쓸 수 있다
  • Solana Tool Suite

  • Solana에서 CLI 작동 가능한 도구 준비
  • Solana Tool 설치 방법


  • Mac & Linux 설치 방법
  • Solana Tool 설치
  • > sh -c "$(curl -sSfL https://release.solana.com/v1.9.0/install)"
      downloading v1.9.0 installer
        ✨ 1.9.0 initialized
    
  • PATH 명령 추가
    1의 명령 실행 결과로 "export~"의 출력도 함께 출력되기 때문에 실행
  • > export PATH="/Users/xxx/.local/share/solana/install/active_release/bin:$PATH"
    
    ※ 필요에 따라 bash 또는 zsh에 PATH 추가
    3. 도구 설치 확인
    다음 명령을 실행하여 CLI 도구가 제대로 설치되어 있는지 확인합니다.
    > solana --version
    solana-cli 1.9.0 (src:7782d34b; feat:378846963)
    
  • 지갑 키 생성
    키를 생성할 때 암호문이 필요하기 때문에 키 파일을 임의로 설정하고 생성할 수 있습니다.
  • > solana-keygen new
    
    Generating a new keypair
    
    For added security, enter a BIP39 passphrase
    
    NOTE! This passphrase improves security of the recovery seed phrase NOT the keypair file itself, which is stored as insecure plain text
    
    BIP39 Passphrase (empty for none): 
    Enter same passphrase again: 
    
    Wrote new keypair to /Users/xxx/.config/solana/id.json
    
    pubkey: xxxxxxxxxxxxxxxxxxxxxxxxx
    
    Save this seed phrase and your BIP39 passphrase to recover your new
    keypair:
    topple wear visit what refuse sail skin goose law maze secret forum
    

    devnet에 연결하기

  • devnet이란 solana를 시도하고 싶은 사람에게 플레이그라운드의 환경
  • 영패도 존재하지만, 이것은 사실이 아니다
  • 다음 명령을 실행하여 연결 목적지를 지정할 수 있습니다.
    solana config set --url https://api.devnet.solana.com  
    
    여기는 devnet에 연결되어 있을 것입니다. 확인이 포함되어 있으니 에어드롭 영패를 사용해 보세요.
    > solana airdrop 1
    
    Requesting airdrop of 1 SOL
    Signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    1 SOL
    
    위에서 보듯이 devnet에서 안전하게 영패를 얻었습니다!
    (진짜 토큰이라면 기쁠 거야.)
    다음 보도에서 devnet을 사용하여 응용 개발에 도전하고 싶습니다.

    인용하다

  • https://docs.solana.com/cli/install-solana-cli-tools
  • 좋은 웹페이지 즐겨찾기