Skip to content

Commit

Permalink
Misc updates for style, code changes, etc (MystenLabs#9299)
Browse files Browse the repository at this point in the history
## Description 

Describe the changes or additions included in this PR.

## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
randall-Mysten authored Mar 14, 2023
1 parent 46a1ede commit 6a78178
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 187 deletions.
16 changes: 8 additions & 8 deletions doc/src/build/comms.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: Connect to the Sui Network
title: Connect to a Sui Network
---

The pages in this section provide various options for communicating with Sui:

* Use the [Sui JSON-RPC API](json-rpc.md) to interact with a Sui network.
* Use the [Sui CLI client](cli-client.md).
* Interact with the Sui network via the [Sui Rust SDK](rust-sdk.md), a collection of Rust language JSON-RPC wrapper and crypto utilities.
* Sign transactions and interact with the Sui network using the [Sui TypeScript SDK](https://github.com/MystenLabs/sui/tree/main/sdk/typescript) built on the Sui JSON RPC API.
* Run a [Sui Full node](fullnode.md) yourself to store the full Sui blockchain state and history.
* Filter and subscribe to a [real-time event stream](event_api.md#subscribe-to-sui-events) on your Sui Full node using the WebSocket API.
* Find SDKs for other languages provided by the community in the [awesome-move](https://github.com/MystenLabs/awesome-move#sdks) overview.
* Use the [Sui JSON-RPC API](json-rpc.md) to interact with a Sui network.
* Use the [Sui CLI client](cli-client.md).
* Interact with the Sui network via the [Sui Rust SDK](rust-sdk.md), a collection of Rust language JSON-RPC wrapper and crypto utilities.
* Sign transactions and interact with the Sui network using the [Sui TypeScript SDK](https://github.com/MystenLabs/sui/tree/main/sdk/typescript) built on the Sui JSON RPC API.
* Run a [Sui Full node](fullnode.md) yourself to store the full Sui blockchain state and history.
* Filter and subscribe to a [real-time event stream](event_api.md#subscribe-to-sui-events) on your Sui Full node using the WebSocket API.
* Find SDKs for other languages provided by the community in the [awesome-move](https://github.com/MystenLabs/awesome-move#sdks) overview.

See the [Sui Reference Documentation](../reference/index.md) for information on the Sui API and SuiJSON format.
86 changes: 43 additions & 43 deletions doc/src/build/event_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Move event attributes:
"moveEvent": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"type": "0x2::devnet_nft::MintNFTEvent",
"fields": {
"creator": "0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1",
"creator": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"name": "Example NFT",
"object_id": "0x497913a47dc0028a85f24c70d825991b71c60001"
"object_id": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
},
"bcs": "SXkTpH3AAoqF8kxw2CWZG3HGAAFwYT9PF64TY/en5yUdqrXFsG9owQtFeGFtcGxlIE5GVA=="
}
Expand All @@ -64,8 +64,8 @@ Publish event attributes:
```json
{
"publish": {
"sender": "0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1",
"packageId": "0x2d052c9de3dd02f28ec0f8e4dfdee175a5c597c3"
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"packageId": "0x5f01a29887a1d95e5b548b616da63b0ce07d816e89ef7b9a382177b4422bbaa2"
}
}
```
Expand All @@ -92,11 +92,11 @@ Transfer event attributes:
"transferObject": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "native",
"sender": "0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"recipient": {
"AddressOwner": "0x741a9a7ea380aed286341fcf16176c8653feb667"
"AddressOwner": "0xa3c00467938b392a12355397bdd3d319cea5c9b8f4fc9c51b46b8e15a807f030"
},
"objectId": "0x591fbb00a6c9676186cb44402040a8350520cbe9",
"objectId": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5",
"version": 1,
"type": "Coin"
}
Expand All @@ -119,10 +119,10 @@ Delete object events occur when you delete an object.
```json
{
"deleteObject": {
"packageId": "0x2d052c9de3dd02f28ec0f8e4dfdee175a5c597c3",
"packageId": "0x5f01a29887a1d95e5b548b616da63b0ce07d816e89ef7b9a382177b4422bbaa2",
"transactionModule": "discount_coupon",
"sender": "0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1",
"objectId": "0xe3a6bc7bf1dba4d17a91724009c461bd69870719"
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"objectId": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
}
}
```
Expand All @@ -147,11 +147,11 @@ New object event attributes:
"newObject": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"recipient": {
"AddressOwner": "0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1"
"AddressOwner": "0xa3c00467938b392a12355397bdd3d319cea5c9b8f4fc9c51b46b8e15a807f030"
},
"objectId": "0x497913a47dc0028a85f24c70d825991b71c60001"
"objectId": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
}
}
```
Expand Down Expand Up @@ -199,9 +199,9 @@ You can use the `EventQuery` criteria object to query a Sui node and retrieve ev
| MoveModule | Events emitted from the specified Move module | {"MoveModule":{"package":"0x2", "module":"devnet_nft"}} |
| MoveEvent | Move struct name of the event | {"MoveEvent":"0x2::event_nft::MintNFTEvent"} |
| EventType | Type of event described in [Events](#event-types) section | {"EventType": "NewObject"} |
| Sender | Query by sender address | {"Sender":"0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1"} |
| Recipient | Query by recipient | {"Recipient":{"AddressOwner":"0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1"}} |
| Object | Return events associated with the given object | {"Object":"0xe3a6bc7bf1dba4d17a91724009c461bd69870719"} |
| Sender | Query by sender address | {"Sender":"0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106"} |
| Recipient | Query by recipient | {"Recipient":{"AddressOwner":"0xa3c00467938b392a12355397bdd3d319cea5c9b8f4fc9c51b46b8e15a807f030"}} |
| Object | Return events associated with the given object | {"Object":"0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"} |
| TimeRange | Return events emitted in [start_time, end_time] interval | {"TimeRange":{"startTime":1669039504014, "endTime":1669039604014}} |

## Pagination
Expand Down Expand Up @@ -246,12 +246,12 @@ curl --location --request POST '127.0.0.1:9000' \
"moveEvent": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"type": "0x2::devnet_nft::MintNFTEvent",
"fields": {
"creator": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"creator": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"name": "Example NFT",
"object_id": "0x2ee80b4a2d203365dfbd68a90a8ad9a0dca19155"
"object_id": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
},
"bcs": "LugLSi0gM2XfvWipCorZoNyhkVX+1JBtcbilg//9jpVnYCe2u4HXzwtFeGFtcGxlIE5GVA=="
}
Expand All @@ -268,11 +268,11 @@ curl --location --request POST '127.0.0.1:9000' \
"newObject": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"recipient": {
"AddressOwner": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf"
"AddressOwner": "0xa3c00467938b392a12355397bdd3d319cea5c9b8f4fc9c51b46b8e15a807f030"
},
"objectId": "0x2ee80b4a2d203365dfbd68a90a8ad9a0dca19155"
"objectId": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
}
}
},
Expand All @@ -287,12 +287,12 @@ curl --location --request POST '127.0.0.1:9000' \
"moveEvent": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"type": "0x2::devnet_nft::MintNFTEvent",
"fields": {
"creator": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"creator": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"name": "Example NFT",
"object_id": "0xd5657cf6acaba958c5b01ec0516f4f0dac77c7d2"
"object_id": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
},
"bcs": "1WV89qyrqVjFsB7AUW9PDax3x9L+1JBtcbilg//9jpVnYCe2u4HXzwtFeGFtcGxlIE5GVA=="
}
Expand All @@ -309,11 +309,11 @@ curl --location --request POST '127.0.0.1:9000' \
"newObject": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"recipient": {
"AddressOwner": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf"
"AddressOwner": "0xa3c00467938b392a12355397bdd3d319cea5c9b8f4fc9c51b46b8e15a807f030"
},
"objectId": "0xd5657cf6acaba958c5b01ec0516f4f0dac77c7d2"
"objectId": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
}
}
}
Expand Down Expand Up @@ -360,12 +360,12 @@ curl --location --request POST '127.0.0.1:9000' \
"moveEvent": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"type": "0x2::devnet_nft::MintNFTEvent",
"fields": {
"creator": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"creator": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"name": "Example NFT",
"object_id": "0x2ee80b4a2d203365dfbd68a90a8ad9a0dca19155"
"object_id": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
},
"bcs": "LugLSi0gM2XfvWipCorZoNyhkVX+1JBtcbilg//9jpVnYCe2u4HXzwtFeGFtcGxlIE5GVA=="
}
Expand All @@ -382,12 +382,12 @@ curl --location --request POST '127.0.0.1:9000' \
"moveEvent": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"type": "0x2::devnet_nft::MintNFTEvent",
"fields": {
"creator": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"creator": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"name": "Example NFT",
"object_id": "0xd5657cf6acaba958c5b01ec0516f4f0dac77c7d2"
"object_id": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
},
"bcs": "1WV89qyrqVjFsB7AUW9PDax3x9L+1JBtcbilg//9jpVnYCe2u4HXzwtFeGFtcGxlIE5GVA=="
}
Expand Down Expand Up @@ -435,11 +435,11 @@ curl --location --request POST '127.0.0.1:9000' \
"newObject": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"recipient": {
"AddressOwner": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf"
"AddressOwner": "0xa3c00467938b392a12355397bdd3d319cea5c9b8f4fc9c51b46b8e15a807f030"
},
"objectId": "0xd5657cf6acaba958c5b01ec0516f4f0dac77c7d2"
"objectId": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
}
}
},
Expand All @@ -454,12 +454,12 @@ curl --location --request POST '127.0.0.1:9000' \
"moveEvent": {
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000002",
"transactionModule": "devnet_nft",
"sender": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"sender": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"type": "0x2::devnet_nft::MintNFTEvent",
"fields": {
"creator": "0xfed4906d71b8a583fffd8e95676027b6bb81d7cf",
"creator": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106",
"name": "Example NFT",
"object_id": "0xd5657cf6acaba958c5b01ec0516f4f0dac77c7d2"
"object_id": "0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"
},
"bcs": "1WV89qyrqVjFsB7AUW9PDax3x9L+1JBtcbilg//9jpVnYCe2u4HXzwtFeGFtcGxlIE5GVA=="
}
Expand Down Expand Up @@ -488,9 +488,9 @@ You can use `EventFilter` to filter the events included in your subscription to
| Module | Move module name | MoveEvent<br/>TransferObject<br/>DeleteObject<br/>NewObject | `{"Module":"devnet_nft"}` |
| MoveEventType | Move event type defined in the move code | MoveEvent | `{"MoveEventType":"0x2::devnet_nft::MintNFTEvent"}`|
| MoveEventField | Filter using the data fields in the move event object | MoveEvent | `{"MoveEventField":{ "path":"/name", "value":"Example NFT"}}` |
| SenderAddress | Address that started the transaction | MoveEvent<br/>Publish<br/>TransferObject<br/>DeleteObject<br/>NewObject | `{"SenderAddress": "0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1"}` |
| SenderAddress | Address that started the transaction | MoveEvent<br/>Publish<br/>TransferObject<br/>DeleteObject<br/>NewObject | `{"SenderAddress": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106"}` |
| EventType | Type of event described in the [Events](#type-of-events) section | MoveEvent<br/>Publish<br/>TransferObject<br/>DeleteObject<br/>NewObject<br/>EpochChange<br/>Checkpoint | `{"EventType":"Publish"}` |
| ObjectId | Object ID | TransferObject<br/>DeleteObject<br/>NewObject | `{"ObjectId":"0xe3a6bc7bf1dba4d17a91724009c461bd69870719"}` |
| ObjectId | Object ID | TransferObject<br/>DeleteObject<br/>NewObject | `{"ObjectId":"0x727b37454ab13d5c1dbb22e8741bff72b145d1e660f71b275c01f24e7860e5e5"}` |

### Combining filters

Expand Down
8 changes: 4 additions & 4 deletions doc/src/build/fullnode.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Suggested minimum hardware to run a Sui Full node:

* CPUs: 10 core
* RAM: 32 GB
* Storage (SSD): 1 TB
* Storage (SSD): 2 TB

### Software requirements

Expand Down Expand Up @@ -113,7 +113,7 @@ Follow the instructions in the [Full node Docker README](https://github.com/Myst
```shell
curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
```
* [Testnet genesis blob](https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob)
* [Testnet genesis blob](https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob) - Supported only when there is an active public Testnet network.
```shell
curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob
```
Expand Down Expand Up @@ -174,7 +174,7 @@ docker-compose down --volumes
If you followed the instructions for [Building from
Source](#building-from-source), update your Full node as follows:

1. Shut down your currently running Full node.
1. Shut down your running Full node.
1. `cd` into your local Sui repository:
```shell
cd sui
Expand All @@ -196,7 +196,7 @@ Source](#building-from-source), update your Full node as follows:
```shell
curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
```
* [Testnet genesis blob](https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob)
* [Testnet genesis blob](https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob) - supported only when there is an active public Testnet network
```shell
curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob
```
Expand Down
4 changes: 2 additions & 2 deletions doc/src/build/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ The topics in this section provide information and guidance to help you start bu

To get started, see [Install](../build/install.md) to learn about prerequisites and steps to install Sui binaries.

After you install Sui, learn how to use the [Sui Client CLI](cli-client.md). You can use the client to interact with a [Devnet](devnet.md) Full node or your own [local network](../build/cli-client.md#genesis).
After you install Sui, learn how to use the [Sui Client CLI](cli-client.md). You can use the client to interact with a Sui Full node or your own [local network](../build/cli-client.md#genesis).

## Smart contracts

Learn about how to [Write Smart Contracts with Move](../build/move/index.md), including how to write, build, test, and publish Move packages on Sui.
Learn how to [Write Smart Contracts with Move](../build/move/index.md), including how to write, build, test, and publish Sui Move packages.

## Programming with Objects

Expand Down
Loading

0 comments on commit 6a78178

Please sign in to comment.