Returns all instances where contracts' storage mappings include a given address, in the spirit of the FOIA (Freedom of Information Act)
Parameters
address
(address as hex string, default: 0x48D004a6C175dB331E99BeAf64423b3098357Ae7)chain_id
(uint64, default: 0)- Optional. Can be used to view information from a certain chain. If unset, defaults to
0
and returns results from all chains.
- Optional. Can be used to view information from a certain chain. If unset, defaults to
block_number
(uint64, default: 0)- Optional. Can be used to view information at a particular block. If unset, defaults to
0
and returns latest.
- Optional. Can be used to view information at a particular block. If unset, defaults to
limit
(uint32, default: 100)- Number of records you want returned.
offset
(uint32, default: 0)- For pagination. If you're showing ten records per page, choose offset = 9 for the second page.
Returns
Array with the following fields from @sim.mapping_storage_writes:
block_number
chain_id
contract_address
entry_slot
global_counter
key_1_type
key_1_value
key_2_type
key_2_value
key_3_type
key_3_value
txn_hash
value_after
value_before
value_type
variable_name
variable_slot
Query
SELECT *
FROM @sim.mapping_storage_writes
WHERE (
key_1_value = lower($address)
OR key_2_value = lower($address)
OR key_3_value = lower($address)
)
AND (
chain_id = $chain_id
OR $chain_id = 0
)
AND (
block_number <= $block_number
OR $block_number = 0
)
LIMIT $limit OFFSET $offset