• Image placeholder
  • 홈 페이지
  • 블로그 센터
  • 범주
Image placeholder

smartcotract

Solidity의 정수 오버플로 및 언더플로

간단히 말해서 오버플로는 uint(부호 없는 정수)가 바이트 크기에 도달하는 상황입니다. 그런 다음 추가된 다음 요소는 첫 번째 변수 요소를 반환합니다. 8비트만 가질 수 있는 uint8이 있다고 가정해 보겠습니다. 즉, 우리가 저장할 수 있는 가장 큰 숫자는 이진수 11111111(십진수로 2^8 - 1 = 255)입니다. 아래 코드를 보세요. 위의 코드를 실행하면 "잔액"은 0이 됩니다....

securityethereumsoliditysmartcotract

© 2022 intrepidgeeks.com

Privacy Policy Contact US Sitemap
🍪 This website uses cookies to ensure you get the best experience on our website. Learn more