Circle CCTP Token Messenger v2 decoder
Decode Circle CCTP Token Messenger v2 instructions, accounts and events in Rust with the carbon-circle-token-messenger-v2-decoder crate.
On this page
carbon-circle-token-messenger-v2-decoder decodes the instructions, accounts and events of the Circle CCTP Token Messenger v2 program (CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe): 25 instructions, 7 account types, 22 events. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.
| Crate | carbon-circle-token-messenger-v2-decoder 2.0.0 |
| Install | cargo add carbon-circle-token-messenger-v2-decoder@2. |
| Program ID | CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe (carbon_) |
| Category | Bridges & messaging |
| Decoder | carbon_ |
| Instruction enum | instructions:: |
| Account enum | accounts:: |
| Event enum | instructions:: |
| Features | serde, postgres, graphql (none enabled by default) |
| API docs | docs.rs/carbon-circle-token-messenger-v2-decoder/2.0.0 |
| Source | decoders/circle-token-messenger-v2-decoder |
Other bridge and messaging decoders: Circle CCTP Message Transmitter v2. To decode several in one pipeline, see bridge and messaging decoders.
The serde feature derives Serialize/Deserialize on every type, postgres adds tables and processors for Postgres, and graphql adds a schema for the GraphQL server.
Usage#
This program crawls recent Circle CCTP Token Messenger v2 transactions from the public RPC and prints every decoded DepositForBurn instruction. Add the dependencies:
cargo add carbon-core@2.0.0 carbon-circle-token-messenger-v2-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/fulluse {
carbon_core::{
error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
processor::Processor,
},
carbon_log_metrics::LogMetrics,
carbon_circle_token_messenger_v2_decoder::{
instructions::CircleTokenMessengerV2Instruction, CircleTokenMessengerV2Decoder, PROGRAM_ID,
},
carbon_rpc_transaction_crawler_datasource::{ConnectionConfig, Filters, RpcTransactionCrawler},
std::sync::Arc,
};
#[tokio::main]
async fn main() -> CarbonResult<()> {
env_logger::init();
// Fetches the program's recent transactions over JSON-RPC, newest first.
let datasource = RpcTransactionCrawler::new(
"https://api.mainnet-beta.solana.com".to_string(),
PROGRAM_ID,
ConnectionConfig::default(),
Filters::new(None, None, None),
None,
);
Pipeline::builder()
.datasource(datasource)
.metrics(Arc::new(LogMetrics::new()))
.instruction(CircleTokenMessengerV2Decoder, InstructionLogger)
.build()?
.run()
.await
}
struct InstructionLogger;
impl Processor<InstructionProcessorInputType<'_, CircleTokenMessengerV2Instruction>> for InstructionLogger {
async fn process(
&mut self,
input: &InstructionProcessorInputType<'_, CircleTokenMessengerV2Instruction>,
) -> CarbonResult<()> {
let signature = input.metadata.transaction_metadata.signature;
if let CircleTokenMessengerV2Instruction::DepositForBurn { data, accounts, .. } = input.decoded_instruction {
println!("deposit_for_burn {signature}: {data:?} owner={}", accounts.owner);
}
Ok(())
}
}RUST_LOG=info cargo runEach DepositForBurn instruction prints one line with the transaction signature and the decoded DepositForBurn data. The public endpoint rate-limits requests, so the first lines can take a while; use your own RPC URL for anything beyond a test. See stream with RPC for the crawler options.
Events published with Anchor's emit_cpi! arrive as the CpiEvent instruction. Match them with CircleTokenMessengerV2Instruction:: (import instructions::); see Events. If CpiEvent never arrives, the program logs its events with emit! instead: decode them with decode_.
Decode accounts#
The transaction crawler emits transactions only. To decode accounts, use a datasource that emits account updates. This program subscribes to the program's accounts with programSubscribe on the public WebSocket endpoint and prints every decoded DenylistedAccount account as it changes. Add the datasource and the Solana RPC types it takes:
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2use {
carbon_core::{
account::AccountProcessorInputType, error::CarbonResult, pipeline::Pipeline,
processor::Processor,
},
carbon_log_metrics::LogMetrics,
carbon_circle_token_messenger_v2_decoder::{
accounts::CircleTokenMessengerV2Account, CircleTokenMessengerV2Decoder, PROGRAM_ID,
},
carbon_rpc_program_subscribe_datasource::{Filters, RpcProgramSubscribe},
solana_client::rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig, UiAccountEncoding},
std::sync::Arc,
};
#[tokio::main]
async fn main() -> CarbonResult<()> {
env_logger::init();
// Streams every change to an account owned by the program (programSubscribe).
let config = RpcProgramAccountsConfig {
account_config: RpcAccountInfoConfig {
encoding: Some(UiAccountEncoding::Base64),
..Default::default()
},
..Default::default()
};
let datasource = RpcProgramSubscribe::new(
"wss://api.mainnet-beta.solana.com".to_string(),
Filters::new(PROGRAM_ID, Some(config)),
);
Pipeline::builder()
.datasource(datasource)
.metrics(Arc::new(LogMetrics::new()))
.account(CircleTokenMessengerV2Decoder, AccountLogger)
.build()?
.run()
.await
}
struct AccountLogger;
impl Processor<AccountProcessorInputType<'_, CircleTokenMessengerV2Account>> for AccountLogger {
async fn process(
&mut self,
input: &AccountProcessorInputType<'_, CircleTokenMessengerV2Account>,
) -> CarbonResult<()> {
if let CircleTokenMessengerV2Account::DenylistedAccount(denylisted_account) = &input.decoded_account.data {
println!("denylisted_account {}: {denylisted_account:?}", input.metadata.pubkey);
}
Ok(())
}
}RUST_LOG=info cargo runEach update to a DenylistedAccount account prints its address and decoded fields; the program runs until you stop it. Cargo resolves solana-client to 4.2.2, the exact version the datasource pins, so both use the same RpcProgramAccountsConfig type. To load every existing account once instead of streaming changes, see load account state.
Instructions#
Variants of CircleTokenMessengerV2Instruction. Each is CircleTokenMessengerV2Instruction::, where data and accounts are the types listed under the variant, exported from carbon_. Discriminators are the leading bytes of the instruction data, in hex.
How an instruction decodes. The decoder returns a variant only when all of these hold; otherwise the instruction is skipped and no processor is called:
- The instruction's program ID is
CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe. - The data starts with the variant's discriminator, and the rest deserializes into its data type.
- The instruction has at least as many accounts as the variant requires (the "Required accounts" count under each variant).
Accounts. They are matched by position, in the order listed. An account marked optional is None only when the instruction ends before it; Anchor programs pass the program ID as a placeholder for an omitted optional account, so check for Some(PROGRAM_ too. Accounts after the listed ones are in accounts. as AccountMetas. The decoder doesn't record whether an account signed or was writable: read that from input. and ., which follow the same order. It doesn't check signer, writable, owner or PDA constraints either; the program enforced those when the transaction executed, so a decoded instruction from a successful transaction already satisfied them.
AcceptOwnership#
Discriminator ac172b0deed55596 · data AcceptOwnership · accounts AcceptOwnershipInstructionAccounts.
| Field | Type |
|---|---|
params | AcceptOwnershipParams |
Required accounts: 4; extras go to remaining.
Fields of AcceptOwnershipInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pending_ | Pubkey |
| 1 | token_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
AddLocalToken#
Discriminator d5c7cd12627c49c6 · data AddLocalToken · accounts AddLocalTokenInstructionAccounts.
| Field | Type |
|---|---|
params | AddLocalTokenParams |
Required accounts: 10; extras go to remaining.
Fields of AddLocalTokenInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payer | Pubkey |
| 1 | token_ | Pubkey |
| 2 | token_ | Pubkey |
| 3 | local_token | Pubkey |
| 4 | custody_ | Pubkey |
| 5 | local_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | system_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
AddRemoteTokenMessenger#
Discriminator 0c95aca56fca1821 · data AddRemoteTokenMessenger · accounts AddRemoteTokenMessengerInstructionAccounts.
| Field | Type |
|---|---|
params | AddRemoteTokenMessengerParams |
Required accounts: 7; extras go to remaining.
Fields of AddRemoteTokenMessengerInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payer | Pubkey |
| 1 | owner | Pubkey |
| 2 | token_ | Pubkey |
| 3 | remote_ | Pubkey |
| 4 | system_ | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
BurnTokenCustody#
Discriminator e988b4af70293e47 · data BurnTokenCustody · accounts BurnTokenCustodyInstructionAccounts.
| Field | Type |
|---|---|
params | BurnTokenCustodyParams |
Required accounts: 9; extras go to remaining.
Fields of BurnTokenCustodyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payee | Pubkey |
| 1 | token_ | Pubkey |
| 2 | token_ | Pubkey |
| 3 | local_token | Pubkey |
| 4 | custody_ | Pubkey |
| 5 | custody_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | event_ | Pubkey |
| 8 | program | Pubkey |
| 9… | remaining | Vec< |
DenylistAccount#
Discriminator 6574c57051f94bc2 · data DenylistAccount · accounts DenylistAccountInstructionAccounts.
| Field | Type |
|---|---|
params | DenylistParams |
Required accounts: 7; extras go to remaining.
Fields of DenylistAccountInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payer | Pubkey |
| 1 | denylister | Pubkey |
| 2 | token_ | Pubkey |
| 3 | denylist_ | Pubkey |
| 4 | system_ | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
DepositForBurn#
Discriminator d73c3d2e723780b0 · data DepositForBurn · accounts DepositForBurnInstructionAccounts.
| Field | Type |
|---|---|
params | DepositForBurnParams |
Required accounts: 18; extras go to remaining.
Fields of DepositForBurnInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | event_ | Pubkey |
| 2 | sender_ | Pubkey |
| 3 | burn_ | Pubkey |
| 4 | denylist_ | Pubkey |
| 5 | message_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | remote_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | local_token | Pubkey |
| 10 | burn_ | Pubkey |
| 11 | message_ | Pubkey |
| 12 | message_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | token_ | Pubkey |
| 15 | system_ | Pubkey |
| 16 | event_ | Pubkey |
| 17 | program | Pubkey |
| 18… | remaining | Vec< |
DepositForBurnWithHook#
Discriminator 6ff53e83cc6cdf9b · data DepositForBurnWithHook · accounts DepositForBurnWithHookInstructionAccounts.
| Field | Type |
|---|---|
params | DepositForBurnWithHookParams |
Required accounts: 18; extras go to remaining.
Fields of DepositForBurnWithHookInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | event_ | Pubkey |
| 2 | sender_ | Pubkey |
| 3 | burn_ | Pubkey |
| 4 | denylist_ | Pubkey |
| 5 | message_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | remote_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | local_token | Pubkey |
| 10 | burn_ | Pubkey |
| 11 | message_ | Pubkey |
| 12 | message_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | token_ | Pubkey |
| 15 | system_ | Pubkey |
| 16 | event_ | Pubkey |
| 17 | program | Pubkey |
| 18… | remaining | Vec< |
HandleReceiveFinalizedMessage#
Discriminator bafcef4656b46e5f · data HandleReceiveFinalizedMessage · accounts HandleReceiveFinalizedMessageInstructionAccounts.
| Field | Type |
|---|---|
params | HandleReceiveMessageParams |
Required accounts: 12; extras go to remaining.
Fields of HandleReceiveFinalizedMessageInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | authority_ | Pubkey |
| 1 | token_ | Pubkey |
| 2 | remote_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | local_token | Pubkey |
| 5 | token_pair | Pubkey |
| 6 | fee_ | Pubkey |
| 7 | recipient_ | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | event_ | Pubkey |
| 11 | program | Pubkey |
| 12… | remaining | Vec< |
HandleReceiveUnfinalizedMessage#
Discriminator c8a9af14c83ab63d · data HandleReceiveUnfinalizedMessage · accounts HandleReceiveUnfinalizedMessageInstructionAccounts.
| Field | Type |
|---|---|
params | HandleReceiveMessageParams |
Required accounts: 12; extras go to remaining.
Fields of HandleReceiveUnfinalizedMessageInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | authority_ | Pubkey |
| 1 | token_ | Pubkey |
| 2 | remote_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | local_token | Pubkey |
| 5 | token_pair | Pubkey |
| 6 | fee_ | Pubkey |
| 7 | recipient_ | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | event_ | Pubkey |
| 11 | program | Pubkey |
| 12… | remaining | Vec< |
Initialize#
Discriminator afaf6d1f0d989bed · data Initialize · accounts InitializeInstructionAccounts.
| Field | Type |
|---|---|
params | InitializeParams |
Required accounts: 10; extras go to remaining.
Fields of InitializeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payer | Pubkey |
| 1 | upgrade_ | Pubkey |
| 2 | authority_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | token_ | Pubkey |
| 5 | token_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | system_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
LinkTokenPair#
Discriminator 44a218687d2e820c · data LinkTokenPair · accounts LinkTokenPairInstructionAccounts.
| Field | Type |
|---|---|
params | LinkTokenPairParams |
Required accounts: 7; extras go to remaining.
Fields of LinkTokenPairInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payer | Pubkey |
| 1 | token_ | Pubkey |
| 2 | token_ | Pubkey |
| 3 | token_pair | Pubkey |
| 4 | system_ | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
Pause#
Discriminator d316ddfb4a79c12f · data Pause · accounts PauseInstructionAccounts.
| Field | Type |
|---|---|
params | PauseParams |
Required accounts: 4; extras go to remaining.
Fields of PauseInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pauser | Pubkey |
| 1 | token_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
RemoveLocalToken#
Discriminator 1b2b42aabc2c6d61 · data RemoveLocalToken · accounts RemoveLocalTokenInstructionAccounts.
| Field | Type |
|---|---|
params | RemoveLocalTokenParams |
Required accounts: 9; extras go to remaining.
Fields of RemoveLocalTokenInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payee | Pubkey |
| 1 | token_ | Pubkey |
| 2 | token_ | Pubkey |
| 3 | local_token | Pubkey |
| 4 | custody_ | Pubkey |
| 5 | custody_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | event_ | Pubkey |
| 8 | program | Pubkey |
| 9… | remaining | Vec< |
RemoveRemoteTokenMessenger#
Discriminator 41724255a962b192 · data RemoveRemoteTokenMessenger · accounts RemoveRemoteTokenMessengerInstructionAccounts.
| Field | Type |
|---|---|
params | RemoveRemoteTokenMessengerParams |
Required accounts: 6; extras go to remaining.
Fields of RemoveRemoteTokenMessengerInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payee | Pubkey |
| 1 | owner | Pubkey |
| 2 | token_ | Pubkey |
| 3 | remote_ | Pubkey |
| 4 | event_ | Pubkey |
| 5 | program | Pubkey |
| 6… | remaining | Vec< |
SetFeeRecipient#
Discriminator e312d72aedf69742 · data SetFeeRecipient · accounts SetFeeRecipientInstructionAccounts.
| Field | Type |
|---|---|
params | SetFeeRecipientParams |
Required accounts: 4; extras go to remaining.
Fields of SetFeeRecipientInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | token_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
SetMaxBurnAmountPerMessage#
Discriminator 1e8091f046ed6dcf · data SetMaxBurnAmountPerMessage · accounts SetMaxBurnAmountPerMessageInstructionAccounts.
| Field | Type |
|---|---|
params | SetMaxBurnAmountPerMessageParams |
Required accounts: 5; extras go to remaining.
Fields of SetMaxBurnAmountPerMessageInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | token_ | Pubkey |
| 1 | token_ | Pubkey |
| 2 | local_token | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
SetMinFee#
Discriminator 72c6230329c4c2f6 · data SetMinFee · accounts SetMinFeeInstructionAccounts.
| Field | Type |
|---|---|
params | SetMinFeeParams |
Required accounts: 4; extras go to remaining.
Fields of SetMinFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | min_ | Pubkey |
| 1 | token_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
SetMinFeeController#
Discriminator c38e4a54ea5eb471 · data SetMinFeeController · accounts SetMinFeeControllerInstructionAccounts.
| Field | Type |
|---|---|
params | SetMinFeeControllerParams |
Required accounts: 4; extras go to remaining.
Fields of SetMinFeeControllerInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | token_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
SetTokenController#
Discriminator 5806620a4f3b0f18 · data SetTokenController · accounts SetTokenControllerInstructionAccounts.
| Field | Type |
|---|---|
params | SetTokenControllerParams |
Required accounts: 5; extras go to remaining.
Fields of SetTokenControllerInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | token_ | Pubkey |
| 2 | token_ | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
TransferOwnership#
Discriminator 41b1d749352d632f · data TransferOwnership · accounts TransferOwnershipInstructionAccounts.
| Field | Type |
|---|---|
params | TransferOwnershipParams |
Required accounts: 4; extras go to remaining.
Fields of TransferOwnershipInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | token_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
UndenylistAccount#
Discriminator 39242ba83eac2127 · data UndenylistAccount · accounts UndenylistAccountInstructionAccounts.
| Field | Type |
|---|---|
params | UndenylistParams |
Required accounts: 7; extras go to remaining.
Fields of UndenylistAccountInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payer | Pubkey |
| 1 | denylister | Pubkey |
| 2 | token_ | Pubkey |
| 3 | denylist_ | Pubkey |
| 4 | system_ | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
UnlinkTokenPair#
Discriminator 34c6647268ae553a · data UnlinkTokenPair · accounts UnlinkTokenPairInstructionAccounts.
| Field | Type |
|---|---|
params | UninkTokenPairParams |
Required accounts: 6; extras go to remaining.
Fields of UnlinkTokenPairInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payee | Pubkey |
| 1 | token_ | Pubkey |
| 2 | token_ | Pubkey |
| 3 | token_pair | Pubkey |
| 4 | event_ | Pubkey |
| 5 | program | Pubkey |
| 6… | remaining | Vec< |
Unpause#
Discriminator a99004260a8dbcff · data Unpause · accounts UnpauseInstructionAccounts.
| Field | Type |
|---|---|
params | UnpauseParams |
Required accounts: 4; extras go to remaining.
Fields of UnpauseInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pauser | Pubkey |
| 1 | token_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
UpdateDenylister#
Discriminator c142c6c954390ede · data UpdateDenylister · accounts UpdateDenylisterInstructionAccounts.
| Field | Type |
|---|---|
params | UpdateDenylisterParams |
Required accounts: 4; extras go to remaining.
Fields of UpdateDenylisterInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | token_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
UpdatePauser#
Discriminator 8cabd38439c910fe · data UpdatePauser · accounts UpdatePauserInstructionAccounts.
| Field | Type |
|---|---|
params | UpdatePauserParams |
Required accounts: 5; extras go to remaining.
Fields of UpdatePauserInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | token_ | Pubkey |
| 2 | token_ | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
CpiEvent#
Anchor self-CPI that carries one of the program's events. data is the CpiEvent enum.
Discriminator e445a52e51cb9a1d · data CpiEvent · accounts CpiEventInstructionAccounts.
Required accounts: 2; extras go to remaining.
Fields of CpiEventInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | program | Pubkey |
| 1 | event_ | Pubkey |
| 2… | remaining | Vec< |
Accounts#
Variants of CircleTokenMessengerV2Account. Each wraps a boxed struct from carbon_. decode_ only considers accounts owned by PROGRAM_ID and returns the first variant that matches.
DenylistedAccount#
Discriminator ba3ad4ef66839d92 · accounts::.
| Field | Type |
|---|---|
account | Pubkey |
LocalToken#
Discriminator 9f833aaac15480b6 · accounts::.
| Field | Type |
|---|---|
custody | Pubkey |
mint | Pubkey |
burn_ | u64 |
messages_ | u64 |
messages_ | u64 |
amount_sent | u128 |
amount_ | u128 |
bump | u8 |
custody_ | u8 |
MessageTransmitter#
Discriminator 4728b48e13cb23fc · accounts::.
| Field | Type |
|---|---|
owner | Pubkey |
pending_ | Pubkey |
attester_ | Pubkey |
pauser | Pubkey |
paused | bool |
local_ | u32 |
version | u32 |
signature_ | u32 |
enabled_ | Vec<Pubkey> |
max_ | u64 |
RemoteTokenMessenger#
Discriminator 6973ae225fe98afc · accounts::.
| Field | Type |
|---|---|
domain | u32 |
token_ | Pubkey |
TokenMessenger#
Discriminator a204f23493f3dd60 · accounts::.
| Field | Type |
|---|---|
denylister | Pubkey |
owner | Pubkey |
pending_ | Pubkey |
message_ | u32 |
authority_ | u8 |
fee_ | Pubkey |
min_ | Pubkey |
min_fee | u32 |
TokenMinter#
Discriminator 7a85543f399fabce · accounts::.
| Field | Type |
|---|---|
token_ | Pubkey |
pauser | Pubkey |
paused | bool |
bump | u8 |
TokenPair#
Discriminator 11d62db0e595c547 · accounts::.
| Field | Type |
|---|---|
remote_ | u32 |
remote_ | Pubkey |
local_token | Pubkey |
bump | u8 |
Events#
Variants of instructions::, decoded from the CpiEvent instruction. Each wraps a struct from carbon_. The discriminator is the 8-byte event discriminator that follows the e445a52e51cb9a1d CPI-event tag.
Denylisted#
Discriminator 1491adc8b611ea9a · events::.
| Field | Type |
|---|---|
account | Pubkey |
DenylisterChanged#
Discriminator f9aa51b4b9af8a48 · events::.
| Field | Type |
|---|---|
old_ | Pubkey |
new_ | Pubkey |
DepositForBurn#
Discriminator 90fc9192064aa7eb · events::.
| Field | Type |
|---|---|
burn_token | Pubkey |
amount | u64 |
depositor | Pubkey |
mint_ | Pubkey |
destination_ | u32 |
destination_ | Pubkey |
destination_ | Pubkey |
max_fee | u64 |
min_ | u32 |
hook_data | Vec<u8> |
FeeRecipientSet#
Discriminator 638c5023f5b0b36e · events::.
| Field | Type |
|---|---|
new_ | Pubkey |
LocalTokenAdded#
Discriminator 9208e0967aad1727 · events::.
| Field | Type |
|---|---|
custody | Pubkey |
mint | Pubkey |
LocalTokenRemoved#
Discriminator b5cc015f023242d2 · events::.
| Field | Type |
|---|---|
custody | Pubkey |
mint | Pubkey |
MinFeeControllerSet#
Discriminator ef0c7a69e7720dc4 · events::.
| Field | Type |
|---|---|
new_ | Pubkey |
MinFeeSet#
Discriminator 3c7f65e6d881bc62 · events::.
| Field | Type |
|---|---|
new_min_fee | u32 |
MintAndWithdraw#
Discriminator 4b43e546a27e0047 · events::.
| Field | Type |
|---|---|
mint_ | Pubkey |
amount | u64 |
mint_token | Pubkey |
fee_ | u64 |
OwnershipTransferStarted#
Discriminator b7fdeff68cb38569 · events::.
| Field | Type |
|---|---|
previous_ | Pubkey |
new_owner | Pubkey |
OwnershipTransferred#
Discriminator ac3dcdb7fa322662 · events::.
| Field | Type |
|---|---|
previous_ | Pubkey |
new_owner | Pubkey |
Pause#
Discriminator c2fbe8c4765f6fdb · events::.
No fields.
PauserChanged#
Discriminator 8e9d9e577f087737 · events::.
| Field | Type |
|---|---|
new_address | Pubkey |
RemoteTokenMessengerAdded#
Discriminator fb1d3ff43072d2af · events::.
| Field | Type |
|---|---|
domain | u32 |
token_ | Pubkey |
RemoteTokenMessengerRemoved#
Discriminator ff798927e67d0b1e · events::.
| Field | Type |
|---|---|
domain | u32 |
token_ | Pubkey |
SetBurnLimitPerMessage#
Discriminator 629858bff51e1bd1 · events::.
| Field | Type |
|---|---|
token | Pubkey |
burn_ | u64 |
SetTokenController#
Discriminator c12cf353e64878d8 · events::.
| Field | Type |
|---|---|
token_ | Pubkey |
TokenCustodyBurned#
Discriminator db8f6be2434bb22e · events::.
| Field | Type |
|---|---|
custody_ | Pubkey |
amount | u64 |
TokenPairLinked#
Discriminator 020eb1409b5dc48d · events::.
| Field | Type |
|---|---|
local_token | Pubkey |
remote_ | u32 |
remote_ | Pubkey |
TokenPairUnlinked#
Discriminator 4ee8e6d0b4d4f648 · events::.
| Field | Type |
|---|---|
local_token | Pubkey |
remote_ | u32 |
remote_ | Pubkey |
UnDenylisted#
Discriminator 9627e314a2b405f2 · events::.
| Field | Type |
|---|---|
account | Pubkey |
Unpause#
Discriminator f195685ac788db92 · events::.
No fields.
Types#
Types used by the instructions, accounts and events above, exported from carbon_.
AcceptOwnershipParams#
Struct types::.
No fields.
AddLocalTokenParams#
Struct types::.
No fields.
AddRemoteTokenMessengerParams#
Struct types::.
| Field | Type |
|---|---|
domain | u32 |
token_ | Pubkey |
BurnTokenCustodyParams#
Struct types::.
| Field | Type |
|---|---|
amount | u64 |
Denylisted#
Struct types::. Same fields as the Denylisted event.
DenylisterChanged#
Struct types::. Same fields as the DenylisterChanged event.
DenylistParams#
Struct types::.
| Field | Type |
|---|---|
account | Pubkey |
DepositForBurn#
Struct types::. Same fields as the DepositForBurn event.
DepositForBurnParams#
Struct types::.
| Field | Type |
|---|---|
amount | u64 |
destination_ | u32 |
mint_ | Pubkey |
destination_ | Pubkey |
max_fee | u64 |
min_ | u32 |
DepositForBurnWithHookParams#
Struct types::.
| Field | Type |
|---|---|
amount | u64 |
destination_ | u32 |
mint_ | Pubkey |
destination_ | Pubkey |
max_fee | u64 |
min_ | u32 |
hook_data | Vec<u8> |
FeeRecipientSet#
Struct types::. Same fields as the FeeRecipientSet event.
HandleReceiveMessageParams#
Struct types::.
| Field | Type |
|---|---|
remote_ | u32 |
sender | Pubkey |
finality_ | u32 |
message_ | Vec<u8> |
authority_ | u8 |
InitializeParams#
Struct types::.
| Field | Type |
|---|---|
token_ | Pubkey |
denylister | Pubkey |
fee_ | Pubkey |
min_ | Pubkey |
min_fee | u32 |
message_ | u32 |
LinkTokenPairParams#
Struct types::.
| Field | Type |
|---|---|
local_token | Pubkey |
remote_ | u32 |
remote_ | Pubkey |
LocalTokenAdded#
Struct types::. Same fields as the LocalTokenAdded event.
LocalTokenRemoved#
Struct types::. Same fields as the LocalTokenRemoved event.
MinFeeControllerSet#
Struct types::. Same fields as the MinFeeControllerSet event.
MinFeeSet#
Struct types::. Same fields as the MinFeeSet event.
MintAndWithdraw#
Struct types::. Same fields as the MintAndWithdraw event.
OwnershipTransferred#
Struct types::. Same fields as the OwnershipTransferred event.
OwnershipTransferStarted#
Struct types::. Same fields as the OwnershipTransferStarted event.
Pause#
Struct types::. Same fields as the Pause event.
PauseParams#
Struct types::.
No fields.
PauserChanged#
Struct types::. Same fields as the PauserChanged event.
RemoteTokenMessengerAdded#
Struct types::. Same fields as the RemoteTokenMessengerAdded event.
RemoteTokenMessengerRemoved#
Struct types::. Same fields as the RemoteTokenMessengerRemoved event.
RemoveLocalTokenParams#
Struct types::.
No fields.
RemoveRemoteTokenMessengerParams#
Struct types::.
No fields.
SetBurnLimitPerMessage#
Struct types::. Same fields as the SetBurnLimitPerMessage event.
SetFeeRecipientParams#
Struct types::.
| Field | Type |
|---|---|
new_ | Pubkey |
SetMaxBurnAmountPerMessageParams#
Struct types::.
| Field | Type |
|---|---|
burn_ | u64 |
SetMinFeeControllerParams#
Struct types::.
| Field | Type |
|---|---|
new_ | Pubkey |
SetMinFeeParams#
Struct types::.
| Field | Type |
|---|---|
new_min_fee | u32 |
SetTokenController#
Struct types::. Same fields as the SetTokenController event.
SetTokenControllerParams#
Struct types::.
| Field | Type |
|---|---|
token_ | Pubkey |
TokenCustodyBurned#
Struct types::. Same fields as the TokenCustodyBurned event.
TokenPairLinked#
Struct types::. Same fields as the TokenPairLinked event.
TokenPairUnlinked#
Struct types::. Same fields as the TokenPairUnlinked event.
TransferOwnershipParams#
Struct types::.
| Field | Type |
|---|---|
new_owner | Pubkey |
UnDenylisted#
Struct types::. Same fields as the UnDenylisted event.
UndenylistParams#
Struct types::.
| Field | Type |
|---|---|
account | Pubkey |
UninkTokenPairParams#
Struct types::.
No fields.
Unpause#
Struct types::. Same fields as the Unpause event.
UnpauseParams#
Struct types::.
No fields.
UpdateDenylisterParams#
Struct types::.
| Field | Type |
|---|---|
new_ | Pubkey |
UpdatePauserParams#
Struct types::.
| Field | Type |
|---|---|
new_pauser | Pubkey |