TransactionForwarder_v1
Inherits: ITransactionForwarder_v1, ERC2771ForwarderUpgradeable, ContextUpgradeable
Author: Inverter Network
This contract enables users to interact with smart contracts indirectly through a trusted forwarder. It supports meta transactions, allowing transactions to be sent by one party but signed and paid for by another. It also handles batch transactions (multi-call), facilitating complex, multi-step interactions within a single transaction.
Integrates {ERC2771ForwarderUpgradeable} and {ContextUpgradeable} to manage and relay meta transactions. It handles nonce management, signature verification, and ensures only trusted calls are forwarded.
State Variables
__gap
Storage gap for future upgrades.
uint[50] private __gap;
Functions
constructor
constructor();
init
function init() external initializer;
createDigest
Creates a digest for the given ForwardRequestData
.
The signature field of the given ForwardRequestData
can be empty.
function createDigest(ForwardRequestData memory req)
external
view
returns (bytes32 digest);
Parameters
req
ForwardRequestData
The ForwardRequest you want to get the digest from.
Returns
digest
bytes32
The digest needed to create a signature for the request.
executeMulticall
Enables the execution of multiple calls in a single transaction.
function executeMulticall(SingleCall[] calldata calls)
external
returns (Result[] memory results);
Parameters
calls
SingleCall[]
Array of call structs that should be executed in the multicall.
Returns
results
Result[]
returnData The return data of the calls that were executed.
_getStructHash
Returns the digest for the given ForwardRequestData
.
function _getStructHash(
ERC2771ForwarderUpgradeable.ForwardRequestData memory req
) internal view returns (bytes32);
Parameters
req
ERC2771ForwarderUpgradeable.ForwardRequestData
The ForwardRequest you want to get the digest from.
Returns
<none>
bytes32
digest The digest needed to create a signature for the request.
__isTrustedByTarget
function __isTrustedByTarget(address target) private view returns (bool);
Last updated