hedera-smart-contracts
hedera-smart-contracts copied to clipboard
Define ReadableAirdropStore and WritableAirdropStore interfaces and provide implementations for them
- Add the following classes in
hedera-token-service-impl
: -
ReadableAirdropStore
interface -
ReadableAirdropStoreImpl
that would implementReadableAirdropStore
, holdingReadableKVState<PendingAirdropId, PendingAirdropValue> airdropsState
as a field and implement the interface's methods -
WritableAirdropStore
that would extendReadableAirdropStoreImpl
and implement theput
andremove
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