pub struct registerMappingSstoreHookCall {
pub target: Address,
pub rootSlot: FixedBytes<32>,
pub callback: FixedBytes<4>,
}Expand description
Registers a callback after exact mapping-element SSTOREs rooted at rootSlot in target’s effective storage account.
The callback signature is function(address account, bytes32 computedSlot, bytes32 rootSlot, bytes32[] keys, bytes32 oldValue, bytes32 newValue) external; keys are raw words in
root-to-leaf order. Only complete 64-byte Keccak chains observed after the latest mapping
hook registration for target in the current top-level execution match; provenance is
cleared between top-level executions. Resolution follows the complete chain to its terminal
root and ignores registered intermediate hashes. Offsets, incomplete or unknown chains,
hashes computed before registration or in an earlier top-level execution, and source layouts
do not match. The contract that calls this cheatcode receives the callback. Registration
persists across reverts and replaces the same target/root callback; callback state rolls back
with its enclosing context, callback reverts propagate, and hooks are suppressed throughout
callback subtrees. The callback must authenticate msg.sender == address(vm) to prevent
external spoofing. Raw and mapping SSTORE hooks conflict per target, while multiple mapping
roots may be registered.
Function with signature registerMappingSstoreHook(address,bytes32,bytes4) and selector 0x12d14123.
function registerMappingSstoreHook(address target, bytes32 rootSlot, bytes4 callback) external;Fields§
§target: Address§rootSlot: FixedBytes<32>§callback: FixedBytes<4>Trait Implementations§
Source§impl Clone for registerMappingSstoreHookCall
impl Clone for registerMappingSstoreHookCall
Source§fn clone(&self) -> registerMappingSstoreHookCall
fn clone(&self) -> registerMappingSstoreHookCall
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl JsonAbiExt for registerMappingSstoreHookCall
impl JsonAbiExt for registerMappingSstoreHookCall
Source§impl SolCall for registerMappingSstoreHookCall
impl SolCall for registerMappingSstoreHookCall
Source§const SIGNATURE: &'static str = "registerMappingSstoreHook(address,bytes32,bytes4)"
const SIGNATURE: &'static str = "registerMappingSstoreHook(address,bytes32,bytes4)"
Source§type Parameters<'a> = (Address, FixedBytes<32>, FixedBytes<4>)
type Parameters<'a> = (Address, FixedBytes<32>, FixedBytes<4>)
Source§type Token<'a> = <<registerMappingSstoreHookCall as SolCall>::Parameters<'a> as SolType>::Token<'a>
type Token<'a> = <<registerMappingSstoreHookCall as SolCall>::Parameters<'a> as SolType>::Token<'a>
Source§type Return = registerMappingSstoreHookReturn
type Return = registerMappingSstoreHookReturn
Source§type ReturnTuple<'a> = ()
type ReturnTuple<'a> = ()
Source§type ReturnToken<'a> = <<registerMappingSstoreHookCall as SolCall>::ReturnTuple<'a> as SolType>::Token<'a>
type ReturnToken<'a> = <<registerMappingSstoreHookCall as SolCall>::ReturnTuple<'a> as SolType>::Token<'a>
Source§fn new<'a>(tuple: <Self::Parameters<'a> as SolType>::RustType) -> Self
fn new<'a>(tuple: <Self::Parameters<'a> as SolType>::RustType) -> Self
Source§fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_>
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_>
Source§fn abi_decode_returns(data: &[u8]) -> Result<Self::Return>
fn abi_decode_returns(data: &[u8]) -> Result<Self::Return>
Source§fn abi_decode_returns_validate(data: &[u8]) -> Result<Self::Return>
fn abi_decode_returns_validate(data: &[u8]) -> Result<Self::Return>
§fn abi_encoded_size(&self) -> usize
fn abi_encoded_size(&self) -> usize
§fn abi_decode_raw(data: &[u8]) -> Result<Self, Error>
fn abi_decode_raw(data: &[u8]) -> Result<Self, Error>
§fn abi_decode_raw_validate(data: &[u8]) -> Result<Self, Error>
fn abi_decode_raw_validate(data: &[u8]) -> Result<Self, Error>
§fn abi_decode(data: &[u8]) -> Result<Self, Error>
fn abi_decode(data: &[u8]) -> Result<Self, Error>
§fn abi_decode_validate(data: &[u8]) -> Result<Self, Error>
fn abi_decode_validate(data: &[u8]) -> Result<Self, Error>
§fn abi_encode_raw(&self, out: &mut Vec<u8>)
fn abi_encode_raw(&self, out: &mut Vec<u8>)
§fn abi_encode(&self) -> Vec<u8> ⓘ
fn abi_encode(&self) -> Vec<u8> ⓘ
§fn abi_encode_returns(ret: &Self::Return) -> Vec<u8> ⓘ
fn abi_encode_returns(ret: &Self::Return) -> Vec<u8> ⓘ
Auto Trait Implementations§
impl Freeze for registerMappingSstoreHookCall
impl RefUnwindSafe for registerMappingSstoreHookCall
impl Send for registerMappingSstoreHookCall
impl Sync for registerMappingSstoreHookCall
impl Unpin for registerMappingSstoreHookCall
impl UnsafeUnpin for registerMappingSstoreHookCall
impl UnwindSafe for registerMappingSstoreHookCall
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes