Skip to content

Commit d788db1

Browse files
committed
Fix broken links
1 parent b19a349 commit d788db1

File tree

10 files changed

+25
-21
lines changed

10 files changed

+25
-21
lines changed

not-so-smart-contracts/cairo/consider_L1_to_L2_message_failure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Consider L1 to L2 message failure
22

3-
In Starknet, [Ethereum contracts can send messages from L1 to L2, using a bridge](https://starknet.io/docs/hello_starknet/l1l2.html#messages-from-l1-to-l2). However, it is not guaranteed that the message will be processed by the sequencer.
3+
In Starknet, [Ethereum contracts can send messages from L1 to L2, using a bridge](https://docs.starknet.io/documentation/architecture_and_concepts/L1-L2_Communication/messaging-mechanism/). However, it is not guaranteed that the message will be processed by the sequencer.
44
For instance, a message can fail to be processed if there is a sudden spike in the gas price and the value provided is too low. For that reason, Starknet developers provided a
5-
[API to cancel on-going messages](https://docs.starknet.io/docs/L1-L2%20Communication/messaging-mechanism/#l1--l2-messages)
5+
[API to cancel on-going messages](https://docs.starknet.io/documentation/architecture_and_concepts/L1-L2_Communication/messaging-mechanism/#l2-l1_message_cancellation)
66

77
# Example
88

not-so-smart-contracts/cairo/replay_protection/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Consider the following function that validates a signature for EIP712-style perm
1212

1313
## Mitigations
1414

15-
- Consider using the [OpenZeppelin Contracts for Cairo Account contract](https://github.com/OpenZeppelin/cairo-contracts/blob/main/docs/Account.md) or another existing account contract implementation.
15+
- Consider using the [OpenZeppelin Contracts for Cairo Account contract](https://github.com/OpenZeppelin/cairo-contracts/blob/main/docs/modules/ROOT/pages/accounts.adoc) or another existing account contract implementation.
1616

1717
## External Examples
1818

not-so-smart-contracts/cairo/view_state/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# State modifications in a view function
22

3-
StarkNet provides the @view decorator to signal that a function should not make state modifications. However, this is [not currently enforced by the compiler](https://starknet.io/docs/hello_starknet/intro.html). Developers should take care when designing view functions but also when calling functions in other contracts as they may result in unexpected behavior if they do include state modifications accidentally.
3+
StarkNet provides the @view decorator to signal that a function should not make state modifications. However, this is [not currently enforced by the compiler](https://www.cairo-lang.org/docs/hello_starknet/intro.html). Developers should take care when designing view functions but also when calling functions in other contracts as they may result in unexpected behavior if they do include state modifications accidentally.
44

55
## Example
66

not-so-smart-contracts/cosmos/broken_bookkeeping/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ A malicious user can screw an exchange rate in two ways:
5353
* by force-sending Tokens to the module, changing the `tokensHeld` value
5454
* by transferring uTokens to another chain via IBC, chaning `uTokensInCirculation` value
5555

56-
The first "attack" could be pulled of by sending [`MsgSend`](https://docs.cosmos.network/main/modules/bank/03_messages.html#msgsend) message. However, it would be not profitable (probably), as executing it would irreversibly decrease an attacker's resources.
56+
The first "attack" could be pulled of by sending [`MsgSend`](https://docs.cosmos.network/main/modules/bank#msgsend) message. However, it would be not profitable (probably), as executing it would irreversibly decrease an attacker's resources.
5757

5858
The second one works because the IBC module [burns transferred coins in the source chain](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/transfer/keeper/relay.go#L135-L136) and mints corresponding tokens in the destination chain. Therefore, it will decrease the supply reported by the `x/bank` module, increasing the exchange rate. After the attack the malicious user can just transfer back uTokens.
5959

not-so-smart-contracts/cosmos/unregistered_msg_handler/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Unregistered message handler
22

3-
In the legacy version of the [Msg Service](https://docs.cosmos.network/v0.44/building-modules/msg-services.html#implementation), all messages have to be registered in a module keeper's `NewHandler` method. Failing to do so would prevent users from sending the not-registered message.
3+
In the legacy version of the `Msg Service`, all messages have to be registered in a module keeper's `NewHandler` method. Failing to do so would prevent users from sending the not-registered message.
44

5-
In [the recent Cosmos version manual registration is no longer needed](https://docs.cosmos.network/v0.44/architecture/adr-031-msg-service.html#pros).
5+
In [the recent Cosmos version manual registration is no longer needed](https://docs.cosmos.network/v0.47/building-modules/msg-services).
66

77
## Example
88

not-so-smart-contracts/substrate/randomness/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ To use randomness in a Substrate pallet, all you need to do is require a source
44
1. `random_seed`: This function takes no arguments and returns back a random value. Calling this value multiple times in a block will result in the same value.
55
2. `random`: Takes in a byte-array (a.k.a "context-identifier") and returns a value that is as independent as possible from other contexts.
66

7-
Substrate provides the [Randomness Collective Flip Pallet](https://paritytech.github.io/substrate/master/pallet_randomness_collective_flip/index.html) and a Verifiable Random Function implementation in the [BABE pallet](https://paritytech.github.io/substrate/master/pallet_babe/index.html). Developers can also choose to build their own source of randomness.
7+
Substrate provides the [Randomness Collective Flip Pallet](https://docs.rs/pallet-randomness-collective-flip/latest/pallet_randomness_collective_flip/) and a Verifiable Random Function implementation in the [BABE pallet](https://paritytech.github.io/substrate/master/pallet_babe/index.html). Developers can also choose to build their own source of randomness.
88

99
A bad source of randomness can lead to a variety of exploits such as the theft of funds or undefined system behavior.
1010

program-analysis/echidna/Exercise-8.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ We recommend to first try without reading the following hints. The hints are in
3939

4040
- The invariant that we are looking for is "an attacker cannot get almost whole amount of rewards"
4141
- 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)
42-
- A template is provided in [contracts/the-rewarder/EchidnaRewarder.sol](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/contracts/the-rewarder/EchidnaRewarder.sol)
4342
- A config file is provided in [the-rewarder.yaml](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/solutions/the-rewarder.yaml)
4443

4544
## Solution

program-analysis/manticore/adding-constraints.md

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

33
**Table of contents:**
44

5-
- [Introduction](#introduction)
6-
- [Operators](#Operators)
7-
- [Constraints](#constraints)
8-
- [Checking Constraint](#checking-constraint)
9-
- [Summary: Adding Constraints](#summary-adding-constraints)
5+
- [Adding Constraints](#adding-constraints)
6+
- [Introduction](#introduction)
7+
- [Operators](#operators)
8+
- [Constraints](#constraints)
9+
- [Global constraint](#global-constraint)
10+
- [State constraint](#state-constraint)
11+
- [Checking Constraint](#checking-constraint)
12+
- [Summary: Adding Constraints](#summary-adding-constraints)
1013

1114
## Introduction
1215

@@ -68,7 +71,7 @@ m.transaction(caller=user_account,
6871

6972
### State constraint
7073

71-
Use [state.constrain(constraint)](https://manticore.readthedocs.io/en/latest/api.html?highlight=operator#manticore.core.state.StateBase.constrain) to add a constraint to a specific state
74+
Use [state.constrain(constraint)](https://manticore.readthedocs.io/en/latest/states.html?highlight=statebase#manticore.core.state.StateBase.constrain) to add a constraint to a specific state
7275
It can be used to constrain the state after its exploration to check some property on it.
7376

7477
## Checking Constraint

program-analysis/manticore/getting-throwing-paths.md

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

33
**Table of contents:**
44

5-
- [Introduction](#introduction)
6-
- [Using state information](#using-state-information)
7-
- [How to generate testcase](#how-to-generate-testcase)
8-
- [Summary: Getting Throwing Path](#summary-getting-throwing-path)
5+
- [Getting Throwing Path](#getting-throwing-path)
6+
- [Introduction](#introduction)
7+
- [Using state information](#using-state-information)
8+
- [How to generate testcase](#how-to-generate-testcase)
9+
- [Summary](#summary)
10+
- [Summary: Getting Throwing Path](#summary-getting-throwing-path)
911

1012

1113
## Introduction
@@ -51,7 +53,7 @@ data = ABI.deserialize("uint", data)
5153

5254
## How to generate testcase
5355

54-
Use [m.generate_testcase(state, name)](https://manticore.readthedocs.io/en/latest/api.html#manticore.ethereum.ManticoreEVM.generate_testcase) to generate testcase:
56+
Use [m.generate_testcase(state, name)](https://github.com/trailofbits/manticore/blob/dc8c3c822bbd50adabe50cafef38457505c0bc7b/manticore/ethereum/manticore.py#L1572) to generate testcase:
5557

5658
```python3
5759
m.generate_testcase(state, 'BugFound')

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

Lines changed: 1 addition & 1 deletion
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/trailofbits/building-secure-contracts/blob/master/program-analysis/determine-properties.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](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`.
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)