Skip to content

Commit d695945

Browse files
committed
Fix links
1 parent 13186c2 commit d695945

16 files changed

+83
-70
lines changed

program-analysis/echidna/advanced/collecting-a-corpus.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
**Table of contents:**
44

5-
- [Introduction](#introduction)
6-
- [Collecting a corpus](#collecting-a-corpus)
7-
- [Seeding a corpus](#seeding-a-corpus)
5+
- [Collecting, visualizing and modifying an Echidna corpus](#collecting-visualizing-and-modifying-an-echidna-corpus)
6+
- [Introduction](#introduction)
7+
- [Collecting a corpus](#collecting-a-corpus)
8+
- [Seeding a corpus](#seeding-a-corpus)
89

910
## Introduction
1011

11-
We will see how to collect and use a corpus of transactions with Echidna. The target is the following smart contract (*[example/magic.sol](./example/magic.sol)*):
12+
We will see how to collect and use a corpus of transactions with Echidna. The target is the following smart contract (*[../example/magic.sol](../example/magic.sol)*):
1213

1314
```Solidity
1415
contract C {

program-analysis/echidna/advanced/finding-transactions-with-high-gas-consumption.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
**Table of contents:**
44

5-
- [Introduction](#introduction)
6-
- [Measuring Gas Consumption](#measuring-gas-consumption)
5+
- [Finding transactions with high gas consumption](#finding-transactions-with-high-gas-consumption)
6+
- [Introduction](#introduction)
7+
- [Measuring Gas Consumption](#measuring-gas-consumption)
78
- [Run Echidna](#run-echidna)
89
- [Filtering Out Gas-Reducing Calls](#filtering-out-gas-reducing-calls)
9-
- [Summary: Finding transactions with high gas consumption](#summary-finding-transactions-with-high-gas-consumption)
10+
- [Summary: Finding transactions with high gas consumption](#summary-finding-transactions-with-high-gas-consumption)
1011

1112
## Introduction
1213

13-
We will see how to find the transactions with high gas consumption with Echidna. The target is the following smart contract (*[example/gas.sol](./example/gas.sol)*):
14+
We will see how to find the transactions with high gas consumption with Echidna. The target is the following smart contract (*[../example/gas.sol](../example/gas.sol)*):
1415

1516
```solidity
1617
contract C {
@@ -49,7 +50,7 @@ Seed: 2320549945714142710
4950

5051
## Measuring Gas Consumption
5152

52-
To enable Echidna's gas consumption feature, create a configuration file [`config.yaml`](./example/gas.yaml):
53+
To enable Echidna's gas consumption feature, create a configuration file [`../example/gas.yaml`](../example/gas.yaml):
5354

5455
```yaml
5556
estimateGas: true
@@ -85,10 +86,10 @@ Seed: -325611019680165325
8586
8687
# Filtering Out Gas-Reducing Calls
8788
88-
The tutorial on [filtering functions to call during a fuzzing campaign](./filtering-functions.md) shows how to
89+
The tutorial on [filtering functions to call during a fuzzing campaign](../basic/filtering-functions.md) shows how to
8990
remove some functions during testing.
9091
This can be critical for getting an accurate gas estimate.
91-
Consider the following example (*[example/pushpop.sol](./example/pushpop.sol)*):
92+
Consider the following example (*[example/pushpop.sol](../example/pushpop.sol)*):
9293
9394
```solidity
9495
contract C {
@@ -113,7 +114,7 @@ contract C {
113114
}
114115
}
115116
```
116-
If Echidna uses this [`config.yaml`](./example/pushpop.yaml), it can call all functions and won't easily find transactions with high gas cost:
117+
If Echidna uses this [`config.yaml`](../example/pushpop.yaml), it can call all functions and won't easily find transactions with high gas cost:
117118

118119
```
119120
$ echidna-test pushpop.sol --config config.yaml
@@ -128,7 +129,7 @@ push used a maximum of 40839 gas
128129
```
129130

130131
That's because the cost depends on the size of `addrs` and random calls tend to leave the array almost empty.
131-
Blacklisting `pop` and `clear`, however, gives us much better results (*[example/blacklistpushpop.yaml](./example/blacklistpushpop.yaml)*):
132+
Blacklisting `pop` and `clear`, however, gives us much better results (*[../example/blacklistpushpop.yaml](../example/blacklistpushpop.yaml)*):
132133

133134
```yaml
134135
estimateGas: true

program-analysis/echidna/advanced/hevm-cheats-to-test-permit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ First we will call `permit()` on our Mock ERC20 token with the signature generat
4343

4444
## Code
4545

46-
The full example code can be found [here](example/TestDepositWithPermit.sol).
46+
The full example code can be found [here](../example/TestDepositWithPermit.sol).

program-analysis/echidna/advanced/optimization_mode.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
**Table of contents:**
44

5-
- [Introduction](#introduction)
6-
- [Optimizing with Echidna](#optimizing-with-echidna)
5+
- [Using optimization mode to find local maximums](#using-optimization-mode-to-find-local-maximums)
6+
- [Introduction](#introduction)
7+
- [Optimizing with Echidna](#optimizing-with-echidna)
78

89
## Introduction
910

@@ -22,7 +23,7 @@ and returns a `int256`. Echidna will try find a sequence of transactions to maxi
2223

2324
## Optimizing with Echidna
2425

25-
In this example, the target is the following smart contract (*[example/opt.sol](./example/opt.sol)*):
26+
In this example, the target is the following smart contract (*[../example/opt.sol](../example/opt.sol)*):
2627

2728
```solidity
2829
contract TestDutchAuctionOptimization {

program-analysis/echidna/advanced/testing-bytecode.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# How to test bytecode only contracts
22

33
**Table of contents:**
4-
- [Introduction](#introduction)
5-
- [Proxy pattern](#proxy-pattern)
6-
- [Run Echidna](#run-echidna)
7-
- [Differential fuzzing](#differential-fuzzing)
8-
- [Generic proxy pattern](#generic-proxy-code)
9-
- [Summary: Testing bytecode](#summary-testing-contracts-without-source-code)
4+
- [How to test bytecode only contracts](#how-to-test-bytecode-only-contracts)
5+
- [Introduction](#introduction)
6+
- [Proxy pattern](#proxy-pattern)
7+
- [Run Echidna](#run-echidna)
8+
- [Target source code](#target-source-code)
9+
- [Differential fuzzing](#differential-fuzzing)
10+
- [Generic Proxy code](#generic-proxy-code)
11+
- [Summary: Testing contracts without source code](#summary-testing-contracts-without-source-code)
1012

1113
## Introduction
1214

@@ -157,7 +159,7 @@ contract SolidityVersion{
157159
}
158160
```
159161

160-
Here we run Echidna with the [assertion mode](./assertion-checking.md):
162+
Here we run Echidna with the [assertion mode](../basic/assertion-checking.md):
161163
```
162164
$ echidna-test vyper.sol --config config.yaml --contract SolidityVersion --test-mode assertion
163165
assertion in test: passed! 🎉

program-analysis/echidna/advanced/using-multi-abi.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
**Table of contents:**
44

5-
- [Introduction](#introduction)
6-
- [What is `multi-abi` testing?](#what-is-multi-abi-testing)
7-
- [When and how to use `multi-abi`](#when-and-how-to-use-multi-abi)
8-
- [Run Echidna](#run-echidna)
9-
- [Use cases and conclusions](#use-cases-and-conclusions)
5+
- [Understanding and using `multi-abi` in Echidna](#understanding-and-using-multi-abi-in-echidna)
6+
- [Introduction](#introduction)
7+
- [What is `multi-abi` testing?](#what-is-multi-abi-testing)
8+
- [When and how to use `multi-abi`](#when-and-how-to-use-multi-abi)
9+
- [Run Echidna](#run-echidna)
10+
- [Example run with `multi-abi` set to `false`](#example-run-with-multi-abi-set-to-false)
11+
- [Example run with `multi-abi` set to `true`](#example-run-with-multi-abi-set-to-true)
12+
- [Use cases and conclusions](#use-cases-and-conclusions)
1013

1114
## Introduction
1215

@@ -28,7 +31,7 @@ This is where `multi-abi` testing is useful: It allows Echidna to call functions
2831

2932
## Run Echidna
3033

31-
We will use a simple example to show how `multi-abi` works. We will be using two contracts, `Flag` and `EchidnaTest`, both available in [`multiabi.sol`](example/multiabi.sol).
34+
We will use a simple example to show how `multi-abi` works. We will be using two contracts, `Flag` and `EchidnaTest`, both available in [`../example/multiabi.sol`](../example/multiabi.sol).
3235

3336
The `Flag` contract contains a boolean flag that is only set if `flip()` is called, and a getter function that returns the value of the flag. For now, ignore `test_fail()`, we will talk about this function later.
3437

@@ -68,7 +71,7 @@ contract EchidnaTest {
6871
}
6972
```
7073

71-
In a non `multi-abi` fuzzing campaign, Echidna is not able to break the invariant, because it only interacts with `EchidnaTest` functions. However, if we use the following configuration file, enabling `multi-abi` testing, the invariant is broken. You can access [`multiabi.yaml` here](example/multiabi.yaml).
74+
In a non `multi-abi` fuzzing campaign, Echidna is not able to break the invariant, because it only interacts with `EchidnaTest` functions. However, if we use the following configuration file, enabling `multi-abi` testing, the invariant is broken. You can access [`../example/multiabi.yaml` here](../example/multiabi.yaml).
7275

7376
```yaml
7477
testMode: assertion

program-analysis/echidna/basic/assertion-checking.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
**Table of contents:**
44

5-
- [Introduction](#introduction)
6-
- [Write an assertion](#write-an-assertion)
7-
- [Run Echidna](#run-echidna)
8-
- [When and how to use assertions](#when-and-how-to-use-assertions)
9-
- [Summary: Assertion checking](#summary-assertion-checking)
5+
- [How to test assertions with Echidna](#how-to-test-assertions-with-echidna)
6+
- [Introduction](#introduction)
7+
- [Write an assertion](#write-an-assertion)
8+
- [Run Echidna](#run-echidna)
9+
- [When and how to use assertions](#when-and-how-to-use-assertions)
10+
- [Summary: Assertion Checking](#summary-assertion-checking)
1011

1112
## Introduction
1213

@@ -29,7 +30,7 @@ contract Incrementor {
2930
}
3031
```
3132

32-
We want to make sure that `tmp` is less than or equal to `counter` after returning its difference. We could write an Echidna property, but we will need to store the `tmp` value somewhere. Instead, we could use an assertion like this one (*[example/assert.sol](./example/assert.sol)*):
33+
We want to make sure that `tmp` is less than or equal to `counter` after returning its difference. We could write an Echidna property, but we will need to store the `tmp` value somewhere. Instead, we could use an assertion like this one (*[../example/assert.sol](../example/assert.sol)*):
3334

3435
```solidity
3536
contract Incrementor {

program-analysis/echidna/basic/filtering-functions.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
**Table of contents:**
44

5-
- [Introduction](#introduction)
6-
- [Filtering functions](#filtering-functions)
5+
- [Filtering functions to call during a fuzzing campaign](#filtering-functions-to-call-during-a-fuzzing-campaign)
6+
- [Introduction](#introduction)
7+
- [Filtering functions](#filtering-functions)
78
- [Run Echidna](#run-echidna)
8-
- [Summary: Filtering functions](#summary-filtering-functions)
9+
- [Summary: Filtering functions](#summary-filtering-functions)
910

1011
## Introduction
1112

1213
We will see how to filter the functions to be fuzzed.
13-
The target is the following smart contract (*[example/multi.sol](./example/multi.sol)*):
14+
The target is the following smart contract (*[../example/multi.sol](../example/multi.sol)*):
1415

1516
```solidity
1617
contract C {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Join the team on Slack at: https://empireslacking.herokuapp.com/ #ethereum
1010

1111
## Targeted contract
1212

13-
We will test the following contract *[exercises/exercise1/token.sol](exercises/exercise1/token.sol)*:
13+
We will test the following contract *[./exercise1/token.sol](./exercise1/token.sol)*:
1414

1515
```Solidity
1616
contract Ownership{
@@ -57,7 +57,7 @@ We will test the following contract *[exercises/exercise1/token.sol](exercises/e
5757
- Add a property to check that `echidna_caller` cannot have more than an initial balance of 10000.
5858
- Once Echidna finds the bug, fix the issue, and re-check your property with Echidna.
5959

60-
The skeleton for this exercise is (*[exercises/exercise1/template.sol](./exercises/exercise1/template.sol)*):
60+
The skeleton for this exercise is (*[./exercise1/template.sol](./exercise1/template.sol)*):
6161

6262
```Solidity
6363
import "token.sol";
@@ -74,4 +74,4 @@ The skeleton for this exercise is (*[exercises/exercise1/template.sol](./exercis
7474

7575
## Solution
7676

77-
This solution can be found in [exercises/exercise1/solution.sol](./exercises/exercise1/solution.sol)
77+
This solution can be found in [./exercise1/solution.sol](./exercise1/solution.sol)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Join the team on Slack at: https://empireslacking.herokuapp.com/ #ethereum
1212

1313
## Targeted contract
1414

15-
We will test the following contract *[exercises/exercise2/token.sol](./exercises/exercise2/token.sol)*:
15+
We will test the following contract *[./exercise2/token.sol](./exercise2/token.sol)*:
1616

1717
```Solidity
1818
contract Ownership{
@@ -60,7 +60,7 @@ We will test the following contract *[exercises/exercise2/token.sol](./exercises
6060
- Add a property to check that the contract cannot be unpaused.
6161
- Once Echidna finds the bug, fix the issue, and re-try your property with Echidna.
6262

63-
The skeleton for this exercise is (*[exercises/exercise2/template.sol](./exercises/exercise2/template.sol)*):
63+
The skeleton for this exercise is (*[./exercise2/template.sol](./exercise2/template.sol)*):
6464

6565
```Solidity
6666
import "token.sol";
@@ -77,4 +77,4 @@ The skeleton for this exercise is (*[exercises/exercise2/template.sol](./exercis
7777

7878
## Solution
7979

80-
This solution can be found in [./exercises/exercise2/solution.sol](./exercises/exercise2/solution.sol)
80+
This solution can be found in [./exercise2/solution.sol](./exercise2/solution.sol)

0 commit comments

Comments
 (0)