Skip to content

Instantly share code, notes, and snippets.

@jakim929
Last active August 31, 2023 15:50
Show Gist options
  • Save jakim929/d8269973aa87862fa91037d3be3c4d7f to your computer and use it in GitHub Desktop.
Save jakim929/d8269973aa87862fa91037d3be3c4d7f to your computer and use it in GitHub Desktop.

These schemas are work in progress, and may change

Profile

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/Profile",
  "definitions": {
    "Profile": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "profileImageUrl": {
          "type": "string",
          "format": "uri",
          "maxLength": 2000
        },
        "bannerImageUrl": {
          "type": "string",
          "format": "uri",
          "maxLength": 2000
        },
        "websiteUrl": {
          "type": "string",
          "format": "uri",
          "maxLength": 2000
        },
        "bio": {
          "type": "string",
          "maxLength": 800
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Typescript type

{
    name: string;
    profileImageUrl?: string | undefined;
    bannerImageUrl?: string | undefined;
    websiteUrl?: string | undefined;
    bio?: string | undefined;
}

RPGF3 Application

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/PublicRPGF3Application",
  "definitions": {
    "PublicRPGF3Application": {
      "type": "object",
      "properties": {
        "applicantType": {
          "type": "string",
          "enum": [
            "PROJECT",
            "INDIVIDUAL"
          ]
        },
        "displayName": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "websiteUrl": {
          "type": "string",
          "format": "uri",
          "minLength": 1,
          "maxLength": 2000
        },
        "bio": {
          "type": "string",
          "format": "uri",
          "minLength": 1,
          "maxLength": 80
        },
        "contributionDescription": {
          "type": "string",
          "minLength": 250,
          "maxLength": 800
        },
        "contributionLinks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CONTRACT_ADDRESS",
                  "GITHUB_REPO",
                  "OTHER"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "minLength": 1,
                "maxLength": 2000
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            },
            "required": [
              "type",
              "url",
              "description"
            ],
            "additionalProperties": false
          }
        },
        "impactCategory": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "OP_STACK",
              "COLLECTIVE_GOVERNANCE",
              "DEVELOPER_ECOSYSTEM",
              "END_USER_EXPERIENCE_AND_ADOPTION"
            ]
          },
          "minItems": 1
        },
        "impactDescription": {
          "type": "string",
          "minLength": 250,
          "maxLength": 800
        },
        "impactMetrics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "number": {
                "type": "number"
              },
              "url": {
                "type": "string",
                "format": "uri",
                "minLength": 1,
                "maxLength": 2000
              }
            },
            "required": [
              "description",
              "number",
              "url"
            ],
            "additionalProperties": false
          },
          "minItems": 1
        },
        "fundingSources": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "GOVERNANCE_FUND",
                      "PARTNER_FUND",
                      "RETROPGF_2"
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "OP"
                    ]
                  },
                  "amount": {
                    "type": "number",
                    "minimum": 1
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 80
                  }
                },
                "required": [
                  "type",
                  "currency",
                  "amount"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "RETROPGF_1",
                      "REVENUE",
                      "OTHER"
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "USD"
                    ]
                  },
                  "amount": {
                    "type": "number",
                    "minimum": 1
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 80
                  }
                },
                "required": [
                  "type",
                  "currency",
                  "amount"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "payoutAddress": {
          "type": "string"
        },
        "understoodKYCRequirements": {
          "type": "boolean"
        },
        "understoodFundClaimPeriod": {
          "type": "boolean"
        },
        "certifiedNotDesignatedOrSanctionedOrBlocked": {
          "type": "boolean"
        },
        "certifiedNotSponsoredByPoliticalFigureOrGovernmentEntity": {
          "type": "boolean"
        },
        "certifiedNotBarredFromParticipating": {
          "type": "boolean"
        }
      },
      "required": [
        "applicantType",
        "displayName",
        "websiteUrl",
        "bio",
        "contributionDescription",
        "contributionLinks",
        "impactCategory",
        "impactDescription",
        "impactMetrics",
        "fundingSources",
        "payoutAddress",
        "understoodKYCRequirements",
        "understoodFundClaimPeriod",
        "certifiedNotDesignatedOrSanctionedOrBlocked",
        "certifiedNotSponsoredByPoliticalFigureOrGovernmentEntity",
        "certifiedNotBarredFromParticipating"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Typescript type

{
    applicantType: "PROJECT" | "INDIVIDUAL";
    displayName: string;
    websiteUrl: string;
    bio: string;
    contributionDescription: string;
    contributionLinks: {
        type: "CONTRACT_ADDRESS" | "GITHUB_REPO" | "OTHER";
        url: string;
        description: string;
    }[];
    impactCategory: ("OP_STACK" | "COLLECTIVE_GOVERNANCE" | "DEVELOPER_ECOSYSTEM" | "END_USER_EXPERIENCE_AND_ADOPTION")[];
    impactDescription: string;
    impactMetrics: {
        description: string;
        number: number;
        url: string;
    }[];
    fundingSources: ({
        type: "GOVERNANCE_FUND" | "PARTNER_FUND" | "RETROPGF_2";
        currency: "OP";
        amount: number;
        description?: string | undefined;
    } | {
        type: "RETROPGF_1" | "REVENUE" | "OTHER";
        currency: "USD";
        amount: number;
        description?: string | undefined;
    })[];
    payoutAddress: string;
    understoodKYCRequirements: boolean;
    understoodFundClaimPeriod: boolean;
    certifiedNotDesignatedOrSanctionedOrBlocked: boolean;
    certifiedNotSponsoredByPoliticalFigureOrGovernmentEntity: boolean;
    certifiedNotBarredFromParticipating: boolean;
}
@ccerv1
Copy link

ccerv1 commented Aug 29, 2023

For CONTRACT_ADDRESS contributions, is the expectation that the URL would be a link to a block explorer? If so, will there be anything on the frontend that helps users determine which contracts / networks they should enumerate? (eg, if I've deployed my contract to various OP chains, ETH mainnet, etc which addresses should I list here?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment