Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rm auto register 2 #89

Merged
merged 7 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions contracts/babylon/schema/babylon-contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"btc_confirmation_depth": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
},
"btc_finality_code_id": {
Expand Down Expand Up @@ -72,7 +72,7 @@
},
"checkpoint_finalization_timeout": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
},
"consumer_description": {
Expand Down Expand Up @@ -351,7 +351,7 @@
"properties": {
"height": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down Expand Up @@ -411,7 +411,7 @@
"integer",
"null"
],
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down Expand Up @@ -836,7 +836,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down Expand Up @@ -928,7 +928,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down Expand Up @@ -1020,7 +1020,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down Expand Up @@ -1174,7 +1174,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down Expand Up @@ -1221,7 +1221,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down Expand Up @@ -1300,7 +1300,7 @@
},
"btc_confirmation_depth": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
},
"btc_finality": {
Expand All @@ -1327,7 +1327,7 @@
},
"checkpoint_finalization_timeout": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
},
"consumer_description": {
Expand Down Expand Up @@ -1379,7 +1379,7 @@
"babylon_header_hash",
"babylon_header_height",
"babylon_tx_hash",
"chain_id",
"consumer_id",
"hash",
"height"
],
Expand All @@ -1404,8 +1404,8 @@
"description": "babylon_tx_hash is the hash of the tx that includes this header. (babylon_block_height, babylon_tx_hash) jointly provides the position of the header in the Babylon ledger. Hex-encoded string of 32 bytes",
"type": "string"
},
"chain_id": {
"description": "chain_id is the unique ID of the chain",
"consumer_id": {
"description": "consumer_id is the unique ID of the consumer",
"type": "string"
},
"hash": {
Expand Down Expand Up @@ -1456,7 +1456,7 @@
"babylon_header_hash",
"babylon_header_height",
"babylon_tx_hash",
"chain_id",
"consumer_id",
"hash",
"height"
],
Expand All @@ -1481,8 +1481,8 @@
"description": "babylon_tx_hash is the hash of the tx that includes this header. (babylon_block_height, babylon_tx_hash) jointly provides the position of the header in the Babylon ledger. Hex-encoded string of 32 bytes",
"type": "string"
},
"chain_id": {
"description": "chain_id is the unique ID of the chain",
"consumer_id": {
"description": "consumer_id is the unique ID of the consumer",
"type": "string"
},
"hash": {
Expand Down
4 changes: 2 additions & 2 deletions contracts/babylon/schema/raw/instantiate.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"btc_confirmation_depth": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
},
"btc_finality_code_id": {
Expand Down Expand Up @@ -68,7 +68,7 @@
},
"checkpoint_finalization_timeout": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
},
"consumer_description": {
Expand Down
4 changes: 2 additions & 2 deletions contracts/babylon/schema/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"properties": {
"height": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down Expand Up @@ -119,7 +119,7 @@
"integer",
"null"
],
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down
2 changes: 1 addition & 1 deletion contracts/babylon/schema/raw/response_to_btc_header.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down
2 changes: 1 addition & 1 deletion contracts/babylon/schema/raw/response_to_btc_headers.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"height": {
"description": "The height of the block in the BTC blockchain.",
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
}
},
Expand Down
4 changes: 2 additions & 2 deletions contracts/babylon/schema/raw/response_to_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"btc_confirmation_depth": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
},
"btc_finality": {
Expand All @@ -47,7 +47,7 @@
},
"checkpoint_finalization_timeout": {
"type": "integer",
"format": "uint64",
"format": "uint32",
"minimum": 0.0
},
"consumer_description": {
Expand Down
6 changes: 3 additions & 3 deletions contracts/babylon/schema/raw/response_to_cz_header.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"babylon_header_hash",
"babylon_header_height",
"babylon_tx_hash",
"chain_id",
"consumer_id",
"hash",
"height"
],
Expand All @@ -33,8 +33,8 @@
"description": "babylon_tx_hash is the hash of the tx that includes this header. (babylon_block_height, babylon_tx_hash) jointly provides the position of the header in the Babylon ledger. Hex-encoded string of 32 bytes",
"type": "string"
},
"chain_id": {
"description": "chain_id is the unique ID of the chain",
"consumer_id": {
"description": "consumer_id is the unique ID of the consumer",
"type": "string"
},
"hash": {
Expand Down
6 changes: 3 additions & 3 deletions contracts/babylon/schema/raw/response_to_cz_last_header.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"babylon_header_hash",
"babylon_header_height",
"babylon_tx_hash",
"chain_id",
"consumer_id",
"hash",
"height"
],
Expand All @@ -33,8 +33,8 @@
"description": "babylon_tx_hash is the hash of the tx that includes this header. (babylon_block_height, babylon_tx_hash) jointly provides the position of the header in the Babylon ledger. Hex-encoded string of 32 bytes",
"type": "string"
},
"chain_id": {
"description": "chain_id is the unique ID of the chain",
"consumer_id": {
"description": "consumer_id is the unique ID of the consumer",
"type": "string"
},
"hash": {
Expand Down
17 changes: 7 additions & 10 deletions contracts/babylon/src/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use babylon_proto::babylon::zoneconcierge::v1::{
use crate::state::config::CONFIG;
use cosmwasm_std::{
Binary, DepsMut, Env, Event, Ibc3ChannelOpenResponse, IbcBasicResponse, IbcChannel,
IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg, IbcChannelOpenResponse, IbcMsg,
IbcOrder, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse,
IbcTimeout, Never, StdAck, StdError, StdResult,
IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg, IbcChannelOpenResponse, IbcOrder,
IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse, IbcTimeout,
Never, StdAck, StdError, StdResult,
};
use cw_storage_plus::Item;
use prost::Message;
Expand Down Expand Up @@ -59,7 +59,7 @@ pub fn ibc_channel_open(
/// Second part of the 4-step handshake, i.e. ChannelOpenAck and ChannelOpenConfirm.
pub fn ibc_channel_connect(
deps: DepsMut,
env: Env,
_env: Env,
msg: IbcChannelConnectMsg,
) -> Result<IbcBasicResponse, ContractError> {
// Ensure we have no channel yet
Expand Down Expand Up @@ -157,18 +157,15 @@ pub fn ibc_packet_receive(
pub(crate) mod ibc_packet {
use super::*;
use crate::state::config::CONFIG;
use babylon_apis::btc_staking_api::SlashedBtcDelegation;
use babylon_apis::btc_staking_api::{
ActiveBtcDelegation, BtcUndelegationInfo, CovenantAdaptorSignatures,
FinalityProviderDescription, NewFinalityProvider, ProofOfPossessionBtc, SignatureInfo,
UnbondedBtcDelegation,
ActiveBtcDelegation, NewFinalityProvider, UnbondedBtcDelegation,
};
use babylon_apis::btc_staking_api::{DelegatorUnbondingInfo, SlashedBtcDelegation};
use babylon_apis::finality_api::Evidence;
use babylon_proto::babylon::btcstaking::v1::BtcStakingIbcPacket;
use babylon_proto::babylon::zoneconcierge::v1::zoneconcierge_packet_data::Packet::ConsumerSlashing;
use babylon_proto::babylon::zoneconcierge::v1::ConsumerSlashingIbcPacket;
use cosmwasm_std::{to_json_binary, Decimal, IbcChannel, IbcMsg, WasmMsg};
use std::str::FromStr;
use cosmwasm_std::{to_json_binary, IbcChannel, IbcMsg, WasmMsg};

pub fn handle_btc_timestamp(
deps: DepsMut,
Expand Down
Loading