Next-BlockChain

고정 헤더 영역

글 제목

메뉴 레이어

Next-BlockChain

메뉴 리스트

  • 홈
  • 태그
  • 분류 전체보기 (358)
    • Computer Science (19)
      • OS (3)
      • Network (1)
      • NoSQL (4)
      • DevOps (2)
      • Security (8)
    • Blockchain (94)
      • BlockChain Theory (25)
      • Bitcoin (3)
      • Ethereum (17)
      • Cosmos (4)
      • DeFi (13)
      • DID (3)
      • NFT (7)
      • Oracle - Chainlink (8)
      • Geth_2019_(NAKsir-melody)님자.. (1)
    • Web (13)
      • React (6)
      • NodeJS (4)
      • Echo (2)
    • Programming Language (201)
      • Go (60)
      • Solidity (40)
      • HTML (2)
      • JavaScript (97)
      • CSS (2)
    • 독서 (19)
      • 독후감 (19)
    • 교양 (6)
      • 국어 (4)
      • 영어 (1)
      • 인물 (1)
    • 경제 (0)

검색 레이어

Next-BlockChain

검색 영역

컨텐츠 검색

Programming Language

  • Solidity - Data Locations

    2022.12.25 by Yongari

  • Solidity - Structs

    2022.12.25 by Yongari

  • Solidity - Enum

    2022.12.25 by Yongari

  • Solidity - Array

    2022.12.25 by Yongari

  • CSS 상속이해

    2022.12.23 by Yongari

  • Solidity - Mapping

    2022.12.23 by Yongari

  • Solidity - For and While Loop

    2022.12.23 by Yongari

  • Solidity - If / Else

    2022.12.23 by Yongari

Solidity - Data Locations

Data Locations - Storage, Memory and Calldata Variables are declared as either storage, memory or calldata to explicitly specify the location of the data. storage - variable is a state variable (store on blockchain) memory - variable is in memory and it exists while a function is being called calldata - special data location that contains function arguments 데이터 위치 - 스토리지, 메모리 및 통화 데이터 변수는 데이터의 위..

Programming Language/Solidity 2022. 12. 25. 10:58

Solidity - Structs

You can define your own type by creating a struct. Struct를 만들어서 사용자 고유의 유형을 만들 수 있습니다.(정의할 수 있습니다.) They are useful for grouping together related data. 관련 데이터를 그룹화하는 데 유용합니다. Structs can be declared outside of a contract and imported in another contract. Struct는 계약 외부에서 선언하고 다른 계약으로 가져올 수 있습니다. // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; contract Todos { struct Todo { string text; b..

Programming Language/Solidity 2022. 12. 25. 10:53

Solidity - Enum

Enum Solidity supports enumerables and they are useful to model choice and keep track of state. 솔리디티는 enum(열거형)을 지원합니다. 그리고 선택을 모델링하고 상태를 추적하는 데 유용합니다. Enums can be declared outside of a contract. 열거형은 계약 외부에서 선언할 수 있습니다. // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; contract Enum { // Enum representing shipping status // 상태를 표현하는 Enum enum Status { Pending, Shipped, Accepted, Rejecte..

Programming Language/Solidity 2022. 12. 25. 10:44

Solidity - Array

Array can have a compile-time fixed size or a dynamic size. 배열은 컴파일 시간이 고정적인 크기 또는 동적인 크기를 가질 수 있습니다. 즉 컴파일 타임에 배열 길이를 정하는 고정배열과 배열을 동적으로 할당하는 동적배열이 있습니다. // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; contract Array { // Several ways to initialize an array // 배열을 초기화하는 여러 가지 방법 uint[] public arr; uint[] public arr2 = [1, 2, 3]; // Fixed sized array, all elements initialize to 0 // 고정된..

Programming Language/Solidity 2022. 12. 25. 09:33

CSS 상속이해

CSS는 스타일링 도구로서 독립적으로 기능하지 않습니다. HTML이라는 마크업 언어가 있어야 동작할 수 있습니다. CSS는 HTML을 스타일링하게 바꿈으로서 디자인적으로 html을 더 훌륭하게 만들어줍니다. CSS의 디자인적인 기능외에도 상속을 할 수 있는 기능이 있는데요 다음과 같습니다. CSS 상속 적용한 화면 body와 span 셀렉터에 color 속성을 부여했습니다. .main { color: rebeccapurple; border: 2px solid #ccc; padding: 1em; } .special { color: black; font-weight: bold; } 그리고 html 소스를 보겠습니다. main class 하위 자식 중 Item One, Item Two, Item Three까지..

Programming Language/CSS 2022. 12. 23. 21:21

Solidity - Mapping

Maps are created with the syntax mapping(keyType => valueType). 맵은 구문 매핑(keyType = > valueType)을 사용하여 생성됩니다. The keyType can be any built-in value type, bytes, string, or any contract. keyType은 기본 제공 값 유형, 바이트, 문자열 또는 계약일 수 있습니다. valueType can be any type including another mapping or an array. valueType은 다른 매핑 또는 배열을 포함한 모든 유형일 수 있습니다. Mappings are not iterable. 매핑은 iterable(반복)할 수 없다. 코드 // SPD..

Programming Language/Solidity 2022. 12. 23. 19:20

Solidity - For and While Loop

Solidity supports for, while, and do while loops. Solidity 언어는 for문, while문 do while 문등을 지원합니다. 즉 반복문을 지원합니다. Don't write loops that are unbounded as this can hit the gas limit, causing your transaction to fail. 무한 루프를 작성하지 마십시오. 가스 한계에 도달하여 거래가 실패할 수 있습니다. 솔리디티에서 무한루프를 사용하면 가스 비용은 무한대로 비용이 들 수 있습니다. For the reason above, while and do while loops are rarely used. 위의 이유로 while and do while 루프는 거의..

Programming Language/Solidity 2022. 12. 23. 19:12

Solidity - If / Else

Solidity supports conditional statements if, else if and else. Solidity 언어는 조건문 if, else if, else, 삼항 연산자를 지원합니다. // SPDX-License-Identifier: MIT // 라이선스 명시 pragma solidity ^0.8.13; // 솔리디티 버전 명시 contract IfElse { //조건문별로 분기처리 function foo(uint x) public pure returns (uint) { if (x < 10) { return 0; } else if (x < 20) { return 1; } else { return 2; } } function ternary(uint _x) public pure retur..

Programming Language/Solidity 2022. 12. 23. 19:07

추가 정보

인기글

최신글

페이징

이전
1 ··· 15 16 17 18 19 20 21 ··· 26
다음
TISTORY
Next-BlockChain © Magazine Lab
페이스북 트위터 인스타그램 유투브 메일

티스토리툴바