Skip to content

Commit

Permalink
Update EIP-7201: Add note about Solidity compiler version
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
frangio authored Jul 8, 2023
1 parent 4350732 commit d333f35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EIPS/eip-7201.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A _namespace id_ is a string that uniquely identifies a namespace in a contract.

The storage location for a namespace is defined as `ns_loc(id: string) = keccak256(uint256(keccak256(id)) - 1)`.

A Solidity contract using namespaced storage can annotate a struct with the NatSpec tag `@custom:storage-location erc7201:<NAMESPACE_ID>` to identify it as a namespace with id `<NAMESPACE_ID>`.
A Solidity contract using namespaced storage can annotate a struct with the NatSpec tag `@custom:storage-location erc7201:<NAMESPACE_ID>` to identify it as a namespace with id `<NAMESPACE_ID>`. _(Note: The Solidity compiler includes this annotation in the AST since v0.8.20, so this is recommended as the minimum compiler version when using this pattern.)_

## Rationale

Expand All @@ -54,7 +54,7 @@ No backward compatibility issues found.
## Reference Implementation

```solidity
pragma solidity ^0.8.19;
pragma solidity ^0.8.20;
contract Example {
/// @custom:storage-location erc7201:example.main
Expand Down

0 comments on commit d333f35

Please sign in to comment.