Skip to content

Commit 6d1b1f2

Browse files
committed
test: fix CLI usage
1 parent bed124a commit 6d1b1f2

File tree

4 files changed

+1092
-31
lines changed

4 files changed

+1092
-31
lines changed

a3p-integration/proposals/f:fast-usdc/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@agoric/fast-usdc": "dev",
1414
"@agoric/synthetic-chain": "^0.4.3",
1515
"@endo/init": "^1.1.7",
16+
"agoric": "dev",
1617
"ava": "^5.3.1"
1718
},
1819
"ava": {
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
#!/bin/bash
2+
set -euo pipefail
23

3-
# FIXME these commands are run against the `@agoric/fast-usdc` pulled from NPM
4-
# but should be run against the local SDK. The `yarn link` command described in
5-
# a3p-integration/README.md is supposed to make that work but it's not working.
4+
# XXX the from address is gov1 but using that causes:
5+
# Error: gov1 is not a valid name or address: decoding bech32 failed: invalid bech32 string length 4
6+
# Usage:
7+
# agd keys show [name_or_address [name_or_address...]] [flags]
68

7-
yarn @agoric/fast-usdc operator accept >| accept.json
9+
yarn fast-usdc operator accept >| accept.json
810
cat accept.json
9-
yarn agoric wallet send --offer accept.json --from gov1 --keyring-backend="test"
11+
yarn agoric wallet send --offer accept.json --from agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q --keyring-backend test
1012
ACCEPT_OFFER_ID=$(agoric wallet extract-id --offer accept.json)
1113

12-
# FIXME attest something
13-
yarn @agoric/fast-usdc operator attest --previousOfferId "$ACCEPT_OFFER_ID" >| attest.json
14+
yarn fast-usdc operator attest --previousOfferId="$ACCEPT_OFFER_ID" --forwardingChannel=foo --recipientAddress=agoric1foo --blockHash=0xfoo --blockNumber=1 --chainId=3 --amount=123 --forwardingAddress=noble1foo --sender 0xfoo --txHash=0xtx >| attest.json
1415
cat attest.json
15-
yarn agoric wallet send --offer attest.json --from gov1 --keyring-backend="test"
16+
yarn agoric wallet send --offer attest.json --from agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q --keyring-backend test
17+
18+
# The data above are bogus and result in errors in the logs:
19+
# SwingSet: vat: v72: ----- TxFeed.11 8 publishing evidence { aux: { forwardingChannel: 'foo', recipientAddress: 'agoric1foo' }, blockHash: '0xfoo', blockNumber: 1n, chainId: 3, tx: { amount: 123n, forwardingAddress: 'noble1foo', sender: '0xfoo' }, txHash: '0xtx' } []
20+
# SwingSet: vat: v72: ----- Advancer.15 2 Advancer error: (Error#4)
21+
# SwingSet: vat: v72: Error#4: Data too short

a3p-integration/proposals/f:fast-usdc/test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ set -euo pipefail
33

44
yarn ava
55

6-
# TODO get CLI test passing and part of CI
7-
./test-cli.sh || echo "CLI test failed"
6+
./test-cli.sh

0 commit comments

Comments
 (0)