Skip to content

Commit

Permalink
ISMP: Add a new field context to GetRequest (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Aug 22, 2024
1 parent bc79098 commit 5c869cf
Show file tree
Hide file tree
Showing 29 changed files with 4,570 additions and 1,441 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 2 additions & 0 deletions evm/abi/src/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ impl From<router::GetRequest> for GetRequest {
address.0.copy_from_slice(&value.from);
address
},
context: value.context.into(),
timeout_timestamp: value.timeout_timestamp,
height: value.height,
}
Expand Down Expand Up @@ -421,6 +422,7 @@ impl TryFrom<GetRequestEventFilter> for router::GetRequest {
from: get.from.0.into(),
keys: get.keys.into_iter().map(|key| key.0.into()).collect(),
height: get.height.low_u64(),
context: get.context.as_ref().to_vec(),
timeout_timestamp: get.timeout_timestamp.low_u64(),
})
}
Expand Down
210 changes: 105 additions & 105 deletions evm/abi/src/generated/evm_host.rs

Large diffs are not rendered by default.

28 changes: 15 additions & 13 deletions evm/abi/src/generated/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ pub mod handler {
),
),
::ethers::core::abi::ethabi::ParamType::Uint(64usize),
::ethers::core::abi::ethabi::ParamType::Bytes,
],
),
),
Expand Down Expand Up @@ -157,6 +158,7 @@ pub mod handler {
),
),
::ethers::core::abi::ethabi::ParamType::Uint(64usize),
::ethers::core::abi::ethabi::ParamType::Bytes,
],
),
::ethers::core::abi::ethabi::ParamType::Array(
Expand Down Expand Up @@ -644,24 +646,24 @@ pub mod handler {
.method_hash([187, 22, 137, 190], (host, proof))
.expect("method not found (this should never happen)")
}
///Calls the contract's `handleGetRequestTimeouts` (0x22b3144a) function
///Calls the contract's `handleGetRequestTimeouts` (0x191c872b) function
pub fn handle_get_request_timeouts(
&self,
host: ::ethers::core::types::Address,
message: GetTimeoutMessage,
) -> ::ethers::contract::builders::ContractCall<M, ()> {
self.0
.method_hash([34, 179, 20, 74], (host, message))
.method_hash([25, 28, 135, 43], (host, message))
.expect("method not found (this should never happen)")
}
///Calls the contract's `handleGetResponses` (0x6e011b21) function
///Calls the contract's `handleGetResponses` (0xc96bdc16) function
pub fn handle_get_responses(
&self,
host: ::ethers::core::types::Address,
message: GetResponseMessage,
) -> ::ethers::contract::builders::ContractCall<M, ()> {
self.0
.method_hash([110, 1, 27, 33], (host, message))
.method_hash([201, 107, 220, 22], (host, message))
.expect("method not found (this should never happen)")
}
///Calls the contract's `handlePostRequestTimeouts` (0x089b174c) function
Expand Down Expand Up @@ -1072,7 +1074,7 @@ pub mod handler {
}
///Container type for all input parameters for the `handleGetRequestTimeouts` function with
/// signature `handleGetRequestTimeouts(address,((bytes,bytes,uint64,address,uint64,bytes[],
/// uint64)[],(uint256,uint256),bytes[]))` and selector `0x22b3144a`
/// uint64,bytes)[],(uint256,uint256),bytes[]))` and selector `0x191c872b`
#[derive(
Clone,
::ethers::contract::EthCall,
Expand All @@ -1085,16 +1087,16 @@ pub mod handler {
)]
#[ethcall(
name = "handleGetRequestTimeouts",
abi = "handleGetRequestTimeouts(address,((bytes,bytes,uint64,address,uint64,bytes[],uint64)[],(uint256,uint256),bytes[]))"
abi = "handleGetRequestTimeouts(address,((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes)[],(uint256,uint256),bytes[]))"
)]
pub struct HandleGetRequestTimeoutsCall {
pub host: ::ethers::core::types::Address,
pub message: GetTimeoutMessage,
}
///Container type for all input parameters for the `handleGetResponses` function with signature
/// `handleGetResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,
/// address,uint64,bytes[],uint64),(bytes,bytes)[]),uint256,uint256)[]))` and selector
/// `0x6e011b21`
/// address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[]))` and selector
/// `0xc96bdc16`
#[derive(
Clone,
::ethers::contract::EthCall,
Expand All @@ -1107,7 +1109,7 @@ pub mod handler {
)]
#[ethcall(
name = "handleGetResponses",
abi = "handleGetResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,address,uint64,bytes[],uint64),(bytes,bytes)[]),uint256,uint256)[]))"
abi = "handleGetResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[]))"
)]
pub struct HandleGetResponsesCall {
pub host: ::ethers::core::types::Address,
Expand Down Expand Up @@ -1361,7 +1363,7 @@ pub mod handler {
Hash,
)]
pub struct SupportsInterfaceReturn(pub bool);
///`GetResponseLeaf(((bytes,bytes,uint64,address,uint64,bytes[],uint64),(bytes,bytes)[]),
///`GetResponseLeaf(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),
/// uint256,uint256)`
#[derive(
Clone,
Expand All @@ -1379,7 +1381,7 @@ pub mod handler {
pub k_index: ::ethers::core::types::U256,
}
///`GetResponseMessage(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,address,
/// uint64,bytes[],uint64),(bytes,bytes)[]),uint256,uint256)[])`
/// uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[])`
#[derive(
Clone,
::ethers::contract::EthAbiType,
Expand All @@ -1394,8 +1396,8 @@ pub mod handler {
pub proof: Proof,
pub responses: ::std::vec::Vec<GetResponseLeaf>,
}
///`GetTimeoutMessage((bytes,bytes,uint64,address,uint64,bytes[],uint64)[],(uint256,uint256),
/// bytes[])`
///`GetTimeoutMessage((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes)[],(uint256,
/// uint256),bytes[])`
#[derive(
Clone,
::ethers::contract::EthAbiType,
Expand Down
Loading

0 comments on commit 5c869cf

Please sign in to comment.