This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into huangminghuang/duplicate-connection-fix.
- Loading branch information
Showing
7 changed files
with
192 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,60 @@ | ||
## Goal | ||
|
||
Create a `keosd` wallet | ||
Create a wallet using `keosd`. | ||
|
||
## Before you begin | ||
|
||
* Install the currently supported version of `cleos` | ||
Make sure you meet the following requirements: | ||
|
||
* Understand the following: | ||
* What is an account | ||
* What is a public and private key pair | ||
* Familiarize with the [`cleos wallet create`](../03_command-reference/wallet/create.md) command and its parameters. | ||
* Familiarize with the other [`cleos wallet`](../03_command-reference/wallet/index.md) commands. | ||
* Install the currently supported version of `cleos`. | ||
|
||
[[info | Note]] | ||
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`. | ||
|
||
* Understand what an [account](https://developers.eos.io/welcome/latest/glossary/index/#account) is and its role in the blockchain. | ||
* Understand [Accounts and Permissions](https://developers.eos.io/welcome/latest/protocol-guides/accounts_and_permissions) in the protocol documents. | ||
* Understand what a [public](https://developers.eos.io/welcome/latest/glossary/index/#public-key) and [private](https://developers.eos.io/welcome/latest/glossary/index/#private-key) key pair is. | ||
|
||
## Steps | ||
|
||
Create a wallet and save the password to a file: | ||
Perform the step below: | ||
|
||
Create a default or named wallet and save the wallet password to a file: | ||
|
||
```sh | ||
cleos wallet create --file password.pwd | ||
cleos wallet create [-n named_wallet] -f <file_to_save_pwd> | ||
``` | ||
|
||
This should produce similar output as below. Note the wallet is named `default` if no name is provided. | ||
Where `file_to_save_pwd` is the name of the file to write the wallet password to and `named_wallet` is an optional parameter to assign a name to the wallet. | ||
|
||
Some examples are provided below: | ||
|
||
* Create a default wallet and save the password to the file `default_wallet.pwd`: | ||
|
||
**Example Output** | ||
|
||
```sh | ||
cleos wallet create -f default_wallet.pwd | ||
``` | ||
```console | ||
Creating wallet: default | ||
Save password to use in the future to unlock this wallet. | ||
Without password imported keys will not be retrievable. | ||
saving password to password.pwd | ||
saving password to default_wallet.pwd | ||
``` | ||
|
||
Alternatively, you can name a wallet with `-n` option: | ||
* Create a named wallet `my_wallet` and save the password to the file `my_wallet.pwd`: | ||
|
||
**Example Output** | ||
|
||
```sh | ||
cleos wallet create -n named_wallet -f passwd | ||
cleos wallet create -n my_wallet -f my_wallet.pwd | ||
``` | ||
|
||
You should see something like the output below: | ||
|
||
```console | ||
Creating wallet: named_wallet | ||
Creating wallet: my_wallet | ||
Save password to use in the future to unlock this wallet. | ||
Without password imported keys will not be retrievable. | ||
saving password to passwd | ||
saving password to my_wallet.pwd | ||
``` |
41 changes: 28 additions & 13 deletions
41
docs/02_cleos/02_how-to-guides/how-to-delegate-CPU-resource.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,47 @@ | ||
## Goal | ||
|
||
Delegate resource for an account or application | ||
Delegate CPU bandwidth for an account or application. | ||
|
||
## Before you begin | ||
|
||
* Install the currently supported version of `cleos` | ||
Make sure you meet the following requirements: | ||
|
||
* Ensure the reference system contracts from `eosio.contracts` repository is deployed and used to manage system resources | ||
* Familiarize with the [`cleos system delegatebw`](../03_command-reference/system/system-delegatebw.md) command and its parameters. | ||
* Install the currently supported version of `cleos`. | ||
|
||
* Understand the following: | ||
* What is an account | ||
* What is network bandwidth | ||
* What is CPU bandwidth | ||
[[info | Note]] | ||
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`. | ||
|
||
* Ensure the reference system contracts from [`eosio.contracts`](https://github.com/EOSIO/eosio.contracts) repository is deployed and used to manage system resources. | ||
* Understand what an [account](https://developers.eos.io/welcome/latest/glossary/index/#account) is and its role in the blockchain. | ||
* Understand [CPU bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#cpu) in an EOSIO blockchain. | ||
* Understand [NET bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#net) in an EOSIO blockchain. | ||
|
||
## Steps | ||
|
||
Delegate 0.01 SYS CPU bandwidth from `bob` to `alice` | ||
Perform the step below: | ||
|
||
Delegate CPU bandwidth from a source account to a receiver account: | ||
|
||
```sh | ||
cleos system delegatebw bob alice "0 SYS" "0.01 SYS" | ||
cleos system delegatebw <from> <receiver> <stake_net_quantity> <stake_cpu_quantity> | ||
``` | ||
|
||
You should see something below: | ||
Where `from` is the account to delegate bandwidth from, `receiver` is the account to receive the delegated bandwidth, and `stake_net_quantity` and/or `stake_cpu_quantity` is the amount of tokens to stake for network (NET) bandwidth and/or CPU bandwidth, respectively. | ||
|
||
Some examples are provided below: | ||
|
||
* Delegate 0.01 SYS CPU bandwidth from `bob` to `alice`: | ||
|
||
```console | ||
**Example Output** | ||
|
||
```sh | ||
cleos system delegatebw bob alice "0 SYS" "0.01 SYS" | ||
``` | ||
```json | ||
executed transaction: 5487afafd67bf459a20fcc2dbc5d0c2f0d1f10e33123eaaa07088046fd18e3ae 192 bytes 503 us | ||
# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.0000 SYS","stake_cpu_quanti... | ||
# eosio.token <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 EOS","memo":"stake bandwidth"} | ||
# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.0000 SYS","stake_cpu_quantity":"0.0100 SYS"... | ||
# eosio.token <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"} | ||
# bob <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"} | ||
# eosio.stake <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"} | ||
``` |
39 changes: 26 additions & 13 deletions
39
docs/02_cleos/02_how-to-guides/how-to-delegate-net-resource.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.