|
@@ -16,12 +16,18 @@ pub mod relations_derivation {
|
|
|
ctx.accounts.account.bump = ctx.bumps.account;
|
|
|
Ok(())
|
|
|
}
|
|
|
+
|
|
|
pub fn test_relation(_ctx: Context<TestRelation>) -> Result<()> {
|
|
|
Ok(())
|
|
|
}
|
|
|
+
|
|
|
pub fn test_seed_constant(_ctx: Context<TestSeedConstant>) -> Result<()> {
|
|
|
Ok(())
|
|
|
}
|
|
|
+
|
|
|
+ pub fn test_address_relation(_ctx: Context<TestAddressRelation>) -> Result<()> {
|
|
|
+ Ok(())
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#[derive(Accounts)]
|
|
@@ -80,6 +86,14 @@ pub struct TestSeedConstant<'info> {
|
|
|
system_program: Program<'info, System>,
|
|
|
}
|
|
|
|
|
|
+#[derive(Accounts)]
|
|
|
+pub struct TestAddressRelation<'info> {
|
|
|
+ #[account(address = my_account.my_account)]
|
|
|
+ account: UncheckedAccount<'info>,
|
|
|
+ #[account(seeds = [b"seed"], bump = my_account.bump)]
|
|
|
+ my_account: Account<'info, MyAccount>,
|
|
|
+}
|
|
|
+
|
|
|
#[account]
|
|
|
pub struct MyAccount {
|
|
|
pub my_account: Pubkey,
|