diff --git a/contracts/interfaces/IBiconomySponsorshipPaymaster.sol b/contracts/interfaces/IBiconomySponsorshipPaymaster.sol index 761ad22..81c4e0c 100644 --- a/contracts/interfaces/IBiconomySponsorshipPaymaster.sol +++ b/contracts/interfaces/IBiconomySponsorshipPaymaster.sol @@ -22,6 +22,9 @@ interface IBiconomySponsorshipPaymaster { event TokensWithdrawn(address indexed token, address indexed to, uint256 indexed amount, address actor); event WithdrawalRequestSubmitted(address withdrawAddress, uint256 amount); event WithdrawalRequestCancelledFor(address paymasterId); + event TrustedPaymasterIdSet(address indexed paymasterId, bool isTrusted); + event EthWithdrawn(address indexed recipient, uint256 indexed amount); + event MinDepositChanged(uint256 indexed oldValue, uint256 indexed newValue); function depositFor(address paymasterId) external payable; diff --git a/contracts/sponsorship/BiconomySponsorshipPaymaster.sol b/contracts/sponsorship/BiconomySponsorshipPaymaster.sol index e4bdb3f..1a37c14 100644 --- a/contracts/sponsorship/BiconomySponsorshipPaymaster.sol +++ b/contracts/sponsorship/BiconomySponsorshipPaymaster.sol @@ -138,7 +138,10 @@ contract BiconomySponsorshipPaymaster is */ function setTrustedPaymasterId(address paymasterId, bool isTrusted) external payable onlyOwner { if (paymasterId == address(0)) revert PaymasterIdCanNotBeZero(); - _trustedPaymasterIds[paymasterId] = isTrusted; + if (_trustedPaymasterIds[paymasterId] != isTrusted) { + _trustedPaymasterIds[paymasterId] = isTrusted; + emit TrustedPaymasterIdSet(paymasterId, isTrusted); + } } /** @@ -148,6 +151,7 @@ contract BiconomySponsorshipPaymaster is */ function setMinDeposit(uint256 newMinDeposit) external payable onlyOwner { minDeposit = newMinDeposit; + emit MinDepositChanged(minDeposit, newMinDeposit); } /** @@ -243,6 +247,7 @@ contract BiconomySponsorshipPaymaster is if (!success) { revert WithdrawalFailed(); } + emit EthWithdrawn(recipient, amount); } function withdrawTo(address payable withdrawAddress, uint256 amount) external virtual override {