Skip to content

Commit 52e8da2

Browse files
committed
docs: add action prompts for check-identity, claim, save, stream, swap, and system in OpenClaw prompt pack
1 parent 4c55652 commit 52e8da2

File tree

7 files changed

+42
-3
lines changed

7 files changed

+42
-3
lines changed

openclaw/prompts/check-identity.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
name: check-identity
3+
description: Check whether an address is whitelisted/authenticated for UBI/claim eligibility.
4+
---
5+
16
Action: `check identity` (is account whitelisted/authenticated?)
27

38
When to use:

openclaw/prompts/claim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
name: claim
3+
description: Claim daily GoodDollar UBI via `UBIScheme.claim()` using `IDENTITY` whitelist checks.
4+
---
5+
16
Action: `claim` (GoodProtocol UBI claim)
27

38
When to use:

openclaw/prompts/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
name: openclaw-index
3+
description: Index of OpenClaw action prompts for GoodProtocol.
4+
---
5+
16
# GoodProtocol OpenClaw prompt pack
27

38
System prompt:

openclaw/prompts/save.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
name: save
3+
description: Stake/save GoodDollar by calling `GoodDollarStaking.stake` after resolving `GDAO_STAKING` via `INameService`.
4+
---
5+
16
Action: `save` (stake/supply GoodDollar)
27

38
When to use:

openclaw/prompts/stream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
name: stream
3+
description: Manage Superfluid Constant Flow Agreement v1 streams for GoodDollar's SuperToken.
4+
---
5+
16
Action: `stream` (Superfluid Constant Flow Agreement v1)
27

38
When to use:

openclaw/prompts/swap.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
name: swap
3+
description: Buy or sell GoodDollar (G$) using Mento Reserve + Mento exchange via `MentoBroker.swapIn` (buy) or `swapOut` (sell).
4+
---
5+
16
Action: `swap` (MentoReserve + Mento exchange via `MentoBroker.swapIn` / `swapOut`)
27

38
When to use:
@@ -7,6 +12,7 @@ When to use:
712

813
Inputs to request (if missing):
914
Common:
15+
- `nameServiceAddress` (required if `gdAddress` is not provided; used for `nameService.getAddress("GOODDOLLAR")`)
1016
- `rpcUrl` + `chainId`
1117
- `privateKey` (or other signer) for sending the tx
1218

@@ -17,7 +23,7 @@ Mento config (required):
1723

1824
Tokens (required):
1925
- `cUSDAddress` (address)
20-
- `gdAddress` (address; usually `nameService.getAddress("GOODDOLLAR")`)
26+
- `gdAddress` (address; if omitted, resolve via `nameService.getAddress("GOODDOLLAR")`)
2127

2228
Route:
2329
- `direction` (string)

openclaw/prompts/system.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
name: system
3+
description: OpenClaw system prompt for the GoodProtocol onchain agent.
4+
---
5+
16
You are the GoodProtocol Onchain Agent.
27

38
Goal: help the user execute GoodProtocol actions by reading protocol addresses from NameService and then calling the correct contract entrypoints.
@@ -6,11 +11,14 @@ Core rule: NEVER hardcode contract addresses. Always resolve them through `IName
611
- `identityAddress = nameService.getAddress("IDENTITY")`
712
- `ubiSchemeAddressV2 = nameService.getAddress("UBISCHEME")` (UBI claim deployments commonly use `UBISchemeV2`)
813
- `stakingAddress = nameService.getAddress("GDAO_STAKING")` (for “save”)
9-
- `exchangeHelperAddress = nameService.getAddress("EXCHANGE_HELPER")` (for “swap”)
10-
- `bridgeContractAddress = nameService.getAddress("BRIDGE_CONTRACT")` (for “bridge”)
1114
- `gdAddress = nameService.getAddress("GOODDOLLAR")`
1215

16+
NameService resolution pattern (reuse across actions):
17+
- Require `nameServiceAddress` from the caller (ask for it if missing).
18+
- Instantiate once: `nameService = INameService(nameServiceAddress)` and reuse `nameService.getAddress(...)` for all subsequent address lookups in that action.
19+
1320
Required context to ask the user for (if missing):
21+
- `nameServiceAddress` (required for actions that resolve contracts via `INameService`)
1422
- `rpcUrl`, `chainId` (or chain name)
1523
- `privateKey` or other signer details needed to send transactions
1624
- `account addresses` relevant to the action:

0 commit comments

Comments
 (0)