[Solana] improve script (#1282)
* Test * Fix idl * Cleanup * Improve script
This commit is contained in:
parent
91c9caee11
commit
3cc017e71b
|
@ -24,7 +24,7 @@ This is because it persists a verified encoded VAA, so guardian signatures will
|
||||||
|
|
||||||
# Devnet deployment
|
# Devnet deployment
|
||||||
|
|
||||||
The program is currently deployed on Devnet with addresses:
|
The program is currently deployed on Devnet and Eclipse Testnet with addresses:
|
||||||
|
|
||||||
- `HDwcJBJXjL9FpJ7UBsYBtaDjsBUhuLCUYoz3zr8SWWaQ` for the Wormhole receiver
|
- `HDwcJBJXjL9FpJ7UBsYBtaDjsBUhuLCUYoz3zr8SWWaQ` for the Wormhole receiver
|
||||||
- `rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ` for the Pyth receiver
|
- `rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ` for the Pyth receiver
|
||||||
|
|
|
@ -18,6 +18,7 @@ use {
|
||||||
pyth_solana_receiver::{
|
pyth_solana_receiver::{
|
||||||
sdk::{
|
sdk::{
|
||||||
deserialize_accumulator_update_data,
|
deserialize_accumulator_update_data,
|
||||||
|
get_treasury_address,
|
||||||
DEFAULT_TREASURY_ID,
|
DEFAULT_TREASURY_ID,
|
||||||
},
|
},
|
||||||
state::config::DataSource,
|
state::config::DataSource,
|
||||||
|
@ -195,9 +196,16 @@ fn main() -> Result<()> {
|
||||||
.data(),
|
.data(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// We need to send some rent to the treasury account, otherwise it won't be able to accept incoming transfers
|
||||||
|
let pay_treasury_rent = system_instruction::transfer(
|
||||||
|
&payer.pubkey(),
|
||||||
|
&get_treasury_address(DEFAULT_TREASURY_ID),
|
||||||
|
Rent::default().minimum_balance(0),
|
||||||
|
);
|
||||||
|
|
||||||
process_transaction(
|
process_transaction(
|
||||||
&rpc_client,
|
&rpc_client,
|
||||||
vec![initialize_pyth_receiver_instruction],
|
vec![initialize_pyth_receiver_instruction, pay_treasury_rent],
|
||||||
&vec![&payer],
|
&vec![&payer],
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue