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 for Fast USDC transfer #10339

Open
turadg opened this issue Oct 25, 2024 · 1 comment · May be fixed by #10717
Open

CLI for Fast USDC transfer #10339

turadg opened this issue Oct 25, 2024 · 1 comment · May be fixed by #10717
Assignees
Labels
enhancement New feature or request

Comments

@turadg
Copy link
Member

turadg commented Oct 25, 2024

What is the Problem Being Solved?

We need a way to validate that a web app like Noble Express can be used with the rest of Fast USDC to achieve the user's aims. In particular, what the UI has to do to get the transaction onto the Ethereum ledger such that Noble x/forwarding will work.

We'll validate it by building a real (but unpolished) CLI for initiating a fast transfer.

Description of the Design

CLI version of the Fast USDC end user workflow.

Add a transfer command to fast-usdc cli

  • user can request a transfer of USDC to their EUD (always use FU)
  • app prints progress until the EUD has received the funds
  • app reports time taken

Operation to calculate Noble address

  • From vstorage fetch the address of the LCA that Fast USDC uses for staging transfers
  • Get address from user (e.g. dydx1blablah)
  • Supplement LCA address with destination address to create a routing virtual address: agoric1+
  • Use (unreleased) Noble x/forwarding ability to predetermine the noble1 forwarding address for the agoric1 address
  • Ask user to sign a transfer to that noble1 address, with the above assurances

It can be used in CI, either by CLI or be importing the modules that power the CLI.

  • Assume CI will have reachable instances of RPC for Ethereum, Noble, Agoric, EUD chain

Security Considerations

n/a, testing

Scaling Considerations

n/a, testing

Test Plan

Upgrade Considerations

@turadg turadg changed the title Working prototype of Noble Express CLI for Fast USDC transfer Oct 25, 2024
mergify bot added a commit that referenced this issue Nov 14, 2024
refs #10339

## Description

- Adds a `config` command for setting all the required variables relating to IBC channels, mnemonics, rpc endpoints, etc.
- Adds a `transfer` command for simulating the Noble Express frontend. It accepts an end user cosmos address destination, and a USDC amount as args. TODO: It should query the agoric Fast USDC LCA address, but for now it just stubs a hardcoded address there, because I'm not sure what the query should look like.
- Also TODO, add a command to query the status of pending transfers

### Documentation Considerations
Tried to make the `help` command as self-documenting as possible

### Testing Considerations
Manually tested on testnets with testnet tokens that:
- It queries the noble forwarding address for the "agoricXXX?EUD=dydxYYY" address 
- It registers the forwarding address on noble if it doesn't exist yet (I tested on noble mainnet for this part actually, not testnet)
- It sends a depositForBurn txn on ethereum (I used sepolia testnet) with the correctly encoded noble address: https://sepolia.etherscan.io/tx/0xde6d7ea6a6d2737e67524dca70372610c5ac0476d75d4c30fc4270e89e36de77

I put the config used for that test run in `demo/testnet` for reference.

Added unit tests for all the config stuff, but didn't unit test "transfer" yet. Maybe e2e tests would be better for that part...

### Upgrade Considerations
The CLI is a client program and doesn't need to be upgraded in production.
@LuqiPan LuqiPan added the enhancement New feature or request label Dec 2, 2024
@samsiegart
Copy link
Contributor

samsiegart commented Dec 9, 2024

@turadg I talked with @LuqiPan about this. We are thinking the "app prints progress until the EUD has received the funds" part needn't be too granular, because we're probably just going to show a rough time estimate until it completes in the actual UI. The CLI already sends the transfer (#10437), but doesn't track anything. I think at minimum though, it should report when the EUD receives the funds. Does that sound like reasonable acceptance criteria? I anticipate this feature will need to be updated after #10614 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants