Skip to content

Commit ba7408c

Browse files
authored
feat: aleo protocol type (#7323)
1 parent 6cea518 commit ba7408c

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

rust/main/hyperlane-base/src/contract_sync/cursors/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ impl Indexable for HyperlaneMessage {
4545
HyperlaneDomainProtocol::Starknet => CursorType::SequenceAware,
4646
HyperlaneDomainProtocol::CosmosNative => CursorType::SequenceAware,
4747
HyperlaneDomainProtocol::Radix => CursorType::SequenceAware,
48+
HyperlaneDomainProtocol::Aleo => CursorType::SequenceAware,
4849
}
4950
}
5051

@@ -68,6 +69,7 @@ impl Indexable for InterchainGasPayment {
6869
HyperlaneDomainProtocol::Starknet => CursorType::RateLimited,
6970
HyperlaneDomainProtocol::CosmosNative => CursorType::RateLimited,
7071
HyperlaneDomainProtocol::Radix => CursorType::SequenceAware,
72+
HyperlaneDomainProtocol::Aleo => CursorType::SequenceAware,
7173
}
7274
}
7375

@@ -86,6 +88,7 @@ impl Indexable for MerkleTreeInsertion {
8688
HyperlaneDomainProtocol::Starknet => CursorType::SequenceAware,
8789
HyperlaneDomainProtocol::CosmosNative => CursorType::SequenceAware,
8890
HyperlaneDomainProtocol::Radix => CursorType::SequenceAware,
91+
HyperlaneDomainProtocol::Aleo => CursorType::SequenceAware,
8992
}
9093
}
9194

@@ -104,6 +107,7 @@ impl Indexable for Delivery {
104107
HyperlaneDomainProtocol::Starknet => CursorType::RateLimited,
105108
HyperlaneDomainProtocol::CosmosNative => CursorType::RateLimited,
106109
HyperlaneDomainProtocol::Radix => CursorType::SequenceAware,
110+
HyperlaneDomainProtocol::Aleo => CursorType::SequenceAware,
107111
}
108112
}
109113

rust/main/hyperlane-base/src/settings/parser/connection_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,9 @@ pub fn build_connection_conf(
531531
HyperlaneDomainProtocol::Starknet => {
532532
build_starknet_connection_conf(rpcs, chain, err, operation_batch)
533533
}
534-
// TODO: adjust the connection config
535534
HyperlaneDomainProtocol::Radix => {
536535
build_radix_connection_conf(rpcs, chain, err, operation_batch)
537536
}
537+
HyperlaneDomainProtocol::Aleo => todo!(),
538538
}
539539
}

rust/main/hyperlane-core/src/chain.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ pub enum HyperlaneDomainProtocol {
387387
CosmosNative,
388388
/// A Raidx based chain
389389
Radix,
390+
/// Aleo chain
391+
Aleo,
390392
}
391393

392394
impl HyperlaneDomainProtocol {
@@ -732,7 +734,7 @@ impl HyperlaneDomain {
732734
let protocol = self.domain_protocol();
733735
match protocol {
734736
Ethereum | Cosmos | CosmosNative | Starknet => IndexMode::Block,
735-
Fuel | Sealevel | Radix => IndexMode::Sequence,
737+
Fuel | Sealevel | Radix | Aleo => IndexMode::Sequence,
736738
}
737739
}
738740
}

0 commit comments

Comments
 (0)