Skip to content

Commit 4d2aa32

Browse files
Merge pull request #2 from catalyst-network/docs/use-cases-user-first
docs: clarify SDK install and contract calling
2 parents 336c798 + b2f2f48 commit 4d2aa32

6 files changed

Lines changed: 88 additions & 2 deletions

File tree

site/docs/quickstarts/i-want-to-build-a-dapp.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,27 @@ title: "Quickstart: I want to build a dApp"
1010

1111
## Steps
1212

13-
1) Install the SDK package:
13+
1) Get the SDK:
14+
15+
:::note
16+
If `@catalyst/sdk` is not published to npm yet, use the repo-based workflow below (clone + build).
17+
:::
18+
19+
Option A (npm, when published):
1420

1521
```bash
1622
npm install @catalyst/sdk
1723
```
1824

25+
Option B (repo, works today):
26+
27+
```bash
28+
git clone https://github.com/catalyst-network/catalyst-sdk
29+
cd catalyst-sdk
30+
npm install
31+
npm run build
32+
```
33+
1934
2) Read the tx lifecycle (so you understand domain separation + receipts):
2035

2136
- **[RPC: transaction lifecycle](/docs/rpc-reference/transaction-lifecycle)**

site/docs/sdk/common-pitfalls.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,34 @@ Fix:
4747

4848
- increase poll interval and add exponential backoff + jitter
4949

50+
## Explorer shows “missing txs”
51+
52+
Symptom:
53+
54+
- your deploy/call CLI shows `receipt_status: applied`
55+
- but the block explorer does not show the transaction
56+
57+
Cause (common):
58+
59+
- explorer/indexer is behind, stalled, or pointed at a different backend/RPC
60+
61+
Fix:
62+
63+
- treat RPC as source of truth:
64+
- `catalyst_getTransactionReceipt(txid)` (check `applied_cycle`)
65+
- `catalyst_getBlockByNumber(applied_cycle, false)` (check tx is included)
66+
67+
## Payable calls / `msg.value`
68+
69+
Symptom:
70+
71+
- a contract requires a non-zero `msg.value` (e.g. fee-based registration)
72+
73+
Cause:
74+
75+
- current Catalyst testnet CALL transactions do not carry an Ethereum-style `value`
76+
77+
Fix:
78+
79+
- set fees to zero for testnet workflows, or avoid payable patterns until value support is exposed
80+

site/docs/sdk/deploy-contract.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,25 @@ code_verified: true
109109

110110
This is a **transaction** (not `eth_call`).
111111

112+
You must provide **calldata bytes** (hex). If you have Foundry installed, you can generate calldata with `cast calldata`.
113+
112114
```bash
115+
DATA=$(cast calldata "setNumber(uint256)" 42)
116+
113117
node packages/cli/dist/index.js call \
114118
--rpc-url "$RPC_URL" \
115119
--key-file ../catalyst-node-rust/wallet.key \
116120
--to 0x<contract_address> \
117-
--data 0x \
121+
--data "$DATA" \
118122
--wait
119123
```
120124

125+
::::caution
126+
EVM `value` (payable calls)
127+
128+
On current Catalyst testnet, EVM calls do not carry an Ethereum-style `value`. Contracts that require `msg.value` may not be usable until value support is exposed by the runtime/RPC.
129+
::::
130+
121131
### Option B: Deploy to public testnet
122132

123133
Follow the same CLI command, but:

site/docs/sdk/get-started.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,29 @@ This section is for builders (dApps, tooling, wallets). If you’re just using a
1717

1818
### 1) Install the SDK
1919

20+
:::note
21+
`@catalyst/sdk` is a TypeScript package that is intended to be published to npm.
22+
23+
If the package is not published yet, use the **repo-based workflow** below (clone + build) or use the **deploy CLI** directly:
24+
25+
- **[Deploy a contract](/docs/sdk/deploy-contract)** (uses `catalyst-sdk` CLI)
26+
:::
27+
28+
#### Option A: npm (when published)
29+
2030
```bash
2131
npm install @catalyst/sdk
2232
```
2333

34+
#### Option B: repo (works today)
35+
36+
```bash
37+
git clone https://github.com/catalyst-network/catalyst-sdk
38+
cd catalyst-sdk
39+
npm install
40+
npm run build
41+
```
42+
2443
### 2) Connect to RPC and fetch the tx signing domain
2544

2645
```ts

site/docs/smart-contracts/contract-repo-workflows.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ This page links to existing Catalyst contract repos and recommended workflows.
1111
Designed to be usable by wallets/nodes that can only read raw EVM storage (`catalyst_getStorageAt`).
1212
- **General contracts**: `catalyst-contracts` (currently minimal; expect changes)
1313

14+
## Identity contracts: recommended deploy + test flow
15+
16+
The identity contracts repo contains a Foundry `forge script --broadcast` deploy script, but Catalyst deployments should be done via **CTX2** tooling.
17+
18+
Recommended workflow:
19+
20+
- deploy: `catalyst-sdk/scripts/deploy-catalyst-identity-contracts.sh`
21+
- smoke test: `catalyst-sdk/scripts/test-deployed-identity-contracts.mjs`
22+
1423
## Recommended workflow (Foundry)
1524

1625
1) Write + test contracts:

site/docs/smart-contracts/evm-support-status.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Based on the current node implementation:
1313
- **Read code**: supported via `catalyst_getCode(address20)`
1414
- **Storage reads**: supported via `catalyst_getStorageAt(address20, slot32)`
1515
- **Receipts**: supported via `catalyst_getTransactionReceipt(tx_id)`
16+
- **`eth_call` equivalent**: not a standard part of the Catalyst workflow today (calls are submitted as transactions)
1617

1718
Canonical references:
1819

@@ -25,6 +26,7 @@ Canonical references:
2526
- **Submission method**: `catalyst_sendRawTransaction` (not `eth_sendRawTransaction`)
2627
- **Signing domain**: `catalyst_getTxDomain` (single-call domain separation; includes `genesis_hash`)
2728
- **Cycle/block semantics**: some cycles produce no block/LSU; explorers must handle gaps
29+
- **Payable calls**: EVM calls do not currently carry an Ethereum-style `value` (`msg.value`)
2830

2931
## Verify
3032

0 commit comments

Comments
 (0)