Skip to content

Commit 21c39fc

Browse files
committed
Emit an event when staking contract is authorized in TokenGrant
This is a security-critical action so it is worth having some sort of a notification we can watch for.
1 parent cc324ab commit 21c39fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

solidity/contracts/TokenGrant.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ contract TokenGrant {
2929
event TokenGrantStaked(uint256 indexed grantId, uint256 amount, address operator);
3030
event TokenGrantRevoked(uint256 id);
3131

32+
event StakingContractAuthorized(address indexed grantManager, address stakingContract);
33+
3234
struct Grant {
3335
address grantManager; // Token grant manager.
3436
address grantee; // Address to which granted tokens are going to be withdrawn.
@@ -86,6 +88,7 @@ contract TokenGrant {
8688
"Staking contract address can't be zero"
8789
);
8890
stakingContracts[msg.sender][_stakingContract] = true;
91+
emit StakingContractAuthorized(msg.sender, _stakingContract);
8992
}
9093

9194
/// @notice Gets the amount of granted tokens to the specified address.

0 commit comments

Comments
 (0)