The Deelit protocol defines various structured messages that are used as input parameters. The list of messages is as follows:

EIP-712 Domain

To optimize transaction costs, messages are not stored on the EVM but hashes of these messages are stored. The protocol uses the EIP-712 definition for structuring messages and hashing its data (see EIP-712). The EIP-712 domain is defined as follows:
EIP712Domain.sol
struct EIP712Domain {
        string name; // = "deelit.net";
        string version; // = "1";
        uint256 chainId;
        address verifyingContract;
    }
name
string
The name of the domain. Should be “deelit.net”.
version
string
The version of the domain. Should be “1”.
chainId
uint256
The chain id of the domain. Should be the chain id of the EVM network.
verifyingContract
address
The address of the contract that verifies the signatures.

Messages

Product

Product.sol
struct Product {
    address owner;
    string title;
    string description;
    uint8 condition;
    string[] images;
    Location location;
    }

struct Location {
    string country_code;
    string postal_code;
}
owner
address
The address of the product owner.
title
string
The title of the product.
description
string
The description of the product.
condition
uint8
The condition of the product.
  • 0: Undetermined
  • 1: New
  • 2: Open box
  • 3: Refurbished
  • 4: Perfect
  • 5: Used
  • 6: Broken
images
string[]
The images of the product.
location
Location
The location of the product.
location.country_code
string
The country code of the product location.
location.postal_code
string
The postal code of the product location.

Offer

Offer.sol
struct Offer {
    address from_address;
    bytes32 product_hash;
    uint256 price;
    string currency_code;
    uint256 chain_id; 
    address token_address;
    bytes32 shipment_hash;
    uint256 shipment_price;
    uint256 expiration_time;
    uint256 salt;
}
from_address
address
The address of the user who makes the offer.
product_hash
bytes32
The hash of the product offered. see Product.
price
uint256
The price of the offer.
currency_code
string
The currency code used for the payment.
chain_id
uint256
The chain id of the EVM network.
token_address
address
The address of the token used for the payment.
shipment_hash
bytes32
The hash of the shipment information. see Shipment.
shipment_price
uint256
The price of the shipment.
expiration_time
uint256
The expiration timestamp of the offer.
salt
uint256
A random number to allow the renewal of an offer.

Shipment

Shipment.sol
struct Shipment {
    uint8 type;
    Carrier carrier_data;
}

struct Carrier {
    string name;
    string service;
    string address;
    string phone;
    string email;
}
type
uint8
The type of the shipment.
  • 0: No shipping
  • 1: National delivery
  • 2: Regional delivery
  • 3: International delivery
carrier_data
Carrier
The carrier data of the shipment.
carrier_data.name
string
The name of the carrier.
carrier_data.service
string
The service of the carrier.
carrier_data.address
string
The address of the carrier.
carrier_data.phone
string
The phone number of the carrier.
carrier_data.email
string
The email address of the carrier.

Payment

Payment.sol
struct Payment {
    address from_address;
    bytes destination_address;
    bytes32 offer_hash;
    uint256 expiration_time;
    uint256 vesting_period;
}
from_address
address
The address of the user who makes the payment.
destination_address
bytes
The destination address of the payment.
offer_hash
bytes32
The hash of the offer associated with the payment. see Offer.
expiration_time
uint256
The expiration timestamp of the payment.
vesting_period
uint256
The vesting period of the payment before unlocking without acceptance.

Transaction

Transaction.sol
struct Transaction {
  Offer offer;
  Payment payment;
}
offer
Offer
The offer associated with the transaction. see Offer.
payment
Payment
The payment associated with the transaction. see Payment.

Acceptance

Acceptance.sol
struct Acceptance { 
    address from_address;
    bytes32 payment_hash
}
from_address
address
The address of the user who accepts the payment.
payment_hash
bytes32
The hash of the payment accepted. see Payment.

Conflict

Conflict.sol
struct Conflict {
    address from_address;
    bytes32 payment_hash
}
from_address
address
The address of the user who raises the conflict.
payment_hash
bytes32
The hash of the accepted payment. see Payment.

Verdict

Verdict.sol
struct Verdict {
    address from_address;
    bytes32 conflict_hash;
    bool granted;
}
from_address
address
The address of the user who makes the verdict.
conflict_hash
bytes32
The hash of the conflict. see Conflict.
granted
bool
The verdict granted. true for accepted, false for refused.