займ на карту онлайн кредит банк

Do modifiers work in interfaces

0

Can an interface enforce a modifier on a function?

For example, does this work:

contract TokenSeller {    modifer enforceSale(uint256 amount) {     ERC20 t = token();     uint256 beforeBalance = t.balanceOf(msg.sender);     _;     uint256 afterBalance = t.balanceOf(msg.sender);     require(afterBalance == beforeBalance + amount);   }    function buyToken(uint256 amount) public enforceSale(amount) returns(uint256);    function token() public returns(ERC20); } 

Is there another way to achieve this kind of interface?