You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-11Lines changed: 24 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,16 +12,16 @@ If there are any incorrect descriptions, I would appreciate it if you could let
12
12
13
13
**Table of Contents**
14
14
-[Ethereum](#ethereum)
15
-
-[Contract basics](#contract-basics)
15
+
-[Smart contract basics](#smart-contract-basics)
16
16
-[EVM puzzles](#evm-puzzles)
17
17
-[Misuse of `tx.origin`](#misuse-of-txorigin)
18
18
-[Weak sources of randomness from chain attributes](#weak-sources-of-randomness-from-chain-attributes)
19
19
-[ERC-20 basics](#erc-20-basics)
20
20
-[Storage overwrite by `delegatecall`](#storage-overwrite-by-delegatecall)
21
21
-[Context mismatch in `delegatecall`](#context-mismatch-in-delegatecall)
22
22
-[Integer overflow](#integer-overflow)
23
-
-[Non-executable Ether transfers to contracts](#non-executable-ether-transfers-to-contracts)
24
-
-[Forced Ether transfers to contracts via `selfdestruct`](#forced-ether-transfers-to-contracts-via-selfdestruct)
23
+
-[Ether transfer failures for non-payable contracts](#ether-transfer-failures-for-non-payable-contracts)
24
+
-[Forced Ether transfers to non-payable contracts via `selfdestruct`](#forced-ether-transfers-to-non-payable-contracts-via-selfdestruct)
25
25
-[Large gas consumption by contract callees](#large-gas-consumption-by-contract-callees)
26
26
-[Forgetting to set `view`/`pure` to interface and abstract contract functions](#forgetting-to-set-viewpure-to-interface-and-abstract-contract-functions)
27
27
-[`view` functions that do not always return same values](#view-functions-that-do-not-always-return-same-values)
@@ -30,6 +30,7 @@ If there are any incorrect descriptions, I would appreciate it if you could let
- If an attack is only valid for a particular version of Solidity and not for the latest version, the version is noted at the end of the heading.
82
83
- To avoid notation fluctuations, EVM terms are avoided as much as possible and Solidity terms are used.
83
84
84
-
### Contract basics
85
+
### Smart contract basics
85
86
- These challenges can be solved if you know the basic mechanics of Ethereum, [the basic language specification of Solidity](https://docs.soliditylang.org/en/latest/), and the basic operation of contracts.
### Ether transfer failures for non-payable contracts
186
188
- Do not create a contract on the assumption that normal Ether transfer (`.send()` or `.transfer()`) can always be executed.
187
189
- If a destination is a contract and there is no receive Ether function or payable fallback function, Ether cannot be transferred.
188
-
- However, instead of the normal transfer functions, the `selfdestruct` described below can be used to force such a contract to transfer Ether.
190
+
- However, instead of the normal transfer functions, the `selfdestruct` described in the next section can be used to force such a contract to transfer Ether.
|[Project SEKAI CTF 2022: Random Song](src/ProjectSekaiCTF2022/RandomSong/)| Chainlink VRF |
194
196
195
-
### Forced Ether transfers to contracts via `selfdestruct`
197
+
### Forced Ether transfers to non-payable contracts via `selfdestruct`
196
198
- If a contract does not have a receive Ether function and a payable fallback function, it is not guaranteed that Ether will not be received.
197
199
- When a contract executes `selfdestruct`, it can transfer its Ether to another contract or EOA, and this `selfdestruct` transfer can be forced even if the destination contract does not have the receive Ether function and the payable fallback function.
198
200
- If the application is built on the assumption that the Ether is `0`, it could be a bug.
0 commit comments