Skip to content

Commit

Permalink
Merge pull request #751 from chainbound/nico/fix/operator-extradata
Browse files Browse the repository at this point in the history
fix(cli): sanitize extra-data during registration
  • Loading branch information
merklefruit authored Jan 29, 2025
2 parents 62aa708 + 34aed70 commit dd46194
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bolt-cli/src/commands/operators/eigenlayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ impl EigenLayerSubcommand {
let signature = Bytes::from(signer.sign_hash_sync(&signature_digest)?.as_bytes());
let signature = SignatureWithSaltAndExpiry { signature, expiry, salt };

// Sanitize extra data removing quotes and trimming whitespace
let extra_data = extra_data.trim_matches('"').trim_start().trim_end().to_string();

// TODO(nico): consolidate holesky & mainnet smart contracts
if chain == Chain::Mainnet {
let el_middleware =
Expand Down
3 changes: 3 additions & 0 deletions bolt-cli/src/commands/operators/symbiotic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ impl SymbioticSubcommand {
);
}

// Sanitize extra data removing quotes and trimming whitespace
let extra_data = extra_data.trim_matches('"').trim_start().trim_end().to_string();

if chain == Chain::Mainnet {
let middleware = BoltSymbioticMiddlewareMainnet::new(
deployments.bolt.symbiotic_middleware,
Expand Down

0 comments on commit dd46194

Please sign in to comment.