Skip to content

Commit

Permalink
fix: move events
Browse files Browse the repository at this point in the history
  • Loading branch information
cosinlink committed Sep 3, 2024
1 parent d1a8a56 commit 4db83b8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
19 changes: 10 additions & 9 deletions contracts/BSCValidatorSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,27 @@ contract BSCValidatorSet is IBSCValidatorSet, System, IParamSubscriber, IApplica

/*----------------- events -----------------*/
event validatorSetUpdated();
event validatorJailed(address indexed validator); // @dev deprecated
event validatorEmptyJailed(address indexed validator); // @dev deprecated
event batchTransfer(uint256 amount); // @dev deprecated
event batchTransferFailed(uint256 indexed amount, string reason); // @dev deprecated
event batchTransferLowerFailed(uint256 indexed amount, bytes reason); // @dev deprecated
event systemTransfer(uint256 amount);
event directTransfer(address payable indexed validator, uint256 amount); // @dev deprecated
event directTransferFail(address payable indexed validator, uint256 amount); // @dev deprecated
event deprecatedDeposit(address indexed validator, uint256 amount);
event validatorDeposit(address indexed validator, uint256 amount);
event validatorMisdemeanor(address indexed validator, uint256 amount);
event validatorFelony(address indexed validator, uint256 amount);
event failReasonWithStr(string message); // @dev deprecated
event unexpectedPackage(uint8 channelId, bytes msgBytes); // @dev deprecated
event paramChange(string key, bytes value);
event feeBurned(uint256 amount);
event validatorEnterMaintenance(address indexed validator);
event validatorExitMaintenance(address indexed validator);
event finalityRewardDeposit(address indexed validator, uint256 amount);
event deprecatedFinalityRewardDeposit(address indexed validator, uint256 amount);

event validatorJailed(address indexed validator); // @dev deprecated
event validatorEmptyJailed(address indexed validator); // @dev deprecated
event batchTransfer(uint256 amount); // @dev deprecated
event batchTransferFailed(uint256 indexed amount, string reason); // @dev deprecated
event batchTransferLowerFailed(uint256 indexed amount, bytes reason); // @dev deprecated
event directTransfer(address payable indexed validator, uint256 amount); // @dev deprecated
event directTransferFail(address payable indexed validator, uint256 amount); // @dev deprecated
event failReasonWithStr(string message); // @dev deprecated
event unexpectedPackage(uint8 channelId, bytes msgBytes); // @dev deprecated
event tmpValidatorSetUpdated(uint256 validatorsNum); // @dev deprecated

/*----------------- init -----------------*/
Expand Down
5 changes: 2 additions & 3 deletions contracts/SlashIndicator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ contract SlashIndicator is ISlashIndicator, System, IParamSubscriber, IApplicati
uint256 public felonySlashScope;

event validatorSlashed(address indexed validator);
event maliciousVoteSlashed(bytes32 indexed voteAddrSlice); // @dev deprecated
event indicatorCleaned();
event paramChange(string key, bytes value);
event failedFelony(address indexed validator, uint256 slashCount, bytes failReason);

event maliciousVoteSlashed(bytes32 indexed voteAddrSlice); // @dev deprecated
event knownResponse(uint32 code); // @dev deprecated
event unKnownResponse(uint32 code); // @dev deprecated
event crashResponse(); // @dev deprecated

event failedFelony(address indexed validator, uint256 slashCount, bytes failReason);

struct Indicator {
uint256 height;
uint256 count;
Expand Down
9 changes: 4 additions & 5 deletions contracts/TokenHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,17 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR
mapping(address => mapping(address => LockInfo)) public lockInfoMap;
uint8 internal reentryLock;

event rewardTo(address to, uint256 amount);
event receiveDeposit(address from, uint256 amount);
event WithdrawUnlockedToken(address indexed tokenAddr, address indexed recipient, uint256 amount);

event transferInSuccess(address bep20Addr, address refundAddr, uint256 amount); // @dev deprecated
event transferOutSuccess(address bep20Addr, address senderAddr, uint256 amount, uint256 relayFee); // @dev deprecated
event refundSuccess(address bep20Addr, address refundAddr, uint256 amount, uint32 status); // @dev deprecated
event refundFailure(address bep20Addr, address refundAddr, uint256 amount, uint32 status); // @dev deprecated
event rewardTo(address to, uint256 amount);
event receiveDeposit(address from, uint256 amount);
event unexpectedPackage(uint8 channelId, bytes msgBytes); // @dev deprecated
event paramChange(string key, bytes value); // @dev deprecated

// BEP-171: Security Enhancement for Cross-Chain Module
event LargeTransferLocked(address indexed tokenAddr, address indexed recipient, uint256 amount, uint256 unlockAt); // @dev deprecated
event WithdrawUnlockedToken(address indexed tokenAddr, address indexed recipient, uint256 amount);
event CancelTransfer(address indexed tokenAddr, address indexed attacker, uint256 amount); // @dev deprecated
event LargeTransferLimitSet(address indexed tokenAddr, address indexed owner, uint256 largeTransferLimit); // @dev deprecated

Expand Down
2 changes: 1 addition & 1 deletion contracts/deprecated/RelayerHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ contract RelayerHub is IRelayerHub, System, IParamSubscriber {
}

event relayerUnRegister(address _relayer);
event paramChange(string key, bytes value); // @dev deprecated

event paramChange(string key, bytes value); // @dev deprecated
event managerRemoved(address _removedManager); // @dev deprecated
event managerAdded(address _addedManager); // @dev deprecated
event relayerUpdated(address _from, address _to); // @dev deprecated
Expand Down
3 changes: 2 additions & 1 deletion contracts/deprecated/RelayerIncentivize.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ contract RelayerIncentivize is IRelayerIncentivize, System, IParamSubscriber {

uint256 public dynamicExtraIncentiveAmount; // @dev deprecated

event rewardToRelayer(address relayer, uint256 amount);

event distributeCollectedReward(
uint256 sequence, uint256 roundRewardForHeaderRelayer, uint256 roundRewardForTransferRelayer
); // @dev deprecated
event paramChange(string key, bytes value); // @dev deprecated
event rewardToRelayer(address relayer, uint256 amount);

function init() external onlyNotInit {
require(!alreadyInit, "already initialized");
Expand Down
3 changes: 2 additions & 1 deletion contracts/deprecated/Staking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ contract Staking is IStaking, System, IParamSubscriber, IApplication {
}

/*----------------- Events -----------------*/
event rewardClaimed(address indexed delegator, uint256 amount);

event delegateSubmitted(address indexed delegator, address indexed validator, uint256 amount, uint256 relayerFee); // @dev deprecated
event undelegateSubmitted(address indexed delegator, address indexed validator, uint256 amount, uint256 relayerFee); // @dev deprecated
event redelegateSubmitted(
Expand All @@ -87,7 +89,6 @@ contract Staking is IStaking, System, IParamSubscriber, IApplication {
uint256 relayerFee
); // @dev deprecated
event rewardReceived(address indexed delegator, uint256 amount); // @dev deprecated
event rewardClaimed(address indexed delegator, uint256 amount);
event undelegatedReceived(address indexed delegator, address indexed validator, uint256 amount); // @dev deprecated
event undelegatedClaimed(address indexed delegator, uint256 amount);
event delegateSuccess(address indexed delegator, address indexed validator, uint256 amount); // @dev deprecated
Expand Down

0 comments on commit 4db83b8

Please sign in to comment.