提交 c6c9311e 编写于 作者: K Kevin Heifner

Update README.md for recent changes. #764

上级 517975fb
......@@ -150,7 +150,7 @@ EOS comes with a number of programs you can find in `~/eos/build/programs`. They
After successfully building the project, the `eosd` binary should be present in the `build/programs/eosd` directory. Go ahead and run `eosd` -- it will probably exit with an error, but if not, close it immediately with <kbd>Ctrl-C</kbd>. Note that `eosd` created a directory named `data-dir` containing the default configuration (`config.ini`) and some other internals. This default data storage path can be overridden by passing `--data-dir /path/to/data` to `eosd`.
Edit the `config.ini` file, adding the following settings to the defaults already in place:
Edit the `config.ini` file, adding/updating the following settings to the defaults already in place:
```
# Load the testnet genesis state, which creates some initial block producers with the default key
......@@ -246,7 +246,7 @@ This will output two pairs of public and private keys
```
Private key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Public key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Public key: EOSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```
**Important:**
......@@ -270,11 +270,15 @@ If all went well, you will receive output similar to the following
```json
{
"name": "currency",
"eos_balance": 0,
"staked_balance": 1,
"unstaking_balance": 0,
"last_unstaking_time": "2106-02-07T06:28:15"
"account_name": "currency",
"eos_balance": "0.0000 EOS",
"staked_balance": "0.0001 EOS",
"unstaking_balance": "0.0000 EOS",
"last_unstaking_time": "1969-12-31T23:59:59",
"permissions": [{
...
}
]
}
```
......@@ -319,7 +323,7 @@ Next verify the currency contract has the proper initial balance:
./eosc get table currency currency account
{
"rows": [{
"account": "account",
"key": "account",
"balance": 1000000000
}
],
......@@ -334,18 +338,18 @@ Anyone can send any message to any contract at any time, but the contracts may r
sent "from" anyone, they are sent "with permission of" one or more accounts and permission levels. The following commands shows a "transfer" message being
sent to the "currency" contract.
The content of the message is `'{"from":"currency","to":"inita","amount":50}'`. In this case we are asking the currency contract to transfer funds from itself to
The content of the message is `'{"from":"currency","to":"inita","quantity":50}'`. In this case we are asking the currency contract to transfer funds from itself to
someone else. This requires the permission of the currency contract.
```bash
./eosc push message currency transfer '{"from":"currency","to":"inita","amount":50}' --scope currency,inita --permission currency@active
./eosc push message currency transfer '{"from":"currency","to":"inita","quantity":50}' --scope currency,inita --permission currency@active
```
Below is a generalization that shows the `currency` account is only referenced once, to specify which contract to deliver the `transfer` message to.
```bash
./eosc push message currency transfer '{"from":"${usera}","to":"${userb}","amount":50}' --scope ${usera},${userb} --permission ${usera}@active
./eosc push message currency transfer '{"from":"${usera}","to":"${userb}","quantity":50}' --scope ${usera},${userb} --permission ${usera}@active
```
We specify the `--scope ...` argument to give the currency contract read/write permission to those users so it can modify their balances. In a future release scope
......@@ -362,7 +366,7 @@ So now check the state of both of the accounts involved in the previous transact
./eosc get table inita currency account
{
"rows": [{
"account": "account",
"key": "account",
"balance": 50
}
],
......@@ -371,7 +375,7 @@ So now check the state of both of the accounts involved in the previous transact
./eosc get table currency currency account
{
"rows": [{
"account": "account",
"key": "account",
"balance": 999999950
}
],
......@@ -546,7 +550,8 @@ Install the dependencies:
```bash
brew update
brew install git automake libtool boost openssl llvm@4 gmp
brew install git automake libtool boost openssl llvm@4 gmp ninja gettext
brew link gettext --force
```
Install [secp256k1-zkp (Cryptonomex branch)](https://github.com/cryptonomex/secp256k1-zkp.git):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册