Skip to content

Commit

Permalink
Release 0.13 (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy authored Feb 11, 2025
1 parent 4110860 commit e355223
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 26 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

## [Unreleased](https://github.com/babylonlabs-io/babylon-contract/tree/HEAD)

[Full Changelog](https://github.com/babylonlabs-io/babylon-contract/compare/v0.12.0...HEAD)
[Full Changelog](https://github.com/babylonlabs-io/babylon-contract/compare/v0.13.0...HEAD)

## [v0.13.0](https://github.com/babylonlabs-io/babylon-contract/tree/v0.13.0) (2025-02-11)

[Full Changelog](https://github.com/babylonlabs-io/babylon-contract/compare/v0.12.0-rc.0...v0.13.0)

**Merged pull requests:**

- feat: improve IBC packet structure [\#110](https://github.com/babylonlabs-io/babylon-contract/pull/110) ([gusin13](https://github.com/gusin13))

## [v0.12.0](https://github.com/babylonlabs-io/babylon-contract/tree/v0.12.0) (2025-02-07)

Expand Down
22 changes: 11 additions & 11 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
version = "0.12.0"
version = "0.13.0"
license = "Apache-2.0"
repository = "https://github.com/babylonlabs-io/babylon-contract"
authors = ["Babylon Labs Ltd. <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion contracts/babylon/schema/babylon-contract.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "babylon-contract",
"contract_version": "0.12.0",
"contract_version": "0.13.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
2 changes: 1 addition & 1 deletion contracts/btc-finality/schema/btc-finality.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "btc-finality",
"contract_version": "0.12.0",
"contract_version": "0.13.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
8 changes: 4 additions & 4 deletions contracts/btc-finality/src/multitest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,11 +564,7 @@ mod distribution {
// Assert that rewards have been generated, sent to the staking contract, and
// distributed among delegators
let rewards_denom = suite.get_btc_staking_config().denom;
// Build staker 1 address on the Consumer network
let staker1_addr = del1.staker_addr;
let staker1_addr_consumer = suite
.to_consumer_addr(&Addr::unchecked(staker1_addr.clone()))
.unwrap();
let staker2_addr = del2.staker_addr;

let pending_rewards_1 = suite.get_pending_delegator_rewards(&staker1_addr);
Expand All @@ -593,6 +589,10 @@ mod distribution {

// Withdrawing rewards
// Trying to withdraw the rewards with a Consumer address should fail
// Build staker 1 address on the Consumer network
let staker1_addr_consumer = suite
.to_consumer_addr(&Addr::unchecked(staker1_addr.clone()))
.unwrap();
let res = suite.withdraw_rewards(&new_fp1.btc_pk_hex, staker1_addr_consumer.as_ref());
assert!(res.is_err());

Expand Down
2 changes: 1 addition & 1 deletion contracts/btc-staking/schema/btc-staking.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "btc-staking",
"contract_version": "0.12.0",
"contract_version": "0.13.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
4 changes: 2 additions & 2 deletions contracts/btc-staking/src/state/delegations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct DelegationIndexes<'a> {
pub staker: MultiIndex<'a, (Vec<u8>, String), DelegationDistribution, (Vec<u8>, String)>,
}

impl<'a> IndexList<DelegationDistribution> for DelegationIndexes<'a> {
impl IndexList<DelegationDistribution> for DelegationIndexes<'_> {
fn get_indexes(
&'_ self,
) -> Box<dyn Iterator<Item = &'_ dyn Index<DelegationDistribution>> + '_> {
Expand All @@ -39,7 +39,7 @@ pub struct Delegations<'a> {
pub delegation: IndexedMap<(&'a [u8], &'a str), DelegationDistribution, DelegationIndexes<'a>>,
}

impl<'a> Delegations<'a> {
impl Delegations<'_> {
fn deserialize_pk(pk: &[u8]) -> (Vec<u8>, String) {
<(Vec<u8>, String)>::from_slice(pk).unwrap() // mustn't fail
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/btc-staking/src/state/fp_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub struct FinalityProviderIndexes<'a> {
pub power: MultiIndex<'a, u64, FinalityProviderState, String>,
}

impl<'a> IndexList<FinalityProviderState> for FinalityProviderIndexes<'a> {
impl IndexList<FinalityProviderState> for FinalityProviderIndexes<'_> {
fn get_indexes(
&'_ self,
) -> Box<dyn Iterator<Item = &'_ dyn Index<FinalityProviderState>> + '_> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "op-finality-gadget",
"contract_version": "0.12.0",
"contract_version": "0.13.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
2 changes: 1 addition & 1 deletion packages/apis/src/btc_staking_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ pub enum ExecuteMsg {
/// It's a Babylon address. If rewards are to be sent to a Consumer address, the
/// staker's equivalent address in that chain will be computed and used.
WithdrawRewards {
fp_pubkey_hex: String,
staker_addr: String,
fp_pubkey_hex: String,
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/proto/babylon

0 comments on commit e355223

Please sign in to comment.