Skip to content

Commit

Permalink
add set_signer method in Writer methods (#364)
Browse files Browse the repository at this point in the history
Fixes #334

### What Changed?
Added `set-signer ` method .
### Reviewer Checklist

- [ ] New features are tested and documented
- [ ] PR updates the changelog with a description of changes
- [ ] PR has one of the `changelog-X` labels (if applies)
- [ ] Code deprecates any old functionality before removing it
  • Loading branch information
supernovahs authored Feb 19, 2025
1 parent cf37ee2 commit c9cdb6f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ Those changes in added, changed or breaking changes, should include usage exampl
.unwrap();
```

* Added new method `set_signer` in `ELChainWriter` and `AvsRegistryChainWriter` in [#364](https://github.com/Layr-Labs/eigensdk-rs/pull/364).

```rust
avs_registry_chain_writer.set_signer(PRIVATE_KEY_STRING);
el_chain_writer.set_signer(PRIVATE_KEY_STRING);
```

### Breaking Changes 🛠

* `TaskMetadata.task_created_block` field changed to `u64` [#362](https://github.com/Layr-Labs/eigensdk-rs/pull/362)
Expand Down
10 changes: 10 additions & 0 deletions crates/chainio/clients/avsregistry/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ impl AvsRegistryChainWriter {
})
}

/// Sets signer for AvsRegistryChainWriter
///
/// # Arguments
///
/// * `signer` - signer string
///
pub fn set_signer(&mut self, signer: String) {
self.signer = signer;
}

/// Register operator in quorum with avs registry coordinator
///
/// # Arguments
Expand Down
10 changes: 10 additions & 0 deletions crates/chainio/clients/elcontracts/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ impl ELChainWriter {
}
}

/// Sets signer for ELChainWriter
///
/// # Arguments
///
/// * `signer`: signer string
///
pub fn set_signer(&mut self, signer: String) {
self.signer = signer;
}

/// Register an operator to EigenLayer, and wait for the transaction to be mined.
///
/// # Arguments
Expand Down

0 comments on commit c9cdb6f

Please # to comment.