Skip to content

Commit

Permalink
Update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
ericglau committed Sep 11, 2023
1 parent a89817a commit 813e048
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 65 deletions.
70 changes: 5 additions & 65 deletions packages/plugin-hardhat/test/namespaced.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,6 @@ The actual snapshot is saved in `namespaced.js.snap`.

Generated by [AVA](https://avajs.dev).

## conflicting namespaces through inheritance

> Snapshot 1
`Contract \`contracts/Namespaced.sol:ConflictingNamespace\` is not upgrade safe␊
contracts/Namespaced.sol:29: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts␊
contracts/Namespaced.sol:6: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts`

## duplicate namespaces in same contract

> Snapshot 1
`Contract \`contracts/Namespaced.sol:DuplicateNamespace\` is not upgrade safe␊
contracts/Namespaced.sol:36: Namespace \`erc7201:conflicting\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts␊
contracts/Namespaced.sol:41: Namespace \`erc7201:conflicting\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts`

## validate namespace - bad

> Snapshot 1
Expand All @@ -43,7 +19,7 @@ Generated by [AVA](https://avajs.dev).
`New storage layout is incompatible␊
contracts/Namespaced.sol:128: Upgraded \`s\` to an incompatible type␊
contracts/Namespaced.sol:109: Upgraded \`s\` to an incompatible type␊
- Bad upgrade from struct RecursiveStruct.MyStruct to struct RecursiveStructV2_Bad.MyStruct␊
- In struct RecursiveStructV2_Bad.MyStruct␊
- Added \`c\``
Expand All @@ -54,7 +30,7 @@ Generated by [AVA](https://avajs.dev).
`New storage layout is incompatible␊
contracts/Namespaced.sol:181: Upgraded \`s\` to an incompatible type␊
contracts/Namespaced.sol:162: Upgraded \`s\` to an incompatible type␊
- Bad upgrade from struct TripleStruct.Outer to struct TripleStructV2_Bad.Outer␊
- In struct TripleStructV2_Bad.Outer␊
- Upgraded \`i\` to an incompatible type␊
Expand All @@ -68,13 +44,13 @@ Generated by [AVA](https://avajs.dev).
`New storage layout is incompatible␊
contracts/Namespaced.sol:244: Inserted \`a2\`␊
contracts/Namespaced.sol:225: Inserted \`a2\`␊
> New variables should be placed after all existing inherited variables␊
contracts/Namespaced.sol:230: Inserted \`a2\`␊
contracts/Namespaced.sol:211: Inserted \`a2\`␊
> New variables should be placed after all existing inherited variables␊
contracts/Namespaced.sol:238: Inserted \`a2\`␊
contracts/Namespaced.sol:219: Inserted \`a2\`␊
> New variables should be placed after all existing inherited variables`

## delete namespace - bad
Expand Down Expand Up @@ -103,39 +79,3 @@ Generated by [AVA](https://avajs.dev).
Example: Deleted \`x\`␊
> Keep the variable even if unused`

## moving namespace to inherited contract - conflicting namespace - bad

> Snapshot 1
`Contract \`contracts/Namespaced.sol:InheritsConflictingNamespace\` is not upgrade safe␊
contracts/Namespaced.sol:29: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts␊
contracts/Namespaced.sol:6: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts␊
contracts/Namespaced.sol:29: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts␊
contracts/Namespaced.sol:6: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts`

## moving namespace to inherited contract - conflicting namespace and has layout - bad

> Snapshot 1
`Contract \`contracts/Namespaced.sol:InheritsConflictingNamespaceAndHasLayout\` is not upgrade safe␊
contracts/Namespaced.sol:29: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts␊
contracts/Namespaced.sol:6: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts␊
contracts/Namespaced.sol:29: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts␊
contracts/Namespaced.sol:6: Namespace \`erc7201:example.main\` is defined multiple times␊
Use a unique namespace id for each struct annotated with '@custom:storage-location erc7201:<NAMESPACE_ID>' in your contract and its inherited contracts`
Binary file modified packages/plugin-hardhat/test/namespaced.js.snap
Binary file not shown.

0 comments on commit 813e048

Please sign in to comment.