Don't verify core bridge config in token bridge
This is checked when we do CPI calls and did not work since derive is using ctx.this as context address Change-Id: Ie8fefedb40c3c5eb4966bb0b85f207a40e0fe3be
This commit is contained in:
parent
44cb47c2d8
commit
d95e38da47
|
@ -1,6 +1,7 @@
|
||||||
use crate::types::*;
|
use crate::types::*;
|
||||||
use bridge::{
|
use bridge::{
|
||||||
api::ForeignAddress,
|
api::ForeignAddress,
|
||||||
|
types::BridgeData,
|
||||||
vaa::{
|
vaa::{
|
||||||
DeserializePayload,
|
DeserializePayload,
|
||||||
PayloadMessage,
|
PayloadMessage,
|
||||||
|
@ -16,6 +17,8 @@ pub type AuthoritySigner<'b> = Derive<Info<'b>, "authority_signer">;
|
||||||
pub type CustodySigner<'b> = Derive<Info<'b>, "custody_signer">;
|
pub type CustodySigner<'b> = Derive<Info<'b>, "custody_signer">;
|
||||||
pub type MintSigner<'b> = Derive<Info<'b>, "mint_signer">;
|
pub type MintSigner<'b> = Derive<Info<'b>, "mint_signer">;
|
||||||
|
|
||||||
|
pub type CoreBridge<'a, const State: AccountState> = Data<'a, BridgeData, { State }>;
|
||||||
|
|
||||||
pub type EmitterAccount<'b> = Derive<Info<'b>, "emitter">;
|
pub type EmitterAccount<'b> = Derive<Info<'b>, "emitter">;
|
||||||
|
|
||||||
pub type ConfigAccount<'b, const State: AccountState> =
|
pub type ConfigAccount<'b, const State: AccountState> =
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
accounts::{
|
accounts::{
|
||||||
ConfigAccount,
|
ConfigAccount,
|
||||||
|
CoreBridge,
|
||||||
EmitterAccount,
|
EmitterAccount,
|
||||||
SplTokenMeta,
|
SplTokenMeta,
|
||||||
SplTokenMetaDerivationData,
|
SplTokenMetaDerivationData,
|
||||||
|
@ -77,7 +78,7 @@ pub struct AttestToken<'b> {
|
||||||
pub spl_metadata: SplTokenMeta<'b>,
|
pub spl_metadata: SplTokenMeta<'b>,
|
||||||
|
|
||||||
/// CPI Context
|
/// CPI Context
|
||||||
pub bridge: Mut<Bridge<'b, { AccountState::Initialized }>>,
|
pub bridge: Mut<CoreBridge<'b, { AccountState::Initialized }>>,
|
||||||
|
|
||||||
/// Account to store the posted message
|
/// Account to store the posted message
|
||||||
pub message: Signer<Mut<Info<'b>>>,
|
pub message: Signer<Mut<Info<'b>>>,
|
||||||
|
|
|
@ -2,6 +2,7 @@ use crate::{
|
||||||
accounts::{
|
accounts::{
|
||||||
AuthoritySigner,
|
AuthoritySigner,
|
||||||
ConfigAccount,
|
ConfigAccount,
|
||||||
|
CoreBridge,
|
||||||
CustodyAccount,
|
CustodyAccount,
|
||||||
CustodyAccountDerivationData,
|
CustodyAccountDerivationData,
|
||||||
CustodySigner,
|
CustodySigner,
|
||||||
|
@ -81,7 +82,7 @@ pub struct TransferNative<'b> {
|
||||||
pub custody_signer: CustodySigner<'b>,
|
pub custody_signer: CustodySigner<'b>,
|
||||||
|
|
||||||
/// CPI Context
|
/// CPI Context
|
||||||
pub bridge: Mut<Bridge<'b, { AccountState::Initialized }>>,
|
pub bridge: Mut<CoreBridge<'b, { AccountState::Initialized }>>,
|
||||||
|
|
||||||
/// Account to store the posted message
|
/// Account to store the posted message
|
||||||
pub message: Signer<Mut<Info<'b>>>,
|
pub message: Signer<Mut<Info<'b>>>,
|
||||||
|
@ -230,7 +231,7 @@ pub struct TransferWrapped<'b> {
|
||||||
pub authority_signer: AuthoritySigner<'b>,
|
pub authority_signer: AuthoritySigner<'b>,
|
||||||
|
|
||||||
/// CPI Context
|
/// CPI Context
|
||||||
pub bridge: Mut<Bridge<'b, { AccountState::Initialized }>>,
|
pub bridge: Mut<CoreBridge<'b, { AccountState::Initialized }>>,
|
||||||
|
|
||||||
/// Account to store the posted message
|
/// Account to store the posted message
|
||||||
pub message: Signer<Mut<Info<'b>>>,
|
pub message: Signer<Mut<Info<'b>>>,
|
||||||
|
|
Loading…
Reference in New Issue