simFunctions augment Solidity with extra abilities
Transaction Context
- simCalldata: Returns the calldata of the (internal) transaction
- simCallDepth: Returns the call depth of the currently executing (internal) transaction
- simCallKind: Returns the call kind of the (internal) transaction
- simFrom: Returns the from address of the (internal) transaction
- simGas: Returns the amount of gas assigned to this (internal) transaction
- simGasLeft: Returns the gas remaining after an (internal) transaction
- simTo: Returns the to address of the (internal) transaction
- simValue: Returns the value sent with the (internal) transaction
- simTransactionGasLimit: Returns the gas limit of the transaction
- simTransactionHash: Returns the transaction hash
- simTransactionIndex: Returns the index of the transaction within its block
- simTransactionStatus: Returns the transaction status
- simCodeAddress: Returns the code address of the (internal) transaction
- simCreatedContract: Returns the gas remaining after an (internal) transaction
- simImplementsFunction: Checks if a contract implements a function
- simParentCodeAddress: Returns the parent code address of the (internal) transaction
- simSalt: Returns the salt of a CREATE2 transaction
Storage and State
- simReadStorage: Reads storage for specified (contract, slot)
- simSetStorage: Overwrites the contents of any (contract, slot)
- simStorageAddress: Returns the address whose slot was read/written
- simStorageKey: Returns the key of the slot that was read/written
- simStorageValue: Returns the value of the slot that was read/written
- simSetBalance: Overwrite the native token balance of a given address
Logs and Events
- simEmitsLog: Checks if a contract emits a log
- simLogAddress: Get the address that emitted a log
- simLogData: Returns the unindexed event data of a log
- simLogTopic: Returns a topic from a log
- simLogTopicSize: Returns the number of topics in a log
Utilities
- simAddressNonce: Returns the nonce of an address
- simToString: Converts many data types to string for easy logging