pangyoelon

  • 홈
  • 태그
  • 방명록

modifier 1

여러개의 modifier 적용 시 순서

솔리디티의 modifier는 한 함수에 여러개 적용이 가능한데 그 순서를 알아보자 아래의 예시를 살펴보겠습니다 contract Test { address owner; modifier onlyOwner { require(msg.sender == owner); _; } modifier costs(uint price) { if (msg.value >= price) { _; } } constructor() public { owner = msg.sender; } function changeOwner(address newOwner) public onlyOwner costs(10) { owner = newOwner; } } 여기서 먼저 앞에 나온 onlyOwner부터 적용이 됩니다 고로 [ onlyOwner의 _; ..

Solidity 2023.06.15
이전
1
다음
더보기
프로필사진

pangyoelon

블록체인 개발자 https://github.com/km3140 https://velog.io/@pangyoelon

  • 분류 전체보기 (29)
    • BlockChain (4)
    • Node.js (6)
    • Javascript (1)
    • Solidity (4)
    • Git (3)
    • Go (1)
    • Shell (1)
    • 정보처리기사 (1)
    • React (2)
    • etc (2)
    • Typescript (1)
    • 해커톤 (1)
    • aws (1)

Tag

lens protocol, undefined hacker house, 비트코인, glitch hackathon, ethersjs, 깃허브 옵션, 채굴, 2022년 3월 5일 기출, TypeError: Member "push" not found or not visible after argument-dependent lookup in, solidity, 구글링 연산자 이스케이프, 글리치 해커톤, cors오류, Rebase, 블록체인, axios baseURL, undefined hackathon, tx.wait, react, git,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2026/02   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

방문자수Total

  • Today :
  • Yesterday :

Copyright © AXZ Corp. All rights reserved.

  • Github

티스토리툴바