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 bridge::{
|
||||
api::ForeignAddress,
|
||||
types::BridgeData,
|
||||
vaa::{
|
||||
DeserializePayload,
|
||||
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 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 ConfigAccount<'b, const State: AccountState> =
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use crate::{
|
||||
accounts::{
|
||||
ConfigAccount,
|
||||
CoreBridge,
|
||||
EmitterAccount,
|
||||
SplTokenMeta,
|
||||
SplTokenMetaDerivationData,
|
||||
|
@ -77,7 +78,7 @@ pub struct AttestToken<'b> {
|
|||
pub spl_metadata: SplTokenMeta<'b>,
|
||||
|
||||
/// CPI Context
|
||||
pub bridge: Mut<Bridge<'b, { AccountState::Initialized }>>,
|
||||
pub bridge: Mut<CoreBridge<'b, { AccountState::Initialized }>>,
|
||||
|
||||
/// Account to store the posted message
|
||||
pub message: Signer<Mut<Info<'b>>>,
|
||||
|
|
|
@ -2,6 +2,7 @@ use crate::{
|
|||
accounts::{
|
||||
AuthoritySigner,
|
||||
ConfigAccount,
|
||||
CoreBridge,
|
||||
CustodyAccount,
|
||||
CustodyAccountDerivationData,
|
||||
CustodySigner,
|
||||
|
@ -81,7 +82,7 @@ pub struct TransferNative<'b> {
|
|||
pub custody_signer: CustodySigner<'b>,
|
||||
|
||||
/// CPI Context
|
||||
pub bridge: Mut<Bridge<'b, { AccountState::Initialized }>>,
|
||||
pub bridge: Mut<CoreBridge<'b, { AccountState::Initialized }>>,
|
||||
|
||||
/// Account to store the posted message
|
||||
pub message: Signer<Mut<Info<'b>>>,
|
||||
|
@ -230,7 +231,7 @@ pub struct TransferWrapped<'b> {
|
|||
pub authority_signer: AuthoritySigner<'b>,
|
||||
|
||||
/// CPI Context
|
||||
pub bridge: Mut<Bridge<'b, { AccountState::Initialized }>>,
|
||||
pub bridge: Mut<CoreBridge<'b, { AccountState::Initialized }>>,
|
||||
|
||||
/// Account to store the posted message
|
||||
pub message: Signer<Mut<Info<'b>>>,
|
||||
|
|
Loading…
Reference in New Issue