Skip to content

Store payments in the state in addition / instead of events #27

@dmytrotkk

Description

@dmytrotkk

Is your feature request related to a problem? Please describe.

Currently, the only way to retrieve payment information about past credit purchases is to scan the blockchain for PaymentReceived event, which makes it extra complicated to get the required info.

Describe the solution you'd like

Ideally, we should store payment info in the contract state with the following getters:

  • get the current max payment id (for all addresses)
  • get payment ids for an address
  • get payment by id

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions