FulfillmentTypes

FulfillmentTypes

Overview

The FulfillmentTypes.sol file defines the core data structures used throughout the EVM Fulfillment Protocol. These types represent the fundamental entities in the fulfillment process, including requests, results, and records for both native currency and ERC20 token fulfillments.

The defined types are used across all components of the protocol:

  • FulFillmentRequest and ERC20FulFillmentRequest are submitted by users through the BandoRouter

  • FulFillmentResult is submitted by fulfillers through the BandoFulfillmentManager

  • FulFillmentRecord and ERC20FulFillmentRecord are stored in the BandoFulfillable and BandoERC20Fulfillable contracts

  • FulFillmentResultState is used to track the status of fulfillments throughout the protocol

The types in this file can be categorized as follows:

Fulfillment States

FulFillmentResultState

/**
 * @notice Enum with states for fulfillment results
 */
enum FulFillmentResultState {
    FAILED,
    SUCCESS,
    PENDING,
    REFUNDED
}

Represents the possible states of a fulfillment:

  • FAILED: The fulfillment attempt failed and cannot be completed

  • SUCCESS: The fulfillment was successfully completed

  • PENDING: The fulfillment is in progress and awaiting completion

  • REFUNDED: The funds were refunded to the requester

Native Currency Fulfillment Types

FulFillmentRequest

Represents a native currency fulfillment request that is submitted by a user through the BandoRouter.

FulFillmentResult

Represents the result of a fulfillment that is submitted by a fulfiller through the BandoFulfillmentManager.

FulFillmentRecord

Represents a record of a native currency fulfillment that is stored in the BandoFulfillable contract.

ERC20 Token Fulfillment Types

ERC20FulFillmentRequest

Represents an ERC20 token fulfillment request that is submitted by a user through the BandoRouter.

ERC20FulFillmentRecord

Represents a record of an ERC20 token fulfillment that is stored in the BandoERC20Fulfillable contract.


Last updated

Was this helpful?