Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
325 stars 205 forks source link

orchestration - ICA Controller - deposit payment to ICA #9193

Open 0xpatrickdev opened 5 months ago

0xpatrickdev commented 5 months ago
  1. As new user of an orchestration contract, I need to “deposit” (move) my fungible funds into a place controlled by orchestration so it can do things with it.

    • for assets starting on Agoric in a smart-wallet

      • Only chains available through vbank (by BLD stakers)
    • for assets starting on a remote Cosmos chain [into an agoric-controlled-ICA on the same remote chain]

  2. As a user of an orchestration contract, I need to withdraw assets from a LocalChain Account and ICA into my smart wallet

    ### Tasks
    - [ ] https://github.com/Agoric/agoric-sdk/issues/9784
    - [ ] https://github.com/Agoric/agoric-sdk/issues/9925
0xpatrickdev commented 5 months ago

The way I currently imagine this might work - is with an LCA and IBC Transfer:

dckc commented 5 months ago

this only works for brands that are registered in the vbank by BLD staker governance. Does that suffice?

   const allegedPurse = E(bankAcct).getPurse(allegedBrand); 

p.s. see #9211

dckc commented 5 months ago

(tangential...)

   const allegedPurse = E(bankAcct).getPurse(allegedBrand); 

"alleged" seems misused there. The caller relies on the bankManager, right? it's not in a position to be suspicious of it. Seems like the result of getPurse has to be presumed correct.