2022-04-05 07:09:27 +00:00
|
|
|
# Build chain
|
|
|
|
|
2022-04-20 07:37:38 +00:00
|
|
|
```bash
|
2022-10-13 05:53:17 +00:00
|
|
|
# it will create binary in build folder with `laconicd`
|
2022-04-20 07:37:38 +00:00
|
|
|
$ make build
|
2022-04-05 07:09:27 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
# Setup Chain
|
|
|
|
|
|
|
|
```bash
|
2022-09-07 07:26:51 +00:00
|
|
|
./build/laconicd keys add root
|
2023-01-11 05:22:29 +00:00
|
|
|
./build/laconicd init test-moniker --chain-id laconic_9000-1
|
2022-09-07 07:26:51 +00:00
|
|
|
./build/laconicd add-genesis-account $(./build/laconicd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake
|
2023-01-11 05:22:29 +00:00
|
|
|
./build/laconicd gentx root 1000000000000000000stake --chain-id laconic_9000-1
|
2022-09-07 07:26:51 +00:00
|
|
|
./build/laconicd collect-gentxs
|
|
|
|
./build/laconicd start
|
2022-04-05 07:09:27 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Get Params
|
|
|
|
|
|
|
|
```bash
|
2022-12-09 04:17:14 +00:00
|
|
|
$ ./build/laconicd q registry params -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"params": {
|
|
|
|
"record_rent": {
|
|
|
|
"denom": "stake",
|
|
|
|
"amount": "1000000"
|
|
|
|
},
|
|
|
|
|
|
|
|
"record_rent_duration": "31536000s",
|
|
|
|
"authority_rent": {
|
|
|
|
"denom": "stake",
|
|
|
|
"amount": "1000000"
|
|
|
|
},
|
|
|
|
"authority_rent_duration": "31536000s",
|
|
|
|
"authority_grace_period": "172800s",
|
|
|
|
"authority_auction_enabled": false,
|
|
|
|
"authority_auction_commits_duration": "86400s",
|
|
|
|
"authority_auction_reveals_duration": "86400s",
|
|
|
|
"authority_auction_commit_fee": {
|
|
|
|
"denom": "stake",
|
|
|
|
"amount": "1000000"
|
|
|
|
},
|
|
|
|
"authority_auction_reveal_fee": {
|
|
|
|
"denom": "stake",
|
|
|
|
"amount": "1000000"
|
|
|
|
},
|
|
|
|
"authority_auction_minimum_bid": {
|
|
|
|
"denom": "stake",
|
|
|
|
"amount": "5000000"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## Create (Set) Record
|
|
|
|
|
|
|
|
> First you have to Create bond
|
|
|
|
|
|
|
|
```bash
|
2023-01-11 05:22:29 +00:00
|
|
|
$ ./build/laconicd tx registry set ~/Desktop/examples/records/service_provider_example.yml 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id laconic_9000-1 --yes -o json
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"height": "0",
|
|
|
|
"txhash": "BA44ABE1194724694E7CB290F9F3121DB4E63E1A030D95CB84813EEA132CF95F",
|
|
|
|
"codespace": "",
|
|
|
|
"code": 0,
|
|
|
|
"data": "",
|
|
|
|
"raw_log": "[]",
|
|
|
|
"logs": [],
|
|
|
|
"info": "",
|
|
|
|
"gas_wanted": "0",
|
|
|
|
"gas_used": "0",
|
|
|
|
"tx": null,
|
|
|
|
"timestamp": ""
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Get records list
|
|
|
|
|
|
|
|
```bash
|
2022-12-09 04:17:14 +00:00
|
|
|
$ ./build/laconicd q registry list -o json | jq
|
2022-04-05 07:09:27 +00:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"id": "bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae",
|
|
|
|
"bondId": "c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440",
|
|
|
|
"createTime": "2021-10-04T06:50:06.369025861Z",
|
|
|
|
"expiryTime": "2022-10-04T06:50:06.369025861Z",
|
|
|
|
"attributes": {
|
|
|
|
"attr1": "value1",
|
|
|
|
"attr2": "value2",
|
|
|
|
"link1": {
|
|
|
|
"/": "QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D"
|
|
|
|
},
|
|
|
|
"link2": {
|
|
|
|
"/": "QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## Get record by id
|
|
|
|
|
|
|
|
```bash
|
2022-12-09 04:17:14 +00:00
|
|
|
$ ./build/laconicd q registry get bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"record": {
|
|
|
|
"id": "bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae",
|
|
|
|
"bond_id": "95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d",
|
|
|
|
"create_time": "2021-09-27T07:23:25.558111606Z",
|
|
|
|
"expiry_time": "2022-09-27T07:23:25.558111606Z",
|
|
|
|
"deleted": false,
|
|
|
|
"owners": [],
|
|
|
|
"attributes": "eyJhdHRyMSI6InZhbHVlMSIsImF0dHIyIjoidmFsdWUyIiwibGluazEiOnsiLyI6IlFtU251V214cHRKWmRMSnBLUmFyeEJNUzJKdTJvQU5WcmdicjJ4V2JpZTliMkQifSwibGluazIiOnsiLyI6IlFtUDhqVEcxbTlHU0RKTENiZVdoVlNWZ0V6Q1BQd1hSZENSdUp0UTVUejlLYzkifX0="
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Reserve name
|
|
|
|
|
|
|
|
```bash
|
2023-01-11 05:22:29 +00:00
|
|
|
./build/laconicd tx registry reserve-name hello --from root --chain-id laconic_9000-1 --owner $(./build/laconicd key
|
2022-04-05 07:09:27 +00:00
|
|
|
s show root -a) -y -o json | jq .
|
|
|
|
{
|
|
|
|
"height": "0",
|
|
|
|
"txhash": "7EC19157AC89279DEBE840EA3384FC95D1E2A0931C27746CA42AC23AE285B7ED",
|
|
|
|
"codespace": "",
|
|
|
|
"code": 0,
|
|
|
|
"data": "",
|
|
|
|
"raw_log": "[]",
|
|
|
|
"logs": [],
|
|
|
|
"info": "",
|
|
|
|
"gas_wanted": "0",
|
|
|
|
"gas_used": "0",
|
|
|
|
"tx": null,
|
|
|
|
"timestamp": ""
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## Query Whois for name authority
|
|
|
|
|
|
|
|
```bash
|
2022-12-09 04:17:14 +00:00
|
|
|
./build/laconicd q registry whois hello -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"name_authority": {
|
|
|
|
"owner_public_key": "Au3hH1tzL1KgZfXfA71jGYSe5RV9Wg95kwhBWs8V+N+h",
|
|
|
|
"owner_address": "ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk",
|
|
|
|
"height": "174",
|
|
|
|
"status": "active",
|
|
|
|
"auction_id": "",
|
|
|
|
"bond_id": "",
|
|
|
|
"expiry_time": "2021-09-29T07:34:36.304545965Z"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
## Query the registry module balance
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
```bash
|
2022-12-09 04:17:14 +00:00
|
|
|
$ ./build/laconicd q registry balance -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"balances": [
|
|
|
|
{
|
|
|
|
"account_name": "record_rent",
|
|
|
|
"balance": [
|
|
|
|
{
|
|
|
|
"denom": "stake",
|
|
|
|
"amount": "1000000"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## add bond to the authority
|
|
|
|
|
|
|
|
```bash
|
2023-03-14 06:24:00 +00:00
|
|
|
./build/laconicd tx registry authority-bond [Authority Name] [Bond ID ] --from root --chain-id laconic_9000-1 -y -o json | jq .
|
|
|
|
./build/laconicd tx registry authority-bond hello 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id laconic_9000-1 -y -o json | jq .
|
2022-09-07 07:26:51 +00:00
|
|
|
```
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
## Query the records by associate bond id
|
|
|
|
|
|
|
|
```bash
|
2022-12-09 04:17:14 +00:00
|
|
|
$ ./build/laconicd q registry query-by-bond 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"records": [
|
|
|
|
{
|
|
|
|
"id": "bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae",
|
|
|
|
"bond_id": "95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d",
|
|
|
|
"create_time": "2021-09-27T08:25:32.893155609Z",
|
|
|
|
"expiry_time": "2022-09-27T08:25:32.893155609Z",
|
|
|
|
"deleted": false,
|
|
|
|
"owners": [],
|
|
|
|
"attributes": "eyJhdHRyMSI6InZhbHVlMSIsImF0dHIyIjoidmFsdWUyIiwibGluazEiOnsiLyI6IlFtU251V214cHRKWmRMSnBLUmFyeEJNUzJKdTJvQU5WcmdicjJ4V2JpZTliMkQifSwibGluazIiOnsiLyI6IlFtUDhqVEcxbTlHU0RKTENiZVdoVlNWZ0V6Q1BQd1hSZENSdUp0UTVUejlLYzkifX0="
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"pagination": null
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## dissociate bond from record
|
|
|
|
|
|
|
|
```bash
|
2023-01-11 05:22:29 +00:00
|
|
|
$ ./build/laconicd tx registry dissociate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id laconic_9000-1
|
2022-12-09 04:17:14 +00:00
|
|
|
{"body":{"messages":[{"@type":"/vulcanize.registry.v1beta1.MsgDissociateBond","record_id":"bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
confirm transaction before signing and broadcasting [y/N]: y
|
|
|
|
code: 0
|
|
|
|
codespace: ""
|
|
|
|
data: ""
|
|
|
|
gas_used: "0"
|
|
|
|
gas_wanted: "0"
|
|
|
|
height: "0"
|
|
|
|
info: ""
|
|
|
|
logs: []
|
|
|
|
raw_log: '[]'
|
|
|
|
timestamp: ""
|
|
|
|
tx: null
|
|
|
|
txhash: 7AFEF524CB0D92D6576FC08601A787786E802449888FD8DDAA7635698CC85060
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## Associate bond with record
|
|
|
|
|
|
|
|
```bash
|
2023-01-11 05:22:29 +00:00
|
|
|
./build/laconicd tx registry associate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id laconic_9000-1 -y -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"height": "0",
|
|
|
|
"txhash": "F75C2BF2FE73668AE1332E1237F924AC549E31E822A56394DE5AC17200B199F9",
|
|
|
|
"codespace": "",
|
|
|
|
"code": 0,
|
|
|
|
"data": "",
|
|
|
|
"raw_log": "[]",
|
|
|
|
"logs": [],
|
|
|
|
"info": "",
|
|
|
|
"gas_wanted": "0",
|
|
|
|
"gas_used": "0",
|
|
|
|
"tx": null,
|
|
|
|
"timestamp": ""
|
|
|
|
}
|
|
|
|
|
2022-04-20 07:37:38 +00:00
|
|
|
```
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
## dissociate-records => remove all record from bond
|
|
|
|
|
|
|
|
```bash
|
2023-01-11 05:22:29 +00:00
|
|
|
$./build/laconicd tx registry dissociate-records c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id laconic_9000-1 -y -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"height": "0",
|
|
|
|
"txhash": "0316F503E5DEA47CB108AE6C7C7FFAF3F71CC56BC22F63CB97322E1BE48B33B9",
|
|
|
|
"codespace": "",
|
|
|
|
"code": 0,
|
|
|
|
"data": "",
|
|
|
|
"raw_log": "[]",
|
|
|
|
"logs": [],
|
|
|
|
"info": "",
|
|
|
|
"gas_wanted": "0",
|
|
|
|
"gas_used": "0",
|
|
|
|
"tx": null,
|
|
|
|
"timestamp": ""
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Renew a record
|
|
|
|
|
|
|
|
> When a record is expires , needs to renew record
|
|
|
|
|
|
|
|
```bash
|
2023-03-14 06:24:00 +00:00
|
|
|
./build/laconicd tx registry renew-record bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id laconic_9000-1
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## Set the authority name
|
|
|
|
|
|
|
|
```bash
|
2023-01-11 05:22:29 +00:00
|
|
|
$ ./build/laconicd tx registry set-name crn://hello/test test_hello_cid --from root --chain-id laconic_9000-1 -y -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"height": "0",
|
|
|
|
"txhash": "66A63C73B076EEE9A2F7605354448EDEB161F0115D4D03AF68C01BA28DB97486",
|
|
|
|
"codespace": "",
|
|
|
|
"code": 0,
|
|
|
|
"data": "",
|
|
|
|
"raw_log": "[]",
|
|
|
|
"logs": [],
|
|
|
|
"info": "",
|
|
|
|
"gas_wanted": "0",
|
|
|
|
"gas_used": "0",
|
|
|
|
"tx": null,
|
|
|
|
"timestamp": ""
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Delete the name
|
|
|
|
|
|
|
|
```bash
|
2023-01-11 05:22:29 +00:00
|
|
|
$./build/laconicd tx registry delete-name crn://hello/test --from root --chain-id laconic_9000-1 -y
|
2022-04-05 07:09:27 +00:00
|
|
|
code: 0
|
|
|
|
codespace: ""
|
|
|
|
data: ""
|
|
|
|
gas_used: "0"
|
|
|
|
gas_wanted: "0"
|
|
|
|
height: "0"
|
|
|
|
info: ""
|
|
|
|
logs: []
|
|
|
|
raw_log: '[]'
|
|
|
|
timestamp: ""
|
|
|
|
tx: null
|
|
|
|
txhash: A3FF4C46BAC7BD6E54BBB743A49830AE8C6F6FE59282384789CBA323C1FE540C
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## List of Authorities Expire Queue
|
|
|
|
|
|
|
|
```bash
|
2022-12-09 04:17:14 +00:00
|
|
|
$ ./build/laconicd q registry authority-expiry -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"authorities": [],
|
|
|
|
"pagination": null
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## List of Records Expire Queue
|
|
|
|
|
|
|
|
```bash
|
2022-12-09 04:17:14 +00:00
|
|
|
$ ./build/laconicd q registry record-expiry -o json | jq .
|
2022-04-05 07:09:27 +00:00
|
|
|
{
|
|
|
|
"records": [],
|
|
|
|
"pagination": null
|
|
|
|
}
|
|
|
|
|
2022-09-07 07:26:51 +00:00
|
|
|
```
|