Skip to content

Commit c570b02

Browse files
authored
Merge pull request solana-labs#39 from solendprotocol/WM_null_address
Add a canonical null address
2 parents b51bfa9 + fb9da09 commit c570b02

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

token-lending/cli/src/main.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ fn command_update_reserve(
11641164
reserve.config.fee_receiver = reserve_config.fee_receiver.unwrap();
11651165
}
11661166

1167-
let mut new_pyth_product_pubkey = null_pyth_product_oracle_pubkey();
1167+
let mut new_pyth_product_pubkey = spl_token_lending::null_pubkey();
11681168
if pyth_price_pubkey.is_some() {
11691169
println!(
11701170
"Updating pyth oracle pubkey from {} to {}",
@@ -1257,9 +1257,3 @@ fn quote_currency_of(matches: &ArgMatches<'_>, name: &str) -> Option<[u8; 32]> {
12571257
None
12581258
}
12591259
}
1260-
1261-
/// We need a bogus value to send up when we don't want to change
1262-
/// the oracle addresses.
1263-
pub fn null_pyth_product_oracle_pubkey() -> Pubkey {
1264-
Pubkey::from_str("nu11orac1e111111111111111111111111111111111").unwrap()
1265-
}

token-lending/program/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ pub mod math;
99
pub mod processor;
1010
pub mod pyth;
1111
pub mod state;
12+
use std::str::FromStr;
1213

1314
// Export current sdk types for downstream users building with a different sdk version
1415
pub use solana_program;
1516

1617
solana_program::declare_id!("So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo");
18+
19+
/// null pubkey
20+
pub fn null_pubkey() -> solana_program::pubkey::Pubkey {
21+
solana_program::pubkey::Pubkey::from_str("nu11111111111111111111111111111111111111111").unwrap()
22+
}

0 commit comments

Comments
 (0)