
Modifier
=> 함수의 동작을 변경시키기 위해 사용
=> 함수 실행 전과 실행 후에 특정한 기능을 가능케 함
=> 상속이 가능한 property, overriding 가능
_; underscore
function testModifier() {
uint256 public age = 0;
modifier onlyProposer(uint256 proposalId) {
require(proposals[proposalId].proposer == msg.sender);
_;
}
function intro(uint256 _age) onlyProposer {
age = _age
}
modifier를 통해 onlyOwner와 같은 식별을 가능케 함