일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
- REACT
- 삶
- bitcoin
- solidity
- typeScript
- express.js
- CLASS
- error
- HTML
- concept
- Props
- tailwindcss
- CSS
- Redux
- nextJS
- useState
- SSR
- built in object
- web
- Interface
- node.js
- graphQL
- JavaScript
- evm
- Ethereum
- 기준
- blockchain
- API
- hardhat
- middleware
- Today
- Total
목록Blockchain (89)
ReasonJun
Events and emit are two important concepts in Solidity. Events are a way to log and notify external entities (such as user interfaces or other smart contracts) about specific occurrences within a smart contract. Emit is the keyword used to trigger or emit events within the smart contract code. Events are similar to logs or records that capture important information, allowing external observers t..
// 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 ..