Etherscan
Read-only Etherscan V2 blockchain data: balances, transactions, transfers, tokens, contracts, logs.
我該用這個嗎
品質與安全性
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"etherscan-mcp": {
"url": "https://mcp.etherscan.io/mcp"
}
}
}遠端端點
https://mcp.etherscan.io/mcpstreamable-httphttps://mcp-keyless.etherscan.io/mcpstreamable-http它能做什麼
工具清單
工具(16)
🟢get_native_balance(address, chainid, tag)
Get the native coin (e.g. ETH) balance of an address, in wei.
輸入結構描述
{
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$",
"description": "Account address to query."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
},
"tag": {
"type": "string",
"enum": [
"latest",
"earliest",
"pending"
],
"description": "Block tag. Default latest."
}
},
"required": [
"address"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_transactions(address, chainid, startblock, endblock, page, ...)
Get the list of normal (external) transactions for an address.
輸入結構描述
{
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$",
"description": "Account address to query."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
},
"startblock": {
"type": "integer",
"minimum": 0,
"description": "Start block number."
},
"endblock": {
"type": "integer",
"minimum": 0,
"description": "End block number."
},
"page": {
"type": "integer",
"minimum": 1,
"description": "Page number (1-based)."
},
"offset": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "Records per page (max 10000)."
},
"sort": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Sort order by block number."
}
},
"required": [
"address"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_internal_transactions(address, txhash, chainid, startblock, endblock, ...)
Get internal transactions for an address, or by a specific parent transaction hash.
輸入結構描述
{
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$",
"description": "Account address (omit if using txhash)."
},
"txhash": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Parent transaction hash (omit if using address)."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
},
"startblock": {
"type": "integer",
"minimum": 0,
"description": "Start block number."
},
"endblock": {
"type": "integer",
"minimum": 0,
"description": "End block number."
},
"page": {
"type": "integer",
"minimum": 1,
"description": "Page number (1-based)."
},
"offset": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "Records per page (max 10000)."
},
"sort": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Sort order by block number."
}
},
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_token_transfers(standard, address, contractaddress, chainid, startblock, ...)
Get token transfer events for an address, optionally filtered by token contract. Select the token standard: erc20 (fungible, default), erc721 (NFT), or erc1155 (multi-token).
輸入結構描述
{
"type": "object",
"properties": {
"standard": {
"type": "string",
"enum": [
"erc20",
"erc721",
"erc1155"
],
"description": "Token standard: erc20 (default), erc721, or erc1155."
},
"address": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$",
"description": "Account address."
},
"contractaddress": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$",
"description": "Token contract address to filter by."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
},
"startblock": {
"type": "integer",
"minimum": 0,
"description": "Start block number."
},
"endblock": {
"type": "integer",
"minimum": 0,
"description": "End block number."
},
"page": {
"type": "integer",
"minimum": 1,
"description": "Page number (1-based)."
},
"offset": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "Records per page (max 10000)."
},
"sort": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Sort order by block number."
}
},
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_contract_source(address, chainid)
Get the verified source code and metadata for a contract address.
輸入結構描述
{
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$",
"description": "Contract address."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"required": [
"address"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_contract_abi(address, chainid)
Get the verified ABI (JSON) for a contract address.
輸入結構描述
{
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$",
"description": "Contract address."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"required": [
"address"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_contract_creation(contractaddresses, include_creation_bytecode, chainid)
Get the creator address and creation transaction hash for up to 5 contract addresses. The multi-kilobyte creation bytecode is omitted by default to keep responses small; set include_creation_bytecode=true to include it.
輸入結構描述
{
"type": "object",
"properties": {
"contractaddresses": {
"type": "array",
"items": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$"
},
"minItems": 1,
"maxItems": 5,
"description": "List of contract addresses (1-5)."
},
"include_creation_bytecode": {
"type": "boolean",
"description": "Include the full contract creation bytecode (several KB per contract). Omitted by default."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"required": [
"contractaddresses"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_transaction_receipt_status(txhash, chainid)
Get the receipt status of a transaction (1 = success, 0 = failed). Post-Byzantium only.
輸入結構描述
{
"type": "object",
"properties": {
"txhash": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Transaction hash."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"required": [
"txhash"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_transaction_status(txhash, chainid)
Get the contract execution status of a transaction (detects failed/erroring executions).
輸入結構描述
{
"type": "object",
"properties": {
"txhash": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Transaction hash."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"required": [
"txhash"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_gas_oracle(chainid)
Get current gas price recommendations (safe / propose / fast) from the gas tracker.
輸入結構描述
{
"type": "object",
"properties": {
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_block_by_timestamp(timestamp, closest, chainid)
Get the block number closest to a given Unix timestamp (seconds).
輸入結構描述
{
"type": "object",
"properties": {
"timestamp": {
"type": "integer",
"minimum": 0,
"description": "Unix timestamp in seconds."
},
"closest": {
"type": "string",
"enum": [
"before",
"after"
],
"description": "Return closest block before or after. Default before."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"required": [
"timestamp"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_supported_chains
Get the chains / chain IDs supported by the Etherscan V2 API. In the hosted (proxy) deployment this returns a bundled snapshot shipped with the server, refreshed when the package is updated; in direct/stdio mode it queries the live chain-list endpoint. A chain's absence from the returned list is not proof that it lacks live support.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_logs(address, fromblock, toblock, topic0, topic1, ...)
Search event logs by contract address and/or topics over a block range. Topics are 32-byte hex values; topic0 is usually the keccak256 event-signature hash. Adjacent-topic operators (and/or) combine multiple topic filters. Provide 'address' and/or at least one topic.
輸入結構描述
{
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$",
"description": "Contract address to filter by (optional if filtering by topics)."
},
"fromblock": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"const": "latest"
}
],
"description": "Start block number, or \"latest\". Default 0."
},
"toblock": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"const": "latest"
}
],
"description": "End block number, or \"latest\". Default latest."
},
"topic0": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Topic 0 — usually the keccak256 event-signature hash."
},
"topic1": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Topic 1 (first indexed argument)."
},
"topic2": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Topic 2 (second indexed argument)."
},
"topic3": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Topic 3 (third indexed argument)."
},
"topic0_1_opr": {
"type": "string",
"enum": [
"and",
"or"
],
"description": "Combine topic0 and topic1: and | or."
},
"topic1_2_opr": {
"type": "string",
"enum": [
"and",
"or"
],
"description": "Combine topic1 and topic2: and | or."
},
"topic2_3_opr": {
"type": "string",
"enum": [
"and",
"or"
],
"description": "Combine topic2 and topic3: and | or."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
},
"page": {
"type": "integer",
"minimum": 1,
"description": "Page number (1-based)."
},
"offset": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "Records per page (max 1000)."
}
},
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_transaction_by_hash(txhash, chainid)
Get the full transaction object for a transaction hash (from, to, value, input data, gas, gas price, nonce, block number/hash, transaction index). Returns null if the hash is unknown.
輸入結構描述
{
"type": "object",
"properties": {
"txhash": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Transaction hash."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"required": [
"txhash"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_transaction_receipt(txhash, chainid)
Get the transaction receipt for a transaction hash (execution status, gas used, cumulative gas used, effective gas price, logs, and the created contract address for deployments). Returns null if the hash is unknown or the transaction is still pending.
輸入結構描述
{
"type": "object",
"properties": {
"txhash": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$",
"description": "Transaction hash."
},
"chainid": {
"type": "string",
"pattern": "^\\d+$",
"description": "Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1)."
}
},
"required": [
"txhash"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The JSON result returned by the Etherscan data tool."
}
},
"required": [
"data"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢render_etherscan_widget(view, title, subtitle, chain, metrics, ...)
Present exact facts returned by Etherscan data tools in a fast explorer-style card. Call the relevant Etherscan data tool first and copy only supported values into this tool. Never invent scores, risk labels, historical prices, forecasts, or audit conclusions.
輸入結構描述
{
"type": "object",
"properties": {
"view": {
"type": "string",
"enum": [
"wallet",
"token",
"transaction",
"contract",
"gas",
"general"
],
"description": "The factual Etherscan result category to display."
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"subtitle": {
"type": "string",
"maxLength": 180
},
"chain": {
"type": "string",
"maxLength": 80
},
"metrics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"detail": {
"type": "string",
"maxLength": 300
}
},
"required": [
"label",
"value"
],
"additionalProperties": false
},
"maxItems": 6,
"default": []
},
"items": {
"type": "array",
"items": {
"$ref": "#/properties/metrics/items"
},
"maxItems": 12,
"default": []
},
"sections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"layout": {
"type": "string",
"enum": [
"cards",
"rows",
"chips"
],
"default": "rows"
},
"items": {
"type": "array",
"items": {
"$ref": "#/properties/metrics/items"
},
"maxItems": 12
}
},
"required": [
"title",
"items"
],
"additionalProperties": false
},
"maxItems": 4,
"default": []
},
"chart": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"points": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 40
},
"startLabel": {
"type": "string",
"maxLength": 40
},
"endLabel": {
"type": "string",
"maxLength": 40
}
},
"required": [
"title",
"points"
],
"additionalProperties": false
},
"explorerUrl": {
"type": "string",
"format": "uri"
},
"footer": {
"type": "string",
"maxLength": 240
}
},
"required": [
"view",
"title"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"view": {
"type": "string",
"enum": [
"wallet",
"token",
"transaction",
"contract",
"gas",
"general"
],
"description": "The factual Etherscan result category to display."
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"subtitle": {
"type": "string",
"maxLength": 180
},
"chain": {
"type": "string",
"maxLength": 80
},
"metrics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"detail": {
"type": "string",
"maxLength": 300
}
},
"required": [
"label",
"value"
],
"additionalProperties": false
},
"maxItems": 6,
"default": []
},
"items": {
"type": "array",
"items": {
"$ref": "#/properties/metrics/items"
},
"maxItems": 12,
"default": []
},
"sections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"layout": {
"type": "string",
"enum": [
"cards",
"rows",
"chips"
],
"default": "rows"
},
"items": {
"type": "array",
"items": {
"$ref": "#/properties/metrics/items"
},
"maxItems": 12
}
},
"required": [
"title",
"items"
],
"additionalProperties": false
},
"maxItems": 4,
"default": []
},
"chart": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"points": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 40
},
"startLabel": {
"type": "string",
"maxLength": 40
},
"endLabel": {
"type": "string",
"maxLength": 40
}
},
"required": [
"title",
"points"
],
"additionalProperties": false
},
"explorerUrl": {
"type": "string",
"format": "uri"
},
"footer": {
"type": "string",
"maxLength": 240
}
},
"required": [
"view",
"title"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據