Skip to content

Commit d098e71

Browse files
committed
docs
1 parent 7ef7c93 commit d098e71

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

book/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
- [Performance]()
6363
- [Chaos](./framework/chaos/chaos.md)
6464
- [Fork Testing](./framework/fork.md)
65+
- [Fork Testing (Mutating Storage)](./framework/fork_storage.md)
6566
- [Libraries](./libraries.md)
6667
- [Seth](./libs/seth.md)
6768
- [WASP](./libs/wasp/overview.md)

framework/evm_storage/layout_api_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ import (
1616

1717
// TestLayoutAPI that's the example of using helpers to override storage in your contracts
1818
func TestLayoutAPI(t *testing.T) {
19-
//t.Skip("this test is for manual debugging and figuring out layout of custom structs")
19+
t.Skip("this test is for manual debugging and figuring out layout of custom structs")
2020
// load contract layout file, see testdata/layout.json
2121
// more docs here - https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html#
2222
layout, err := evm_storage.New(layoutFile)
2323
if err != nil {
2424
t.Fatalf("failed to load layout: %v", err)
2525
}
2626

27-
encodeFunc := func(addr string, index uint8, group uint8) string {
27+
encodeCustomStructFunc := func(addr string, index uint8, group uint8) string {
2828
// huge structs can be packed differently to save space
2929
// cast storage 0x5FbDB2315678afecb367f032d93F642f64180aa3 0x1 --rpc-url http://localhost:8545
3030
addrBytes, _ := hex.DecodeString(strings.TrimPrefix(addr, "0x"))
@@ -82,7 +82,7 @@ func TestLayoutAPI(t *testing.T) {
8282
}
8383
{
8484
slot := layout.MustArraySlot("a_signers", 1)
85-
data := encodeFunc("0x00000000000000000000000000000000000000a5", 255, 42)
85+
data := encodeCustomStructFunc("0x00000000000000000000000000000000000000a5", 255, 42)
8686
fmt.Printf("setting slot: %s with data: %s\n", slot, data)
8787
r := rpc.New(testRPCURL, nil)
8888
err = r.AnvilSetStorageAt([]interface{}{contractAddr, slot, data})
@@ -91,7 +91,7 @@ func TestLayoutAPI(t *testing.T) {
9191
}
9292
{
9393
slot := layout.MustMapSlot("s_signers", "0x00000000000000000000000000000000000000a5")
94-
data := encodeFunc("0x00000000000000000000000000000000000000a5", 254, 40)
94+
data := encodeCustomStructFunc("0x00000000000000000000000000000000000000a5", 254, 40)
9595
fmt.Printf("setting slot: %s with data: %s\n", slot, data)
9696
r := rpc.New(testRPCURL, nil)
9797
err = r.AnvilSetStorageAt([]interface{}{contractAddr, slot, data})

0 commit comments

Comments
 (0)