Skip to content

Conversation

@guibescos
Copy link
Contributor

@guibescos guibescos commented Jan 6, 2023

Scaffolding for a function that proposes an array of instructions as local chain instructions or remote instructions.
I'm hoping to test it once the other pieces are implemented.

The main challenge for this part of the code is batching instructions into transactions. We don't want a ledger user's to have to sign too many transactions. Simultaneously, all instructions might not fit in one transaction.
The current (naive) solution is having 1 instruction per transaction, having the ledger sign all transactions at once and then sending all transactions. This might need to change but don't want to focus on this until we can test it in the UI.

@guibescos guibescos force-pushed the xc-admin/propose-instructions branch from f74f592 to c676db1 Compare January 9, 2023 22:07
@guibescos guibescos marked this pull request as ready for review January 9, 2023 22:55
Copy link
Contributor

@jayantk jayantk left a comment

Choose a reason for hiding this comment

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

I think you may need to refactor this code a bit once you get more stuff written, but I'm going to approve this for now. (I think you'll probably want to develop a systematic organization for the different types of instructions, which will include some representation for remote vs. local instructions. anyway that's something you can do later.)

vault: PublicKey,
instructions: TransactionInstruction[],
remote: boolean,
wormholeAddress?: PublicKey
Copy link
Contributor

Choose a reason for hiding this comment

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

make a class like MultisigWrapper to encapsulate some of the common arguments (squads, wormholeAddress, etc)

@guibescos guibescos merged commit 2a961d5 into main Jan 10, 2023
@guibescos guibescos deleted the xc-admin/propose-instructions branch January 10, 2023 03:46
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