Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI testing tools for PSM #5119

Closed
rowgraus opened this issue Apr 15, 2022 · 10 comments · Fixed by #6176
Closed

CLI testing tools for PSM #5119

rowgraus opened this issue Apr 15, 2022 · 10 comments · Fixed by #6176
Assignees
Labels
Dapp & UI Support Inter-protocol Overarching Inter Protocol
Milestone

Comments

@rowgraus
Copy link

No description provided.

@Tartuffo Tartuffo added this to the Mainnet 1 milestone Apr 18, 2022
@Tartuffo Tartuffo added Dapp & UI Support Inter-protocol Overarching Inter Protocol labels May 2, 2022
@Tartuffo Tartuffo removed this from the Mainnet 1 milestone Jul 20, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 RC0 milestone Aug 20, 2022
@dckc dckc changed the title Functional UI for PSM Functional UI / CLI for PSM Aug 22, 2022
@dckc dckc changed the title Functional UI / CLI for PSM Functional CLI for PSM Aug 22, 2022
@dckc dckc assigned dckc and unassigned rowgraus and samsiegart Aug 22, 2022
@dckc
Copy link
Member

dckc commented Aug 27, 2022

Installation: npm install @agoric/psm-tool?

My current draft is a script inside the agoric-sdk, under packages/inter-protocol/scripts.
But it's a stand-alone script that doesn't rely on the inter-protocol package nor anything else in the SDK.
We could distribute it as a single file that folks just download and run. But I think supporting npm install
is more what the relevant audience expects.

name: psm-tool?

Is psm-tool an adequate name?

features

The features I have prototyped are:

  • get contract info: boardId, fee parameters
    • bug: assumes 1 PSM whose reference / anchor asset was registered as AUSD
    • bug: limited to xnet, ollienet, or a locally running node
  • get wallet info: balances, in-progress offers (same bug about network limitations)
  • format a "wallet action" for a trade (for use with agd to sign and submit the transaction)

@dckc
Copy link
Member

dckc commented Aug 28, 2022

Use cosmjs to avoid agd dependency?

While having a single-file script with no dependencies is nice, it doesn't actually allow users to trade unless they build / install agd. Perhaps it's worth using cosmjs to fill in the gap... though that raises a question of key management.

@dckc dckc added the pso label Aug 31, 2022
@dckc
Copy link
Member

dckc commented Aug 31, 2022

Managing this on an agoric-sdk branch is awkward because I want to use it to test other branches.

a recent version:
https://gist.github.com/dckc/dfc2182a59b11ec4527349afd5ca050f#file-psm-tool-js

cc @gibson042

@Tartuffo Tartuffo changed the title Functional CLI for PSM CLI testing tools for PSM Sep 2, 2022
@Tartuffo
Copy link
Contributor

Tartuffo commented Sep 2, 2022

@dckc has built various tools for this.

@Tartuffo Tartuffo closed this as completed Sep 2, 2022
@dckc
Copy link
Member

dckc commented Sep 6, 2022

in discussion with @dtribble , we do want a CLI in the product for performance testing etc.; not necessarily for PSM RC0

@dckc dckc reopened this Sep 6, 2022
@dckc
Copy link
Member

dckc commented Sep 6, 2022

sounds like @mhofman is doing a mult-trade tool

@mhofman
Copy link
Member

mhofman commented Sep 6, 2022

This is a complete hack based on importing the mnemonic of an "ag-solo", and creating a Cosm.js signing wallet. I would not consider this as a general purpose tool.

@dckc
Copy link
Member

dckc commented Sep 6, 2022

complete hacks are completely fair game here.

@turadg turadg self-assigned this Sep 8, 2022
@turadg
Copy link
Member

turadg commented Sep 8, 2022

Work to close this out:

  • understand the update stream from new smart wallet
  • ? coalesce updates from before the tool ran
  • make it part of agoric-cli

@dckc
Copy link
Member

dckc commented Sep 8, 2022

@turadg feel free to take or leave the psm-tool code in #6015

Ari's ask is for a way to tell when a trade is done. The psm-tool can be used to poll for the status of offers given an address. A "wait until offer XXX is done" feature would probably be nice (the tool would poll at, say, Nyquist frequency of the block time, so every 3sec.)

The other repo we were talking about is https://github.com/Agoric/psmload
where we find a copy of an older version: https://github.com/Agoric/psmload/blob/main/psm-tool.js

@turadg turadg unassigned mhofman and dckc Sep 8, 2022
@mergify mergify bot closed this as completed in #6176 Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dapp & UI Support Inter-protocol Overarching Inter Protocol
Projects
None yet
6 participants