Skip to main content

Signature

Description

Transfers amount from from to to using msg.sender’s allowance. Emits Transfer.

Parameters

Returns

Always true on success.

Reverts

  • ContractPaused(TRANSFER) when TRANSFER is paused.
  • InvalidReceiver when to == address(0).
  • InvalidSender when from == address(0).
  • InsufficientAllowance when the caller’s allowance from from is below amount.
  • PolicyForbids(TRANSFER_EXECUTOR_POLICY, ...) when msg.sender != from and msg.sender is not authorized.
  • PolicyForbids(TRANSFER_SENDER_POLICY, ...) when from is not authorized.
  • PolicyForbids(TRANSFER_RECEIVER_POLICY, ...) when to is not authorized.
  • InsufficientBalance when from’s balance is below amount.

Access control

Read-only or ERC-20-standard access rules unless the NatSpec states otherwise.

Policy interaction

Checks TRANSFER_EXECUTOR_POLICY when msg.sender != from, plus sender and receiver transfer scopes.

Example