github.com/lmittmann/w3@v0.20.0/module/eth/storage_at_test.go (about) 1 package eth_test 2 3 import ( 4 "testing" 5 6 "github.com/ethereum/go-ethereum/common" 7 "github.com/lmittmann/w3" 8 "github.com/lmittmann/w3/module/eth" 9 "github.com/lmittmann/w3/rpctest" 10 ) 11 12 func TestStorageAt(t *testing.T) { 13 rpctest.RunTestCases(t, []rpctest.TestCase[common.Hash]{ 14 { 15 Golden: "get_storage_at", 16 Call: eth.StorageAt(w3.A("0x000000000000000000000000000000000000c0DE"), w3.H("0x0000000000000000000000000000000000000000000000000000000000000001"), nil), 17 WantRet: w3.H("0x0000000000000000000000000000000000000000000000000000000000000042"), 18 }, 19 { 20 Golden: "get_storage_at__number", 21 Call: eth.StorageAt(w3.A("0x000000000000000000000000000000000000c0DE"), w3.H("0x0000000000000000000000000000000000000000000000000000000000000001"), nil), 22 WantRet: w3.H("0x0000000000000000000000000000000000000000000000000000000000000042"), 23 }, 24 }) 25 }