일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- CSS
- blockchain
- typeScript
- Ethereum
- 기준
- solidity
- Props
- concept
- graphQL
- web
- 삶
- useState
- Redux
- express.js
- nextJS
- node.js
- error
- CLASS
- Interface
- evm
- SSR
- HTML
- REACT
- JavaScript
- tailwindcss
- bitcoin
- built in object
- middleware
- hardhat
- API
- Today
- Total
목록Blockchain/Solidity (46)
ReasonJun
// SPDX-License-Identifier: MIT pragma solidity >= 0.7.0 < 0.9.0; contract Ex1 { uint public a = 3; uint public b = 5; function myBlock() public returns (uint, uint){ a = 99; b = 0; return(a, b); } function myBlcok2(uint c) public { a = c; } function myBlock3() public pure returns(uint age, uint weight) { age = 20; weight = 55; } function getValue(uint e) public pure returns (uint) { return e; }..
Pure and view functions are special types of functions in Solidity that have different restrictions on how they can interact with the state of the contract. Pure functions do not read or modify the state of the contract. They can only use the parameters that are passed to them and local variables. Pure functions are often used to perform calculations or to validate data. View functions can read ..
Visibility in Solidity is used to control who can access and modify functions and state variables within a contract. There are four visibility levels in Solidity: Public: Public functions and state variables can be accessed by anyone, inside or outside of the contract. Internal: Internal functions and state variables can be accessed by any function within the contract, as well as any function wi..
Operators in Solidity are used to perform various operations on data. There are many different types of operators, each with its own specific function. The most common types of operators in Solidity are: Arithmetic operators: These operators are used to perform basic arithmetic operations, such as addition, subtraction, multiplication, and division. Comparison operators: These operators are used..
A constant in Solidity is a variable whose value cannot be changed once it has been initialized. Constants are defined using the constant keyword. Constants can be used to represent values that should not change, such as the maximum supply of a token or the address of a trusted contract. They can also be used to improve the readability and maintainability of your code. Here is an example of how ..
Solidity has two main types of data types: value types and reference types. Value types are stored directly in the memory of the Ethereum Virtual Machine (EVM). When a value type variable is assigned to another variable, a copy of the value is created. This means that changes to one variable will not affect the other variable. Reference types are stored in a separate memory location and contain ..