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

feat: add initial cli #520

Merged
merged 8 commits into from
Sep 4, 2024
Merged

feat: add initial cli #520

merged 8 commits into from
Sep 4, 2024

Conversation

keyvankhademi
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Sep 3, 2024

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

Name Status Preview Comments Updated (UTC)
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 4:06pm
staking-devnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 4:06pm

bytemuck = {version = "1.4.0", features = ["derive", "min_const_generics"]}
byteorder = "1.4.3"
wormhole-vaas-serde = "0.1.0"
wormhole-solana-vaas = {version="0.3.0-alpha.1", features = ["anchor", "encoded-vaa", "mainnet"]}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this dep is unused

wormhole-vaas-serde = "0.1.0"
wormhole-solana-vaas = {version="0.3.0-alpha.1", features = ["anchor", "encoded-vaa", "mainnet"]}
serde_wormhole = "0.1.0"
serde_json = "1.0.125"
Copy link
Contributor

Choose a reason for hiding this comment

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

unused

wormhole-solana-vaas = {version="0.3.0-alpha.1", features = ["anchor", "encoded-vaa", "mainnet"]}
serde_wormhole = "0.1.0"
serde_json = "1.0.125"
solana-cli-output = "1.18.16"
Copy link
Contributor

Choose a reason for hiding this comment

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

unused

serde_wormhole = "0.1.0"
serde_json = "1.0.125"
solana-cli-output = "1.18.16"
spl-governance = { version = "4.0.0", features = ["no-entrypoint"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

unused

solana-client = "1.18.0"
shellexpand = "3.1.0"
pythnet-sdk = {version = "2.3.0", features = ["test-utils"]}
bytemuck = {version = "1.4.0", features = ["derive", "min_const_generics"]}
Copy link
Contributor

Choose a reason for hiding this comment

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

unused

wormhole: Pubkey,
},
InitializePoolRewardCustody {},
UpdatePythTokenMint {
Copy link
Contributor

Choose a reason for hiding this comment

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

as said in the other pr I don't feel good keeping this instruction around

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

data: wormhole_core_bridge_solana::instruction::VerifyEncodedVaaV1 {}.data(),
};

process_transaction(
Copy link
Contributor

Choose a reason for hiding this comment

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

note: on mainnet, the vaa is bigger so we'll need to do this in multiple transactions like in write_publisher_caps, but we can fix that once we need it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good.

let encoded_vaa = process_write_encoded_vaa(rpc_client, vaa.as_slice(), wormhole, payer);


let publisher_caps = Keypair::new();
Copy link
Contributor

Choose a reason for hiding this comment

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

init_publisher_caps could return the pubkey for publisher_caps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

let chunk =
&publisher_caps_message_bytes[i..min(i + 1000, publisher_caps_message_bytes.len())];

write_publisher_caps(rpc_client, payer, publisher_caps.pubkey(), i, chunk);
Copy link
Contributor

Choose a reason for hiding this comment

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

feels like init_puiblisher_caps + write_publisher_caps and verify_publisher_caps should all be in 1 function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they are all used in a function fetch_publisher_caps_and_advance

Base automatically changed from update-mint to main September 4, 2024 15:36
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.

2 participants