일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 기준
- hardhat
- JavaScript
- solidity
- 삶
- Redux
- useState
- CSS
- HTML
- blockchain
- Interface
- Props
- graphQL
- web
- built in object
- bitcoin
- SSR
- API
- REACT
- Ethereum
- express.js
- CLASS
- node.js
- evm
- middleware
- tailwindcss
- concept
- typeScript
- nextJS
- error
- Today
- Total
목록receive (2)
ReasonJun
The main difference between fallback() and receive() in Solidity is that fallback() is called when a contract receives Ether without any calldata, while receive() is called when a contract receives Ether with empty calldata. In other words, fallback() is called when a user sends Ether to a contract directly, while receive() is called when a user calls a function on a contract without passing any..
The receive() function in Solidity is a special function that is called automatically when a contract receives Ether without any calldata. This can happen when Ether is sent to the contract using the transfer() function or when a user sends Ether to the contract directly. The receive() function cannot have any arguments or return a value. It can only contain code that interacts with the contract..