Resolution Data Encoding

Encoding Resolution Data in PAL

The encoding of resolution data by gateways follows a specific structure for PAL:

High-Level Data Structure

The primary data is encoded using:

abi.encode([uint8, bytes[]], [peaEntries, entries])

Structure of Entries Array

The entries array comprises several PEA entries followed by a manufacturer entry:

// Some code
abi.encode([bytes32, address, PEAMerkleInfo, bytes, bytes], [enrollmentId, projectRegistrarAddress, peaMerkleInfo, peaCertificate, custodyProof])

PEAMerkleInfo Structure

This structure is defined as:

// Some code
struct PEAMerkleInfo {
    uint256 peaIndex;
    bytes32 serviceId;
    uint256 lockinPeriod;
    string tokenUri;
    bytes32[] peaProof;
}

struct ManufacturerValidation {
    bytes32 enrollmentId;
    uint256 mIndex;
    bytes32[] manufacturerProof;
}

Last updated