aavegotchi-cli 0.2.2 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,46 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.2.5 - 2026-02-27
6
+
7
+ ### Added
8
+
9
+ - First-class auction bid UX (no manual ABI/address/args):
10
+ - `ag auction bid --auction-id <id> --amount-ghst <amount> [--dry-run]`
11
+ - internal GBM diamond + ABI resolution for `commitBid`
12
+ - preflight checks for auction-open state, expected/unbid status, minimum bid, GHST balance, and GHST allowance
13
+ - Batch-native unbid flow:
14
+ - `ag auction bid-unbid --amount-ghst <amount> --max-total-ghst <amount> [--dry-run]`
15
+ - per-auction summary and explicit skip reasons
16
+ - Bankr environment ergonomics:
17
+ - profile-level env file support via `bootstrap --env-file <path>`
18
+ - Bankr env auto-discovery (`AGCLI_BANKR_ENV_FILE`, `AGCLI_HOME` defaults, `~/.config/openclaw/bankr.env`, local `.env.bankr`/`bankr.env`)
19
+
20
+ ### Changed
21
+
22
+ - Added optional GHST auto-approve path for auction bidding (`--auto-approve`).
23
+ - Added race-safe auction submit behavior by rechecking auction highest bid/bidder immediately before send.
24
+ - Improved simulation revert decoding with structured `reasonCode` details (for example: `INSUFFICIENT_ALLOWANCE`, `BID_BELOW_START`, `AUCTION_STATE_CHANGED`).
25
+
26
+ ## 0.2.4 - 2026-02-27
27
+
28
+ ### Added
29
+
30
+ - Built-in mapped write metadata for GBM auction commands (`auction bid`, `auction buy-now`, `auction cancel`, `auction create`, `auction swap-bid`):
31
+ - default contract address: `0x80320a0000c7a6a34086e2acad6915ff57ffda31`
32
+ - built-in ABI signatures for mapped function encoding
33
+ - Mapped help for auction writes now prints built-in ABI signature details without requiring `--abi-file`.
34
+
35
+ ### Changed
36
+
37
+ - Mapped write execution now auto-uses built-in ABI/address defaults when available, while still allowing explicit `--abi-file` / `--address` overrides.
38
+
39
+ ## 0.2.3 - 2026-02-27
40
+
41
+ ### Fixed
42
+
43
+ - Bankr signer now sends the minimal `/agent/submit` transaction schema and omits gas/nonce/fee fields for compatibility.
44
+
5
45
  ## 0.2.2 - 2026-02-27
6
46
 
7
47
  ### Added
package/README.md CHANGED
@@ -46,6 +46,7 @@ npm run ag -- bootstrap --mode agent --profile prod --chain base --signer readon
46
46
  - `subgraph list|check|query`
47
47
  - `baazaar listing get|active|mine` (subgraph-first read wrappers)
48
48
  - `auction get|active|mine|bids|bids-mine` (subgraph-first read wrappers)
49
+ - `auction bid|bid-unbid` (first-class write UX)
49
50
  - `<domain> read` (routes to generic onchain call for that domain)
50
51
 
51
52
  Planned domain namespaces are stubbed for parity tracking:
@@ -53,7 +54,9 @@ Planned domain namespaces are stubbed for parity tracking:
53
54
  - `gotchi`, `portal`, `wearables`, `items`, `inventory`, `baazaar`, `auction`, `lending`, `staking`, `gotchi-points`, `realm`, `alchemica`, `forge`, `token`
54
55
 
55
56
  Many Base-era write flows are already executable as mapped aliases in those namespaces (internally routed through `onchain send`).
56
- Example: `ag lending create --abi-file ./abis/GotchiLendingFacet.json --address 0x... --args-json '[...]' --json`
57
+ Mapped writes now include built-in ABI defaults, so `--abi-file` is no longer required for mapped command execution/help.
58
+ Example with built-in defaults: `ag baazaar buy-now --args-json '[...]' --dry-run --json`
59
+ Example with explicit metadata: `ag lending create --abi-file ./abis/GotchiLendingFacet.json --address 0x... --args-json '[...]' --json`
57
60
 
58
61
  ## Command help and discoverability
59
62
 
@@ -65,7 +68,7 @@ ag tx send --help
65
68
  ag help baazaar buy-now
66
69
  ```
67
70
 
68
- Mapped write commands now expose their onchain function mapping and required flags:
71
+ Mapped write commands now expose their onchain function mapping, defaults (if available), and required flags:
69
72
 
70
73
  ```bash
71
74
  ag baazaar buy-now --help
@@ -168,6 +171,27 @@ Raw GraphQL passthrough (typed projection remains included):
168
171
  npm run ag -- auction active --first 5 --raw --json
169
172
  ```
170
173
 
174
+ ## First-class auction bidding
175
+
176
+ Single auction bid (no manual ABI/address/arg packing):
177
+
178
+ ```bash
179
+ npm run ag -- auction bid --auction-id 5666 --amount-ghst 1 --dry-run --json
180
+ ```
181
+
182
+ Bid all currently unbid auctions up to a max total:
183
+
184
+ ```bash
185
+ npm run ag -- auction bid-unbid --amount-ghst 1 --max-total-ghst 10 --dry-run --json
186
+ ```
187
+
188
+ Notes:
189
+
190
+ - `auction bid` resolves GBM diamond + ABI internally.
191
+ - Preflight checks include auction-open state, expected/unbid checks, minimum bid, GHST balance, and GHST allowance.
192
+ - `--auto-approve` can submit GHST `approve()` automatically when allowance is insufficient.
193
+ - `auction bid-unbid` emits per-auction results and explicit skip reasons in one JSON report.
194
+
171
195
  ## Signer backends
172
196
 
173
197
  - `readonly` (read-only mode)
@@ -176,6 +200,7 @@ npm run ag -- auction active --first 5 --raw --json
176
200
  - `remote:URL|ADDRESS|AUTH_ENV` (HTTP signer service)
177
201
  - `ledger:DERIVATION_PATH|ADDRESS|BRIDGE_ENV` (external bridge command signer)
178
202
  - `bankr[:ADDRESS|API_KEY_ENV|API_URL]` (Bankr-native signer via `/agent/me` + `/agent/submit`; defaults: `BANKR_API_KEY`, `https://api.bankr.bot`)
203
+ - Optional profile env file support (`bootstrap --env-file <path>`) plus Bankr auto-discovery (`$AGCLI_BANKR_ENV_FILE`, `$AGCLI_HOME/bankr.env`, `$AGCLI_HOME/.env.bankr`, `~/.config/openclaw/bankr.env`, `./.env.bankr`, `./bankr.env`)
179
204
 
180
205
  Remote signer contract:
181
206
 
@@ -192,7 +217,7 @@ Bankr bootstrap example:
192
217
 
193
218
  ```bash
194
219
  BANKR_API_KEY=... \
195
- npm run ag -- bootstrap --mode agent --profile bankr --chain base --signer bankr --json
220
+ npm run ag -- bootstrap --mode agent --profile bankr --chain base --signer bankr --env-file ~/.config/openclaw/bankr.env --json
196
221
  ```
197
222
 
198
223
  Ledger bridge contract:
@@ -37,6 +37,8 @@ const BUILTIN_COMMANDS = [
37
37
  "auction mine",
38
38
  "auction bids",
39
39
  "auction bids-mine",
40
+ "auction bid",
41
+ "auction bid-unbid",
40
42
  ];
41
43
  function listDomainReadCommands() {
42
44
  return (0, stubs_1.listDomainStubRoots)().map((root) => `${root} read`);
@@ -66,11 +68,11 @@ function levenshteinDistance(a, b) {
66
68
  return previous[b.length];
67
69
  }
68
70
  function listKnownCommands() {
69
- return [
70
- ...BUILTIN_COMMANDS,
71
- ...listDomainReadCommands(),
72
- ...(0, mapped_1.listMappedCommands)(),
73
- ];
71
+ return [...new Set([
72
+ ...BUILTIN_COMMANDS,
73
+ ...listDomainReadCommands(),
74
+ ...(0, mapped_1.listMappedCommands)(),
75
+ ])];
74
76
  }
75
77
  function suggestCommands(input, max = 5) {
76
78
  const query = input.trim().toLowerCase();
@@ -8,6 +8,7 @@ const batch_1 = require("./commands/batch");
8
8
  const bootstrap_1 = require("./commands/bootstrap");
9
9
  const mapped_1 = require("./commands/mapped");
10
10
  const onchain_1 = require("./commands/onchain");
11
+ const auction_bid_1 = require("./commands/auction-bid");
11
12
  const auction_subgraph_1 = require("./commands/auction-subgraph");
12
13
  const baazaar_subgraph_1 = require("./commands/baazaar-subgraph");
13
14
  const policy_1 = require("./commands/policy");
@@ -193,6 +194,18 @@ async function executeCommand(ctx) {
193
194
  }
194
195
  }
195
196
  if (root === "auction") {
197
+ if (sub === "bid") {
198
+ return {
199
+ commandName: "auction bid",
200
+ data: await (0, auction_bid_1.runAuctionBidCommand)(ctx),
201
+ };
202
+ }
203
+ if (sub === "bid-unbid") {
204
+ return {
205
+ commandName: "auction bid-unbid",
206
+ data: await (0, auction_bid_1.runAuctionBidUnbidCommand)(ctx),
207
+ };
208
+ }
196
209
  if (sub === "get" || sub === "active" || sub === "mine" || sub === "bids" || sub === "bids-mine") {
197
210
  return {
198
211
  commandName: ctx.commandPath.join(" "),