Skip to content

Commit

Permalink
[Docs] - add 0x prefix and change SuiAddress and ObjectID to lowercase (
Browse files Browse the repository at this point in the history
MystenLabs#1867)

* add 0x prefix and change SuiAddress and ObjectID to lowercase

* add 0x prefix and change SuiAddress and ObjectID to lowercase

* address Pr comment
  • Loading branch information
patrickkuo authored May 10, 2022
1 parent b58db03 commit 7b45b07
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 139 deletions.
12 changes: 6 additions & 6 deletions doc/src/build/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ The output you see should resemble the following (abbreviated to show only two o
"objects" : [
{
"digest" : "zpa45U9ANfA9A6iS01NvAoVH0RbYB6a5rjhgh2Hb/GE=",
"objectId" : "17b348903b0cfb75fc9ab5426bb69d83d1e756a5",
"objectId" : "0x17b348903b0cfb75fc9ab5426bb69d83d1e756a5",
"version" : 1
},
{
"digest" : "8SPi0h6xVMVNBvGzzF4RfuOoaXISdtiB5aT7+BYDbxg=",
"objectId" : "7599d8ea1de4c9616d077f16ca0eb38cdecacc07",
"objectId" : "0x7599d8ea1de4c9616d077f16ca0eb38cdecacc07",
"version" : 1
},
...
Expand Down Expand Up @@ -153,7 +153,7 @@ The signing tool will create and print out the signature and public key informat
You will see output resembling:
```shell
2022-04-25T18:50:06.031722Z INFO sui::sui_commands: Data to sign : VHJhbnNhY3Rpb25EYXRhOjoAAFHe8jecgzoGWyGlZ1sJ2KBFN8aZF7NIkDsM+3X8mrVCa7adg9HnVqUBAAAAAAAAACDOlrjlT0A18D0DqJLTU28ChUfRFtgHprmuOGCHYdv8YVHe8jecgzoGWyGlZ1sJ2KBFN8aZdZnY6h3kyWFtB38Wyg6zjN7KzAcBAAAAAAAAACDxI+LSHrFUxU0G8bPMXhF+46hpchJ22IHlpPv4FgNvGOgDAAAAAAAA
2022-04-25T18:50:06.031765Z INFO sui::sui_commands: Address : 51DEF2379C833A065B21A5675B09D8A04537C699
2022-04-25T18:50:06.031765Z INFO sui::sui_commands: Address : 0x51def2379c833a065b21a5675b09d8a04537c699
2022-04-25T18:50:06.031911Z INFO sui::sui_commands: Public Key Base64: H82FDLUZN1u0+6UdZilxu9HDT5rPd3khKo2UJoCPJFo=
2022-04-25T18:50:06.031925Z INFO sui::sui_commands: Signature : 6vc+ku0RsMKdky8DRfoy/hw6eCQ3YsadH6rZ9WUCwGTAumuWER3TOJRw7u7F4QaHkqUsIPfJN9GRraSX+N8ADQ==
```
Expand Down Expand Up @@ -201,11 +201,11 @@ curl --location --request POST $SUI_RPC_HOST \
"method": "sui_moveCall",
"params": [
"{{owner_address}}",
"0000000000000000000000000000000000000002",
"0x2",
"Coin",
"transfer_",
["0x2::SUI::SUI"],
["0x{{coin_object_id}}",10000, "0x{{recipient_address}}"],
["{{coin_object_id}}",10000, "{{recipient_address}}"],
"{{gas_object_id}}",
2000
],
Expand Down Expand Up @@ -294,7 +294,7 @@ Below you can see a truncated sample output of [sui_publish](#sui_publish). One
```
{
"package": [
"13e3ec7279060663e1bbc45aaf5859113fc164d2",
"0x13e3ec7279060663e1bbc45aaf5859113fc164d2",
...
}
```
Expand Down
12 changes: 6 additions & 6 deletions doc/src/build/programming-with-objects/ch1-object-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ $ wallet publish --path $ROOT/sui_programmability/examples/objects_tutorial --ga
You can find the published package object ID in the **Publish Results** output:
```
----- Publish Results ----
The newly published package object: (57258F32746FD1443F2A077C0C6EC03282087C19, SequenceNumber(1), o#b3a8e284dea7482891768e166e4cd16f9749e0fa90eeb0834189016c42327401)
The newly published package object: (0x57258f32746fd1443f2a077c0c6ec03282087c19, SequenceNumber(1), o#b3a8e284dea7482891768e166e4cd16f9749e0fa90eeb0834189016c42327401)
```
Note that the exact data you see will be different. The first hex string in that triple is the package object ID (`57258F32746FD1443F2A077C0C6EC03282087C19` in this case). For convenience, let's save it to an environment variable:
Note that the exact data you see will be different. The first hex string in that triple is the package object ID (`0x57258f32746fd1443f2a077c0c6ec03282087c19` in this case). For convenience, let's save it to an environment variable:
```
$ export PACKAGE=57258F32746FD1443F2A077C0C6EC03282087C19
$ export PACKAGE=0x57258f32746fd1443f2a077c0c6ec03282087c19
```
Next we can call the function to create a color object:
```
Expand All @@ -173,11 +173,11 @@ In the **Transaction Effects** portion of the output, you will see an object sho

```
Created Objects:
5EB2C3E55693282FAA7F5B07CE1C4803E6FDC1BB SequenceNumber(1) o#691b417670979c6c192bdfd643630a125961c71c841a6c7d973cf9429c792efa
0x5eb2c3e55693282faa7f5b07ce1c4803e6fdc1bb SequenceNumber(1) o#691b417670979c6c192bdfd643630a125961c71c841a6c7d973cf9429c792efa
```
Again, for convenience, let's save the object ID:
```
$ export OBJECT=5EB2C3E55693282FAA7F5B07CE1C4803E6FDC1BB
$ export OBJECT=0x5eb2c3e55693282faa7f5b07ce1c4803e6fdc1bb
```
We can inspect this object and see what kind of object it is:
```
Expand All @@ -187,7 +187,7 @@ This will show you the metadata of the object with its type:
```
Owner: AddressOwner(k#5db53ebb05fd3ea5f1d163d9d487ee8cd7b591ee)
Version: 1
ID: 5EB2C3E55693282FAA7F5B07CE1C4803E6FDC1BB
ID: 0x5eb2c3e55693282faa7f5b07ce1c4803e6fdc1bb
Readonly: false
Type: 0x57258f32746fd1443f2a077c0c6ec03282087c19::ColorObject
```
Expand Down
4 changes: 2 additions & 2 deletions doc/src/build/programming-with-objects/ch2-using-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ Now we can try to transfer it to another account address. First let's see what o
```
$ wallet addresses
```
Since the default current address is the first address, let's pick the second address in the list as the recipient. In my case, I have `1416F3D5AF469905B0580B9AF843EC82D02EFD30`. Let's save it for convenience:
Since the default current address is the first address, let's pick the second address in the list as the recipient. In my case, I have `0x1416f3d5af469905b0580b9af843ec82d02efd30`. Let's save it for convenience:
```
$ export RECIPIENT=1416F3D5AF469905B0580B9AF843EC82D02EFD30
$ export RECIPIENT=0x1416f3d5af469905b0580b9af843ec82d02efd30
```
Now let's transfer the object to this address:
```
Expand Down
Loading

0 comments on commit 7b45b07

Please sign in to comment.