-
Notifications
You must be signed in to change notification settings - Fork 0
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
Axelar Relayer 1st version #5
Conversation
…r and axelar event processor and add prisma.
Process gateway call contract event and save data into database.
Collect gas service fees & check wallet balance cron
Process axelar chain events & trigger gateway execute transaction
Process contract call approved event & send MultiversX transactions
Updates for new amplifier api grpc definition.
apps/axelar-event-processor/src/approvals-processor/approvals.processor.service.ts
Outdated
Show resolved
Hide resolved
apps/axelar-event-processor/src/approvals-processor/approvals.processor.service.ts
Show resolved
Hide resolved
|
||
const txHash = await this.transactionsHelper.signAndSendTransaction(transaction, this.walletSigner); | ||
|
||
await this.redisCacheService.set<PendingTransaction>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just nitpicking and maybe overthinking it, but what happens if Redis crashes and the transaction went through? - or what happens if we execute multiple times with the same executeData
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is safe to re-execute a transaction since the contract keeps track internally of which commands are executed. We use Redis to retry the transaction in case it fails since I found this to be the easiest way.
Theoretically the executeData
received will lead to a successful transaction, the only reason this can fail is because of out of gas in case transaction/cost
api does not work properly, hence the increasing gas costs for each retry.
This supports:
For reference:
https://docs.axelar.dev/learn/network/flow
https://github.com/buidly/sc-axelar-cgp-rs/blob/develop/gateway/README.md