forked from igneous-labs/stakedex-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request igneous-labs#35 from igneous-labs/feat/sanctum-macros
Feat: sanctum-macros for compile-time keys derivation
- Loading branch information
Showing
26 changed files
with
1,342 additions
and
971 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
pub mod lido_program { | ||
solana_program::declare_id!("CrX7kMhLC3cSsXJdT7JDgqrRVWGnUpX3gfEfxxU2NVLi"); | ||
// .\xc3...xd1 = lido state | ||
sanctum_macros::declare_program_keys!( | ||
"CrX7kMhLC3cSsXJdT7JDgqrRVWGnUpX3gfEfxxU2NVLi", | ||
[ | ||
("stake_authority", b".\xc3\x8e\xfaG\x07\x0e\x1f\x83\r)\xbc%\xb8\x18\xa5U`rD\x01{\xdf\x9e\"\x9d\xfab\x18\xa2Y\xd1", b"stake_authority") | ||
] | ||
); | ||
} | ||
|
||
pub mod lido_state { | ||
solana_program::declare_id!("49Yi1TKkNyYjPAFdR9LBvoHcUjuPX4Df5T5yv39w2XTn"); | ||
sanctum_macros::declare_program_keys!("49Yi1TKkNyYjPAFdR9LBvoHcUjuPX4Df5T5yv39w2XTn", []); | ||
} | ||
|
||
pub mod lido_validator_list { | ||
solana_program::declare_id!("GL9kqRNUTUosW3RsDoXHCuXUZn73SgQQmBvtp1ng2co4"); | ||
sanctum_macros::declare_program_keys!("GL9kqRNUTUosW3RsDoXHCuXUZn73SgQQmBvtp1ng2co4", []); | ||
} | ||
|
||
pub mod stsol { | ||
solana_program::declare_id!("7dHbWXmci3dT8UFYWYZweBLXgycu7Y3iL6trKn1Y7ARj"); | ||
sanctum_macros::declare_program_keys!("7dHbWXmci3dT8UFYWYZweBLXgycu7Y3iL6trKn1Y7ARj", []); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
pub mod marinade_program { | ||
solana_program::declare_id!("MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD"); | ||
// u\x11...\xf1 = marinade state addr | ||
sanctum_macros::declare_program_keys!( | ||
"MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD", | ||
[ | ||
("liq_pool_sol_leg", b"u\x11\x9b1u\x80u\x86\xe3\xf4\xa7\xe5\xcd\x0f\x89\x0e\x96\xa7S\xb1\x0f\xcc\xc7h\x1e\x94s\xa0\x082p\xf1", b"liq_sol"), | ||
("liq_pool_msol_leg_authority", b"u\x11\x9b1u\x80u\x86\xe3\xf4\xa7\xe5\xcd\x0f\x89\x0e\x96\xa7S\xb1\x0f\xcc\xc7h\x1e\x94s\xa0\x082p\xf1", b"liq_st_sol_authority"), | ||
("msol_mint_auth", b"u\x11\x9b1u\x80u\x86\xe3\xf4\xa7\xe5\xcd\x0f\x89\x0e\x96\xa7S\xb1\x0f\xcc\xc7h\x1e\x94s\xa0\x082p\xf1", b"st_mint"), | ||
("reserve", b"u\x11\x9b1u\x80u\x86\xe3\xf4\xa7\xe5\xcd\x0f\x89\x0e\x96\xa7S\xb1\x0f\xcc\xc7h\x1e\x94s\xa0\x082p\xf1", b"reserve"), | ||
] | ||
); | ||
} | ||
|
||
pub mod marinade_state { | ||
solana_program::declare_id!("8szGkuLTAux9XMgZ2vtY39jVSowEcpBfFfD8hXSEqdGC"); | ||
sanctum_macros::declare_program_keys!("8szGkuLTAux9XMgZ2vtY39jVSowEcpBfFfD8hXSEqdGC", []); | ||
} | ||
|
||
pub mod msol { | ||
solana_program::declare_id!("mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So"); | ||
sanctum_macros::declare_program_keys!("mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So", []); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
mod lido; | ||
mod marinade; | ||
mod spl_stake_pool_like; | ||
mod stakedex; | ||
mod unstake_it; | ||
|
||
pub use lido::*; | ||
pub use marinade::*; | ||
pub use spl_stake_pool_like::*; | ||
pub use stakedex::*; | ||
pub use unstake_it::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,111 @@ | ||
pub mod cogent_stake_pool { | ||
solana_program::declare_id!("CgntPoLka5pD5fesJYhGmUCF8KU1QS1ZmZiuAuMZr2az"); | ||
sanctum_macros::declare_program_keys!("CgntPoLka5pD5fesJYhGmUCF8KU1QS1ZmZiuAuMZr2az", []); | ||
} | ||
|
||
pub mod cogent_validator_list { | ||
solana_program::declare_id!("CGNTvFQ5yhxp2H5RmmXJ2w3LXJ3kAHrgPMrfABBTkeTr"); | ||
sanctum_macros::declare_program_keys!("CGNTvFQ5yhxp2H5RmmXJ2w3LXJ3kAHrgPMrfABBTkeTr", []); | ||
} | ||
|
||
pub mod cogentsol { | ||
solana_program::declare_id!("CgnTSoL3DgY9SFHxcLj6CgCgKKoTBr6tp4CPAEWy25DE"); | ||
sanctum_macros::declare_program_keys!("CgnTSoL3DgY9SFHxcLj6CgCgKKoTBr6tp4CPAEWy25DE", []); | ||
} | ||
|
||
pub mod daopool_stake_pool { | ||
solana_program::declare_id!("7ge2xKsZXmqPxa3YmXxXmzCp9Hc2ezrTxh6PECaxCwrL"); | ||
sanctum_macros::declare_program_keys!("7ge2xKsZXmqPxa3YmXxXmzCp9Hc2ezrTxh6PECaxCwrL", []); | ||
} | ||
|
||
pub mod daopool_validator_list { | ||
solana_program::declare_id!("CKG4Jci9tGSrZtetnLXuDKV2WqaknFCUX9CY3ahfw2n6"); | ||
sanctum_macros::declare_program_keys!("CKG4Jci9tGSrZtetnLXuDKV2WqaknFCUX9CY3ahfw2n6", []); | ||
} | ||
|
||
pub mod daosol { | ||
solana_program::declare_id!("GEJpt3Wjmr628FqXxTgxMce1pLntcPV4uFi8ksxMyPQh"); | ||
sanctum_macros::declare_program_keys!("GEJpt3Wjmr628FqXxTgxMce1pLntcPV4uFi8ksxMyPQh", []); | ||
} | ||
|
||
pub mod jito_stake_pool { | ||
solana_program::declare_id!("Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb"); | ||
sanctum_macros::declare_program_keys!("Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb", []); | ||
} | ||
|
||
pub mod jito_validator_list { | ||
solana_program::declare_id!("3R3nGZpQs2aZo5FDQvd2MUQ6R7KhAPainds6uT6uE2mn"); | ||
sanctum_macros::declare_program_keys!("3R3nGZpQs2aZo5FDQvd2MUQ6R7KhAPainds6uT6uE2mn", []); | ||
} | ||
|
||
pub mod jitosol { | ||
solana_program::declare_id!("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"); | ||
sanctum_macros::declare_program_keys!("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn", []); | ||
} | ||
|
||
pub mod jpool_stake_pool { | ||
solana_program::declare_id!("CtMyWsrUtAwXWiGr9WjHT5fC3p3fgV8cyGpLTo2LJzG1"); | ||
sanctum_macros::declare_program_keys!("CtMyWsrUtAwXWiGr9WjHT5fC3p3fgV8cyGpLTo2LJzG1", []); | ||
} | ||
|
||
pub mod jpool_validator_list { | ||
solana_program::declare_id!("Ei2LhH2tDKPERnoNjQV5darTToZmbg45vDvftFFLNNWd"); | ||
sanctum_macros::declare_program_keys!("Ei2LhH2tDKPERnoNjQV5darTToZmbg45vDvftFFLNNWd", []); | ||
} | ||
|
||
pub mod jsol { | ||
solana_program::declare_id!("7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn"); | ||
sanctum_macros::declare_program_keys!("7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn", []); | ||
} | ||
|
||
pub mod laine_stake_pool { | ||
solana_program::declare_id!("2qyEeSAWKfU18AFthrF7JA8z8ZCi1yt76Tqs917vwQTV"); | ||
sanctum_macros::declare_program_keys!("2qyEeSAWKfU18AFthrF7JA8z8ZCi1yt76Tqs917vwQTV", []); | ||
} | ||
|
||
pub mod laine_validator_list { | ||
solana_program::declare_id!("sHPN95ARJpwN3Yipc22Z3m5118K3czRLBG7WmLDLsMp"); | ||
sanctum_macros::declare_program_keys!("sHPN95ARJpwN3Yipc22Z3m5118K3czRLBG7WmLDLsMp", []); | ||
} | ||
|
||
pub mod lainesol { | ||
solana_program::declare_id!("LAinEtNLgpmCP9Rvsf5Hn8W6EhNiKLZQti1xfWMLy6X"); | ||
sanctum_macros::declare_program_keys!("LAinEtNLgpmCP9Rvsf5Hn8W6EhNiKLZQti1xfWMLy6X", []); | ||
} | ||
|
||
pub mod risklol_stake_pool { | ||
solana_program::declare_id!("F8h46pYkaqPJNP2MRkUUUtRkf8efCkpoqehn9g1bTTm7"); | ||
sanctum_macros::declare_program_keys!("F8h46pYkaqPJNP2MRkUUUtRkf8efCkpoqehn9g1bTTm7", []); | ||
} | ||
|
||
pub mod risklol_validator_list { | ||
solana_program::declare_id!("3p3pwXkx15WSphpmcQyBqJ235pMVQkLYM9t2faBH1Zix"); | ||
sanctum_macros::declare_program_keys!("3p3pwXkx15WSphpmcQyBqJ235pMVQkLYM9t2faBH1Zix", []); | ||
} | ||
|
||
pub mod risksol { | ||
solana_program::declare_id!("C4kq9QRFLAqwYHK7p4Ez54KMZLZNw2yLsiT3KN4FSmdH"); | ||
sanctum_macros::declare_program_keys!("C4kq9QRFLAqwYHK7p4Ez54KMZLZNw2yLsiT3KN4FSmdH", []); | ||
} | ||
|
||
pub mod socean_program { | ||
solana_program::declare_id!("5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx"); | ||
sanctum_macros::declare_program_keys!("5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx", []); | ||
} | ||
|
||
pub mod socean_stake_pool { | ||
solana_program::declare_id!("5oc4nmbNTda9fx8Tw57ShLD132aqDK65vuHH4RU1K4LZ"); | ||
sanctum_macros::declare_program_keys!("5oc4nmbNTda9fx8Tw57ShLD132aqDK65vuHH4RU1K4LZ", []); | ||
} | ||
|
||
pub mod socean_validator_list { | ||
solana_program::declare_id!("8pTa29ovYHxjQgX7gjxGi395GAo8DSXCRTKJZvwMc6MR"); | ||
sanctum_macros::declare_program_keys!("8pTa29ovYHxjQgX7gjxGi395GAo8DSXCRTKJZvwMc6MR", []); | ||
} | ||
|
||
pub mod scnsol { | ||
solana_program::declare_id!("5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm"); | ||
sanctum_macros::declare_program_keys!("5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm", []); | ||
} | ||
|
||
pub mod solblaze_stake_pool { | ||
solana_program::declare_id!("stk9ApL5HeVAwPLr3TLhDXdZS8ptVu7zp6ov8HFDuMi"); | ||
sanctum_macros::declare_program_keys!("stk9ApL5HeVAwPLr3TLhDXdZS8ptVu7zp6ov8HFDuMi", []); | ||
} | ||
|
||
pub mod solblaze_validator_list { | ||
solana_program::declare_id!("1istpXjy8BM7Vd5vPfA485frrV7SRJhgq5vs3sskWmc"); | ||
sanctum_macros::declare_program_keys!("1istpXjy8BM7Vd5vPfA485frrV7SRJhgq5vs3sskWmc", []); | ||
} | ||
|
||
pub mod bsol { | ||
solana_program::declare_id!("bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1"); | ||
sanctum_macros::declare_program_keys!("bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1", []); | ||
} | ||
|
||
pub mod mrgn_stake_pool { | ||
solana_program::declare_id!("DqhH94PjkZsjAqEze2BEkWhFQJ6EyU6MdtMphMgnXqeK"); | ||
sanctum_macros::declare_program_keys!("DqhH94PjkZsjAqEze2BEkWhFQJ6EyU6MdtMphMgnXqeK", []); | ||
} | ||
|
||
pub mod mrgn_validator_list { | ||
solana_program::declare_id!("77Nc7i2Pe4ktkPVsk2KsZeLZRMUMKpddheBUgW727XR4"); | ||
sanctum_macros::declare_program_keys!("77Nc7i2Pe4ktkPVsk2KsZeLZRMUMKpddheBUgW727XR4", []); | ||
} | ||
|
||
pub mod lst { | ||
solana_program::declare_id!("LSTxxxnJzKDFSLr4dUkPcmCf5VyryEqzPLz5j4bpxFp"); | ||
sanctum_macros::declare_program_keys!("LSTxxxnJzKDFSLr4dUkPcmCf5VyryEqzPLz5j4bpxFp", []); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pub mod stakedex_program { | ||
sanctum_macros::declare_program_keys!( | ||
"stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq", | ||
[("sol-bridge-out", b"sol_bridge_out")] | ||
); | ||
} | ||
|
||
pub mod wsol_bridge_in { | ||
sanctum_macros::create_with_seed!( | ||
"75jTZDE78xpBJokeB2BcimRNY5BZ7U45bWhpgUrTzWZC", | ||
"wsol_bridge_in", | ||
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
pub mod unstake_it_program { | ||
solana_program::declare_id!("unpXTU2Ndrc7WWNyEhQWe4udTzSibLPi25SXv2xbCHQ"); | ||
// \xde\...\xc6 = unstakeit pool | ||
sanctum_macros::declare_program_keys!( | ||
"unpXTU2Ndrc7WWNyEhQWe4udTzSibLPi25SXv2xbCHQ", | ||
[ | ||
("sol_reserves", b"\xde\x91\xbbP4tnb;\xfb6\xb7=\xae\"\xa4\x83\xb7\xcf\'\xd2\xad\x83\xfa\x8cx\x05\xa6\xcc`+\xc6"), | ||
("fee", b"\xde\x91\xbbP4tnb;\xfb6\xb7=\xae\"\xa4\x83\xb7\xcf\'\xd2\xad\x83\xfa\x8cx\x05\xa6\xcc`+\xc6", b"fee"), | ||
("protocol_fee", b"protocol-fee") | ||
] | ||
); | ||
} | ||
|
||
pub mod unstake_it_pool { | ||
solana_program::declare_id!("FypPtwbY3FUfzJUtXHSyVRokVKG2jKtH29FmK4ebxRSd"); | ||
sanctum_macros::declare_program_keys!("FypPtwbY3FUfzJUtXHSyVRokVKG2jKtH29FmK4ebxRSd", []); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
mod calc; | ||
mod consts; | ||
mod liq_pool; | ||
mod stakedex_traits; | ||
mod state; | ||
mod validator_system; | ||
|
Oops, something went wrong.