Skip to content

Commit

Permalink
Hyperclient: Support Get Responses (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege authored Aug 13, 2024
1 parent 1c744e6 commit 36dbf7e
Show file tree
Hide file tree
Showing 29 changed files with 1,806 additions and 1,070 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

60 changes: 30 additions & 30 deletions docs/pages/developers/evm/contract-addresses.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,57 +9,57 @@ The current testnet environment for the Hyperbridge network.

### Ethereum Sepolia

| `IsmpHost` | [`0xfCA0c05bEb9564AC154f55173881B4DD221A18A8`](https://sepolia.etherscan.io/address/0xfCA0c05bEb9564AC154f55173881B4DD221A18A8) |
| `IsmpHost` | [`0xF1c7a386325B7D22025D7542b28Ee881Cdf107b3`](https://sepolia.etherscan.io/address/0xF1c7a386325B7D22025D7542b28Ee881Cdf107b3) |
|:------------|:-----|
| `HandlerV1` | [`0x3a3A8BF5454a5ad98a3ca6b095cD6929aD441D7f`](https://sepolia.etherscan.io/address/0x3a3A8BF5454a5ad98a3ca6b095cD6929aD441D7f) |
| `PingModule` | [`0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a`](https://sepolia.etherscan.io/address/0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a) |
| `TokenGateway` | [`0x41867Dd678E3055649c04Fa10180ba90229cAd9F`](https://sepolia.etherscan.io/address/0x41867Dd678E3055649c04Fa10180ba90229cAd9F) |
| `TokenFaucet` | [`0x898BD0C84141De0CD493FA7AB2e7b989cAe27771`](https://sepolia.etherscan.io/address/0x898BD0C84141De0CD493FA7AB2e7b989cAe27771) |
| `FeeToken (USD.h)` | [`0x83aF3a8a53bf0E379c17A8611AD697401A5970fD`](https://sepolia.etherscan.io/address/0x83aF3a8a53bf0E379c17A8611AD697401A5970fD) |
| `HandlerV1` | [`0xeb1359a98765F7B46FAc4ef56A3f2514891f46Ee`](https://sepolia.etherscan.io/address/0xeb1359a98765F7B46FAc4ef56A3f2514891f46Ee) |
| `PingModule` | [`0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50`](https://sepolia.etherscan.io/address/0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50) |
| `TokenGateway` | [`0xFb5de9d7908F4407B239129c57B53c67BF645BAa`](https://sepolia.etherscan.io/address/0xFb5de9d7908F4407B239129c57B53c67BF645BAa) |
| `TokenFaucet` | [`0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320`](https://sepolia.etherscan.io/address/0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320) |
| `FeeToken (USD.h)` | [`0x146760fDDF18a228BB4dA1c4c63c820Dab171D03`](https://sepolia.etherscan.io/address/0x146760fDDF18a228BB4dA1c4c63c820Dab171D03) |

### Arbitrum Sepolia


| `IsmpHost` | [`0xCA5508fB8abCDdeb330eAd57197feFBD62b5cb03`](https://sepolia.arbiscan.io/address/0xCA5508fB8abCDdeb330eAd57197feFBD62b5cb03) |
| `IsmpHost` | [`0x286e1FE1c323EE626bE802b13a5184b588eD14Cb`](https://sepolia.arbiscan.io/address/0x286e1FE1c323EE626bE802b13a5184b588eD14Cb) |
|:------------|:-----|
| `HandlerV1` | [`0xaB9417415e83d15b5Dc058dB5A2177EaF755202e`](https://sepolia.arbiscan.io/address/0xaB9417415e83d15b5Dc058dB5A2177EaF755202e) |
| `PingModule` | [`0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a`](https://sepolia.arbiscan.io/address/0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a) |
| `TokenGateway` | [`0x41867Dd678E3055649c04Fa10180ba90229cAd9F`](https://sepolia.arbiscan.io/address/0x41867Dd678E3055649c04Fa10180ba90229cAd9F) |
| `TokenFaucet` | [`0x898BD0C84141De0CD493FA7AB2e7b989cAe27771`](https://sepolia.arbiscan.io/address/0x898BD0C84141De0CD493FA7AB2e7b989cAe27771) |
| `FeeToken (USD.h)` | [`0x83aF3a8a53bf0E379c17A8611AD697401A5970fD`](https://sepolia.arbiscan.io/address/0x83aF3a8a53bf0E379c17A8611AD697401A5970fD) |
| `HandlerV1` | [`0x13c4e685DF2Bba9d2006db70F44d93bAE246Ea76`](https://sepolia.arbiscan.io/address/0x13c4e685DF2Bba9d2006db70F44d93bAE246Ea76) |
| `PingModule` | [`0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50`](https://sepolia.arbiscan.io/address/0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50) |
| `TokenGateway` | [`0xFb5de9d7908F4407B239129c57B53c67BF645BAa`](https://sepolia.arbiscan.io/address/0xFb5de9d7908F4407B239129c57B53c67BF645BAa) |
| `TokenFaucet` | [`0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320`](https://sepolia.arbiscan.io/address/0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320) |
| `FeeToken (USD.h)` | [`0x146760fDDF18a228BB4dA1c4c63c820Dab171D03`](https://sepolia.arbiscan.io/address/0x146760fDDF18a228BB4dA1c4c63c820Dab171D03) |

### Optimism Sepolia


| `IsmpHost` | [`0x37BBd9d3CF34c9143Ae01E33BA1eB59c3AD00a0f`](https://sepolia-optimism.etherscan.io/address/0x37BBd9d3CF34c9143Ae01E33BA1eB59c3AD00a0f) |
| `IsmpHost` | [`0x625c531a56DB772CC36313d0A0114956aD8b56c2`](https://sepolia-optimism.etherscan.io/address/0x625c531a56DB772CC36313d0A0114956aD8b56c2) |
|:------------|:-----|
| `HandlerV1` | [`0xd1461c180876A02Ee2b6Da6e788C758C71B23504`](https://sepolia-optimism.etherscan.io/address/0xd1461c180876A02Ee2b6Da6e788C758C71B23504) |
| `PingModule` | [`0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a`](https://sepolia-optimism.etherscan.io/address/0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a) |
| `TokenGateway` | [`0x41867Dd678E3055649c04Fa10180ba90229cAd9F`](https://sepolia-optimism.etherscan.io/address/0x41867Dd678E3055649c04Fa10180ba90229cAd9F) |
| `TokenFaucet` | [`0x898BD0C84141De0CD493FA7AB2e7b989cAe27771`](https://sepolia-optimism.etherscan.io/address/0x898BD0C84141De0CD493FA7AB2e7b989cAe27771) |
| `FeeToken (USD.h)` | [`0x83aF3a8a53bf0E379c17A8611AD697401A5970fD`](https://sepolia-optimism.etherscan.io/address/0x83aF3a8a53bf0E379c17A8611AD697401A5970fD) |
| `HandlerV1` | [`0xd5cB7a7971Ec9455B90F65ee1d941D4e5b5e1ff0`](https://sepolia-optimism.etherscan.io/address/0xd5cB7a7971Ec9455B90F65ee1d941D4e5b5e1ff0) |
| `PingModule` | [`0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50`](https://sepolia-optimism.etherscan.io/address/0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50) |
| `TokenGateway` | [`0xFb5de9d7908F4407B239129c57B53c67BF645BAa`](https://sepolia-optimism.etherscan.io/address/0xFb5de9d7908F4407B239129c57B53c67BF645BAa) |
| `TokenFaucet` | [`0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320`](https://sepolia-optimism.etherscan.io/address/0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320) |
| `FeeToken (USD.h)` | [`0x146760fDDF18a228BB4dA1c4c63c820Dab171D03`](https://sepolia-optimism.etherscan.io/address/0x146760fDDF18a228BB4dA1c4c63c820Dab171D03) |

### Base Sepolia


| `IsmpHost` | [`0xe7C43500e07E0Bb5fC0987db95fE57Ce29B9bb80`](https://sepolia.basescan.org/address/0xe7C43500e07E0Bb5fC0987db95fE57Ce29B9bb80) |
| `IsmpHost` | [`0xae9f490EE05588fDD857A078cFC1f5f30ae7185f`](https://sepolia.basescan.org/address/0xae9f490EE05588fDD857A078cFC1f5f30ae7185f) |
|:------------|:-----|
| `HandlerV1` | [`0x0FAC5FfFa3C7F0C22CF0aa644ae68eEF8Db2456E`](https://sepolia.basescan.org/address/0x0FAC5FfFa3C7F0C22CF0aa644ae68eEF8Db2456E) |
| `PingModule` | [`0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a`](https://sepolia.basescan.org/address/0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a) |
| `TokenGateway` | [`0x41867Dd678E3055649c04Fa10180ba90229cAd9F`](https://sepolia.basescan.org/address/0x41867Dd678E3055649c04Fa10180ba90229cAd9F) |
| `TokenFaucet` | [`0x898BD0C84141De0CD493FA7AB2e7b989cAe27771`](https://sepolia.basescan.org/address/0x898BD0C84141De0CD493FA7AB2e7b989cAe27771) |
| `FeeToken (USD.h)` | [`0x83aF3a8a53bf0E379c17A8611AD697401A5970fD`](https://sepolia.basescan.org/address/0x83aF3a8a53bf0E379c17A8611AD697401A5970fD) |
| `HandlerV1` | [`0x2C00a1A42666d42F981E19b633c8d0198149ed36`](https://sepolia.basescan.org/address/0x2C00a1A42666d42F981E19b633c8d0198149ed36) |
| `PingModule` | [`0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50`](https://sepolia.basescan.org/address/0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50) |
| `TokenGateway` | [`0xFb5de9d7908F4407B239129c57B53c67BF645BAa`](https://sepolia.basescan.org/address/0xFb5de9d7908F4407B239129c57B53c67BF645BAa) |
| `TokenFaucet` | [`0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320`](https://sepolia.basescan.org/address/0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320) |
| `FeeToken (USD.h)` | [`0x146760fDDF18a228BB4dA1c4c63c820Dab171D03`](https://sepolia.basescan.org/address/0x146760fDDF18a228BB4dA1c4c63c820Dab171D03) |

### Bsc Testnet


| `IsmpHost` | [`0xd24D7542C74B1f4ee14dC4bD077d5eed47107d51`](https://testnet.bscscan.com/address/0xd24D7542C74B1f4ee14dC4bD077d5eed47107d51) |
| `IsmpHost` | [`0xeB8977EDCdA5FaBDcDdEB39861Df25E8821a9e9b`](https://testnet.bscscan.com/address/0xeB8977EDCdA5FaBDcDdEB39861Df25E8821a9e9b) |
|:------------|:-----|
| `HandlerV1` | [`0x878F329319e0AE11F605468183bB5C6a8A642141`](https://testnet.bscscan.com/address/0x878F329319e0AE11F605468183bB5C6a8A642141) |
| `PingModule` | [`0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a`](https://testnet.bscscan.com/address/0xbbf1c67a1A426e6B63B456C6788e9458DADC3E3a) |
| `TokenGateway` | [`0x41867Dd678E3055649c04Fa10180ba90229cAd9F`](https://testnet.bscscan.com/address/0x41867Dd678E3055649c04Fa10180ba90229cAd9F) |
| `TokenFaucet` | [`0x898BD0C84141De0CD493FA7AB2e7b989cAe27771`](https://testnet.bscscan.com/address/0x898BD0C84141De0CD493FA7AB2e7b989cAe27771) |
| `FeeToken (USD.h)` | [`0x83aF3a8a53bf0E379c17A8611AD697401A5970fD`](https://testnet.bscscan.com/address/0x83aF3a8a53bf0E379c17A8611AD697401A5970fD) |
| `HandlerV1` | [`0x5A8B2dA2994dD818c6C3329E2c1d7cc52C863723`](https://testnet.bscscan.com/address/0x5A8B2dA2994dD818c6C3329E2c1d7cc52C863723) |
| `PingModule` | [`0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50`](https://testnet.bscscan.com/address/0x0A7175d240fe71C8AEa0D1D7467bF03C6E217C50) |
| `TokenGateway` | [`0xFb5de9d7908F4407B239129c57B53c67BF645BAa`](https://testnet.bscscan.com/address/0xFb5de9d7908F4407B239129c57B53c67BF645BAa) |
| `TokenFaucet` | [`0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320`](https://testnet.bscscan.com/address/0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320) |
| `FeeToken (USD.h)` | [`0x146760fDDF18a228BB4dA1c4c63c820Dab171D03`](https://testnet.bscscan.com/address/0x146760fDDF18a228BB4dA1c4c63c820Dab171D03) |

## Gargantua V2 (Paseo) (Deprecated)

Expand Down
28 changes: 18 additions & 10 deletions evm/abi/src/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{
use anyhow::anyhow;
use ismp::{host::StateMachine, router};

use crate::evm_host::PostRequestEventFilter;
use crate::evm_host::{GetRequestEventFilter, PostRequestEventFilter};
#[cfg(feature = "beefy")]
pub use beefy::*;
use ismp::{
Expand Down Expand Up @@ -306,15 +306,7 @@ impl TryFrom<EvmHostEvents> for ismp::events::Event {
fn try_from(event: EvmHostEvents) -> Result<Self, Self::Error> {
match event {
EvmHostEvents::GetRequestEventFilter(get) =>
Ok(ismp::events::Event::GetRequest(router::GetRequest {
source: StateMachine::from_str(&get.source).map_err(|e| anyhow!("{}", e))?,
dest: StateMachine::from_str(&get.dest).map_err(|e| anyhow!("{}", e))?,
nonce: get.nonce.low_u64(),
from: get.from.0.into(),
keys: get.keys.into_iter().map(|key| key.0.into()).collect(),
height: get.height.low_u64(),
timeout_timestamp: get.timeout_timestamp.low_u64(),
})),
Ok(ismp::events::Event::GetRequest(get.try_into()?)),
EvmHostEvents::PostRequestEventFilter(post) =>
Ok(ismp::events::Event::PostRequest(post.try_into()?)),
EvmHostEvents::PostResponseEventFilter(resp) =>
Expand Down Expand Up @@ -418,6 +410,22 @@ impl TryFrom<PostRequestEventFilter> for router::PostRequest {
}
}

impl TryFrom<GetRequestEventFilter> for router::GetRequest {
type Error = anyhow::Error;

fn try_from(get: GetRequestEventFilter) -> Result<Self, Self::Error> {
Ok(router::GetRequest {
source: StateMachine::from_str(&get.source).map_err(|e| anyhow!("{}", e))?,
dest: StateMachine::from_str(&get.dest).map_err(|e| anyhow!("{}", e))?,
nonce: get.nonce.low_u64(),
from: get.from.0.into(),
keys: get.keys.into_iter().map(|key| key.0.into()).collect(),
height: get.height.low_u64(),
timeout_timestamp: get.timeout_timestamp.low_u64(),
})
}
}

pub mod local {
use super::H256;

Expand Down
Loading

0 comments on commit 36dbf7e

Please sign in to comment.