Skip to content

Commit

Permalink
chore: minor readable updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlee42 committed Mar 6, 2024
1 parent eeba3a8 commit 4e2203b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions contracts/LockingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ contract LockingPool is ILockingPool, PausableUpgradeable, SequencerInfo {

/**
* @dev setSignerUpdateThrottle set signerUpdateThrottle
* @param _n the new value of the throttle
* Note: it can be 0
* @param _n the new value of the throttle, it can be 0
*/
function setSignerUpdateThrottle(uint256 _n) external onlyOwner {
signerUpdateThrottle = _n;
emit SetSignerUpdateThrottle(_n);
}

/**
* @dev updateSigner Allow sqeuencer to update new signers to replace old signer addresses,and NFT holder will be transfer driectly
* @dev updateSigner sqeuencer signer can update signer address
* Note: only signer can use this, the sequencer owner doesn't have access
* @param _seqId the sequencer id
* @param _signerPubkey the new signer pubkey address
*/
Expand Down Expand Up @@ -213,7 +213,7 @@ contract LockingPool is ILockingPool, PausableUpgradeable, SequencerInfo {
batchId,
_signerPubkey
);
emit SequencerOwnerChanged(seqId, msg.sender);
emit SequencerOwnerChanged(seqId, owner);
emit SequencerRewardRecipientChanged(seqId, address(0));
}

Expand All @@ -234,23 +234,24 @@ contract LockingPool is ILockingPool, PausableUpgradeable, SequencerInfo {
bytes calldata _signerPubkey
) external whenNotPaused whitelistRequired {
uint256 batchId = curBatchState.id;
address owner = msg.sender;
uint256 seqId = _lockFor(
batchId,
msg.sender,
owner,
_signer,
_signerPubkey,
_amount,
_rewardRecipient
);
escrow.newSequencer(
seqId,
msg.sender,
owner,
_signer,
_amount,
batchId,
_signerPubkey
);
emit SequencerOwnerChanged(seqId, msg.sender);
emit SequencerOwnerChanged(seqId, owner);
emit SequencerRewardRecipientChanged(seqId, _rewardRecipient);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/SequencerInfo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ contract SequencerInfo is OwnableUpgradeable, ISequencerInfo {
deactivationTime: 0,
unlockClaimTime: 0,
nonce: 1,
owner: msg.sender,
owner: _owner,
signer: _signer,
pubkey: _signerPubkey,
rewardRecipient: _rewardRecipient,
Expand Down

0 comments on commit 4e2203b

Please sign in to comment.