Remove hardcoded instances of the bridge pubkey in the program
Change-Id: I42bc36fa9db650b9cab6c6ac4c8e7c969487a40f
This commit is contained in:
parent
86cd27c919
commit
3fb493cb23
|
@ -7,7 +7,6 @@ use solana_program::{
|
||||||
pubkey::Pubkey,
|
pubkey::Pubkey,
|
||||||
sysvar,
|
sysvar,
|
||||||
};
|
};
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
use byteorder::{
|
use byteorder::{
|
||||||
BigEndian,
|
BigEndian,
|
||||||
|
@ -246,8 +245,6 @@ pub fn upgrade_contract(
|
||||||
&solana_program::bpf_loader_upgradeable::id(),
|
&solana_program::bpf_loader_upgradeable::id(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let own_address = Pubkey::from_str("Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o").unwrap();
|
|
||||||
|
|
||||||
Instruction {
|
Instruction {
|
||||||
program_id,
|
program_id,
|
||||||
|
|
||||||
|
@ -260,7 +257,7 @@ pub fn upgrade_contract(
|
||||||
AccountMeta::new(spill, false),
|
AccountMeta::new(spill, false),
|
||||||
AccountMeta::new(new_contract, false),
|
AccountMeta::new(new_contract, false),
|
||||||
AccountMeta::new(program_data, false),
|
AccountMeta::new(program_data, false),
|
||||||
AccountMeta::new(own_address, false),
|
AccountMeta::new(program_id, false),
|
||||||
AccountMeta::new_readonly(sysvar::rent::id(), false),
|
AccountMeta::new_readonly(sysvar::rent::id(), false),
|
||||||
AccountMeta::new_readonly(sysvar::clock::id(), false),
|
AccountMeta::new_readonly(sysvar::clock::id(), false),
|
||||||
AccountMeta::new_readonly(solana_program::bpf_loader_upgradeable::id(), false),
|
AccountMeta::new_readonly(solana_program::bpf_loader_upgradeable::id(), false),
|
||||||
|
|
|
@ -41,7 +41,6 @@ use std::{
|
||||||
Deref,
|
Deref,
|
||||||
DerefMut,
|
DerefMut,
|
||||||
},
|
},
|
||||||
str::FromStr,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Default, BorshSerialize, BorshDeserialize, Serialize, Deserialize)]
|
#[derive(Default, BorshSerialize, BorshDeserialize, Serialize, Deserialize)]
|
||||||
|
@ -199,9 +198,7 @@ pub struct PostedMessageData {
|
||||||
|
|
||||||
impl Owned for PostedMessage {
|
impl Owned for PostedMessage {
|
||||||
fn owner(&self) -> AccountOwner {
|
fn owner(&self) -> AccountOwner {
|
||||||
AccountOwner::Other(
|
AccountOwner::This
|
||||||
Pubkey::from_str("Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o").unwrap(),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue