Skip to content

Commit

Permalink
Add hardfork to the reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Ori Pomerantz authored and winsvega committed Aug 19, 2023
1 parent 70f5c0c commit 9b00b68
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/test_filler/test_addr_pre.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@
sstore(0, add(2,2))
}

Optionally, you can specify the hard fork for which to compile the code

::

:yul berlin {
// Add 2+2 and store the value in storage location 0.
// Because we compile using the Berlin hardfork,
// there is no PUSH0, and we can use the code to check
// forks prior to Shanghai.
sstore(0, add(2,2))
}


- `Solidity, which you can learn here <https://cryptozombies.io/>`_. Solidity
code can be provided to a test in two ways:
Expand All @@ -44,3 +57,9 @@

- Put a **:solidity** section with the contract source code. In
that case, the value in **code:** is **:solidity <name of contract>**.

In either case, you can specify the hardfork to use using this syntax:

::

// RETESTETH_SOLC_EVM_VERSION=berlin

0 comments on commit 9b00b68

Please sign in to comment.