Skip to content

About Batch Call

Miao ZhiCheng edited this page Jul 31, 2023 · 5 revisions

The host contract provides a bespoke solution for batching super token operations, agreements operations and app actions.

Operation Data

Each operation is described by this struct:

    /**
     * @dev Batch operation data
     */
    struct Operation {
        // Operation type. Defined in BatchOperation (Definitions.sol)
        uint32 operationType;
        // Operation target
        address target;
        // Data specific to the operation
        bytes data;
    }

operationType is a set of enumerable constants defined in BatchOperation library (NB! to be moved to global scope soon).

Plain Old batchCall

The most simple version of the batch call is to call batchCall directly.

EIP-2771 forwardBatchCall

ERC-2771 defines a contract-level protocol for Recipient contracts to accept meta-transactions through trusted Forwarder contracts.

By being a trusted forwarder (checked through getTrustedForwarderConfigKey governance method), a contract can call forwardBatchCall on behalf of any address. Due to this power, there are very strict requirements on which contracts can be trusted forwarder; usually they should be immutable, verified and perhaps audited.

Known Trusted Forwarders

(TODO) Account Abstraction Abstraction

Clone this wiki locally