Skip to content

Commit

Permalink
voyager fixes (#3391)
Browse files Browse the repository at this point in the history
  • Loading branch information
benluelo authored Dec 20, 2024
2 parents dcea7c0 + 7158fbb commit c7004e8
Show file tree
Hide file tree
Showing 12 changed files with 673 additions and 402 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion cosmwasm/union-ibc/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- `union-ibc`: [union17e93ukhcyesrvu72cgfvamdhyracghrx4f7ww89rqjg944ntdegscxepme](https://explorer.testnet-9.union.build/union/cosmwasm/0/transactions?contract=union17e93ukhcyesrvu72cgfvamdhyracghrx4f7ww89rqjg944ntdegscxepme)
- `etheruem-light-client`: [union198amaja0zfw53czzfph55xlhwf736qkrcvppx6y3a5rkqmxaj9fshqmczk](https://explorer.testnet-9.union.build/union/cosmwasm/0/transactions?contract=union198amaja0zfw53czzfph55xlhwf736qkrcvppx6y3a5rkqmxaj9fshqmczk)
- `union-ibc-ucs00-pingpong`: [union194e3rchcaqyynwcj6qr6647ge7lheymrgkhq9tdknw35050ufhuqzqz2he](https://explorer.testnet-9.union.build/union/cosmwasm/0/transactions?contract=union194e3rchcaqyynwcj6qr6647ge7lheymrgkhq9tdknw35050ufhuqzqz2he)
- `union-ibc-ucs00-pingpong`: [union1aj2z8mf6ppg4pjsj787t69phxy3mx8p7ce8ncem05lls5j29haxsumypzd](https://explorer.testnet-9.union.build/union/cosmwasm/0/transactions?contract=union194e3rchcaqyynwcj6qr6647ge7lheymrgkhq9tdknw35050ufhuqzqz2he)
13 changes: 8 additions & 5 deletions cosmwasm/union-ibc/core/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ type ContractResult = Result<Response, ContractError>;

pub mod events {
pub mod client {
pub const REGISTER: &str = "client_register";
pub const CREATE: &str = "client_create";
pub const UPDATE: &str = "client_update";
pub const REGISTER: &str = "register_client";
pub const CREATE: &str = "create_client";
pub const UPDATE: &str = "update_client";
}
pub mod connection {
pub const OPEN_INIT: &str = "connection_open_init";
Expand Down Expand Up @@ -76,7 +76,7 @@ pub mod events {
pub const CONNECTION_ID: &str = "connection_id";
pub const CHANNEL_ID: &str = "channel_id";
pub const COUNTERPARTY_CHANNEL_ID: &str = "counterparty_channel_id";
pub const HEIGHT: &str = "height";
pub const COUNTERPARTY_HEIGHT: &str = "counterparty_height";
pub const PACKET: &str = "packet";
pub const PACKETS: &str = "packets";
pub const ACKS: &str = "acks";
Expand Down Expand Up @@ -771,7 +771,10 @@ fn update_client(
Ok(
Response::new().add_event(Event::new(events::client::UPDATE).add_attributes([
(events::attribute::CLIENT_ID, client_id.to_string()),
(events::attribute::HEIGHT, update.height.to_string()),
(
events::attribute::COUNTERPARTY_HEIGHT,
update.height.to_string(),
),
])),
)
}
Expand Down
4 changes: 4 additions & 0 deletions lib/ibc-union-spec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ macros = { workspace = true }
schemars = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = ["derive"] }
sha3 = { workspace = true }
tracing = { workspace = true, optional = true }
unionlabs = { workspace = true }
voyager-core = { workspace = true }

[lints]
workspace = true

[features]
tracing = ["dep:tracing"]
294 changes: 276 additions & 18 deletions lib/ibc-union-spec/src/lib.rs

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions voyager/plugins/event-source/cosmos-sdk/src/ibc_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ event! {

// events for the union IBC specification, emitted by the cosmwasm contract implementation.

#[event(tag = "wasm-client_create")]
#[event(tag = "wasm-create_client")]
UnionCreateClient {
#[parse(u32::from_str)]
client_id: u32,
Expand All @@ -276,12 +276,12 @@ event! {
// height: u64,
},

#[event(tag = "wasm-client_update")]
#[event(tag = "wasm-update_client")]
UnionUpdateClient {
#[parse(u32::from_str)]
client_id: u32,
#[parse(u64::from_str)]
height: u64,
counterparty_height: u64,
},

#[event(tag = "wasm-connection_open_init")]
Expand Down Expand Up @@ -385,7 +385,7 @@ event! {
connection_id: u32,
},

#[event(tag = "wasm-send_packet")]
#[event(tag = "wasm-packet_send")]
UnionSendPacket {
#[parse(serde_json::from_str)]
packet: ibc_solidity::Packet,
Expand Down
Loading

0 comments on commit c7004e8

Please sign in to comment.