Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/horizon/contracts/interfaces/ITAPCollector.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ interface ITAPCollector is IPaymentsCollector {
bytes signature;
}

/**
* @notice Emitted when a RAV is collected
* @param payer The address of the payer
* @param dataService The address of the data service
* @param serviceProvider The address of the service provider
* @param timestampNs The timestamp of the RAV
* @param valueAggregate The total amount owed to the service provider
* @param metadata Arbitrary metadata
* @param signature The signature of the RAV
*/
event RAVCollected(
address indexed payer,
address indexed dataService,
address indexed serviceProvider,
uint64 timestampNs,
uint128 valueAggregate,
bytes metadata,
bytes signature
);

/**
* Thrown when the caller is not the data service the RAV was issued to
* @param caller The address of the caller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ contract TAPCollector is EIP712, GraphDirectory, ITAPCollector {
}

emit PaymentCollected(paymentType, payer, receiver, tokensToCollect, dataService, tokensDataService);
emit RAVCollected(
payer,
dataService,
receiver,
signedRAV.rav.timestampNs,
signedRAV.rav.valueAggregate,
signedRAV.rav.metadata,
signedRAV.signature
);
return tokensToCollect;
}

Expand Down