@@ -7,7 +7,9 @@ Changelog is present since v0.1.2
77The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
88and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
99
10- Each version will have a separate ` Breaking Changes ` section as well. To describe in how to upgrade from one version to another if needed
10+ Each version will have a separate ` Breaking Changes ` section as well. To describe in how to upgrade from one version to another if needed.
11+
12+ Those changes in added, changed or breaking changes, should include usage examples to add clarity to the sdk user.
1113
1214## [ Unreleased]
1315### Added
@@ -36,19 +38,82 @@ Each version will have a separate `Breaking Changes` section as well. To describ
3638* feat: add rewards-v2 related functionality by @supernovahs in https://github.com/Layr-Labs/eigensdk-rs/pull/221
3739 * New methods in ` ELChainReader ` :
3840 * ` get_operator_avs_split `
41+ ``` rust
42+ // Given a chain_reader, an operator_address and an avs_address:
43+
44+ let split = el_chain_reader
45+ . get_operator_avs_split (operator_address , avs_address )
46+ . await
47+ . unwrap ();
48+ ```
49+
3950 * `get_operator_pi_split `
51+ ```rust
52+ // Given a chain_reader and an operator_address:
53+
54+ let split = el_chain_writer
55+ . el_chain_reader
56+ . get_operator_pi_split (operator_address )
57+ . await
58+ . unwrap ();
59+ ```
60+
4061 * New methods in `ELChainWriter `:
4162 * `set_operator_avs_split `
63+ ```rust
64+ // Given a chain_writer, an operator_address, an avs_address and a split:
65+
66+ let tx_hash = el_chain_writer
67+ . set_operator_avs_split (operator_address , avs_address , split )
68+ . await
69+ . unwrap ();
70+ let receipt = wait_transaction (& http_endpoint , tx_hash ). await . unwrap ();
71+ ```
4272 * `set_operator_pi_split `
73+ ```rust
74+ // Given a chain_writer, an operator_address and a split:
75+
76+ let tx_hash = el_chain_writer
77+ . set_operator_pi_split (operator , split )
78+ . await
79+ . unwrap ();
80+ let receipt = wait_transaction (& http_endpoint , tx_hash ). await . unwrap ();
81+ ```
4382 * Bindings updated for rewards - v2 core contracts release
4483
4584### Breaking Changes 🛠
4685* feat! : remove delegation manager from `ELChainWriter ` by @ supernovahs in https : // github.com/Layr-Labs/eigensdk-rs/pull/214
4786 * `ELChainWriter :: new ` no longer receives the delegation manager address as first parameter .
87+ Before , a chainWriter was created this way :
88+
89+ ```rust
90+ let el_writer = ELChainWriter :: new (
91+ DELEGATION_MANAGER_ADDRESS ,
92+ STRATEGY_MANAGER_ADDRESS ,
93+ REWARDS_COORDINATOR ,
94+ el_chain_reader ,
95+ " https://ethereum-holesky.blockpi.network/v1/rpc/public" . to_string (),
96+ " bead471191bea97fc3aeac36c9d74c895e8a6242602e144e43152f96219e96e8" . to_string (),
97+ );
98+ ```
99+
100+ Now , the creation is done without the delegation manager address :
101+
102+ ```rust
103+ let el_writer = ELChainWriter :: new (
104+ STRATEGY_MANAGER_ADDRESS ,
105+ REWARDS_COORDINATOR ,
106+ el_chain_reader ,
107+ " <https://ethereum-holesky.blockpi.network/v1/rpc/public>" . to_string (),
108+ " bead471191bea97fc3aeac36c9d74c895e8a6242602e144e43152f96219e96e8" . to_string (),
109+ );
110+ ```
48111* feat! : change way bindings are generated by @ MegaRedHand in https : // github.com/Layr-Labs/eigensdk-rs/pull/204
49112 * `eigen_utils :: core ` contains bindings related to core contracts
50113 * `eigen_utils :: middleware ` contains bindings related to middleware contracts
51114 * `eigen_utils :: sdk ` contains bindings related to the SDK (should only be used for testing )
115+
116+ Now , to update the bindings , run `make bindings `. This command will generate the bindings files in the folder : `crates / utils `.
52117
53118### Documentation 📚
54119* docs : add CHANGELOG . md by @ lferrigno in https : // github.com/Layr-Labs/eigensdk-rs/pull/220
0 commit comments