Skip to content

Instantly share code, notes, and snippets.

@JSeiferth
Last active September 12, 2023 15:26
Show Gist options
  • Save JSeiferth/fe8bf39c450be8772a9d93b7fc9a0702 to your computer and use it in GitHub Desktop.
Save JSeiferth/fe8bf39c450be8772a9d93b7fc9a0702 to your computer and use it in GitHub Desktop.

List

EAS Attestation

Schema has not been created on-chain yet

Schema

metadataPtrType: uint256
metadataPtr: string

metadataPtrType: used to determine the protocol (TBD, but for instance 1 = ipfs, 2 = http(s))

metadataPtr: can be a URI, ipfs hash, etc. that points to any type of blob storage that stores the metadata of type shown below

Metadata

JSON Schema

{
  "$ref": "#/definitions/List",
  "definitions": {
    "List": {
      "type": "object",
      "properties": {
        "listName": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "listDescription": {
          "type": "string",
          "minLength": 50,
          "maxLength": 800
        },
        "impactEvaluationDescription": {
          "type": "string",
          "maxLength": 800
        },
        "impactEvaluationLink": {
          "type": "string",
          "format": "uri",
          "maxLength": 2000
        },
        "listContent": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "RPGF3_Application_UID": {
                "type": "string",
                "maxLength": 2000
              },
              "OPAmount": {
                "type": "number",
                "maximum": 10000000
              }
            },
            "required": [
              "RPGF3_Application_UID",
              "OPAmount"
            ],
            "additionalProperties": false
          }, 
            "minItems": 1
        }
      },
      "required": [
        "listName",
        "listDescription",
        "listContent"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Typescript type


type List = {
    listName: string;
    listDescription: string;
    impactEvaluationDescription: string | undefined;
    impactEvaluationLink: string | undefined;
    listContent: {
        RPGF3_Application_UID: string;
        OPAmount: number;
    }[];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment