Skip to content

Conversation

@jayantk
Copy link
Contributor

@jayantk jayantk commented Jun 23, 2023

Two small updates:

  1. Flag to avoid sending duplicate transactions. This is a different approach to avoiding concurrent transactions that's sup-specific, as opposed to the previous await PR (which i closed).
  2. CLI flag to set the maximum number of VAAs that can be included in a single sui PTB. At the moment, the SUI cost of our PTBs grows superlinearly with the number VAAs, so we want to split price updates into multiple PTBs to keep the costs down.

@vercel
Copy link

vercel bot commented Jun 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) Jun 23, 2023 3:47pm
xc-admin-frontend ⬜️ Ignored (Inspect) Jun 23, 2023 3:47pm

}

const vaas = await this.priceServiceConnection.getLatestVaas(priceIds);
const vaaToPriceFeedIds: Record<string, string[]> = {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

In general I prefer Map over Record as it's less JS black magic.

Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

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

Looks good to me. I understand the rationale behind it. Breaking down updates into multiple updates is only possible because we don't override a transaction and we want (and ignore). Maybe it's good to right down the assumptions somewhere in the file.

for me and @0xfirefist It's good if we do it for other networks in another PR too, there are some unintuitive important tricks per network that can easily go out of hand.

@jayantk jayantk merged commit 742c37e into main Jun 23, 2023
@jayantk jayantk deleted the sui_pusher_ptb branch June 23, 2023 16:20
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