Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,30 +72,6 @@ jobs:
rsync -a "${{ github.workspace }}/docs/api-references/" pages/api-references/genlayer-cli/
# Copy README as sibling file (strip badges/emojis)
sed -E '/^\[!\[.*\]\(https:\/\/(img\.shields\.io|dcbadge|badge\.fury)/d' "${{ github.workspace }}/README.md" > pages/api-references/genlayer-cli.mdx
# Write _meta.json
cat > pages/api-references/genlayer-cli/_meta.json << 'METAEOF'
{
"init": "init",
"up": "up",
"stop": "stop",
"new": "new",
"config": "config",
"network": "network",
"deploy": "deploy",
"call": "call",
"write": "write",
"schema": "schema",
"code": "code",
"receipt": "receipt",
"trace": "trace",
"appeal": "appeal",
"appeal-bond": "appeal-bond",
"account": "account",
"staking": "staking",
"localnet": "localnet",
"update": "update"
}
METAEOF
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
exit 0
Expand Down
6 changes: 5 additions & 1 deletion docs/api-references/_meta.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"index": "Overview",
"environment": "Environment",
"configuration": "Configuration",
"contracts": "Contracts",
"transactions": "Transactions",
"accounts": "Accounts",
"staking": "Staking",
"localnet": "Localnet"
"localnet": "Localnet",
"estimate-fees": "estimate-fees",
"finalize": "finalize",
"finalize-batch": "finalize-batch"
}
20 changes: 20 additions & 0 deletions docs/api-references/finalize-batch.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: finalize-batch
---

Finalize a batch of idle transactions in a single call (public call)

### Usage

`$ genlayer finalize-batch [options] <txIds...>`

### Arguments

- `<txIds...>`

### Options

| Short | Long | Description | Required | Default |
| --- | --- | --- | :---: | --- |
| | --rpc &lt;rpcUrl&gt; | RPC URL for the network | No | |
| -h | --help | display help for command | No | |
20 changes: 20 additions & 0 deletions docs/api-references/finalize.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: finalize
---

Finalize a transaction that is ready to be finalized (public call)

### Usage

`$ genlayer finalize [options] <txId>`

### Arguments

- `<txId>`

### Options

| Short | Long | Description | Required | Default |
| --- | --- | --- | :---: | --- |
| | --rpc &lt;rpcUrl&gt; | RPC URL for the network | No | |
| -h | --help | display help for command | No | |
4 changes: 3 additions & 1 deletion docs/api-references/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GenLayer CLI is a development environment for the GenLayer ecosystem. It allows
developers to interact with the protocol by creating accounts, sending
transactions, and working with Intelligent Contracts by testing, debugging, and
deploying them.
Version: `0.34.0`
Version: `0.39.1`

### Command List

Expand All @@ -29,6 +29,8 @@ Version: `0.34.0`
- `genlayer appeal` — Appeal a transaction by its hash
- `genlayer appeal-bond` — Show minimum appeal bond required for a transaction
- `genlayer trace` — Get execution trace for a transaction (return data, stdout, stderr, GenVM logs)
- `genlayer finalize` — Finalize a transaction that is ready to be finalized (public call)
- `genlayer finalize-batch` — Finalize a batch of idle transactions in a single call (public call)
- `genlayer staking` — Staking operations for validators and delegators

---
Expand Down
2 changes: 1 addition & 1 deletion docs/api-references/transactions/receipt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Get transaction receipt by hash

| Short | Long | Description | Required | Default |
| --- | --- | --- | :---: | --- |
| | --status &lt;status&gt; | Transaction status to wait for (UNINITIALIZED, PENDING, PROPOSING, COMMITTING, REVEALING, ACCEPTED, UNDETERMINED, FINALIZED, CANCELED, APPEAL_REVEALING, APPEAL_COMMITTING, READY_TO_FINALIZE, VALIDATORS_TIMEOUT, LEADER_TIMEOUT) (default: "FINALIZED") | No | |
| | --status &lt;status&gt; | Transaction status to wait for (UNINITIALIZED, PENDING, PROPOSING, COMMITTING, REVEALING, ACCEPTED, UNDETERMINED, FINALIZED, CANCELED, APPEAL_REVEALING, APPEAL_COMMITTING, READY_TO_FINALIZE, VALIDATORS_TIMEOUT, LEADER_TIMEOUT, LEADER_REVEALING) | No | `FINALIZED` |
| | --retries &lt;retries&gt; | Number of retries | No | `100` |
| | --interval &lt;interval&gt; | Interval between retries in milliseconds (default: 5000) | No | |
| | --rpc &lt;rpcUrl&gt; | RPC URL for the network | No | |
Expand Down
10 changes: 9 additions & 1 deletion scripts/generate-cli-docs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,18 @@ async function main() {
'staking': 'Staking',
'localnet': 'Localnet',
};
const rootMeta = {};
const rootMeta = { index: 'Overview' };
for (const [key, label] of Object.entries(GROUP_LABELS)) {
rootMeta[key] = label;
}
// Ungrouped top-level commands (e.g. finalize) still need nav entries
const ungrouped = outputs
.filter((o) => o.relDir === '' && o.filename !== 'index.mdx')
.map((o) => o.filename.replace(/\.mdx$/, ''))
.sort();
for (const slug of ungrouped) {
if (!rootMeta[slug]) rootMeta[slug] = slug;
}
await fs.writeFile(path.join(rootOut, '_meta.json'), JSON.stringify(rootMeta, null, 2), 'utf8');

// Write _meta.json for each group subdirectory
Expand Down
Loading