cleos 이용 EOS UnStaked (undelegate) 하기 ④ in Docker(window)

in #kr6 years ago (edited)

cleos 를 이용하여 Staked 된 EOS 수량을 다시 Unstaked 수량으로 전환 시키는 명령어에 대해서 설명 합니다.

용어 이해

다소 생소한 용어들이 등장해서 용어에 대한 정리를 먼저 설명 해보면, EOS 토큰을 보유하고 있지만, 용도에 따라서 EOS 토큰 상태를 구분해 놓은 것으로 이해 하시면 됩니다.

Unstaked : 전송(출금) 및 Stake 상태로 전환될 수 있는 언락(UnLock)상태

Staked : CPU, Bandwidth 에 투표 및 자원 사용목적으로 등록해 놓은 락(Lock)상태

Refund : Staked 된 상태에서 UnLock 상태로 전환을 기다리는 대기상태(3일소요)

투표와 무관하게 cleos 명령어에 의해 Staked 로 처리된 물량은 Refund 기간을 거쳐 Unstaked 상태로 전환됩니다.

Unstaked  -> Staked -> Refund -> Unstaked

당장 출금 가능한 수량은 Unstaked 상태에 있는 수량 입니다.

아래 그림을 잠시 보시면, 이해가 쉬울듯 하며 참 멋지고 잘 그린 다이어그램 입니다.

 출처: koreos.io


 cleos delegatebw 명령어

 용어에서 알 수 있듯이 EOS 토큰을 Staked 상태로 전환 하는 명령어 입니다.

cleos system delegatebw <AccountA> <AccountB> "<net> EOS"  "<cpu> EOS" 

<AccountA> = <AccountB> 일반적으로 같은 계정을 입력하며, 다른 계정으로 입력해도 됩니다.

<net>,<cpu> 는 "0.0000 EOS" 와 같이 입력하며 소숫점 4자리까지만 가능 합니다.

 cleos undelegatebw 명령어

Staked 상태의 EOS 토큰을 Refund 상태로 전환 시키는 명령어 입니다.

 cleos system undelegatebw <AccountA> <AccountB> "<net> EOS"  "<cpu> EOS 

주의할점

Staked 상태가 되면 UnStaked 상태로 전환 하는데는 최소 3일이 소요되니 필요시만 Staked 상태로 전환 하시면 됩니다. 

 Summary(요약) 처음 사용자

delegate <-> undelegate 명령어만 잘 구분해서 사용하시면 됩니다. ("$","#" 는 제외하고 입력 합니다.)

$ docker pull eosio/eos:latest

$ docker run --name eos-wallet -it eosio/eos:latest /bin/bash

# export PC_URL=http://localhost:8888

# export EOS_URL=http://user-api.eoseoul.io:80

# keosd &> /var/log/keosd.log &

# cleos --wallet-url $PC_URL wallet create

# cleos --wallet-url $PC_URL wallet import <EOS Private key> 

# cleos --wallet-url $PC_URL -u $EOS_URL system undelegatebw <account> <account> "<0.1> EOS" "<0.1> EOS"

# exit 

 Summary(요약)  재사용

$ docker pull eosio/eos:latest 

$ docker start -i eos-wallet

# export PC_URL=http://localhost:8888

# export EOS_URL=http://user-api.eoseoul.io:80

# keosd &> /var/log/keosd.log & 

# cleos --wallet-url $PC_URL wallet unlock --password <지갑패스워드>

# cleos --wallet-url $PC_URL -u $EOS_URL system undelegatebw <account> <account> "<0.1> EOS" "<0.1> EOS"

# exit


정리

cleos 를 이용하여 투표, 지갑생성, 전송, UnStaked 상태 전환 까지 하는 방법을 소개 했습니다.  혹시 글 내용중에 오류가 있다면 지적해 주시면 감사 하겠습니다.


Docker Install for Window(도커 설치 원도우)  

cleos 이용 EOS 투표(voting)하기 ① in Docker(window)   

cleos 이용 EOS 신규계정(newaccount) 만들기 ② in Docker(window)  

cleos 이용 EOS 전송(transfer)하기 ③ in Docker(window)

 

Sort:  

Congratulations @holcoin! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of posts published

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard!


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @holcoin! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard!


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!