go icon indicating copy to clipboard operation
go copied to clipboard

services/soroban-rpc: getAccount method v2 (balances)

Open paulbellamy opened this issue 3 years ago • 0 comments

Building on the jsonrpc getAccount method in #4556. The getAccount method should include the account's balances. The complication with balances is smart/classic.

We need to decide what to do about smart vs classic asset balances so that assets don't "disappear" when bridging between smart/classic. There are a few "host functions" in the soroban runtime, which move assets between their "classic" representations (which can be used by stellar as-is), and their "smart" representations (which can be used by smart contracts). This basically means that users now have 2 balances for each asset. We should figure out how to handle this in Horizon.

Some options:

  1. Ignore it. Not very compelling and will drive user support as their assets "disappear" on horizon when they move it to a smart contract.
  2. Get their assets from the smart contract ledger entries, and: a. Add it into the classic balance. This would keep the API the same. b. Show two separate balances. This is the most explicit, but changes the API.

paulbellamy avatar Sep 01 '22 11:09 paulbellamy