diff --git a/contracts/core/RegistrationManager.sol b/contracts/core/RegistrationManager.sol index b051e84..88f17d3 100644 --- a/contracts/core/RegistrationManager.sol +++ b/contracts/core/RegistrationManager.sol @@ -472,7 +472,14 @@ contract RegistrationManager is IRegistrationManager, Initializable, UUPSUpgrade } registration.endEpoch = endEpoch; - emit DurationIncreased(sentinel, endEpoch); + emit SentinelRegistrationUpdated( + owner, + registration.startEpoch, + registration.endEpoch, + sentinel, + Constants.REGISTRATION_SENTINEL_STAKING, + stake.amount + ); } function _getActorAddressFromSignatureAndIncreaseSignatureNonce( diff --git a/contracts/interfaces/IRegistrationManager.sol b/contracts/interfaces/IRegistrationManager.sol index 2d7908a..5f72af3 100644 --- a/contracts/interfaces/IRegistrationManager.sol +++ b/contracts/interfaces/IRegistrationManager.sol @@ -23,14 +23,6 @@ interface IRegistrationManager { */ event BorrowingSentinelSlashed(address indexed sentinel); - /** - * @dev Emitted when an user increases his staking sentinel registration position by increasing his lock time within the Staking Manager. - * - * @param sentinel The sentinel - * @param endEpoch The new end epoch - */ - event DurationIncreased(address indexed sentinel, uint16 endEpoch); - /** * @dev Emitted when a guardian is slashed. * diff --git a/test/RegistrationManager.test.js b/test/RegistrationManager.test.js index e4d1c72..8923a67 100644 --- a/test/RegistrationManager.test.js +++ b/test/RegistrationManager.test.js @@ -616,8 +616,8 @@ describe('RegistrationManager', () => { expect(await epochsManager.currentEpoch()).to.be.equal(3) duration = EPOCH_DURATION * 4 await expect(registrationManager.connect(pntHolder1)['increaseSentinelRegistrationDuration(uint64)'](duration)) - .to.emit(registrationManager, 'DurationIncreased') - .withArgs(sentinel1.address, 10) + .to.emit(registrationManager, 'SentinelRegistrationUpdated') + .withArgs(pntHolder1.address, 3, 10, sentinel1.address, REGISTRATION_SENTINEL_STAKING, amount) expect(await registrationManager.sentinelStakedAmountByEpochOf(sentinel1.address, 3)).to.be.eq(truncateWithPrecision(amount)) expect(await registrationManager.sentinelStakedAmountByEpochOf(sentinel1.address, 4)).to.be.eq(truncateWithPrecision(amount)) @@ -721,8 +721,8 @@ describe('RegistrationManager', () => { expect(await epochsManager.currentEpoch()).to.be.equal(4) duration = EPOCH_DURATION * 4 await expect(registrationManager.connect(pntHolder1)['increaseSentinelRegistrationDuration(uint64)'](duration)) - .to.emit(registrationManager, 'DurationIncreased') - .withArgs(sentinel1.address, 9) + .to.emit(registrationManager, 'SentinelRegistrationUpdated') + .withArgs(pntHolder1.address, 3, 9, sentinel1.address, REGISTRATION_SENTINEL_STAKING, amount) expect(await registrationManager.sentinelStakedAmountByEpochOf(sentinel1.address, 3)).to.be.eq(truncateWithPrecision(amount)) expect(await registrationManager.sentinelStakedAmountByEpochOf(sentinel1.address, 4)).to.be.eq(truncateWithPrecision(amount)) @@ -811,8 +811,8 @@ describe('RegistrationManager', () => { await time.increase(EPOCH_DURATION * 5) expect(await epochsManager.currentEpoch()).to.be.equal(7) await expect(registrationManager.connect(pntHolder1)['increaseSentinelRegistrationDuration(uint64)'](duration)) - .to.emit(registrationManager, 'DurationIncreased') - .withArgs(sentinel1.address, 10) + .to.emit(registrationManager, 'SentinelRegistrationUpdated') + .withArgs(pntHolder1.address, 8, 10, sentinel1.address, REGISTRATION_SENTINEL_STAKING, amount) expect(await registrationManager.sentinelStakedAmountByEpochOf(sentinel1.address, 8)).to.be.eq(truncateWithPrecision(amount)) expect(await registrationManager.sentinelStakedAmountByEpochOf(sentinel1.address, 9)).to.be.eq(truncateWithPrecision(amount))