Custom Modifier
In the Factory contract, prior to the setFeeTo and setFeeToSetter entries, there is a check that occurs, and the caller is feeToSetter
.
Let's create a custom modifier for it.
only_fee_setter
In the .logics/impls/factory/factory.rs file, import modifier_definition
and modifiers
:
use openbrush::{
modifier_definition,
modifiers,
traits::{
AccountId,
Storage,
ZERO_ADDRESS,
},
};