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

docs: improve changelog by adding examples #251

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
68 changes: 67 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Changelog is present since v0.1.2
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Each version will have a separate `Breaking Changes` section as well. To describe in how to upgrade from one version to another if needed
Each version will have a separate `Breaking Changes` section as well. To describe in how to upgrade from one version to another if needed.

Those changes in added, changed or breaking changes, should include usage examples to add clarity to the sdk user.

## [Unreleased]
### Added
Expand All @@ -25,19 +27,83 @@ Each version will have a separate `Breaking Changes` section as well. To describ
* feat: add rewards-v2 related functionality by @supernovahs in https://github.com/Layr-Labs/eigensdk-rs/pull/221
* New methods in `ELChainReader`:
* `get_operator_avs_split`
```rust
// Given a chain_reader, an operator_address and an avs_address:

let split = el_chain_reader
.get_operator_avs_split(operator_address, avs_address)
.await
.unwrap();
```

* `get_operator_pi_split`
```rust
// Given a chain_reader and an operator_address:

let split = el_chain_writer
.el_chain_reader
.get_operator_pi_split(operator_address)
.await
.unwrap();
```

* New methods in `ELChainWriter`:
* `set_operator_avs_split`
```rust
// Given a chain_writer, an operator_address, an avs_address and a split:

let tx_hash = el_chain_writer
.set_operator_avs_split(operator_address, avs_address, split)
.await
.unwrap();
let receipt = wait_transaction(&http_endpoint, tx_hash).await.unwrap();
```
* `set_operator_pi_split`
```rust
// Given a chain_writer, an operator_address and a split:

let tx_hash = el_chain_writer
.set_operator_pi_split(operator, split)
.await
.unwrap();
let receipt = wait_transaction(&http_endpoint, tx_hash).await.unwrap();
```
* Bindings updated for rewards-v2 core contracts release

### Breaking Changes 🛠
* feat!: remove delegation manager from `ELChainWriter` by @supernovahs in https://github.com/Layr-Labs/eigensdk-rs/pull/214
* `ELChainWriter::new` no longer receives the delegation manager address as first parameter.
Before, a chainWriter was created this way:

```rust
let el_writer = ELChainWriter::new(
DELEGATION_MANAGER_ADDRESS,
STRATEGY_MANAGER_ADDRESS,
REWARDS_COORDINATOR,
el_chain_reader,
"https://ethereum-holesky.blockpi.network/v1/rpc/public".to_string(),
"bead471191bea97fc3aeac36c9d74c895e8a6242602e144e43152f96219e96e8".to_string(),
);
```

Now, the creation is done without the delegation manager address:

```rust
let el_writer = ELChainWriter::new(
STRATEGY_MANAGER_ADDRESS,
REWARDS_COORDINATOR,
el_chain_reader,
"<https://ethereum-holesky.blockpi.network/v1/rpc/public>".to_string(),
"bead471191bea97fc3aeac36c9d74c895e8a6242602e144e43152f96219e96e8".to_string(),
);

maximopalopoli marked this conversation as resolved.
Show resolved Hide resolved
```
* feat!: change way bindings are generated by @MegaRedHand in https://github.com/Layr-Labs/eigensdk-rs/pull/204
* `eigen_utils::core` contains bindings related to core contracts
* `eigen_utils::middleware` contains bindings related to middleware contracts
* `eigen_utils::sdk` contains bindings related to the SDK (should only be used for testing)

Now, to update the bindings, run `make bindings`. This command will generate the bindings files in the folder: `crates/utils`.

### Documentation 📚
* docs: add CHANGELOG.md by @lferrigno in https://github.com/Layr-Labs/eigensdk-rs/pull/220
Expand Down
Loading