So you always have to stake something to have the account:
First check that the creator account (e.g. accname1
) has funds...
./cleos.sh get currency balance eosio.token accname1
... and the output might be something like...
832.5970 EOS
...and then check what NET and CPU accname1
has remaining:
./cleos.sh get account accname1
e.g.
privileged: false
permissions:
owner 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
memory:
quota: 438.3 Mb used: 2.926 Kb
net bandwidth: (averaged over 3 days)
staked: 0.0000 EOS (total stake delegated from account to self)
delegated: 100.0000 EOS (total staked delegated to account from others)
used: 0 bytes
available: 46.13 Mb
limit: 46.13 Mb
cpu bandwidth: (averaged over 3 days)
staked: 0.0000 EOS (total stake delegated from account to self)
delegated: 100.0000 EOS (total staked delegated to account from others)
used: 0 us
available: 1.017 sec
limit: 1.017 sec
So 'available' is 0 and you can delegate resources from another account or itself:
./cleos.sh system delegatebw eosio accname1 "1.0000 EOS" "1.0000 EOS"
(first EOS parameter is amount of NET, second is amount of CPU)
To make a new account called accname2
, specify the resources to go with it:
./cleos.sh system newaccount accname1 accname2 PUB PUB -p accname1 --stake-net "0.1 EOS" --stake-cpu "0.1 EOS" --buy-ram-EOS "0.1 EOS"
where PUB
is the public key of accname1
and you should get something like
executed transaction: a1dab3d7e920749d35be4f4b610f76e7b5d7bc89aacb8855c7cc09de07d52916 344 bytes 5938 us
# eosio <= eosio::newaccount {"creator":"accname1","name":"accname2","owner":{"threshold":1,"keys":[{"key":"EOS7Lpq5SUkGZ...
# eosio <= eosio::buyram {"payer":"accname1","receiver":"accname2","quant":"0.1000 EOS"}
# eosio.token <= eosio.token::transfer {"from":"accname1","to":"eosio.ram","quantity":"0.0995 EOS","memo":"buy ram"}
# accname1 <= eosio.token::transfer {"from":"accname1","to":"eosio.ram","quantity":"0.0995 EOS","memo":"buy ram"}
# eosio.ram <= eosio.token::transfer {"from":"accname1","to":"eosio.ram","quantity":"0.0995 EOS","memo":"buy ram"}
# eosio.token <= eosio.token::transfer {"from":"accname1","to":"eosio.ramfee","quantity":"0.0005 EOS","memo":"ram fee"}
# accname1 <= eosio.token::transfer {"from":"accname1","to":"eosio.ramfee","quantity":"0.0005 EOS","memo":"ram fee"}
# eosio.ramfee <= eosio.token::transfer {"from":"accname1","to":"eosio.ramfee","quantity":"0.0005 EOS","memo":"ram fee"}
# eosio <= eosio::delegatebw {"from":"accname1","receiver":"accname2","stake_net_quantity":"0.1000 EOS","stake_cpu_quanti...
# eosio.token <= eosio.token::transfer {"from":"accname1","to":"eosio.stake","quantity":"0.2000 EOS","memo":"stake bandwidth"}
# accname1 <= eosio.token::transfer {"from":"accname1","to":"eosio.stake","quantity":"0.2000 EOS","memo":"stake bandwidth"}
# eosio.stake <= eosio.token::transfer {"from":"accname1","to":"eosio.stake","quantity":"0.2000 EOS","memo":"stake bandwidth"}
the above should work for the latest master of eosio
Hope this helps someone :)