hedera-smart-contracts icon indicating copy to clipboard operation
hedera-smart-contracts copied to clipboard

Define ReadableAirdropStore and WritableAirdropStore interfaces and provide implementations for them

Open vtronkov opened this issue 9 months ago • 0 comments

  • Add the following classes in hedera-token-service-impl:
  • ReadableAirdropStore interface
  • ReadableAirdropStoreImpl that would implement ReadableAirdropStore, holding ReadableKVState<PendingAirdropId, PendingAirdropValue> airdropsState as a field and implement the interface's methods
  • WritableAirdropStore that would extend ReadableAirdropStoreImpl and implement the put and remove methods
  • When implementing the put method - if there is already an existing airdrop for a user make sure to sub the tokens for that user. E.g. user A sends user B 10 tokens. Then it sends another 5 - the total tokens should be 15.
  • Define the new readable store in ReadableStoreFactory
  • Define the new writable store in WritableStoreFactory

For more context read: https://github.com/hashgraph/hedera-services/pull/12792

vtronkov avatar May 22 '24 09:05 vtronkov