Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial pass at adding logic to capture the type of xchain message #561

Merged

Conversation

alexanderattar
Copy link
Contributor

@alexanderattar alexanderattar commented Jul 20, 2023

Describe Changes

  • Enables differentiating between NFT and CONTRACT cross chain messages
  • Adds a new function detectCrossChainMessageType that is called within the EventType.CrossChainMessageSent block and the EventType.AvailableOperatorJob blocks of the processSingTransaction function to send the correct type (at the moment either CONTRACT or ERC721) through sqs to the processor
  • Updates BridgeEventPayload to allow passing a crossChainMessageType
  • Adds a separate sqs event type for ContractDeployedEventPayload
  • Includes that as one of the options of payload format in SqsMessageBody

Checklist before requesting a review

  • I have performed a self-review of my code
  • Code styles have been enforced
  • I have checked eslint

@alexanderattar alexanderattar marked this pull request as ready for review July 21, 2023 01:55
@@ -559,13 +586,21 @@ export default class Indexer extends HealthCheck {
const availableOperatorJobEvent: AvailableOperatorJobEvent | null = this.bloomFilters[
type
]!.bloomEvent.decode<AvailableOperatorJobEvent>(type, interestingTransaction.log!)

if (!interestingTransaction.allLogs) {
throw new Error('CrossChainMessageSentEvent has no allLogs')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this actually stop the processes? Or is it caught and continue?

@alexanderattar alexanderattar merged commit 1a28453 into develop Jul 21, 2023
@alexanderattar alexanderattar deleted the feature/HOLO-1054-detect-crosschain-message-type branch July 21, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants