@@ -75,6 +75,12 @@ describe('OperatorRewarder', function () {
7575 . withArgs ( ethers . ZeroAddress ) ;
7676 } ) ;
7777
78+ it ( 'should not transfer beneficiary address to same address' , async function ( ) {
79+ await expect ( this . mock . connect ( this . admin ) . transferBeneficiary ( this . beneficiary . address ) )
80+ . to . be . revertedWithCustomError ( this . mock , 'BeneficiaryAlreadySet' )
81+ . withArgs ( this . beneficiary . address ) ;
82+ } ) ;
83+
7884 it ( 'should not transfer beneficiary address if not owner' , async function ( ) {
7985 await expect ( this . mock . connect ( this . anyone ) . transferBeneficiary ( this . anyone . address ) )
8086 . to . be . revertedWithCustomError ( this . mock , 'OwnableUnauthorizedAccount' )
@@ -333,6 +339,13 @@ describe('OperatorRewarder', function () {
333339 . to . be . revertedWithCustomError ( this . mock , 'InvalidBasisPoints' )
334340 . withArgs ( 10001 ) ;
335341 } ) ;
342+
343+ it ( 'should revert if max fee already set' , async function ( ) {
344+ await this . mock . connect ( this . admin ) . setMaxfee ( 1000 ) ;
345+ await expect ( this . mock . connect ( this . admin ) . setMaxfee ( 1000 ) )
346+ . to . be . revertedWithCustomError ( this . mock , 'MaxFeeAlreadySet' )
347+ . withArgs ( 1000 , 1000 ) ;
348+ } ) ;
336349 } ) ;
337350
338351 describe ( 'setFee' , async function ( ) {
@@ -389,6 +402,13 @@ describe('OperatorRewarder', function () {
389402 . withArgs ( 10001 ) ;
390403 } ) ;
391404
405+ it ( 'should revert if fee already set' , async function ( ) {
406+ await this . mock . connect ( this . beneficiary ) . setFee ( 1000 ) ;
407+ await expect ( this . mock . connect ( this . beneficiary ) . setFee ( 1000 ) )
408+ . to . be . revertedWithCustomError ( this . mock , 'FeeAlreadySet' )
409+ . withArgs ( 1000 , 1000 ) ;
410+ } ) ;
411+
392412 it ( 'should revert if over max fee' , async function ( ) {
393413 await this . mock . connect ( this . admin ) . setMaxfee ( 1000 ) ;
394414 await expect ( this . mock . connect ( this . beneficiary ) . setFee ( 1234 ) )
0 commit comments