-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs: #10567 ## Description This sets up a CLI for transaction oracle operators. It has tests but I don't expect them to pass yet. I think this is worth landing to get the CLI scaffolded and the refactorings of agoric-cli to client-utils that support it. In particular moving the `AGORIC_NET` convention down to `client-utils` in a cli.js module and other network config helpers in network-config.js. It will also help to DRY out the 'test-lib' code in a3p proposals that was copied from agoric-cli (e.g. `rpc.js`) cc @anilhelvaci ### Security Considerations agoric-cli will source its network config lookup function from another package. That's a potential supply chain weakness but it's the same org as the agoric-cli and it's very unlikely only one would be compromised if either were. ### Scaling Considerations none ### Documentation Considerations Includes CLI help and a demonstration test ### Testing Considerations I added a test that runs in CI but doesn't cause a failure so that this can live in master while we build it out ### Upgrade Considerations none
- Loading branch information
Showing
42 changed files
with
379 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,6 @@ | |
"@agoric/synthetic-chain": "^0.4.3", | ||
"@types/better-sqlite3": "^7.6.11" | ||
}, | ||
"packageManager": "[email protected].1", | ||
"packageManager": "[email protected].3", | ||
"license": "Apache-2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# FIXME these commands are run against the `@agoric/fast-usdc` pulled from NPM | ||
# but should be run against the local SDK. The `yarn link` command described in | ||
# a3p-integration/README.md is supposed to make that work but it's not working. | ||
|
||
yarn @agoric/fast-usdc operator accept >| accept.json | ||
cat accept.json | ||
yarn agoric wallet send --offer accept.json --from gov1 --keyring-backend="test" | ||
ACCEPT_OFFER_ID=$(agoric wallet extract-id --offer accept.json) | ||
|
||
# FIXME attest something | ||
yarn @agoric/fast-usdc operator attest --previousOfferId "$ACCEPT_OFFER_ID" >| attest.json | ||
cat attest.json | ||
yarn agoric wallet send --offer attest.json --from gov1 --keyring-backend="test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
#!/bin/bash | ||
yarn ava | ||
|
||
# TODO get CLI test passing and part of CI | ||
./test-cli.sh || echo "CLI test failed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
"scripts": { | ||
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops" | ||
}, | ||
"packageManager": "[email protected].1", | ||
"packageManager": "[email protected].3", | ||
"devDependencies": { | ||
"eslint": "^8.57.0", | ||
"npm-run-all": "^4.1.5", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
"ava": { | ||
"concurrency": 1 | ||
}, | ||
"packageManager": "[email protected].1", | ||
"packageManager": "[email protected].3", | ||
"devDependencies": { | ||
"@types/node": "^22.0.0" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ | |
"scripts": { | ||
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops" | ||
}, | ||
"packageManager": "[email protected].1", | ||
"packageManager": "[email protected].3", | ||
"devDependencies": { | ||
"eslint": "^8.57.0", | ||
"npm-run-all": "^4.1.5", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.