BatchTransferOrchestrator
Contract used to enable entity managers issuing a batch of Entity-to-Entity transfers in a single transaction.
Issues a batch of transfers from entities managed by the caller.
Use this method only if the transfers are coming from different source entities, since it is more expensive to call than "transferFromSingleEntity".
function transferFromMultipleEntities(Transfer[] calldata _transfers) external;
Parameters
Name | Type | Description |
---|---|---|
_transfers | Transfer[] | Transfers to be issued by this contract. |
Issues a batch of transfers from an entity managed by the caller.
This method is cheaper in terms of gas because it only checks the caller is the manager of the source entity once. Prefer using this method if all transfers are coming from the same contract.
function transferFromSingleEntity(Entity _sourceEntity, DestinationTransfer[] calldata _transfers) external;
Parameters
Name | Type | Description |
---|---|---|
_sourceEntity | Entity | Entity to transfer from. Caller must manage this entity. |
_transfers | DestinationTransfer[] | Transfers to be issued by this contract. |
Check that the caller is the manager of the source entity.
function _checkCallerIsManager(Entity _sourceEntity) internal view;
Parameters
Name | Type | Description |
---|---|---|
_sourceEntity | Entity | Entity to check the caller is the manager of. |
struct Transfer {
Entity sourceEntity;
Entity targetEntity;
uint256 amount;
}
struct DestinationTransfer {
Entity targetEntity;
uint256 amount;
}
Last modified 2mo ago