# GsnUtils
The GSN Solidity Utils Library
Some library functions used throughout the GSN Solidity codebase.
# Functions
# getRelayRequestID(struct GsnTypes.RelayRequest relayRequest, bytes signature)
→ bytes32
(internal)
Calculate an identifier for the meta-transaction in a format similar to a transaction hash. Note that uniqueness relies on signature and may not be enforced if meta-transactions are verified with a different algorithm, e.g. when batching.
relayRequest: The RelayRequest
for which an ID is being calculated.
signature: The signature for the RelayRequest
. It is not validated here and may even remain empty.
# getMethodSig(bytes msgData)
→ bytes4
(internal)
Extract the method identifier signature from the encoded function call.
# getParam(bytes msgData, uint256 index)
→ uint256 result
(internal)
Extract a parameter from encoded-function block.
see: https://solidity.readthedocs.io/en/develop/abi-spec.html#formal-specification-of-the-encoding
The return value should be casted to the right type (uintXXX
/bytesXXX
/address
/bool
/enum
).
msgData: Byte array containing a uint256 value.
index: Index in byte array of uint256 value.
# Return values
uint256 value from byte array.
# revertWithData(bytes data)
(internal)
Re-throw revert with the same revert data.
← GsnTypes MinLibBytes →