Skip to content

Commit

Permalink
Deployed on testnet (#13)
Browse files Browse the repository at this point in the history
* Deployed on testnet
  • Loading branch information
XuJiandong authored Jul 3, 2024
1 parent 0275430 commit 10738b4
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 6 deletions.
1 change: 1 addition & 0 deletions deployment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
info.json
10 changes: 10 additions & 0 deletions deployment/nostr-binding-type-script/deployment.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[cells]]
name = "nostr-binding"
enable_type_id = true
location = { file = "../../build/release/nostr-binding" }

# The lock script set to output cells
[lock]
code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
args = "0x9c26427b733e19f774e74312382946db9548093a"
hash_type = "type"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cell_recipes": [
{
"name": "nostr-binding",
"tx_hash": "0x10b5f9f005a7d8004e4b47bb5e05da8aa6de57922105e238cb2b0b2ec20a0a72",
"index": 0,
"occupied_capacity": 20015800000000,
"data_hash": "0x6694d6a1d78172b31a474fe1a1c085b7e48a28f63f9f4135ce4abc458962ddfe",
"type_id": "0x4105801324b70b3a1508ded8958aba66a6faf68cab26f863b4902b50dfb8b9ab"
}
],
"dep_group_recipes": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cell_recipes": [
{
"name": "nostr-binding",
"tx_hash": "0x0e3949fa8afbbdf6d4abdda0d12ac1206c8d05dd51ec490b7341586291db85a6",
"index": 0,
"occupied_capacity": 20081400000000,
"data_hash": "0xee39c944c5bea6857d1b55fc1d4ff9fc1e22e59fd89d1a0fed8e6eabc08dda66",
"type_id": "0x4105801324b70b3a1508ded8958aba66a6faf68cab26f863b4902b50dfb8b9ab"
}
],
"dep_group_recipes": []
}
10 changes: 10 additions & 0 deletions deployment/nostr-binding-type-script/step-1-gen-txs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -ex
cd ../.. && shasum -a 256 -c checksums.txt && cd -

ckb-cli deploy gen-txs \
--deployment-config ./deployment.toml \
--migration-dir ./migrations \
--fee-rate 1600 \
--from-address ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvuyep8kue7r8mhfe6rzguzj3kmj4yqjwsg8lepn \
--info-file info.json
5 changes: 5 additions & 0 deletions deployment/nostr-binding-type-script/step-2-sign.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
ckb-cli deploy sign-txs \
--from-account ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvuyep8kue7r8mhfe6rzguzj3kmj4yqjwsg8lepn \
--add-signatures \
--info-file info.json
3 changes: 3 additions & 0 deletions deployment/nostr-binding-type-script/step-3-apply.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

ckb-cli deploy apply-txs --migration-dir ./migrations --info-file info.json
10 changes: 10 additions & 0 deletions deployment/nostr-lock-script/deployment.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[cells]]
name = "nostr-lock"
enable_type_id = true
location = { file = "../../build/release/nostr-lock" }

# The lock script set to output cells
[lock]
code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
args = "0x9c26427b733e19f774e74312382946db9548093a"
hash_type = "type"
13 changes: 13 additions & 0 deletions deployment/nostr-lock-script/migrations/2024-07-03-011120.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cell_recipes": [
{
"name": "nostr-lock",
"tx_hash": "0xe3812ee29f633abc386754ced79fa31c3c91af8731af3201c74c7dc168bb192d",
"index": 0,
"occupied_capacity": 20333400000000,
"data_hash": "0xa141c33d3380a496754a832da592fa958d539038d3cc1f133c3903e7fb1f06ff",
"type_id": "0x6ae5ee0cb887b2df5a9a18137315b9bdc55be8d52637b2de0624092d5f0c91d5"
}
],
"dep_group_recipes": []
}
13 changes: 13 additions & 0 deletions deployment/nostr-lock-script/migrations/2024-07-03-014310.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cell_recipes": [
{
"name": "nostr-lock",
"tx_hash": "0xa2a434dcdbe280b9ed75bb7d6c7d68186a842456aba0fc506657dc5ed7c01d68",
"index": 0,
"occupied_capacity": 20263000000000,
"data_hash": "0x2effea19ff3024b5b0fb4c0c59c379e7610110e7e3fe7ae003247b1115e59795",
"type_id": "0x6ae5ee0cb887b2df5a9a18137315b9bdc55be8d52637b2de0624092d5f0c91d5"
}
],
"dep_group_recipes": []
}
10 changes: 10 additions & 0 deletions deployment/nostr-lock-script/step-1-gen-txs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -ex
cd ../.. && shasum -a 256 -c checksums.txt && cd -

ckb-cli deploy gen-txs \
--deployment-config ./deployment.toml \
--migration-dir ./migrations \
--fee-rate 3000 \
--from-address ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvuyep8kue7r8mhfe6rzguzj3kmj4yqjwsg8lepn \
--info-file info.json
5 changes: 5 additions & 0 deletions deployment/nostr-lock-script/step-2-sign.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
ckb-cli deploy sign-txs \
--from-account ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvuyep8kue7r8mhfe6rzguzj3kmj4yqjwsg8lepn \
--add-signatures \
--info-file info.json
3 changes: 3 additions & 0 deletions deployment/nostr-lock-script/step-3-apply.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

ckb-cli deploy apply-txs --migration-dir ./migrations --info-file info.json
33 changes: 33 additions & 0 deletions docs/nostr-binding-type-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,36 @@ Outputs:
Witnesses:
<...>
```
## Notes
An implementation of the nostr lock script spec above has been deployed to CKB mainnet and testnet:
- mainnet
| parameter | value |
| ----------- | -------------------------------------------------------------------- |
| `code_hash` | TODO |
| `hash_type` | `type` |
| `tx_hash` | TODO |
| `index` | `0x0` |
| `dep_type` | `code` |

- testnet

| parameter | value |
| ----------- | -------------------------------------------------------------------- |
| `code_hash` | 0x4105801324b70b3a1508ded8958aba66a6faf68cab26f863b4902b50dfb8b9ab |
| `hash_type` | `type` |
| `tx_hash` | 0x0e3949fa8afbbdf6d4abdda0d12ac1206c8d05dd51ec490b7341586291db85a6 |
| `index` | `0x0` |
| `dep_type` | `code` |

Reproducible build is supported to verify the deploy script. To build the deployed the script above, one can use the following steps:

```bash
git clone https://github.com/cryptape/nostr-binding.git
cd nostr-binding
bash scripts/reproducible_build_docker
```
14 changes: 8 additions & 6 deletions docs/nostr-lock-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ Witnesses:

## Notes

An [implementation](TODO) of the nostr lock script spec above has been deployed to CKB mainnet and testnet:
An implementation of the nostr lock script spec above has been deployed to CKB mainnet and testnet:

- Mirana
- mainnet

| parameter | value |
| ----------- | -------------------------------------------------------------------- |
Expand All @@ -261,18 +261,20 @@ An [implementation](TODO) of the nostr lock script spec above has been deployed
| `index` | `0x0` |
| `dep_type` | `code` |

- Pudge
- testnet

| parameter | value |
| ----------- | -------------------------------------------------------------------- |
| `code_hash` | TODO |
| `code_hash` | 0x6ae5ee0cb887b2df5a9a18137315b9bdc55be8d52637b2de0624092d5f0c91d5 |
| `hash_type` | `type` |
| `tx_hash` | TODO |
| `tx_hash` | 0xa2a434dcdbe280b9ed75bb7d6c7d68186a842456aba0fc506657dc5ed7c01d68 |
| `index` | `0x0` |
| `dep_type` | `code` |

Reproducible build is supported to verify the deploy script. To build the deployed the script above, one can use the following steps:

```bash
TODO
git clone https://github.com/cryptape/nostr-binding.git
cd nostr-binding
bash scripts/reproducible_build_docker
```

0 comments on commit 10738b4

Please sign in to comment.