Rename tokens to lamports in book/
This commit is contained in:
parent
beb45f44ac
commit
3794048c91
|
@ -3,8 +3,8 @@
|
||||||
A client *app* interacts with a Solana cluster by sending it *transactions*
|
A client *app* interacts with a Solana cluster by sending it *transactions*
|
||||||
with one or more *instructions*. The Solana *runtime* passes those instructions
|
with one or more *instructions*. The Solana *runtime* passes those instructions
|
||||||
to user-contributed *programs*. An instruction might, for example, tell a
|
to user-contributed *programs*. An instruction might, for example, tell a
|
||||||
program to move *tokens* from one *account* to another or create an interactive
|
program to move *lamports* from one *account* to another or create an interactive
|
||||||
contract that governs how tokens are moved. Instructions are executed
|
contract that governs how lamports are moved. Instructions are executed
|
||||||
atomically. If any instruction is invalid, any changes made within the
|
atomically. If any instruction is invalid, any changes made within the
|
||||||
transaction are discarded.
|
transaction are discarded.
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ transaction fails to commit.
|
||||||
|
|
||||||
### Account Structure
|
### Account Structure
|
||||||
|
|
||||||
Accounts maintain a token balance and program-specific memory.
|
Accounts maintain a lamport balance and program-specific memory.
|
||||||
|
|
||||||
# Transaction Engine
|
# Transaction Engine
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ memory is committed.
|
||||||
|
|
||||||
The TVU runtime ensures that PoH verification occurs before the runtime
|
The TVU runtime ensures that PoH verification occurs before the runtime
|
||||||
processes any transactions.
|
processes any transactions.
|
||||||
|
|
||||||
<img alt="Runtime pipeline" src="img/runtime.svg" class="center"/>
|
<img alt="Runtime pipeline" src="img/runtime.svg" class="center"/>
|
||||||
|
|
||||||
At the *execute* stage, the loaded accounts have no data dependencies, so all the
|
At the *execute* stage, the loaded accounts have no data dependencies, so all the
|
||||||
|
@ -67,7 +67,7 @@ userdata array and assign it to a Program.
|
||||||
|
|
||||||
* `Assign` - Allows the user to assign an existing account to a program.
|
* `Assign` - Allows the user to assign an existing account to a program.
|
||||||
|
|
||||||
* `Move` - Moves tokens between accounts.
|
* `Move` - Moves lamports between accounts.
|
||||||
|
|
||||||
## Program State Security
|
## Program State Security
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ program, the Account's userdata is zero initialized.
|
||||||
* Runtime guarantees that a program's code is the only code that can modify
|
* Runtime guarantees that a program's code is the only code that can modify
|
||||||
Account userdata that the Account is assigned to.
|
Account userdata that the Account is assigned to.
|
||||||
|
|
||||||
* Runtime guarantees that the program can only spend tokens that are in
|
* Runtime guarantees that the program can only spend lamports that are in
|
||||||
accounts that are assigned to it.
|
accounts that are assigned to it.
|
||||||
|
|
||||||
* Runtime guarantees the balances belonging to accounts are balanced before
|
* Runtime guarantees the balances belonging to accounts are balanced before
|
||||||
|
|
|
@ -23,13 +23,13 @@ Next, follow the steps in the git repository's
|
||||||
[README](https://github.com/solana-labs/example-tictactoe/blob/master/README.md).
|
[README](https://github.com/solana-labs/example-tictactoe/blob/master/README.md).
|
||||||
|
|
||||||
|
|
||||||
## Getting tokens to users
|
## Getting lamports to users
|
||||||
|
|
||||||
You may have noticed you interacted with the Solana cluster without first
|
You may have noticed you interacted with the Solana cluster without first
|
||||||
needing to acquire tokens to pay transaction fees. Under the hood, the web
|
needing to acquire lamports to pay transaction fees. Under the hood, the web
|
||||||
app creates a new ephemeral identity and sends a request to an off-chain
|
app creates a new ephemeral identity and sends a request to an off-chain
|
||||||
service for a signed transaction authorizing a user to start a new game.
|
service for a signed transaction authorizing a user to start a new game.
|
||||||
The service is called a *drone*. When the app sends the signed transaction
|
The service is called a *drone*. When the app sends the signed transaction
|
||||||
to the Solana cluster, the drone's tokens are spent to pay the transaction
|
to the Solana cluster, the drone's lamports are spent to pay the transaction
|
||||||
fee and start the game. In a real world app, the drone might request the user
|
fee and start the game. In a real world app, the drone might request the user
|
||||||
watch an ad or pass a CAPTCHA before signing over its tokens.
|
watch an ad or pass a CAPTCHA before signing over its lamports.
|
||||||
|
|
|
@ -14,7 +14,7 @@ $ solana-wallet address
|
||||||
<PUBKEY>
|
<PUBKEY>
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Airdrop Tokens
|
#### Airdrop Lamports
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
|
@ -78,7 +78,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
||||||
|
|
||||||
#### Authorized Transfer
|
#### Authorized Transfer
|
||||||
|
|
||||||
A third party must send a signature to unlock the tokens.
|
A third party must send a signature to unlock the lamports.
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet pay <PUBKEY> 123 \
|
$ solana-wallet pay <PUBKEY> 123 \
|
||||||
|
@ -188,7 +188,7 @@ OPTIONS:
|
||||||
|
|
||||||
SUBCOMMANDS:
|
SUBCOMMANDS:
|
||||||
address Get your public key
|
address Get your public key
|
||||||
airdrop Request a batch of tokens
|
airdrop Request a batch of lamports
|
||||||
balance Get your balance
|
balance Get your balance
|
||||||
cancel Cancel a transfer
|
cancel Cancel a transfer
|
||||||
confirm Confirm transaction by signature
|
confirm Confirm transaction by signature
|
||||||
|
@ -214,7 +214,7 @@ FLAGS:
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-airdrop
|
solana-wallet-airdrop
|
||||||
Request a batch of tokens
|
Request a batch of lamports
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet airdrop <NUM>
|
solana-wallet airdrop <NUM>
|
||||||
|
@ -224,7 +224,7 @@ FLAGS:
|
||||||
-V, --version Prints version information
|
-V, --version Prints version information
|
||||||
|
|
||||||
ARGS:
|
ARGS:
|
||||||
<NUM> The number of tokens to request
|
<NUM> The number of lamports to request
|
||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
|
@ -311,11 +311,11 @@ FLAGS:
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
--after <DATETIME> A timestamp after which transaction will execute
|
--after <DATETIME> A timestamp after which transaction will execute
|
||||||
--require-timestamp-from <PUBKEY> Require timestamp from this third party
|
--require-timestamp-from <PUBKEY> Require timestamp from this third party
|
||||||
--require-signature-from <PUBKEY>... Any third party signatures required to unlock the tokens
|
--require-signature-from <PUBKEY>... Any third party signatures required to unlock the lamports
|
||||||
|
|
||||||
ARGS:
|
ARGS:
|
||||||
<PUBKEY> The pubkey of recipient
|
<PUBKEY> The pubkey of recipient
|
||||||
<NUM> The number of tokens to send
|
<NUM> The number of lamports to send
|
||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
|
|
Loading…
Reference in New Issue