Skip to content

Commit

Permalink
feat(task-processor): add ITS message handling
Browse files Browse the repository at this point in the history
ITS messages, just like governance ones are somewhat special and need
separate logic to handle them.

Signed-off-by: Guilherme Felipe da Silva <[email protected]>
  • Loading branch information
frenzox committed Dec 13, 2024
1 parent ca28104 commit 02063a9
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 23 deletions.
58 changes: 44 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ relayer-amplifier-state = { git = "https://github.com/eigerco/axelar-relayer-cor
core-common-serde-utils = { git = "https://github.com/eigerco/axelar-relayer-core.git", package = "common-serde-utils", branch = "main" }

# Solana Gateway
axelar-solana-gateway = { git = "https://github.com/eigerco/solana-axelar.git", rev = "e212e33", features = ["no-entrypoint"] }
axelar-solana-its = { git = "https://github.com/eigerco/solana-axelar.git", rev = "e212e33", features = ["no-entrypoint"] }
axelar-solana-governance = { git = "https://github.com/eigerco/solana-axelar.git", rev = "e212e33", features = ["no-entrypoint"] }
gateway-event-stack = { git = "https://github.com/eigerco/solana-axelar.git", rev = "e212e33" }
axelar-solana-encoding = { git = "https://github.com/eigerco/solana-axelar.git", rev = "e212e33" }
axelar-message-primitives = { git = "https://github.com/eigerco/solana-axelar.git", rev = "e212e33" }
axelar-executable = { git = "https://github.com/eigerco/solana-axelar.git", rev = "e212e33" }
axelar-solana-gateway = { git = "https://github.com/eigerco/solana-axelar.git", rev = "f065eda", features = ["no-entrypoint"] }
axelar-solana-its = { git = "https://github.com/eigerco/solana-axelar.git", rev = "f065eda", features = ["no-entrypoint"] }
axelar-solana-governance = { git = "https://github.com/eigerco/solana-axelar.git", rev = "f065eda", features = ["no-entrypoint"] }
gateway-event-stack = { git = "https://github.com/eigerco/solana-axelar.git", rev = "f065eda" }
axelar-solana-encoding = { git = "https://github.com/eigerco/solana-axelar.git", rev = "f065eda" }
axelar-message-primitives = { git = "https://github.com/eigerco/solana-axelar.git", rev = "f065eda" }
axelar-executable = { git = "https://github.com/eigerco/solana-axelar.git", rev = "f065eda" }
its-instruction-builder = { git = "https://github.com/eigerco/solana-axelar.git", rev = "f065eda" }

# CLI
clap = { version = "4", features = ["derive"] }
Expand Down
1 change: 1 addition & 0 deletions crates/solana-gateway-task-processor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ effective-tx-sender.workspace = true
axelar-executable.workspace = true
num-traits.workspace = true
relayer-amplifier-state.workspace = true
its-instruction-builder.workspace = true

[dev-dependencies]
serde_json.workspace = true
Expand Down
12 changes: 10 additions & 2 deletions crates/solana-gateway-task-processor/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,16 @@ async fn execute_task(
let destination_address = message.destination_address.parse::<Pubkey>()?;
match destination_address {
axelar_solana_its::ID => {
// todo ITS specific handling
tracing::error!("ITS program not yet supported");
let ix = its_instruction_builder::build_its_gmp_instruction(
signer,
gateway_incoming_message_pda,
message,
payload,
solana_rpc_client,
)
.await?;

send_tx(solana_rpc_client, keypair, ix).await?;
}
axelar_solana_governance::ID => {
// todo Governance specific handling
Expand Down

0 comments on commit 02063a9

Please sign in to comment.