{
  "openapi": "3.1.0",
  "info": {
    "title": "Verify Stylus Source Code",
    "version": "2.0.0",
    "description": "Submit Stylus source code for verification.",
    "license": {
      "name": "Etherscan API Terms",
      "url": "https://etherscan.io/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.etherscan.io",
      "description": "Etherscan API."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v2/api": {
      "post": {
        "operationId": "postVerifystylus",
        "summary": "Verify Stylus Source Code",
        "description": "Submit Stylus source code for verification.",
        "parameters": [
          {
            "name": "chainid",
            "in": "query",
            "required": true,
            "description": "Chain ID to query, eg 42161 for Arbitrum One from our supported chains.",
            "schema": {
              "type": "string"
            },
            "example": "42161"
          },
          {
            "name": "module",
            "in": "query",
            "required": true,
            "description": "Set to contract for this endpoint.",
            "schema": {
              "type": "string",
              "default": "contract"
            },
            "example": "contract"
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "description": "Set to verifysourcecode for this endpoint.",
            "schema": {
              "type": "string",
              "default": "verifysourcecode"
            },
            "example": "verifysourcecode"
          }
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-mint": {
          "metadata": {
            "title": "Verify Stylus Source Code",
            "description": "Submit Stylus source code for verification."
          }
        },
        "x-etherscan-source-page": {
          "page": "api-reference/endpoint/verifystylus",
          "title": "Verify Stylus Source Code",
          "module": "contract",
          "action": "verifysourcecode"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "codeformat": {
                    "type": "string",
                    "examples": [
                      "stylus"
                    ],
                    "description": "Use `stylus` for Stylus projects."
                  },
                  "sourceCode": {
                    "type": "string",
                    "examples": [
                      "https://github.com/OffchainLabs/stylus-hello-world"
                    ],
                    "description": "Public Git repository that hosts the Stylus source code."
                  },
                  "contractaddress": {
                    "type": "string",
                    "examples": [
                      "0x915f0B2f34F5B5b84D1F066b398D7F0E3C2F8f83"
                    ],
                    "description": "The address where the contract is deployed."
                  },
                  "contractname": {
                    "type": "string",
                    "examples": [
                      "stylus_hello_world"
                    ],
                    "description": "The contract name that matches your Stylus deployment."
                  },
                  "compilerversion": {
                    "type": "string",
                    "examples": [
                      "stylus:0.5.3"
                    ],
                    "description": "Stylus compiler version used for compilation."
                  },
                  "licenseType": {
                    "type": "integer",
                    "examples": [
                      3
                    ],
                    "description": "License identifier from the [open source license options](https://arbiscan.io/contract-license-types)."
                  }
                },
                "required": [
                  "codeformat",
                  "sourceCode",
                  "contractaddress",
                  "contractname",
                  "compilerversion"
                ]
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "query",
        "name": "apikey",
        "description": "Your Etherscan API key."
      }
    }
  }
}