Skip to content

Commit 65be64d

Browse files
committed
docs: fix link, add links
1 parent 03bdea1 commit 65be64d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/writing_tests/tutorials/state_transition.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The function parameters (`state_test` and `pre`) are [pytest fixtures](https://d
7979
env = Environment(number=1)
8080
```
8181

82-
This line specifies that `env` is an [`Environment`](https://github.com/ethereum/execution-spec-tests/blob/8b4504aaf6ae0b69c3e847a6c051e64fcefa4db0/src/ethereum_test_tools/common/types.py#L711) object. In this example, we only override the block `number` to 1, leaving all other values at their defaults. It's recommended to use default values whenever possible and only specify custom values when required for your specific test scenario.
82+
This line specifies that `env` is an [`Environment`][ethereum_test_types.Environment] object. In this example, we only override the block `number` to 1, leaving all other values at their defaults. It's recommended to use default values whenever possible and only specify custom values when required for your specific test scenario. (For all available fields, see the pydantic model fields in the source code of [`Environment`][ethereum_test_types.Environment] and [`EnvironmentGeneric`](https://github.com/ethereum/execution-spec-tests/blob/b4d7826bec631574a6fb95d0c58d2c8c4d6e02ca/src/ethereum_test_types/block_types.py#L76) from which `Environment` inherits.)
8383

8484
#### Pre State
8585

@@ -132,7 +132,7 @@ The returned object, which includes a private key, an address, and a nonce, is s
132132
)
133133
```
134134

135-
With the pre-state built, we can now create the transaction that will call our contract. Let's examine the key components of this [`Transaction`](../../../src/ethereum_test_tools/common/types.py):
135+
With the pre-state built, we can now create the transaction that will call our contract. Let's examine the key components of this [`Transaction`][ethereum_test_types.Transaction] (for all available fields, see the source code of [`Transaction`][ethereum_test_types.Transaction] and [`TransactionGeneric`](https://github.com/ethereum/execution-spec-tests/blob/b4d7826bec631574a6fb95d0c58d2c8c4d6e02ca/src/ethereum_test_types/transaction_types.py#L163) from which `Transaction` inherits).
136136

137137
- **`sender=sender`**: We use the EOA we created earlier, which already has the necessary information to sign the transaction and contains the correct `nonce`. The `nonce` is a protection mechanism to prevent replay attacks - it must equal the number of transactions sent from the sender's address, starting from zero. The framework automatically manages nonce incrementing for us.
138138

@@ -142,8 +142,6 @@ With the pre-state built, we can now create the transaction that will call our c
142142

143143
- **`ty=0x2`**: This specifies the transaction type (EIP-1559).
144144

145-
For more information, [see the static test documentation](../../running_tests/test_formats/state_test.md).
146-
147145
#### Post State
148146

149147
Now we need to define what we expect the blockchain state to look like after our transaction executes:

0 commit comments

Comments
 (0)