-
Notifications
You must be signed in to change notification settings - Fork 42
Remove Deprecated REPL Page Contents #1268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,129 +1,4 @@ | ||
| # Agoric REPL | ||
|
|
||
| **Note**: This page describes the Agoric REPL. | ||
| If you are instead looking for information about `node` or the Node.js REPL, see | ||
| [Node.js documentation](https://nodejs.org/api/repl.html). | ||
|
|
||
| ## Introduction | ||
|
|
||
| When you run `agoric start --reset`, you start a local _ag-solo_. | ||
|
|
||
| You use `agoric start` to start what we call an _ag-solo_, which is a | ||
| single personal local Agoric node. You need an ag-solo running on your | ||
| machine to interact with Agoric network services, whether a built-in | ||
| simulated chain (also started by `agoric start`), or a fully-decentralized public Agoric | ||
| blockchain. | ||
|
|
||
| All deployment happens via the local running Agoric process. This is usually the | ||
| ag-solo process, and frequently referred to as that or just as ag-solo. It is also | ||
| sometimes described as/called an Agoric VM or a local server. | ||
|
|
||
| An ag-solo communicates with either a locally running or remote chain. This local process (the ag-solo) | ||
| has a home object, which contains references to services on-chain, including Zoe, the | ||
| Board for sharing objects, and an application user's Wallet, among others. Developers can | ||
| use these service references to call the service's associated API commands. | ||
|
|
||
| Contract code starts in a file on a user's computer, either written by them or | ||
| imported from `agoric/zoe`. The code is _bundled_; turned into a particularly formatted | ||
| blob of code that exists in memory while a deploy script is running. When `E(zoe).install()` is | ||
| called, the blob is sent to and stored on-chain so that Zoe can access it. | ||
|
|
||
| An ag-solo has an associated REPL (_Read-Eval-Print Loop_). From the REPL and the `home` | ||
| object, developers can use all the on-chain commands that deployment scripts use to | ||
| deploy contracts and Dapps. In addition to the on-chain commands, they can also run | ||
| any other JavaScript commands from the REPL. | ||
|
|
||
| ## Accessing the REPL | ||
|
|
||
| Once an ag-solo is running and on-chain, you can access its associated REPL | ||
| in two ways. | ||
|
|
||
| - In a browser tab, go to `localhost:8000`. Depending on the browser's width, you | ||
| will see the Wallet UI and REPL either in separate columns or separate rows. | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| - From a shell, run `agoric open --repl` This opens the user's Wallet UI and its | ||
| associated REPL. To open only the REPL, run `agoric open --repl only` | ||
|
|
||
|  | ||
|
|
||
| ## Using the REPL | ||
|
|
||
| You can run JavaScript commands from the REPL. You can also use the REPL's | ||
| `home` object's predefined connections to other objects and services. To see what’s | ||
| available, just type `home` into the REPL: | ||
|
|
||
|  | ||
|
|
||
| ```js | ||
| Command[1] home | ||
| History[1] {"chainTimerService":[Presence o-50],"contractHost":[Presence o-52],"ibcport":[Presence o-53],"registrar":[Presence o-54],"registry":[Presence o-55],"zoe":[Presence o-56],"localTimerService":[Presence o-57],"uploads":[Presence o-58],"spawner":[Presence o-59],"wallet":[Presence o-60],"network":[Presence o-61],"http":[Presence o-62]} | ||
| ``` | ||
|
|
||
| The results of what is entered into the REPL is saved under `history[N]` | ||
|
|
||
| The following sections describe the `home` objects developers can use. Click on the | ||
| section header to go to more detailed documentation about that object. | ||
| Several `home` objects are either for internal Agoric use only or have been deprecated. These | ||
| are listed together in the final section. External developers should ignore them and not try to use | ||
| them. | ||
|
|
||
| ### [`wallet`](../wallet-api/) | ||
|
|
||
| Holds on-chain digital assets and object capabilities on behalf of the user. | ||
| The header link takes you to the standard non-REPL specific `wallet` API documentation. When calling | ||
| `wallet` API methods from the REPL, `wallet` must be prefaced by `home.` and use `E()`. For | ||
| example, `E(home.wallet).getPurses()`. [Full Wallet API documentation.](/guides/wallet/) | ||
|
|
||
| ### [`chainTimerService`](./timerServices) | ||
|
|
||
| On-chain time authority used to schedule events. [Full `chainTimerService` documentation.](./timerServices) | ||
|
|
||
| ### [`localTimerService`](./timerServices) | ||
|
|
||
| Local off-chain time authority used to schedule events. [Full `localTimerService` documentation.](./timerServices) | ||
|
|
||
| ### [`board`](./board) | ||
|
|
||
| Shared on-chain location where users can post generally accessible values. [Full `board` documentation.](./board) | ||
|
|
||
| ### [`ibcport`](./networking) | ||
|
|
||
| IBC implementation that lets vats open and close listening ports, | ||
| connect and disconnect to/from remote ports, and send and receive | ||
| data over those connections. [Full `ibcport` documentation.](./networking) | ||
|
|
||
| ### [`zoe`](../zoe-api/zoe) | ||
|
|
||
| Deploy and interact with smart contracts. Zoe protects smart contract users by escrowing | ||
| digital assets and guaranteeing users get either what they want or get a refund of what | ||
| they escrowed. Even if the contract is buggy or malicious. The header link takes you to the | ||
| standard, non-REPL specific, `zoe` API documentation. When calling any of the `zoe` API | ||
| methods from the REPL, `zoe` must be prefaced by `home.` and use `E()`. For | ||
| example, `E(home.zoe).getFoo()`. [Full Zoe API documentation.](../zoe-api/zoe) | ||
|
|
||
| ### [`priceAuthority`](./priceAuthority) | ||
|
|
||
| Get price quotes for pairs of digital assets. [Full `priceAuthority` documentation.](./priceAuthority) | ||
|
|
||
| ### [`scratch`](./scratch) | ||
|
|
||
| An off-chain, private, place to store key-value pairs on your ag-solo for later use. [Full `scratch` documentation.](./scratch) | ||
|
|
||
| ### Deprecated and Internal-Only Objects | ||
|
|
||
| - `contractHost`: Replaced by the `spawner` object. | ||
| - `faucet`: Internal for chain setup. | ||
| - `http`: `api/deploy.js` uses this to install new HTTP and WebSocket handlers in an | ||
| ag-solo. You should not need to use it. | ||
| - `network`: Privileged object for internal use. [Full Network documentation.](./networking) | ||
| - `plugin`: Privileged object for internal use. | ||
| - `priceAuthorityAdmin`: Privileged object for internal use. | ||
| - `registrar`: Deprecated. | ||
| - `registry`: Deprecated. | ||
| - `spawner`: Privileged object for internal use. | ||
| - `uploads`: Deprecated name for `scratch`. | ||
| - `vattp`: Privileged object for internal use. | ||
| **Note**: Agoric REPL has been deprecated. Please see [Agoric SDK Unit Testing](https://github.com/Agoric/agoric-sdk/wiki/agoric-sdk-unit-testing) | ||
| for information on how to test your smart contracts using [AVA](https://github.com/avajs/ava). | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah... let's point to https://ms-update-repl-reference.documentation-7tp.pages.dev/guides/zoe/contract-hello.html#testing-a-contract instead.