Events

This is a complete catalogue of 0x events emitted when interacting with the Exchange Proxy system of contracts. The diagram below illustrates how events are emitted when trading through the Exchange Proxy.

Warning

There are pending upgrades that impact these events. Please see the Releases page for more details.

../_images/events.png

Note

This catalogue does not include events emitted by tokens or other exchanges, like Uniswap. It also only lists 0x V3 events that are emitted during a Fill; for an extensive list of V3 events, see the V3 Spec.

Event

Description

Emitted By

Deployed

Emitted by the Transformer Deployer when a Transformer is deployed.

TransformerDeployer

ERC20BridgeTransfer

Emitted when a trade occurs.

FlashWallet

Fill

Emitted by Exchange V3 when an order is filled.

Exchange V3

Killed

Emitted by the Transformer Deployer when a Transformer is killed.

TransformerDeployer

LimitOrderFilled

Emitted when a V4 Limit Order is filled.

ExchangeProxy

LiquidityProviderSwap

Emitted when a PLP executes a swap.

ExchangeProxy

OrderCancelled

Emitted when a V4 Limit or RFQ Order is cancelled.

ExchangeProxy

MetaTransactionExecuted

Emitted when a meta-transaction is executed on the Exchange Proxy. Note that this differs from meta-transactions that are executed on Exchange V3.

ExchangeProxy

Migrated

Emitted when ExchangeProxy.migrate() is called.

ExchangeProxy

PairCancelledLimitOrders

Emitted when a Market Pair is cancelled for Limit Orders (see cancelPairLimitOrders).

ExchangeProxy

PairCancelledRfqOrders

Emitted when a Market Pair is cancelled for RFQ Orders (see cancelPairRfqOrders).

ExchangeProxy

ProtocolFeeUnfunded

Emitted when an order is skipped due to a lack of funds to pay the 0x Protocol fee.

FlashWallet

ProxyFunctionUpdated

Emitted when a function is upgraded via extend() or rollback()

ExchangeProxy

QuoteSignerUpdated

Emitted when ExchangeProxy.setQuoteSigner() is called.

ExchangeProxy

RfqOrderFilled

Emitted when a V4 RFQ Order is filled.

ExchangeProxy

RfqOrderOriginsAllowed

Emitted when a tx.origin is added/removed for RFQ, via registerAllowedRfqOrigins

ExchangeProxy

OrderSignerRegistered

Emitted when an order signer is added/removed for a maker, via registerAllowedOrderSigner

ExchangeProxy

TransformedERC20

Emitted when an ERC20 Transformation completes.

ExchangeProxy

TransformerDeployerUpdated

Emitted when the Transformer Deployer is upgraded.

ExchangeProxy

TransformerMetadata

A general, customizable event emitted that can be emitted by transformers as-needed.

FlashWallet

Deployed

/// @dev Emitted when a contract is deployed via `deploy()`.
/// @param deployedAddress The address of the deployed contract.
/// @param nonce The deployment nonce.
/// @param sender The caller of `deploy()`.
event Deployed(address deployedAddress, uint256 nonce, address sender);

ERC20BridgeTransfer

/// @dev Emitted when a trade occurs.
/// @param inputToken The token the bridge is converting from.
/// @param outputToken The token the bridge is converting to.
/// @param inputTokenAmount Amount of input token.
/// @param outputTokenAmount Amount of output token.
/// @param from The bridge address, indicating the underlying source of the fill.
/// @param to The `to` address, currrently `address(this)`
event ERC20BridgeTransfer(
    IERC20TokenV06 inputToken,
    IERC20TokenV06 outputToken,
    uint256 inputTokenAmount,
    uint256 outputTokenAmount,
    address from,
    address to
);

Fill

event Fill(
    address indexed makerAddress,         // Address that created the order.
    address indexed feeRecipientAddress,  // Address that received fees.
    bytes makerAssetData,                 // Encoded data specific to makerAsset.
    bytes takerAssetData,                 // Encoded data specific to takerAsset.
    bytes makerFeeAssetData,              // Encoded data specific to makerFeeAsset.
    bytes takerFeeAssetData,              // Encoded data specific to takerFeeAsset.
    bytes32 indexed orderHash,            // EIP712 hash of order (see LibOrder.getTypedDataHash).
    address takerAddress,                 // Address that filled the order.
    address senderAddress,                // Address that called the Exchange contract (msg.sender).
    uint256 makerAssetFilledAmount,       // Amount of makerAsset sold by maker and bought by taker.
    uint256 takerAssetFilledAmount,       // Amount of takerAsset sold by taker and bought by maker.
    uint256 makerFeePaid,                 // Amount of makerFeeAssetData paid to feeRecipient by maker.
    uint256 takerFeePaid,                 // Amount of takerFeeAssetData paid to feeRecipient by taker.
    uint256 protocolFeePaid               // Amount of eth or weth paid to the staking contract.
);

Killed

/// @dev Emitted when a contract is killed via `kill()`.
/// @param target The address of the contract being killed..
/// @param sender The caller of `kill()`.
event Killed(address target, address sender);

LimitOrderFilled

/// @dev Emitted whenever a `LimitOrder` is filled.
/// @param orderHash The canonical hash of the order.
/// @param maker The maker of the order.
/// @param taker The taker of the order.
/// @param feeRecipient Fee recipient of the order.
/// @param takerTokenFilledAmount How much taker token was filled.
/// @param makerTokenFilledAmount How much maker token was filled.
/// @param protocolFeePaid How much protocol fee was paid.
/// @param pool The fee pool associated with this order.
event LimitOrderFilled(
    bytes32 orderHash,
    address maker,
    address taker,
    address feeRecipient,
    address makerToken,
    address takerToken,
    uint128 takerTokenFilledAmount,
    uint128 makerTokenFilledAmount,
    uint128 takerTokenFeeFilledAmount,
    uint256 protocolFeePaid,
    bytes32 pool
);

MetaTransactionExecuted

/// @dev Emitted whenever a meta-transaction is executed via
///      `executeMetaTransaction()` or `executeMetaTransactions()`.
/// @param hash The meta-transaction hash.
/// @param selector The selector of the function being executed.
/// @param signer Who to execute the meta-transaction on behalf of.
/// @param sender Who executed the meta-transaction.
event MetaTransactionExecuted(
    bytes32 hash,
    bytes4 indexed selector,
    address signer,
    address sender
);

LiquidityProviderSwap

event LiquidityProviderSwap(
    address inputToken,
    address outputToken,
    uint256 inputTokenAmount,
    uint256 outputTokenAmount,
    address provider,
    address recipient
);

Migrated

/// @dev Emitted when `migrate()` is called.
/// @param caller The caller of `migrate()`.
/// @param migrator The migration contract.
/// @param newOwner The address of the new owner.
event Migrated(address caller, address migrator, address newOwner);

OrderCancelled

/// @dev Emitted whenever a limit or RFQ order is cancelled.
/// @param orderHash The canonical hash of the order.
/// @param maker The order maker.
event OrderCancelled(
    bytes32 orderHash,
    address maker
);

PairCancelledLimitOrders

/// @dev Emitted whenever limit or RFQ orders are cancelled by pair by a maker.
/// @param maker The maker of the order.
/// @param makerToken The maker token in a pair for the orders cancelled.
/// @param takerToken The taker token in a pair for the orders cancelled.
/// @param minValidSalt The new minimum valid salt an order with this pair must
///        have.
event PairCancelledLimitOrders(
    address maker,
    address makerToken,
    address takerToken,
    uint256 minValidSalt
);

PairCancelledRfqOrders

/// @dev Emitted whenever limit or RFQ orders are cancelled by pair by a maker.
/// @param maker The maker of the order.
/// @param makerToken The maker token in a pair for the orders cancelled.
/// @param takerToken The taker token in a pair for the orders cancelled.
/// @param minValidSalt The new minimum valid salt an order with this pair must
///        have.
event PairCancelledRfqOrders(
    address maker,
    address makerToken,
    address takerToken,
    uint256 minValidSalt
);

ProtocolFeeUnfunded

/// @dev Emitted when a trade is skipped due to a lack of funds
///      to pay the 0x Protocol fee.
/// @param orderHash The hash of the order that was skipped.
event ProtocolFeeUnfunded(bytes32 orderHash);

ProxyFunctionUpdated

/// @dev A function implementation was updated via `extend()` or `rollback()`.
/// @param selector The function selector.
/// @param oldImpl The implementation contract address being replaced.
/// @param newImpl The replacement implementation contract address.
event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl);

QuoteSignerUpdated

/// @dev Raised when `setQuoteSigner()` is called.
/// @param quoteSigner The new quote signer.
event QuoteSignerUpdated(address quoteSigner);

RfqOrderFilled

/// @dev Emitted whenever an `RfqOrder` is filled.
/// @param orderHash The canonical hash of the order.
/// @param maker The maker of the order.
/// @param taker The taker of the order.
/// @param takerTokenFilledAmount How much taker token was filled.
/// @param makerTokenFilledAmount How much maker token was filled.
/// @param pool The fee pool associated with this order.
event RfqOrderFilled(
    bytes32 orderHash,
    address maker,
    address taker,
    address makerToken,
    address takerToken,
    uint128 takerTokenFilledAmount,
    uint128 makerTokenFilledAmount,
    bytes32 pool
);

RfqOrderOriginsAllowed

/// @dev Emitted when new addresses are allowed or disallowed to fill
///      orders with a given txOrigin.
/// @param origin The address doing the allowing.
/// @param addrs The address being allowed/disallowed.
/// @param allowed Indicates whether the address should be allowed.
event RfqOrderOriginsAllowed(
    address origin,
    address[] addrs,
    bool allowed
);

OrderSignerRegistered

/// @dev Emitted when new order signers are registered
/// @param maker The maker address that is registering a designated signer.
/// @param signer The address that will sign on behalf of maker.
/// @param allowed Indicates whether the address should be allowed.
event OrderSignerRegistered(
    address maker,
    address signer,
    bool allowed
);

TransformedERC20

/// @dev Raised upon a successful `transformERC20`.
/// @param taker The taker (caller) address.
/// @param inputToken The token being provided by the taker.
///        If `0xeee...`, ETH is implied and should be provided with the call.`
/// @param outputToken The token to be acquired by the taker.
///        `0xeee...` implies ETH.
/// @param inputTokenAmount The amount of `inputToken` to take from the taker.
/// @param outputTokenAmount The amount of `outputToken` received by the taker.
event TransformedERC20(
    address indexed taker,
    address inputToken,
    address outputToken,
    uint256 inputTokenAmount,
    uint256 outputTokenAmount
);

TransformerDeployerUpdated

/// @dev Raised when `setTransformerDeployer()` is called.
/// @param transformerDeployer The new deployer address.
event TransformerDeployerUpdated(address transformerDeployer);

TransformerMetadata

/// @dev A transformer that just emits an event with an arbitrary byte payload.
event TransformerMetadata(
    bytes32 callDataHash,
    address sender,
    address taker,
    bytes data
);