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

Integrate EigenSDK wallet in batcher #348

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

ian-shim
Copy link
Contributor

@ian-shim ian-shim commented Mar 14, 2024

Why are these changes needed?

Integrates EigenSDK wallet interface for sending transactions and retrieving receipts from chain.
This will allow using both private key EOA and Fireblocks MPC wallet to send transactions with a single interface.

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@@ -482,7 +491,7 @@ func serializeProof(proof *merkletree.Proof) []byte {
return proofBytes
}

func (b *Batcher) parseBatchIDFromReceipt(ctx context.Context, txReceipt *types.Receipt) (uint32, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

context isn't used here

@@ -140,7 +140,7 @@ func mustNewSimulatedBackend() (client SimulatedBackend, deployerAddr common.Add
balance.SetString("10000000000000000000", 10) // 10 eth in wei

deployerAddr = auth.From
genesisAlloc := map[common.Address]core.GenesisAccount{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core.GenesisAccount has been deprecated

@ian-shim ian-shim marked this pull request as ready for review March 14, 2024 21:33
@ian-shim ian-shim force-pushed the hotwallet-batcher branch 2 times, most recently from 8b9c30d to 635c50e Compare March 18, 2024 05:47
@mooselumph
Copy link
Collaborator

Looks good to me

len(config.FireblocksConfig.VaultAccountName) > 0 {
secretKey, err := os.ReadFile(config.FireblocksConfig.SecretKeyPath)
if err != nil {
return fmt.Errorf("Cannot read fireblocks secret from %s: %w", config.FireblocksConfig.SecretKeyPath, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: lower case to "cannot.."

return []cli.Flag{
cli.StringFlag{
Name: PrefixFlag(flagPrefix, FireblocksAPIKeyFlagName),
Usage: "Fireblocks API Key. To configure Fireblocks MPC wallet, this field is required.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment that they can be empty string, in which case it'll fallback to private key wallet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an optional parameter, so empty string doesn't need to be passed in to fall back to private key wallet.
I'll comment that it will fall back to private key wallet if not configured.

@ian-shim ian-shim force-pushed the hotwallet-batcher branch from f33fd8f to 4f920b7 Compare March 20, 2024 01:34
@ian-shim ian-shim merged commit 6efe3b8 into Layr-Labs:master Mar 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants