Skip to content

Commit

Permalink
add Rebonded event
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjj9219 committed Jul 12, 2024
1 parent 21b0ed4 commit 601aa9c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
17 changes: 17 additions & 0 deletions contracts/docs/earning/Earning.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,23 @@ Bonded event.
| sender `indexed` | address | The sender of the transaction. |
| amount | uint256 | The bond amount. |

### Rebonded

```solidity
event Rebonded(address indexed sender, uint256 amount)
```

Rebonded event.



#### Parameters

| Name | Type | Description |
|---|---|---|
| sender `indexed` | address | The sender of the transaction. |
| amount | uint256 | The rebond amount. |

### Unbonded

```solidity
Expand Down
17 changes: 17 additions & 0 deletions contracts/docs/earning/IEarning.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,23 @@ Bonded event.
| sender `indexed` | address | The sender of the transaction. |
| amount | uint256 | The bond amount. |

### Rebonded

```solidity
event Rebonded(address indexed sender, uint256 amount)
```

Rebonded event.



#### Parameters

| Name | Type | Description |
|---|---|---|
| sender `indexed` | address | The sender of the transaction. |
| amount | uint256 | The rebond amount. |

### Unbonded

```solidity
Expand Down
2 changes: 1 addition & 1 deletion contracts/earning/Earning.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ contract Earning is IEarning {
if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) }
}

emit Bonded(msg.sender, abi.decode(returnData, (uint256)));
emit Rebonded(msg.sender, abi.decode(returnData, (uint256)));
return true;
}

Expand Down
5 changes: 5 additions & 0 deletions contracts/earning/IEarning.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ interface IEarning {
/// @param amount The unbond amount.
event Unbonded(address indexed sender, uint256 amount);

/// @notice Rebonded event.
/// @param sender The sender of the transaction.
/// @param amount The rebond amount.
event Rebonded(address indexed sender, uint256 amount);

/// @notice Withdraw unbonded.
/// @param sender The sender of the transaction.
/// @param amount The withdrawn unbonded amount.
Expand Down

0 comments on commit 601aa9c

Please sign in to comment.