일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- SSR
- blockchain
- tailwindcss
- API
- typeScript
- hardhat
- 삶
- useState
- error
- middleware
- solidity
- evm
- express.js
- Redux
- Ethereum
- REACT
- CLASS
- HTML
- JavaScript
- web
- nextJS
- built in object
- CSS
- Props
- bitcoin
- node.js
- concept
- Interface
- graphQL
- 기준
- Today
- Total
목록Blockchain (89)
ReasonJun
An abstract contract in Solidity is a contract that cannot be deployed by itself. It must be inherited by other contracts. Abstract contracts are used to define the common functionality of a group of related contracts. To create an abstract contract, you use the abstract keyword. For example, the following contract is abstract: abstract contract Student { function major() public pure virtual ret..
The virtual and override keywords in Solidity are used to support function overriding. Function overriding allows you to redefine a function that is inherited from a base contract. This can be useful for customizing the behavior of the function for your specific needs. Virtual functions A function is marked as virtual if it can be overridden by derived contracts. When a function is marked as vir..
Function overloading in Solidity allows you to define multiple functions with the same name but different argument types and/or numbers. This can be useful for creating more flexible and reusable code. For example, the following contract defines an overloaded add() function: contract Math { function add(uint256 a, uint256 b) public pure returns (uint256) { return a + b; } function add(uint256 a,..
// SPDX-License-Identifier: MIT pragma solidity >= 0.7.0 < 0.9.0; contract Number { uint private num = 4; function changeNum() public { num = 5; } function getNum() public view returns (uint) { return num; } } contract Caller { Number internal instance = new Number(); function changeNumber() public { instance.changeNum(); } function getNumber() public view returns(uint) { return instance.getNum(..
Inheritance in Solidity is a way to create new contracts that reuse and extend the functionality of existing contracts. This can be useful for reducing code duplication, creating reusable libraries, and building complex systems from smaller components. is To inherit from another contract, you use the is keyword. For example, the following contract inherits from the ERC20 contract: contract MyTok..
Immutable and constant are two keywords that can be used to declare variables in Solidity. Both keywords can be used to prevent the value of a variable from being changed, but they have some key differences. Constant variables are initialized at compile time and their value cannot be changed afterwards. This means that constant variables can only be assigned a value once, and they cannot be reas..