GetStorageAt returns the storage from the state at the given address, key and block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block numbers are also allowed.
(ctx context.Context, address common.Address, key string, blockNr rpc.BlockNumber)
| 692 | // block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block |
| 693 | // numbers are also allowed. |
| 694 | func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address common.Address, key string, blockNr rpc.BlockNumber) (hexutil.Bytes, error) { |
| 695 | state, _, err := s.b.StateAndHeaderByNumber(ctx, blockNr, false) |
| 696 | if state == nil || err != nil { |
| 697 | return nil, err |
| 698 | } |
| 699 | res := state.GetState(address, common.HexToHash(key)) |
| 700 | return res[:], state.Error() |
| 701 | } |
| 702 | |
| 703 | // CallArgs represents the arguments for a call. |
| 704 | type CallArgs struct { |
nothing calls this directly
no test coverage detected