Skip to content

Commit 28ba0ce

Browse files
authored
Merge pull request #219 from crytic/reorder
Fix broken links
2 parents 33fe787 + 0bbf66b commit 28ba0ce

File tree

7 files changed

+24
-25
lines changed

7 files changed

+24
-25
lines changed

SUMMARY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- [Forks <> CIPs](./learn_evm/cips_forks.md)
1717
- [Upgrades <> TIPs](./learn_evm/tips_upgrades.md)
1818
- [Forks <> BEPs](./learn_evm/beps_forks.md)
19-
- [Not so smart contracts]()
19+
- [Not so smart contracts](./not-so-smart-contracts/README.md)
2020
- [Algorand](./not-so-smart-contracts/algorand/README.md)
2121
- [Rekeying](./not-so-smart-contracts/algorand/rekeying/README.md)
2222
- [Unchecked Transaction Fees](./not-so-smart-contracts/algorand/unchecked_transaction_fee/README.md)

learn_evm/evm_opcodes.md

+16-17
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
7474
| [`0x55`](#sstore) | SSTORE | Save word to storage | - | 20000** |
7575
| [`0x56`](#jump) | JUMP | Alter the program counter | - | 8 |
7676
| [`0x57`](#jumpi) | JUMPI | Conditionally alter the program counter | - | 10 |
77-
| [`0x58`](#getpc) | GETPC | Get the value of the program counter prior to the increment | - | 2 |
77+
| [`0x58`](#pc) | PC | Get the value of the program counter prior to the increment | - | 2 |
7878
| [`0x59`](#msize) | MSIZE | Get the size of active memory in bytes | - | 2 |
7979
| [`0x5a`](#gas) | GAS | Get the amount of available gas, including the corresponding reduction for the cost of this instruction | - | 2 |
8080
| [`0x5b`](#jumpdest) | JUMPDEST | Mark a valid destination for jumps | - | 1 |
@@ -149,19 +149,19 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
149149
| [`0xa3`](#log3) | LOG3 | Append log record with three topics | - | 1500 |
150150
| [`0xa4`](#log4) | LOG4 | Append log record with four topics | - | 1875 |
151151
| `0xa5` - `0xaf` | Unused | - |
152-
| [`0xb0`](#jumpto) | JUMPTO | Tentative [libevmasm has different numbers](https://github.com/ethereum/solidity/blob/c61610302aa2bfa029715b534719d25fe3949059/libevmasm/Instruction.h#L176)| [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
153-
| [`0xb1`](#jumpif) | JUMPIF | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
154-
| [`0xb2`](#jumpsub) | JUMPSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
155-
| [`0xb4`](#jumpsubv) | JUMPSUBV | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
156-
| [`0xb5`](#beginsub) | BEGINSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
157-
| [`0xb6`](#begindata) | BEGINDATA | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
158-
| [`0xb8`](#returnsub) | RETURNSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
159-
| [`0xb9`](#putlocal) | PUTLOCAL | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
160-
| [`0xba`](#getlocal) | GETLOCAL | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
152+
| `0xb0` | JUMPTO | Tentative [libevmasm has different numbers](https://github.com/ethereum/solidity/blob/c61610302aa2bfa029715b534719d25fe3949059/libevmasm/Instruction.h#L176)| [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
153+
| `0xb1` | JUMPIF | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
154+
| `0xb2` | JUMPSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
155+
| `0xb4` | JUMPSUBV | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
156+
| `0xb5` | BEGINSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
157+
| `0xb6` | BEGINDATA | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
158+
| `0xb8` | RETURNSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
159+
| `0xb9` | PUTLOCAL | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
160+
| `0xba` | GETLOCAL | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
161161
| `0xbb` - `0xe0` | Unused | - |
162-
| [`0xe1`](#sloadbytes) | SLOADBYTES | Only referenced in pyethereum | - | - |
163-
| [`0xe2`](#sstorebytes) | SSTOREBYTES | Only referenced in pyethereum | - | - |
164-
| [`0xe3`](#ssize) | SSIZE | Only referenced in pyethereum | - | - |
162+
| `0xe1` | SLOADBYTES | Only referenced in pyethereum | - | - |
163+
| `0xe2` | SSTOREBYTES | Only referenced in pyethereum | - | - |
164+
| `0xe3` | SSIZE | Only referenced in pyethereum | - | - |
165165
| `0xe4` - `0xef` | Unused | - |
166166
| [`0xf0`](#create) | CREATE | Create a new account with associated code | - | 32000 |
167167
| [`0xf1`](#call) | CALL | Message-call into an account | - | Complicated |
@@ -172,9 +172,8 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
172172
| `0xf6` - `0xf9` | Unused | - | - |
173173
| [`0xfa`](#staticcall) | STATICCALL | Similar to CALL, but does not modify state | - | 40 |
174174
| `0xfb` | Unused | - | - |
175-
| [`0xfc`](#txexecgas) | TXEXECGAS | Not in yellow paper FIXME | - | - |
176175
| [`0xfd`](#revert) | REVERT | Stop execution and revert state changes, without consuming all provided gas and providing a reason | - | 0 |
177-
| [`0xfe`](#invalid) | INVALID | Designated invalid instruction | - | 0 |
176+
| `0xfe` | INVALID | Designated invalid instruction | - | 0 |
178177
| [`0xff`](#selfdestruct) | SELFDESTRUCT | Halt execution and register account for later deletion | - | 5000* |
179178

180179
## Instruction Details
@@ -262,7 +261,7 @@ c = (a + b) % m
262261
c = (a * b) % m
263262

264263
-----
265-
### EXT
264+
### EXP
266265
**0x0a**
267266

268267
(a, b, m) => (c)
@@ -408,7 +407,7 @@ res = value >> shift
408407
value: int256
409408

410409
-----
411-
### SHA3
410+
### KECCAK256
412411
**0x20**
413412

414413
(offset, len) => (hash)

program-analysis/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ The broad areas that are frequently relevant for smart contracts include:
7373
Component | Tools | Examples
7474
--- | --- | --- |
7575
State machine | Echidna, Manticore |
76-
Access control | Slither, Echidna, Manticore | [Slither exercise 2](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/slither/exercise2.md), [Echidna exercise 2](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/Exercise-2.md)
77-
Arithmetic operations | Manticore, Echidna | [Echidna exercise 1](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/Exercise-1.md), [Manticore exercises 1 - 3](https://github.com/crytic/building-secure-contracts/tree/master/program-analysis/manticore/exercises)
78-
Inheritance correctness | Slither | [Slither exercise 1](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/slither/exercise1.md)
76+
Access control | Slither, Echidna, Manticore | [Slither exercise 2](./slither/exercise2.md), [Echidna exercise 2](./echidna/exercises/Exercise-2.md)
77+
Arithmetic operations | Manticore, Echidna | [Echidna exercise 1](./echidna/exercises/Exercise-1.md), [Manticore exercises 1 - 3](./manticore/exercises)
78+
Inheritance correctness | Slither | [Slither exercise 1](./slither/exercise1.md)
7979
External interactions | Manticore, Echidna |
8080
Standard conformance | Slither, Echidna, Manticore | [`slither-erc`](https://github.com/crytic/slither/wiki/ERC-Conformance)
8181

program-analysis/echidna/exercises/Exercise-5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ We recommend to first try without reading the following hints. The hints are in
3838

3939
- Remember that sometimes you have to supply the test contract with Ether. Read more in [the Echidna wiki](https://github.com/crytic/echidna/wiki/Config) and look at [the default config setup](https://github.com/crytic/echidna/blob/master/tests/solidity/basic/default.yaml).
4040
- The invariant that we are looking for is "the balance of the receiver contract can not decrease"
41-
- Read what is the [multi abi option](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/common-testing-approaches.md#external-testing)
41+
- Read what is the [multi abi option](../basic/common-testing-approaches.md#external-testing)
4242
- A template is provided in [contracts/naive-receiver/NaiveReceiverEchidna.sol](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/contracts/naive-receiver/NaiveReceiverEchidna.sol)
4343
- A config file is provided in [naivereceiver.yaml](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/naivereceiver.yaml)
4444

program-analysis/echidna/exercises/Exercise-6.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Only the following contracts are relevant:
3737
We recommend to first try without reading the following hints. The hints are in the [`hints` branch](https://github.com/crytic/damn-vulnerable-defi-echidna/tree/hints).
3838

3939
- The invariant that we are looking for is "Flash loan can always be made"
40-
- Read what is the [multi abi option](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/common-testing-approaches.md#external-testing)
40+
- Read what is the [multi abi option](../basic/common-testing-approaches.md#external-testing)
4141
- The `receiveTokens` callback function must be implemented
4242
- A template is provided in [contracts/unstoppable/UnstoppableEchidna.sol](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/contracts/unstoppable/UnstoppableEchidna.sol)
4343
- A config file is provided in [unstoppable.yaml](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/unstoppable.yaml)

program-analysis/echidna/exercises/Exercise-8.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Only the following contracts are relevant:
3838
We recommend to first try without reading the following hints. The hints are in the [`hints` branch](https://github.com/crytic/damn-vulnerable-defi-echidna/tree/hints).
3939

4040
- The invariant that we are looking for is "an attacker cannot get almost whole amount of rewards"
41-
- Read what is the [multi abi option](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/common-testing-approaches.md#external-testing)
41+
- Read what is the [multi abi option](../basic/common-testing-approaches.md#external-testing)
4242
- A config file is provided in [the-rewarder.yaml](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/solutions/the-rewarder.yaml)
4343

4444
## Solution

program-analysis/manticore/symbolic-execution-introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ As `f()` contains two paths, a DSE will construct two differents path predicates
2828
- Path 1: `a == 65`
2929
- Path 2: `Not (a == 65)`
3030

31-
Each path predicate is a mathematical formula that can be given to a so-called [SMT solver](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/manticore/symbolic-execution-introduction.md), which will try to solve the equation. For `Path 1`, the solver will say that the path can be explored with `a = 65`. For `Path 2`, the solver can give `a` any value other than 65, for example `a = 0`.
31+
Each path predicate is a mathematical formula that can be given to a so-called `SMT solver`, which will try to solve the equation. For `Path 1`, the solver will say that the path can be explored with `a = 65`. For `Path 2`, the solver can give `a` any value other than 65, for example `a = 0`.
3232

3333
### Verifying properties
3434
Manticore allows a full control over all the execution of each path. As a result, it allows to add arbirtray contraints to almost anything. This control allows for the creation of properties on the contract.

0 commit comments

Comments
 (0)