gmet을 이용하여 계정을 생성하고 직접 제어합니다. 을 이용하는 경우 간단하게 계정을 이용할 수 있습니다.
gmet을 이용하여 Account를 생성하는 명령어 입니다. 생성된 Account File은 Keystore 디렉토리에 저장됩니다.
gmet metadium new-account --out <account-file-name>
외부에서 생성된 Account File을 디렉토리에 복사하는 명령어입니다.
mkdir {data_directory}/keystore
chmod 700 {data_directory}/keystore
cp <account-file-name> {data_directory}/keystore
gmet Console에 접속하여, 잔고를 확인하는 명령어입니다.
eth.getBalance('{your_address}')
gmet Console로 Keystore에 있는 모든 Account의 잔고를 조회하는 명령어입니다.
function checkAllBalances() {
var i = 0;
eth.accounts.forEach( function(e){
console.log("eth.accounts["+i+"]: " + e + " \tbalance: " + web3.fromWei(eth.getBalance(e), "ether") + " ether");
i++;
})
};