컨트렉트 배포시 실행되는 함수.
초기값 설정등에 쓰임constructor() { owner = msg.sender; }
함수 실행전 검사를 해주는 함수?
반복되는 검사 요소 처리에 용이함mapping( address => bool ) blacklist ; modifier chk_bl(){ require( blacklist[ msg.sender ] == false ) ; _ ; } function add( uint a , uint b ) public view chk_bl returns( uint ) { return ( a + b ) ; }
block.number: 현재 블록의 번호를 반환합니다.
block.timestamp: 현재 블록의 타임스탬프를 반환합니다.
block.difficulty: 현재 블록의 난이도를 반환합니다.
block.coinbase: 현재 블록의 블록 생성자(마이너)의 주소를 반환합니다.