Skip to content

Commit

Permalink
chore: unify the interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
renlulu committed Aug 10, 2024
1 parent 12cba1f commit 5cfabb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions chainio/txmgr/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ func (m *SimpleTxManager) WithGasLimitMultiplier(multiplier float64) *SimpleTxMa
// To check out the whole flow on how this works, check out the README.md in this folder
func (m *SimpleTxManager) Send(ctx context.Context, tx *types.Transaction) (*types.Receipt, error) {

txID, err := m.SendWithoutWaiting(ctx, tx)
r, err := m.SendWithoutWaiting(ctx, tx)
if err != nil {
return nil, errors.Join(errors.New("send: failed to estimate gas and nonce"), err)
}

receipt, err := m.waitForReceipt(ctx, *txID)
receipt, err := m.waitForReceipt(ctx, r.TxHash.Hex())
if err != nil {
log.Info("Transaction receipt not found", "err", err)
return nil, err
Expand All @@ -83,7 +83,7 @@ func (m *SimpleTxManager) Send(ctx context.Context, tx *types.Transaction) (*typ
return receipt, nil
}

func (m *SimpleTxManager) SendWithoutWaiting(ctx context.Context, tx *types.Transaction) (*wallet.TxID, error) {
func (m *SimpleTxManager) SendWithoutWaiting(ctx context.Context, tx *types.Transaction) (*types.Receipt, error) {
// Estimate gas and nonce
// can't print tx hash in logs because the tx changes below when we complete and sign it
// so the txHash is meaningless at this point
Expand All @@ -105,7 +105,9 @@ func (m *SimpleTxManager) SendWithoutWaiting(ctx context.Context, tx *types.Tran
if err != nil {
return nil, errors.Join(errors.New("send: failed to estimate gas and nonce"), err)
}
return &txID, nil
return &types.Receipt{
TxHash: common.HexToHash(txID),
}, nil
}

func NoopSigner(addr common.Address, tx *types.Transaction) (*types.Transaction, error) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/eigenlayer-middleware
Submodule eigenlayer-middleware updated 55 files
+3 −0 .gitmodules
+3 −29 LICENSE
+10 −24 README.md
+ audits/Dedaub - Middleware Audit - Final - Feb'24.pdf
+2 −2 docs/README.md
+1 −1 docs/ServiceManagerBase.md
+1 −1 docs/experimental/AVS-Guide.md
+0 −1 foundry.toml
+1 −0 lib/ds-test
+1 −1 lib/eigenlayer-contracts
+1 −1 lib/forge-std
+4 −8 src/BLSApkRegistry.sol
+62 −116 src/BLSSignatureChecker.sol
+0 −175 src/EjectionManager.sol
+1 −5 src/IndexRegistry.sol
+0 −33 src/OperatorStateRetriever.sol
+9 −52 src/RegistryCoordinator.sol
+1 −6 src/RegistryCoordinatorStorage.sol
+28 −93 src/ServiceManagerBase.sol
+0 −53 src/ServiceManagerBaseStorage.sol
+3 −3 src/ServiceManagerRouter.sol
+10 −22 src/StakeRegistry.sol
+3 −24 src/interfaces/IECDSAStakeRegistryEventsAndErrors.sol
+0 −55 src/interfaces/IEjectionManager.sol
+41 −15 src/interfaces/IServiceManager.sol
+0 −61 src/interfaces/IServiceManagerUI.sol
+0 −283 src/unaudited/ECDSAServiceManagerBase.sol
+75 −204 src/unaudited/ECDSAStakeRegistry.sol
+3 −10 src/unaudited/ECDSAStakeRegistryStorage.sol
+10 −14 src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol
+0 −69 test/events/IServiceManagerBaseEvents.sol
+1 −1 test/ffi/BLSPubKeyCompendiumFFI.t.sol
+1 −6 test/integration/CoreRegistration.t.sol
+61 −117 test/integration/IntegrationDeployer.t.sol
+1 −1 test/integration/TimeMachine.t.sol
+2 −4 test/integration/User.t.sol
+0 −123 test/mocks/AVSDirectoryMock.sol
+3 −3 test/mocks/DelegationMock.sol
+0 −22 test/mocks/ECDSAServiceManagerMock.sol
+0 −14 test/mocks/ECDSAStakeRegistryMock.sol
+0 −110 test/mocks/RewardsCoordinatorMock.sol
+3 −9 test/mocks/ServiceManagerMock.sol
+146 −368 test/unit/BLSApkRegistryUnit.t.sol
+1 −1 test/unit/BitmapUtils.t.sol
+0 −186 test/unit/ECDSAServiceManager.t.sol
+14 −60 test/unit/ECDSAStakeRegistryEqualWeightUnit.t.sol
+16 −48 test/unit/ECDSAStakeRegistryPermissionedUnit.t.sol
+105 −472 test/unit/ECDSAStakeRegistryUnit.t.sol
+0 −399 test/unit/EjectionManagerUnit.t.sol
+110 −266 test/unit/OperatorStateRetrieverUnit.t.sol
+0 −56 test/unit/RegistryCoordinatorUnit.t.sol
+0 −527 test/unit/ServiceManagerBase.t.sol
+0 −1 test/unit/ServiceManagerRouter.t.sol
+411 −820 test/unit/StakeRegistryUnit.t.sol
+91 −122 test/utils/MockAVSDeployer.sol

0 comments on commit 5cfabb4

Please sign in to comment.