omgnetwork / omg-js

JavaScript Library for communication with OMG network
Apache License 2.0
42 stars 15 forks source link

Get exit information helper #285

Open nicholasmueller opened 4 years ago

nicholasmueller commented 4 years ago

new feature request to get exits and its information by wallet address

something like: rootChain.getExits(address: string): IExit[]

IExit = {
  status: ‘Pending’ | ‘Exited’
  token: string
  exitId: string
  exitableAt: string
  priority: string
}
nicholasmueller commented 4 years ago

blocked on this issue: https://github.com/omisego/plasma-contracts/issues/573

main issue being it is currently impossible to associate an exit id with the token associated with that exit. without additional information from the exit event, or a helper api, you would have to get information from all contract events and run filtering on the client, which can overflow memory if there are a lot of large transaction data, which is highly likely.