Commit 946c9b44 authored by isstuev's avatar isstuev

spec from gh

parent 5609bcf3
......@@ -48,6 +48,7 @@ NEXT_PUBLIC_API_PROTOCOL=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_PROTOCOL__
NEXT_PUBLIC_API_PORT=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_PORT__
NEXT_PUBLIC_STATS_API_HOST=__PLACEHOLDER_FOR_NEXT_PUBLIC_STATS_API_HOST__
NEXT_PUBLIC_VISUALIZE_API_HOST=__PLACEHOLDER_FOR_NEXT_PUBLIC_VISUALIZE_API_HOST__
NEXT_PUBLIC_API_SPEC_URL= __PLACEHOLDER_FOR_NEXT_PUBLIC_API_SPEC_URL__
# external services config
NEXT_PUBLIC_SENTRY_DSN=__PLACEHOLDER_FOR_NEXT_PUBLIC_SENTRY_DSN__
......
......@@ -79,6 +79,7 @@ The app instance could be customized by passing following variables to NodeJS en
| NEXT_PUBLIC_HOMEPAGE_SHOW_AVG_BLOCK_TIME | `boolean` *(optional)* | Set to false if average block time is useless for the network | `true` |
| NEXT_PUBLIC_DOMAIN_WITH_AD | `string` *(optional)* | The domain on which we display ads | `blockscout.com` |
| NEXT_PUBLIC_AD_ADBUTLER_ON | `boolean` *(optional)* | Set to true to show Adbutler banner instead of Coinzilla banner | `false` |
| NEXT_PUBLIC_API_SPEC_URL | `string` *(optional)* | Spec to be displayed on api-docs page | `https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml` |
### App configuration
| Variable | Type | Description | Default value
......
......@@ -126,6 +126,9 @@ const config = Object.freeze({
walletConnect: {
projectId: getEnvValue(process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID),
},
apiDoc: {
specUrl: getEnvValue(process.env.NEXT_PUBLIC_API_SPEC_URL),
},
});
export default config;
# ui config
NEXT_PUBLIC_FEATURED_NETWORKS=[{'title':'Ethereum','url':'https://blockscout.com/eth/mainnet','group':'mainnets','type':'eth_mainnet'},{'title':'Ethereum Classic','url':'https://blockscout.com/etx/mainnet','group':'mainnets','type':'etc_mainnet'},{'title':'Gnosis Chain','url':'https://blockscout.com/xdai/mainnet','group':'mainnets','type':'xdai_mainnet'},{'title':'Astar (EVM)','url':'https://blockscout.com/astar','group':'mainnets','type':'astar'},{'title':'Shiden (EVM)','url':'https://blockscout.com/shiden','group':'mainnets','type':'astar'},{'title':'Klaytn Mainnet (Cypress)','url':'https://klaytn-mainnet.aws-k8s.blockscout.com/','group':'mainnets','type':'klaytn'},{'title':'Goerli','url':'https://blockscout.com/eth/goerli/','group':'testnets','type':'goerli'},{'title':'Optimism Goerli','url':'https://blockscout.com/optimism/goerli/','group':'testnets','type':'optimism_goerli'},{'title':'Optimism Bedrock Alpha','url':'https://blockscout.com/optimism/bedrock-alpha','group':'testnets','type':'optimism_bedrock_alpha'},{'title':'Gnosis Chiado','url':'https://blockscout.com/gnosis/chiado/','group':'testnets','type':'gnosis_chiado'},{'title':'Shibuya (EVM)','url':'https://blockscout.com/shibuya','group':'testnets','type':'shibuya'},{'title':'Optimism Opcraft','url':'https://blockscout.com/optimism/opcraft','group':'other','type':'optimism_opcraft'},{'title':'Optimism on Gnosis Chain','url':'https://blockscout.com/xdai/optimism','group':'other','type':'optimism_gnosis'},{'title':'ARTIS-Σ1','url':'https://blockscout.com/artis/sigma1','group':'other','type':'artis_sigma1'},{'title':'LUKSO L14','url':'https://blockscout.com/lukso/l14','group':'other','type':'lukso_l14'},{'title':'POA','url':'https://blockscout.com/poa/core','group':'other','type':'poa_core'},{'title':'POA Sokol','url':'https://blockscout.com/poa/sokol','group':'other','type':'poa_sokol'}]
NEXT_PUBLIC_NETWORK_EXPLORERS=[{'title':'Anyblock','baseUrl':'https://explorer.anyblock.tools','paths':{'tx':'/ethereum/ethereum/goerli/transaction','address':'/ethereum/ethereum/goerli/address'}},{'title':'Etherscan','baseUrl':'https://goerli.etherscan.io/','paths':{'tx':'/tx','address':'/address'}}]
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
# network config
NEXT_PUBLIC_NETWORK_NAME=Goerli
......
......@@ -17,6 +17,7 @@ NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs','coin_price','market_cup']
NEXT_PUBLIC_HOMEPAGE_PLATE_GRADIENT=radial-gradient(at 12% 37%, hsla(324,73%,67%,1) 0px, transparent 50%), radial-gradient(at 62% 14%, hsla(256,87%,73%,1) 0px, transparent 50%), radial-gradient(at 84% 80%, hsla(128,75%,73%,1) 0px, transparent 50%), radial-gradient(at 57% 46%, hsla(285,63%,72%,1) 0px, transparent 50%), radial-gradient(at 37% 30%, hsla(174,70%,61%,1) 0px, transparent 50%), radial-gradient(at 15% 86%, hsla(350,65%,70%,1) 0px, transparent 50%), radial-gradient(at 67% 57%, hsla(14,95%,76%,1) 0px, transparent 50%)
#NEXT_PUBLIC_NETWORK_LOGO=https://placekitten.com/300/60
#NEXT_PUBLIC_NETWORK_SMALL_LOGO=https://placekitten.com/300/300
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
# network config
NEXT_PUBLIC_NETWORK_NAME=POA
......
......@@ -7,6 +7,7 @@ NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs','coin_price','market_cup']
NEXT_PUBLIC_HOMEPAGE_PLATE_GRADIENT=radial-gradient(at 12% 37%, hsla(324,73%,67%,1) 0px, transparent 50%), radial-gradient(at 62% 14%, hsla(256,87%,73%,1) 0px, transparent 50%), radial-gradient(at 84% 80%, hsla(128,75%,73%,1) 0px, transparent 50%), radial-gradient(at 57% 46%, hsla(285,63%,72%,1) 0px, transparent 50%), radial-gradient(at 37% 30%, hsla(174,70%,61%,1) 0px, transparent 50%), radial-gradient(at 15% 86%, hsla(350,65%,70%,1) 0px, transparent 50%), radial-gradient(at 67% 57%, hsla(14,95%,76%,1) 0px, transparent 50%)
#NEXT_PUBLIC_NETWORK_LOGO=https://placekitten.com/300/60
#NEXT_PUBLIC_NETWORK_SMALL_LOGO=https://placekitten.com/300/300
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
# network config
NEXT_PUBLIC_NETWORK_NAME=POA
......
......@@ -571,3 +571,5 @@ frontend:
_default: https://rpc.ankr.com/eth_goerli
NEXT_PUBLIC_HOMEPAGE_CHARTS:
_default: "['daily_txs','coin_price','market_cup']"
NEXT_PUBLIC_API_SPEC_URL:
_default: https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
......@@ -409,3 +409,5 @@ frontend:
_default: https://rpc.ankr.com/eth_goerli
NEXT_PUBLIC_NETWORK_EXPLORERS:
_default: "[{'title':'Anyblock','baseUrl':'https://explorer.anyblock.tools','paths':{'tx':'/ethereum/ethereum/goerli/transaction','address':'/ethereum/ethereum/goerli/address'}},{'title':'Etherscan','baseUrl':'https://goerli.etherscan.io/','paths':{'tx':'/tx','address':'/address'}}]"
NEXT_PUBLIC_API_SPEC_URL:
_default: https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
{
"openapi" : "3.0.0",
"servers" : [ {
"url" : "http://{server}/api/v2/",
"variables" : {
"server" : {
"default" : "blockscout.com/poa/core"
}
}
}, {
"description" : "SwaggerHub API Auto Mocking",
"url" : "https://virtserver.swaggerhub.com/NIKITOSING4/CoreBlockScoutAPI/1.0.0"
} ],
"info" : {
"description" : "API for BlockScout web app",
"version" : "1.0.0",
"title" : "BlockScout API",
"contact" : {
"email" : "you@your-company.com"
},
"license" : {
"name" : "Apache 2.0",
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"paths" : {
"/search" : {
"get" : {
"parameters" : [ {
"in" : "query",
"name" : "q",
"schema" : {
"type" : "string",
"example" : "USDT"
}
} ],
"summary" : "search",
"operationId" : "search",
"responses" : {
"200" : {
"description" : "search response",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/SearchResultToken"
}, {
"$ref" : "#/components/schemas/SearchResultAddressOrContract"
}, {
"$ref" : "#/components/schemas/SearchResultBlock"
}, {
"$ref" : "#/components/schemas/SearchResultTransaction"
} ]
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"address_hash" : "0x052Ad78E3aA0b0F2D3912FD3b50a9a289CF2f7Aa",
"block_hash" : null,
"holder_count" : 548,
"inserted_at" : "2021-12-07T08:39:01.062253Z",
"item_type" : "token",
"items_count" : 50,
"name" : "RealToken S 13245 Monica St Detroit MI",
"q" : "1",
"tx_hash" : null
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/search/check-redirect" : {
"get" : {
"parameters" : [ {
"in" : "query",
"name" : "q",
"schema" : {
"type" : "string",
"example" : "USDT"
}
} ],
"summary" : "search redirect",
"operationId" : "search redirect",
"responses" : {
"200" : {
"description" : "search response",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/SearchResultRedirect"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/transactions" : {
"get" : {
"parameters" : [ {
"in" : "query",
"name" : "filter",
"schema" : {
"type" : "string",
"example" : "pending | validated"
}
}, {
"in" : "query",
"name" : "type",
"schema" : {
"type" : "string",
"example" : "token_transfer,contract_creation,contract_call,coin_transfer,token_creation"
}
}, {
"in" : "query",
"name" : "method",
"schema" : {
"type" : "string",
"example" : "approve,transfer,multicall,mint,commit"
}
} ],
"summary" : "get txs",
"operationId" : "get_txs",
"responses" : {
"200" : {
"description" : "block",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Transaction"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27170298,
"filter" : "validated",
"index" : 0,
"items_count" : 50,
"type" : "token_transfer"
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/blocks" : {
"get" : {
"parameters" : [ {
"in" : "query",
"name" : "type",
"schema" : {
"type" : "string",
"example" : "block | uncle | reorg"
}
} ],
"summary" : "get blocks",
"operationId" : "get_blocks",
"responses" : {
"200" : {
"description" : "block",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Block"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27729304,
"items_count" : 50
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/main-page/transactions" : {
"get" : {
"summary" : "get main page txs",
"operationId" : "get_main_page_txs",
"responses" : {
"200" : {
"description" : "txs",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Transaction"
}
}
}
}
}
}
}
},
"/main-page/blocks" : {
"get" : {
"summary" : "get main page blocks",
"operationId" : "get_main_page_tokens",
"responses" : {
"200" : {
"description" : "blocks",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Block"
}
}
}
}
}
}
}
},
"/main-page/indexing-status" : {
"get" : {
"summary" : "get indexing status",
"operationId" : "get_indexing_status",
"responses" : {
"200" : {
"description" : "indexing status",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/IndexingStatus"
}
}
}
}
}
}
},
"/stats" : {
"get" : {
"summary" : "get stats counters",
"operationId" : "get_stats",
"responses" : {
"200" : {
"description" : "stats",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/StatsResponse"
}
}
}
}
}
}
},
"/stats/charts/transactions" : {
"get" : {
"summary" : "get txs chart",
"operationId" : "get_txs_chart",
"responses" : {
"200" : {
"description" : "tx chart",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "chart_data" ],
"properties" : {
"chart_data" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TransactionChartItem"
}
}
}
}
}
}
}
}
}
},
"/stats/charts/market" : {
"get" : {
"summary" : "get market chart",
"operationId" : "get_market_chart",
"responses" : {
"200" : {
"description" : "market chart",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "chart_data", "available_supply" ],
"properties" : {
"available_supply" : {
"type" : "string",
"example" : "164918857.718061"
},
"chart_data" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/MarketChartItem"
}
}
}
}
}
}
}
}
}
},
"/transactions/{transaction_hash}" : {
"get" : {
"summary" : "get tx info",
"operationId" : "get_tx",
"parameters" : [ {
"$ref" : "#/components/parameters/transactionHash"
} ],
"responses" : {
"200" : {
"description" : "tx info",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Transaction"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/transactions/{transaction_hash}/token-transfers" : {
"get" : {
"summary" : "get token transfers",
"operationId" : "get_token_transfers",
"parameters" : [ {
"$ref" : "#/components/parameters/transactionHash"
}, {
"in" : "query",
"name" : "type",
"schema" : {
"type" : "string",
"example" : "ERC-20,ERC-721,ERC-1155"
}
} ],
"responses" : {
"200" : {
"description" : "token transfers",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TokenTransfer"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27350206,
"index" : 1,
"items_count" : 50,
"transaction_hash" : "0xa3b401d6f3124c9d1528cd8d4b692f523d86fd88e48c391ffe9c67e4436ae5ca"
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/transactions/{transaction_hash}/internal-transactions" : {
"get" : {
"summary" : "get internal txs",
"operationId" : "get_internal_txs",
"parameters" : [ {
"$ref" : "#/components/parameters/transactionHash"
} ],
"responses" : {
"200" : {
"description" : "internal txs",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/InternalTransaction"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27350206,
"index" : 1,
"items_count" : 50,
"transaction_hash" : "0xa3b401d6f3124c9d1528cd8d4b692f523d86fd88e48c391ffe9c67e4436ae5ca",
"transaction_index" : 0
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/transactions/{transaction_hash}/logs" : {
"get" : {
"summary" : "get logs",
"operationId" : "get_logs",
"parameters" : [ {
"$ref" : "#/components/parameters/transactionHash"
} ],
"responses" : {
"200" : {
"description" : "internal txs",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Log"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"index" : 0,
"items_count" : 50,
"transaction_hash" : "0xa3b401d6f3124c9d1528cd8d4b692f523d86fd88e48c391ffe9c67e4436ae5ca"
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/transactions/{transaction_hash}/raw-trace" : {
"get" : {
"summary" : "get raw trace",
"operationId" : "get_raw_trace",
"parameters" : [ {
"$ref" : "#/components/parameters/transactionHash"
} ],
"responses" : {
"200" : {
"description" : "internal txs",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/RawTrace"
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/blocks/{block_number_or_hash}" : {
"get" : {
"summary" : "get block info",
"operationId" : "get_block",
"parameters" : [ {
"$ref" : "#/components/parameters/blockNumberOrHash"
} ],
"responses" : {
"200" : {
"description" : "block",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Block"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/blocks/{block_number_or_hash}/transactions" : {
"get" : {
"summary" : "get block txs",
"operationId" : "get_block_txs",
"parameters" : [ {
"$ref" : "#/components/parameters/blockNumberOrHash"
} ],
"responses" : {
"200" : {
"description" : "block",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Transaction"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27736955,
"index" : 4,
"items_count" : 50
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses" : {
"get" : {
"summary" : "get native coin holders list",
"operationId" : "get_addresses",
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "exchange_rate", "total_supply", "items", "next_page_params" ],
"properties" : {
"exchange_rate" : {
"type" : "string",
"example" : "0.01"
},
"total_supply" : {
"type" : "string",
"example" : "100000000"
},
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/AddressWithTxCount"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"fetched_coin_balance" : "269536604956070000000",
"hash" : "0xf74769d9ffe1cd17f20b283995cf9e7fa2a262ed",
"items_count" : 50
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}" : {
"get" : {
"summary" : "get address info",
"operationId" : "get_address",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Address"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/counters" : {
"get" : {
"summary" : "get address counters",
"operationId" : "get_address_counters",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/AddressCounters"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/transactions" : {
"get" : {
"summary" : "get address txs",
"operationId" : "get_address_txs",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"in" : "query",
"name" : "filter",
"schema" : {
"type" : "string",
"example" : "to | from"
}
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/Transaction"
}, {
"$ref" : "#/components/schemas/TransactionReward"
} ]
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"hash" : "0x5b432d185e0f08f31cf182a89305eb7ec05ed94395f1e47400dc7934850435ba",
"inserted_at" : "2021-11-13T11:06:00.800000Z",
"items_count" : 50
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/token-transfers" : {
"get" : {
"summary" : "get address token transfers",
"operationId" : "get_address_token_transfers",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"in" : "query",
"name" : "type",
"schema" : {
"type" : "string",
"example" : "ERC-20,ERC-721,ERC-1155"
}
}, {
"in" : "query",
"name" : "filter",
"schema" : {
"type" : "string",
"example" : "to | from"
}
}, {
"in" : "query",
"name" : "token",
"schema" : {
"type" : "string",
"example" : "0xb81afe27c103bcd42f4026cf719af6d802928765"
}
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TokenTransfer"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27736955,
"index" : 4,
"items_count" : 50
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/internal-transactions" : {
"get" : {
"summary" : "get address internal txs",
"operationId" : "get_address_internal_txs",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"in" : "query",
"name" : "filter",
"schema" : {
"type" : "string",
"example" : "to | from"
}
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/InternalTransaction"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27625575,
"index" : 0,
"items_count" : 50,
"transaction_index" : 0
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/logs" : {
"get" : {
"summary" : "get address logs",
"operationId" : "get_address_logs",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Log"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27736955,
"index" : 68,
"items_count" : 50,
"transaction_index" : 9
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/blocks-validated" : {
"get" : {
"summary" : "get blocks validated by address",
"operationId" : "get_address_blocks_validated",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Block"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27736955,
"items_count" : 50
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/token-balances" : {
"get" : {
"summary" : "get blocks validated by address",
"operationId" : "get_address_token_balances",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TokenBalance"
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/tokens" : {
"get" : {
"summary" : "get blocks validated by address",
"operationId" : "get_address_tokens",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"in" : "query",
"name" : "type",
"schema" : {
"type" : "string",
"example" : "ERC-20,ERC-721,ERC-1155"
}
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TokenBalance"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"items_count" : 50,
"token_name" : null,
"token_type" : "ERC-1155",
"value" : 14
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/coin-balance-history" : {
"get" : {
"summary" : "get address coin balance history",
"operationId" : "get_address_coin_balance_history",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/CoinBalanceHistoryEntry"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27736955,
"items_count" : 50
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/addresses/{address_hash}/coin-balance-history-by-day" : {
"get" : {
"summary" : "get address coin balance history by day",
"operationId" : "get_address_coin_balance_history_by_day",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "address",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/CoinBalanceHistoryByDaysEntry"
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens" : {
"get" : {
"summary" : "get tokens list",
"operationId" : "get_tokens_list",
"parameters" : [ {
"in" : "query",
"name" : "filter",
"schema" : {
"type" : "string",
"example" : "USDT"
}
}, {
"in" : "query",
"name" : "type",
"schema" : {
"type" : "string",
"example" : "ERC-20,ERC-721,ERC-1155"
}
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TokenInfo"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"holder_count" : 2,
"items_count" : 50,
"name" : "Apocryph"
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens/{address_hash}" : {
"get" : {
"summary" : "get token info",
"operationId" : "get_token",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/TokenInfo"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens/{address_hash}/token-transfers" : {
"get" : {
"summary" : "get token token transfers",
"operationId" : "get_token_token_transfers",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TokenTransfer"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27736955,
"index" : 61,
"items_count" : 2
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens/{address_hash}/holders" : {
"get" : {
"summary" : "get token holders",
"operationId" : "get_token_holders",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Holder"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"items_count" : 2,
"value" : 789999999999999970440
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens/{address_hash}/counters" : {
"get" : {
"summary" : "get token holders",
"operationId" : "get_token_counters",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/TokenCounters"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens/{address_hash}/inventory" : {
"get" : {
"summary" : "get token inventory",
"operationId" : "get_token_inventory",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/InventoryItem"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"id" : 27736955,
"index" : 4,
"items_count" : 50
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens/{address_hash}/inventory/{id}" : {
"get" : {
"summary" : "get token instance by id",
"operationId" : "get_token_instance",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"$ref" : "#/components/parameters/id"
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/TokenInstance"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens/{address_hash}/inventory/{id}/token-transfers" : {
"get" : {
"summary" : "get token transfers of token instance",
"operationId" : "get_token_instance_token_transfers",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"$ref" : "#/components/parameters/id"
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "items", "next_page_params" ],
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TokenTransfer"
}
},
"next_page_params" : {
"type" : "object",
"example" : {
"block_number" : 27736955,
"index" : 61,
"items_count" : 2
}
}
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/tokens/{address_hash}/inventory/{id}/metadata" : {
"get" : {
"summary" : "get metadata of token instance",
"operationId" : "get_token_instance_metadata",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"$ref" : "#/components/parameters/id"
} ],
"responses" : {
"200" : {
"description" : "token",
"content" : {
"application/json" : {
"schema" : {
"type" : "string",
"example" : "{ \"name\": \"Crypto stamp 3.0 2P6rB8\", \"image\": \"https://crypto.post.at/CS3/image/whale-sleeping\", \"fingerprint\": \"0x60e54e804ee2bdc6ca24971674821ca787fc7fb3ecdc4760060da223a9a3afea\", \"external_url\": \"https://crypto.post.at/CS3/2P6rB8\", \"description\": \"Crypto stamp Edition 3 (CS3), ID 2P6rB8\", \"attributes\": [ { \"value\": \"sleeping\", \"trait_type\": \"color\" }, { \"value\": \"Whale\", \"trait_type\": \"animal\" }, { \"value\": \"Layer 2: xdai\", \"trait_type\": \"managed_on\" } ] }"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/smart-contracts/{address_hash}" : {
"get" : {
"summary" : "get smart contract",
"operationId" : "get_smart_contract",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"responses" : {
"200" : {
"description" : "smart contract",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/SmartContract"
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/smart-contracts/{address_hash}/methods-read" : {
"get" : {
"summary" : "get read methods",
"operationId" : "get_read_methods",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"in" : "query",
"name" : "is_custom_abi",
"schema" : {
"type" : "string",
"example" : "true"
}
}, {
"in" : "query",
"name" : "from",
"schema" : {
"type" : "string",
"example" : "0xF61f5c4a3664501F499A9289AaEe76a709CE536e"
}
} ],
"responses" : {
"200" : {
"description" : "smart contract",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/ReadMethodWithValue"
}, {
"$ref" : "#/components/schemas/ReadMethodWithoutValue"
} ]
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/smart-contracts/{address_hash}/methods-read-proxy" : {
"get" : {
"summary" : "get read methods proxy",
"operationId" : "get_read_methods_proxy",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"in" : "query",
"name" : "is_custom_abi",
"schema" : {
"type" : "string",
"example" : "true"
}
}, {
"in" : "query",
"name" : "from",
"schema" : {
"type" : "string",
"example" : "0xF61f5c4a3664501F499A9289AaEe76a709CE536e"
}
} ],
"responses" : {
"200" : {
"description" : "smart contract",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/ReadMethodWithValue"
}, {
"$ref" : "#/components/schemas/ReadMethodWithoutValue"
} ]
}
}
}
}
}
}
}
},
"/smart-contracts/{address_hash}/methods-write" : {
"get" : {
"summary" : "get write methods",
"operationId" : "get_write_methods",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"in" : "query",
"name" : "is_custom_abi",
"schema" : {
"type" : "string",
"example" : "true"
}
} ],
"responses" : {
"200" : {
"description" : "smart contract",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/WriteMethod"
} ]
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/smart-contracts/{address_hash}/methods-write-proxy" : {
"get" : {
"summary" : "get write methods proxy",
"operationId" : "get_write_methods_proxy",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
}, {
"in" : "query",
"name" : "is_custom_abi",
"schema" : {
"type" : "string",
"example" : "true"
}
} ],
"responses" : {
"200" : {
"description" : "smart contract",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/WriteMethod"
} ]
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/smart-contracts/{address_hash}/query-read-method" : {
"post" : {
"summary" : "query read method",
"operationId" : "query_read_method",
"parameters" : [ {
"$ref" : "#/components/parameters/addressHash"
} ],
"requestBody" : {
"required" : true,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ReadMethodQueryBody"
}
}
}
},
"responses" : {
"200" : {
"description" : "smart contract",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/ReadMethodResponse"
} ]
}
}
}
}
},
"400" : {
"description" : "bad input parameter"
}
}
}
},
"/config/json-rpc-url" : {
"get" : {
"summary" : "get json rpc url",
"operationId" : "get_json_rpc_url",
"responses" : {
"200" : {
"description" : "json rpc url",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"required" : [ "json_rpc_url" ],
"properties" : {
"json_rpc_url" : {
"type" : "string",
"example" : "https://core.poa.network"
}
}
}
}
}
}
}
}
}
},
"components" : {
"parameters" : {
"addressHash" : {
"name" : "address_hash",
"in" : "path",
"description" : "Address hash",
"required" : true,
"schema" : {
"type" : "string",
"pattern" : "^0x([A-Fa-f0-9]{40})$"
}
},
"addressName" : {
"name" : "address_name",
"in" : "query",
"description" : "the name of address in watchlist",
"required" : true,
"schema" : {
"type" : "string",
"maxLength" : 256
}
},
"transactionHash" : {
"name" : "transaction_hash",
"in" : "path",
"description" : "Transaction hash",
"required" : true,
"schema" : {
"type" : "string",
"pattern" : "^0x([A-Fa-f0-9]{64})$"
}
},
"blockNumberOrHash" : {
"name" : "block_number_or_hash",
"schema" : {
"type" : "string"
},
"in" : "path",
"required" : true,
"description" : "Block number or hash"
},
"id" : {
"name" : "id",
"schema" : {
"type" : "integer"
},
"in" : "path",
"required" : true,
"description" : "integer id"
}
},
"schemas" : {
"Block" : {
"type" : "object",
"required" : [ "height", "timestamp", "tx_count", "miner", "size", "hash", "parent_hash", "difficulty", "total_difficulty", "gas_used", "gas_limit", "nonce" ],
"properties" : {
"height" : {
"type" : "integer"
},
"timestamp" : {
"type" : "string",
"example" : "2022-08-02T07:43:10.000000Z"
},
"tx_count" : {
"type" : "integer"
},
"miner" : {
"$ref" : "#/components/schemas/AddressParam"
},
"size" : {
"type" : "integer"
},
"hash" : {
"type" : "string",
"example" : "0xd2c092969530414df86c6935ebe039224faabe4e80ff51ffa02dc08881e6259a"
},
"parent_hash" : {
"type" : "string",
"example" : "0x3222fd68f89f621ba0fdb0e4fd7d749f40a252174a7808a5d0ad8e6503badd9c"
},
"difficulty" : {
"type" : "integer",
"example" : 340282366920938463463374607431768211454
},
"total_difficulty" : {
"type" : "integer",
"example" : 7340282366920938463463374607431768211454514714
},
"gas_used" : {
"type" : "integer"
},
"gas_limit" : {
"type" : "integer"
},
"nonce" : {
"type" : "string",
"example" : "0x0102034"
},
"base_fee_per_gas" : {
"type" : "integer"
},
"burnt_fees" : {
"type" : "integer"
},
"priority_fee" : {
"type" : "integer"
},
"extra_data" : {
"type" : "string",
"example" : "speth03g�� (Hex:0x7370657468303367c18300)"
},
"uncles_hashes" : {
"type" : "object",
"example" : [ "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" ]
},
"state_root" : {
"type" : "string",
"example" : "0x434fb3f234c8cffc1d915ad26ea360b0261d183ad37af89e31b839df4dd0b00f"
},
"rewards" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Reward"
}
},
"gas_target_percentage" : {
"type" : "number",
"example" : -30
},
"gas_used_percentage" : {
"type" : "number"
},
"burnt_fees_percentage" : {
"type" : "number",
"example" : 50.54
},
"type" : {
"type" : "string",
"example" : "block | reorg | uncle"
},
"tx_fees" : {
"type" : "integer"
}
}
},
"TokenTransfer" : {
"type" : "object",
"required" : [ "tx_hash", "type", "from", "to", "total", "token" ],
"properties" : {
"block_hash" : {
"type" : "string",
"example" : "0xa45ac09015352df65cd4d1314de87419dd7589b033a874a5ef7f2654b342babe"
},
"method" : {
"type" : "string",
"example" : "mint"
},
"timestamp" : {
"type" : "string",
"example" : "2022-11-05T19:20:20.000000Z"
},
"type" : {
"type" : "string",
"example" : "token_transfer"
},
"tx_hash" : {
"type" : "string",
"example" : "0x655a2304c3f69b0ce52a6dd25bf4377ffddcdde6397aa53d47b13c49af0ac5c8"
},
"from" : {
"$ref" : "#/components/schemas/AddressParam"
},
"to" : {
"$ref" : "#/components/schemas/AddressParam"
},
"total" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/TotalERC20"
}, {
"$ref" : "#/components/schemas/TotalERC721"
}, {
"$ref" : "#/components/schemas/TotalERC1155"
}, {
"$ref" : "#/components/schemas/TotalERC1155Batch"
} ]
},
"token" : {
"$ref" : "#/components/schemas/TokenInfo"
}
}
},
"RawTrace" : {
"type" : "object",
"example" : {
"action" : {
"callType" : "call",
"from" : "0xf57b55b01b831e602e09674a4e5d69cbcf343f98",
"gas" : "0x25D3FC",
"input" : "0x630cea8e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000041c25b36779231e71769118210c3eb64c0a9c7577b925b309af3183e13acc7cf30210493d13c8c6c3c0bd337d5e39e454fece0c301f0aedb6c43c7a37650ac83e71c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019500050000f0add9e5dc02faeca12e9669f045685449d6b80a000000000000744359447362798334d3485c64d1e4870fde2ddc0d75f0b456250dc9990662a6f25808cc74a6d1131ea9000927c001018064382ae87cdd000000000000000000000000bab3cbdcbcc578445480a79ed80269c50bb5b71800000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000351af1631aa5ea1ca62ad8a4e3cd87128d4d910800000000000000000000000000000000000000000000005b8decde02914ce837000000000000000000000000000000000000000000000000000000000000001e4d45444f4f5a412045636f73797374656d2076322e30206f6e2078446169000000000000000000000000000000000000000000000000000000000000000000044d445a41000000000000000000000000000000000000000000000000000000000000000000000000000000",
"to" : "0x162e898bd0aacb578c8d5f8d6ca588c13d2a383f",
"value" : "0x0"
},
"error" : "Reverted",
"subtraces" : 1,
"traceAddress" : [ ],
"type" : "call"
}
},
"Log" : {
"type" : "object",
"required" : [ "address", "topics", "data", "index", "tx_hash" ],
"properties" : {
"tx_hash" : {
"type" : "string",
"example" : "0xfb2d87565f230fc6dcbe7c3af45df6d2a9586d08aa5be5491d83216d7e83fc1e"
},
"address" : {
"$ref" : "#/components/schemas/AddressParam"
},
"topics" : {
"type" : "array",
"items" : {
"type" : "string",
"example" : "0x66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed"
}
},
"data" : {
"type" : "string",
"example" : "0x0"
},
"index" : {
"type" : "integer"
},
"decoded" : {
"$ref" : "#/components/schemas/DecodedInputLog",
"example" : {
"method_call" : "Transfer(address indexed from, address indexed to, uint256 tokens)",
"method_id" : "0x630cea8e",
"parameters" : [ {
"name" : "signature",
"type" : "bytes",
"indexed?" : true,
"value" : "0x0"
}, {
"name" : "message",
"type" : "bytes",
"indexed?" : false,
"value" : "0x01"
} ]
}
}
}
},
"InternalTransaction" : {
"type" : "object",
"required" : [ "type", "success", "transaction_hash", "from", "to", "created_contract", "value", "block", "timestamp", "index" ],
"properties" : {
"error" : {
"type" : "string",
"example" : "reverted"
},
"success" : {
"type" : "boolean",
"example" : false
},
"type" : {
"type" : "string",
"example" : "delegate call"
},
"transaction_hash" : {
"type" : "string",
"example" : "0x323177407d08e4dced8c0c5a397b7cf9af50313ae2d98d69f84d65bd4152d6d9"
},
"from" : {
"$ref" : "#/components/schemas/AddressParam"
},
"to" : {
"$ref" : "#/components/schemas/AddressParam"
},
"created_contract" : {
"$ref" : "#/components/schemas/AddressParam"
},
"value" : {
"type" : "integer"
},
"index" : {
"type" : "integer"
},
"block" : {
"type" : "integer"
},
"timestamp" : {
"type" : "string",
"example" : "2022-08-02T07:18:05.000000Z"
}
}
},
"Fee" : {
"type" : "object",
"required" : [ "type", "value" ],
"properties" : {
"type" : {
"type" : "string",
"example" : "maximum | actual"
},
"value" : {
"type" : "string",
"example" : "9853224000000000"
}
}
},
"Transaction" : {
"type" : "object",
"required" : [ "hash", "result", "from", "to", "created_contract", "confirmations", "confirmation_duration", "value", "fee", "gas_price", "gas_limit", "nonce", "raw_input", "tx_types" ],
"properties" : {
"hash" : {
"type" : "string",
"example" : "0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368"
},
"result" : {
"type" : "string",
"example" : "Error: (Awaiting internal transactions for reason)"
},
"confirmations" : {
"type" : "integer",
"example" : 1035
},
"status" : {
"type" : "string",
"example" : "ok | error"
},
"block" : {
"type" : "integer",
"format" : "int32",
"example" : 23484035
},
"timestamp" : {
"type" : "string",
"example" : "2022-08-02T07:18:05.000000Z"
},
"confirmation_duration" : {
"type" : "object",
"example" : [ 0, 17479.0 ]
},
"from" : {
"$ref" : "#/components/schemas/AddressParam"
},
"to" : {
"$ref" : "#/components/schemas/AddressParam"
},
"created_contract" : {
"$ref" : "#/components/schemas/AddressParam"
},
"value" : {
"type" : "integer",
"example" : 100234
},
"fee" : {
"$ref" : "#/components/schemas/Fee"
},
"gas_price" : {
"type" : "integer"
},
"type" : {
"type" : "integer"
},
"gas_used" : {
"type" : "integer"
},
"gas_limit" : {
"type" : "integer"
},
"max_fee_per_gas" : {
"type" : "integer"
},
"max_priority_fee_per_gas" : {
"type" : "integer"
},
"priority_fee" : {
"type" : "integer"
},
"base_fee_per_gas" : {
"type" : "integer"
},
"tx_burnt_fee" : {
"type" : "integer"
},
"nonce" : {
"type" : "integer"
},
"position" : {
"type" : "integer"
},
"revert_reason" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/RevertReasonAsMap"
}, {
"$ref" : "#/components/schemas/DecodedInput"
} ]
},
"raw_input" : {
"type" : "string",
"example" : "0x630cea8e0000000000000000000000000000001"
},
"decoded_input" : {
"$ref" : "#/components/schemas/DecodedInput"
},
"token_transfers" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TokenTransfer"
}
},
"token_transfers_overflow" : {
"type" : "boolean"
},
"exchange_rate" : {
"type" : "number"
},
"method" : {
"type" : "string",
"example" : "transferFrom"
},
"tx_types" : {
"type" : "array",
"items" : {
"type" : "string"
},
"example" : [ "token_transfer", "contract_creation", "contract_call", "token_creation", "coin_transfer" ]
},
"tx_tag" : {
"type" : "string",
"example" : "private_tx_tag"
}
}
},
"RevertReasonAsMap" : {
"type" : "object",
"required" : [ "raw" ],
"properties" : {
"raw" : {
"type" : "string",
"example" : "4b415032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365"
}
}
},
"ExtendedRevertReasonAsMap" : {
"type" : "object",
"required" : [ "raw", "code", "message" ],
"properties" : {
"raw" : {
"type" : "string",
"example" : "4b415032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365"
},
"code" : {
"type" : "integer"
},
"message" : {
"type" : "string",
"example" : "Reverted"
}
}
},
"ReadMethodWithValue" : {
"type" : "object",
"example" : {
"inputs" : [ ],
"method_id" : "2e64cec1",
"name" : "retrieve",
"outputs" : [ {
"internalType" : "uint256",
"name" : "",
"type" : "uint256",
"value" : 0
} ],
"stateMutability" : "view",
"type" : "function"
}
},
"ReadMethodWithoutValue" : {
"type" : "object",
"example" : {
"inputs" : [ ],
"method_id" : "f851a440",
"name" : "admin",
"outputs" : [ {
"internalType" : "address",
"name" : "admin_",
"type" : "address"
} ],
"stateMutability" : "nonpayable",
"type" : "function"
}
},
"WriteMethod" : {
"type" : "object",
"example" : {
"inputs" : [ {
"internalType" : "uint256",
"name" : "num",
"type" : "uint256"
} ],
"name" : "store",
"outputs" : [ ],
"stateMutability" : "nonpayable",
"type" : "function"
}
},
"DecodedInput" : {
"type" : "object",
"required" : [ "method_call", "method_id", "parameters" ],
"properties" : {
"method_call" : {
"type" : "string",
"example" : "transferFrom(address _from, address _to, uint256 _value)"
},
"method_id" : {
"type" : "string",
"example" : "23b872dd"
},
"parameters" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/DecodedInputParameter"
}
}
}
},
"DecodedInputParameter" : {
"type" : "object",
"required" : [ "name", "type", "value" ],
"properties" : {
"name" : {
"type" : "string",
"example" : "signature"
},
"type" : {
"type" : "string",
"example" : "bytes"
},
"value" : {
"type" : "string",
"example" : "0x0"
}
}
},
"DecodedInputLog" : {
"type" : "object",
"required" : [ "method_call", "method_id", "parameters" ],
"properties" : {
"method_call" : {
"type" : "string",
"example" : "transferFrom(address _from, address _to, uint256 _value)"
},
"method_id" : {
"type" : "string",
"example" : "23b872dd"
},
"parameters" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/DecodedInputLogParameter"
}
}
}
},
"DecodedInputLogParameter" : {
"type" : "object",
"required" : [ "name", "type", "value", "indexed?" ],
"properties" : {
"name" : {
"type" : "string",
"example" : "signature"
},
"type" : {
"type" : "string",
"example" : "bytes"
},
"value" : {
"type" : "string",
"example" : "0x0"
},
"indexed?" : {
"type" : "boolean"
}
}
},
"AddressParam" : {
"type" : "object",
"required" : [ "hash" ],
"properties" : {
"hash" : {
"type" : "string",
"example" : "0xEb533ee5687044E622C69c58B1B12329F56eD9ad"
},
"implementation_name" : {
"type" : "string",
"example" : "implementationName"
},
"name" : {
"type" : "string",
"example" : "contractName"
},
"is_contract" : {
"type" : "boolean"
},
"private_tags" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/AddressTag"
}
},
"watchlist_names" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/WatchlistName"
}
},
"public_tags" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/AddressTag"
}
},
"is_verified" : {
"type" : "boolean"
}
}
},
"AddressTag" : {
"type" : "object",
"required" : [ "address_hash", "display_name", "label" ],
"properties" : {
"address_hash" : {
"type" : "string",
"example" : "0xEb533ee5687044E622C69c58B1B12329F56eD9ad"
},
"display_name" : {
"type" : "string",
"example" : "name to show"
},
"label" : {
"type" : "string",
"example" : "label"
}
}
},
"WatchlistName" : {
"type" : "object",
"required" : [ "display_name", "label" ],
"properties" : {
"display_name" : {
"type" : "string",
"example" : "name to show"
},
"label" : {
"type" : "string",
"example" : "label"
}
}
},
"Address" : {
"type" : "object",
"required" : [ "hash" ],
"properties" : {
"creator_address_hash" : {
"type" : "string",
"example" : "0xEb533ee5687044E622C69c58B1B12329F56eD9ad"
},
"creation_tx_hash" : {
"type" : "string",
"example" : "0x1f610ff9c1efad6b5a8bb6afcc0786cd7343f03f9a61e2544fcff908cedee924"
},
"token" : {
"$ref" : "#/components/schemas/TokenInfo"
},
"coin_balance" : {
"type" : "string",
"example" : "10000000"
},
"exchange_rate" : {
"type" : "string",
"example" : "1.01"
},
"implementation_address" : {
"type" : "string",
"example" : "0xEb533ee5687044E622C69c58B1B12329F56eD9ad"
},
"block_number_balance_updated_at" : {
"type" : "integer",
"example" : 27656552
},
"hash" : {
"type" : "string",
"example" : "0xEb533ee5687044E622C69c58B1B12329F56eD9ad"
},
"implementation_name" : {
"type" : "string",
"example" : "implementationName"
},
"name" : {
"type" : "string",
"example" : "contractName"
},
"is_contract" : {
"type" : "boolean"
},
"private_tags" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/AddressTag"
}
},
"watchlist_names" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/WatchlistName"
}
},
"public_tags" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/AddressTag"
}
},
"is_verified" : {
"type" : "boolean"
}
}
},
"AddressWithTxCount" : {
"allOf" : [ {
"$ref" : "#/components/schemas/Address"
}, {
"type" : "object",
"required" : [ "tx_count" ],
"properties" : {
"tx_count" : {
"type" : "string",
"example" : "1234"
}
}
} ]
},
"Reward" : {
"type" : "object",
"required" : [ "reward", "type" ],
"properties" : {
"reward" : {
"type" : "integer"
},
"type" : {
"type" : "string",
"example" : "Miner Reward | Emission Reward | Chore Reward | Uncle Reward"
}
}
},
"TransactionReward" : {
"type" : "object",
"required" : [ "emission_reward", "block_hash", "from", "to", "types" ],
"properties" : {
"types" : {
"type" : "object",
"example" : [ "reward" ]
},
"emission_reward" : {
"type" : "string",
"example" : "500000000000000000"
},
"block_hash" : {
"type" : "string",
"example" : "0x3169a7e9c513462403abb40eaa4fa51c5fbe1b908606e6eeef16232e308cb464"
},
"from" : {
"$ref" : "#/components/schemas/AddressParam"
},
"to" : {
"$ref" : "#/components/schemas/AddressParam"
}
}
},
"AddressCounters" : {
"type" : "object",
"required" : [ "transactions_count", "token_transfers_count", "gas_usage_count", "validations_count" ],
"properties" : {
"transactions_count" : {
"type" : "string",
"example" : "0"
},
"token_transfers_count" : {
"type" : "string",
"example" : "0"
},
"gas_usage_count" : {
"type" : "string",
"example" : "0"
},
"validations_count" : {
"type" : "string",
"example" : "0"
}
}
},
"TokenBalance" : {
"type" : "object",
"required" : [ "value", "token", "token_id" ],
"properties" : {
"value" : {
"type" : "string",
"example" : "10000"
},
"token_id" : {
"type" : "string",
"example" : "123"
},
"token" : {
"$ref" : "#/components/schemas/Token"
}
}
},
"CoinBalanceHistoryEntry" : {
"type" : "object",
"required" : [ "block_number", "block_timestamp", "delta", "value" ],
"properties" : {
"transaction_hash" : {
"type" : "string",
"example" : "0x1f610ff9c1efad6b5a8bb6afcc0786cd7343f03f9a61e2544fcff908cedee924"
},
"block_number" : {
"type" : "integer",
"example" : 1584930
},
"block_timestamp" : {
"type" : "string",
"example" : "2022-08-02T07:18:05.000000Z"
},
"delta" : {
"type" : "string",
"example" : "-234959404"
},
"value" : {
"type" : "string",
"example" : "100232323"
}
}
},
"CoinBalanceHistoryByDaysEntry" : {
"type" : "object",
"required" : [ "date", "value" ],
"properties" : {
"date" : {
"type" : "string",
"example" : "2022-08-02"
},
"value" : {
"type" : "number",
"example" : "100232323"
}
}
},
"Token" : {
"type" : "object",
"required" : [ "address", "symbol", "name", "decimals", "type", "holders", "exchange_rate", "total_supply" ],
"properties" : {
"name" : {
"type" : "string",
"example" : "Tether USD"
},
"decimals" : {
"type" : "string",
"example" : "16"
},
"symbol" : {
"type" : "string",
"example" : "USDT"
},
"address" : {
"type" : "string",
"example" : "0x394c399dbA25B99Ab7708EdB505d755B3aa29997"
},
"type" : {
"type" : "string",
"example" : "ERC-20"
},
"holders" : {
"type" : "integer",
"example" : 837494234523
},
"exchange_rate" : {
"type" : "string",
"example" : "0.99"
},
"total_supply" : {
"type" : "string",
"example" : "10000000"
}
}
},
"TotalERC20" : {
"required" : [ "value" ],
"properties" : {
"decimals" : {
"type" : "string",
"example" : "18"
},
"value" : {
"type" : "string",
"example" : "1000"
}
}
},
"TotalERC721" : {
"required" : [ "token_id" ],
"properties" : {
"token_id" : {
"type" : "string",
"example" : "1"
}
}
},
"TotalERC1155" : {
"required" : [ "token_id", "value" ],
"properties" : {
"token_id" : {
"type" : "string",
"example" : "1"
},
"decimals" : {
"type" : "string",
"example" : null
},
"value" : {
"type" : "string",
"example" : "1000"
}
}
},
"TotalERC1155Batch" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/TotalERC1155"
}
},
"Holder" : {
"required" : [ "address", "value", "token" ],
"properties" : {
"address" : {
"$ref" : "#/components/schemas/AddressParam"
},
"value" : {
"type" : "string",
"example" : "10000"
},
"token_id" : {
"type" : "string",
"example" : "10000"
},
"token" : {
"$ref" : "#/components/schemas/TokenInfo"
}
}
},
"InventoryItem" : {
"required" : [ "is_unique", "token_id" ],
"properties" : {
"is_unique" : {
"type" : "boolean",
"example" : true
},
"token_id" : {
"type" : "integer",
"example" : 431
},
"holder_address_hash" : {
"type" : "string",
"example" : "0x394c399dbA25B99Ab7708EdB505d755B3aa29997"
},
"media_url" : {
"type" : "string",
"example" : "example.com/picture.png"
}
}
},
"TokenInstance" : {
"required" : [ "id", "token_name", "token_type", "token_address_hash", "transfers_count" ],
"properties" : {
"id" : {
"type" : "integer",
"example" : 431
},
"token_name" : {
"type" : "string",
"example" : "New NFT"
},
"token_type" : {
"type" : "string",
"example" : "ERC-721"
},
"token_address_hash" : {
"type" : "string",
"example" : "0x394c399dbA25B99Ab7708EdB505d755B3aa29997"
},
"transfers_count" : {
"type" : "integer",
"example" : 10
},
"media_url" : {
"type" : "string",
"example" : "example.com/picture.png"
}
}
},
"SmartContract" : {
"properties" : {
"verified_twin_address_hash" : {
"type" : "string",
"example" : "0x394c399dbA25B99Ab7708EdB505d755B3aa29997"
},
"is_verified" : {
"type" : "boolean"
},
"is_changed_bytecode" : {
"type" : "boolean"
},
"is_partially_verified" : {
"type" : "boolean"
},
"is_fully_verified" : {
"type" : "boolean"
},
"is_verified_via_sourcify" : {
"type" : "boolean"
},
"is_vyper_contract" : {
"type" : "boolean"
},
"is_self_destructed" : {
"type" : "boolean"
},
"can_be_visualized_via_sol2uml" : {
"type" : "boolean"
},
"minimal_proxy_address_hash" : {
"type" : "string",
"example" : "0x394c399dbA25B99Ab7708EdB505d755B3aa29997"
},
"sourcify_repo_url" : {
"type" : "string",
"example" : "https://sourcify.repo.com/100/link_to_a_contract_at_sourcify"
},
"name" : {
"type" : "string",
"example" : "Cryptostamp3L2"
},
"optimization_enabled" : {
"type" : "boolean",
"example" : false
},
"optimizations_runs" : {
"type" : "integer",
"example" : 200
},
"compiler_version" : {
"type" : "string",
"example" : "v0.8.4+commit.c7e474f2"
},
"evm_version" : {
"type" : "string",
"example" : "default"
},
"verified_at" : {
"type" : "string",
"example" : "2021-06-02T17:54:17.116055Z"
},
"abi" : {
"type" : "string",
"example" : "[{\"type\":\"constructor\",\"stateMutability\":\"nonpayable\",\"inputs\":[{\"type\":\"address\",\"name\":\"_bridgeDataAddress\",\"internalType\":\"address\"},{\"type\":\"uint256\",\"name\":\"_finalSupply\",\"internalType\":\"uint256\"},{\"type\":\"uint256[5]\",\"name\":\"_totalColorSupply\",\"internalType\":\"uint256[5]\"}]}]"
},
"source_code" : {
"type" : "string",
"example" : "contract A {}"
},
"file_path" : {
"type" : "string",
"example" : "contract.sol"
},
"compiler_settings" : {
"type" : "object",
"example" : { }
},
"constructor_args" : {
"type" : "string",
"example" : "0x01"
},
"additional_sources" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/ContractSource"
}
},
"decoded_constructor_args" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/ConstructorArguments"
}
},
"deployed_bytecode" : {
"type" : "string",
"example" : "0x01"
},
"creation_bytecode" : {
"type" : "string",
"example" : "0x02"
},
"external_libraries" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/ExternalLibrary"
}
}
}
},
"ExternalLibrary" : {
"required" : [ "name", "address_hash" ],
"properties" : {
"name" : {
"type" : "string",
"example" : "MathLib"
},
"address_hash" : {
"type" : "string",
"example" : "0xF61f5c4a3664501F499A9289AaEe76a709CE536e"
}
}
},
"ContractSource" : {
"properties" : {
"file_path" : {
"type" : "string",
"example" : "contracts/erc-20.sol"
},
"source_code" : {
"type" : "string",
"example" : "pragma solidity ^0.8.0; \\n contract A {}"
}
}
},
"ConstructorArguments" : {
"type" : "object",
"example" : [ "0x2a3885b3f0c98f3e36334d4fa7beda53cb0ae095", {
"internalType" : "address",
"name" : "_logic",
"type" : "address"
} ]
},
"TokenInfo" : {
"required" : [ "address", "type" ],
"properties" : {
"address" : {
"type" : "string",
"example" : "0xEb533ee5687044E622C69c58B1B12329F56eD9ad"
},
"type" : {
"type" : "string",
"example" : "ERC-20"
},
"symbol" : {
"type" : "string",
"example" : "USDT"
},
"name" : {
"type" : "string",
"example" : "Tether USD"
},
"decimals" : {
"type" : "string",
"example" : "18"
},
"holders" : {
"type" : "string",
"example" : "100"
},
"exchange_rate" : {
"type" : "string",
"example" : "0.001"
},
"total_supply" : {
"type" : "string",
"example" : "1000000"
}
}
},
"Argument" : {
"properties" : {
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"example" : "uint256"
},
"value" : {
"type" : "string",
"example" : "100000"
}
}
},
"SearchResultRedirect" : {
"required" : [ "redirect" ],
"properties" : {
"redirect" : {
"type" : "boolean"
},
"type" : {
"type" : "string",
"example" : "address | block | transaction"
},
"parameter" : {
"type" : "string",
"example" : "0xEb533ee5687044E622C69c58B1B12329F56eD9ad"
}
}
},
"SearchResultToken" : {
"required" : [ "type", "name", "symbol", "address", "token_url", "address_url" ],
"properties" : {
"type" : {
"type" : "string",
"example" : "token"
},
"name" : {
"type" : "string",
"example" : "Tether USD"
},
"symbol" : {
"type" : "string",
"example" : "USDT"
},
"address" : {
"type" : "string",
"example" : "0xe2FBdeADC82c71C1b8bFf9CA4f9E7666224A362c"
},
"token_url" : {
"type" : "string",
"example" : "/xdai/mainnet/token/0xc1c1031e4A44B98707203480029e6576CB3267e3"
},
"address_url" : {
"type" : "string",
"example" : "/xdai/mainnet/address/0xc1c1031e4A44B98707203480029e6576CB3267e3"
}
}
},
"SearchResultAddressOrContract" : {
"required" : [ "type", "address", "url" ],
"properties" : {
"type" : {
"type" : "string",
"example" : "address|contract"
},
"name" : {
"type" : "string",
"example" : "Name"
},
"address" : {
"type" : "string",
"example" : "0xe2FBdeADC82c71C1b8bFf9CA4f9E7666224A362c"
},
"url" : {
"type" : "string",
"example" : "/xdai/mainnet/address/0xc1c1031e4A44B98707203480029e6576CB3267e3"
}
}
},
"SearchResultBlock" : {
"required" : [ "type", "block_number", "block_hash", "url" ],
"properties" : {
"type" : {
"type" : "string",
"example" : "block"
},
"block_number" : {
"type" : "integer",
"example" : 24816691
},
"block_hash" : {
"type" : "string",
"example" : "0xba83e9ba0b43e8d112a07fdab08d53f473d2b7fb0e585bd437ae739933db203e"
},
"url" : {
"type" : "string",
"example" : "/xdai/mainnet/block/0xba83e9ba0b43e8d112a07fdab08d53f473d2b7fb0e585bd437ae739933db203e"
}
}
},
"SearchResultTransaction" : {
"required" : [ "type", "tx_hash", "url" ],
"properties" : {
"type" : {
"type" : "string",
"example" : "transaction"
},
"tx_hash" : {
"type" : "string",
"example" : "0xe38c6772f33edfbd218f59853befe18391cb786f911fb6c0b00ed6dd72ef6e69"
},
"url" : {
"type" : "string",
"example" : "/xdai/mainnet/tx/0xe38c6772f33edfbd218f59853befe18391cb786f911fb6c0b00ed6dd72ef6e69"
}
}
},
"IndexingStatus" : {
"required" : [ "finished_indexing", "finished_indexing_blocks", "indexed_blocks_ratio", "indexed_inernal_transactions_ratio" ],
"properties" : {
"finished_indexing" : {
"type" : "boolean"
},
"finished_indexing_blocks" : {
"type" : "boolean"
},
"indexed_blocks_ratio" : {
"type" : "string",
"example" : "1.0"
},
"indexed_inernal_transactions_ratio" : {
"type" : "string",
"example" : "1.0"
}
}
},
"StatsResponse" : {
"required" : [ "total_blocks", "total_addresses", "total_transactions", "average_block_time", "coin_price", "total_gas_used", "transactions_today", "gas_used_today", "market_cap", "network_utilization_percentage" ],
"properties" : {
"total_blocks" : {
"type" : "string",
"example" : "508700"
},
"total_addresses" : {
"type" : "string",
"example" : "982340"
},
"total_transactions" : {
"type" : "string",
"example" : "1699427"
},
"average_block_time" : {
"type" : "number",
"example" : 25000.0
},
"coin_price" : {
"type" : "string",
"example" : "0.00254957"
},
"total_gas_used" : {
"type" : "string",
"example" : "0"
},
"transactions_today" : {
"type" : "string",
"example" : "622"
},
"gas_used_today" : {
"type" : "string",
"example" : "49063630"
},
"gas_prices" : {
"type" : "object",
"example" : {
"average" : 10.0,
"fast" : 10.0,
"slow" : 10.0
}
},
"static_gas_price" : {
"type" : "string",
"example" : "10.1"
},
"market_cap" : {
"type" : "string",
"example" : "420471.10604559750644"
},
"network_utilization_percentage" : {
"type" : "number",
"example" : 40.2142
}
}
},
"MarketChartItem" : {
"required" : [ "date", "closing_price" ],
"properties" : {
"date" : {
"type" : "string",
"example" : "2022-10-31"
},
"closing_price" : {
"type" : "string",
"example" : "0.00254915"
}
}
},
"TransactionChartItem" : {
"required" : [ "date", "tx_count" ],
"properties" : {
"date" : {
"type" : "string",
"example" : "2022-10-31"
},
"tx_count" : {
"type" : "integer",
"example" : 622
}
}
},
"TokenCounters" : {
"required" : [ "token_holders_count", "transfers_count" ],
"properties" : {
"token_holders_count" : {
"type" : "string",
"example" : "100"
},
"transfers_count" : {
"type" : "string",
"example" : "1000"
}
}
},
"ReadMethodQueryBody" : {
"required" : [ "args", "method_id" ],
"properties" : {
"args" : {
"type" : "array",
"example" : [ 1123, "0xBb36c792B9B45Aaf8b848A1392B0d6559202729E" ]
},
"method_id" : {
"type" : "string",
"example" : "ab470f05"
},
"from" : {
"type" : "string",
"example" : "0xBb36c792B9B45Aaf8b848A1392B0d6559202729E"
},
"contract_type" : {
"type" : "string",
"example" : "proxy | regular"
}
}
},
"ReadMethodResponse" : {
"required" : [ "result", "is_error" ],
"properties" : {
"is_error" : {
"type" : "boolean"
},
"result" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/ExtendedRevertReasonAsMap"
}, {
"$ref" : "#/components/schemas/DecodedInput"
}, {
"$ref" : "#/components/schemas/CodeAndMessage"
}, {
"$ref" : "#/components/schemas/OutputAndNames"
} ]
}
}
},
"CodeAndMessage" : {
"required" : [ "code", "message" ],
"properties" : {
"code" : {
"type" : "integer"
},
"message" : {
"type" : "string",
"example" : "Reverted"
}
}
},
"Error" : {
"required" : [ "error" ],
"properties" : {
"error" : {
"type" : "string",
"example" : "Some error"
}
}
},
"OutputAndNames" : {
"required" : [ "output", "names" ],
"properties" : {
"output" : {
"type" : "array",
"example" : [ {
"type" : "uint256",
"value" : 0
} ]
},
"names" : {
"type" : "array",
"example" : [ null ]
}
}
}
}
}
}
\ No newline at end of file
import type { NextPage } from 'next';
import type { NextPage, GetServerSideProps } from 'next';
import Head from 'next/head';
import React from 'react';
import appConfig from 'configs/app/config';
import getNetworkTitle from 'lib/networks/getNetworkTitle';
import { getServerSideProps as getServerSidePropsBase } from 'lib/next/getServerSideProps';
import type { Props } from 'lib/next/getServerSideProps';
import Page from 'ui/shared/Page/Page';
import PageTitle from 'ui/shared/Page/PageTitle';
import SwaggerUI from 'ui/SwaggerUI';
......@@ -21,4 +24,12 @@ const AppsPage: NextPage = () => {
export default AppsPage;
export { getServerSideProps } from 'lib/next/getServerSideProps';
export const getServerSideProps: GetServerSideProps<Props> = async(args) => {
if (!appConfig.apiDoc.specUrl) {
return {
notFound: true,
};
}
return getServerSidePropsBase(args);
};
......@@ -8,7 +8,7 @@ import { Box, Spinner, useColorModeValue } from '@chakra-ui/react';
import dynamic from 'next/dynamic';
import React from 'react';
import spec from '../lib/spec.json';
import appConfig from 'configs/app/config';
import 'swagger-ui-react/swagger-ui.css';
......@@ -47,7 +47,7 @@ const SwaggerUI = () => {
return (
<Box sx={ swaggerStyle }>
<SwaggerUIReact spec={ spec } plugins={ [ NeverShowInfoPlugin ] }/>
<SwaggerUIReact url={ appConfig.apiDoc.specUrl } plugins={ [ NeverShowInfoPlugin ] }/>
</Box>
);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment