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

add set_signer method in Writer methods #364

Merged
merged 4 commits into from
Feb 19, 2025
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
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
Loading