Explorer Api
The Explorer API is a documentation of the API of the caduceus browser explorer. You can find the explorer here: https://cmpscan.io/miscapis
Where you will be able to sign up, verify contracts and query the blockchain, helping you query data that is specific to NFT's or ERC20 Tokens. You can also get the log events or verify a contract via API. You must sign up at cmpscan.io to get an API key.
Separate addresses by comma, up to a maxium of 20 accounts in a single batch
[Optional Parameters] startblock: starting blockNo to retrieve results, endblock: ending blockNo to retrieve results
(Returns up to a maximum of the last 10000 transactions only)
Another example:
(To get paginated results use page=[page number] and offset=[max records to return])
[Optional Parameters] startblock: starting blockNo to retrieve results, endblock: ending blockNo to retrieve results
(Returns up to a maximum of the last 10000 transactions only)
Another example:
(To get paginated results use page=[page number] and offset=[max records to return])
(Returns up to a maximum of the last 10000 transactions only)
(Returns up to a maximum of the last 10000 transactions only)
[Optional Parameters] startblock: starting blockNo to retrieve results, endblock: ending blockNo to retrieve results
(Returns up to a maximum of the last 10000 transactions only)
Another example:
(To get paginated results use page=[page number] and offset=[max records to return])
Another example:
(To get transfer events for a specific token contract, include the contractaddress parameter)
[Optional Parameters] startblock: starting blockNo to retrieve results, endblock: ending blockNo to retrieve results
(Returns up to a maximum of the last 10000 transactions only)
Another example:
(To get paginated results use page=[page number] and offset=[max records to return])
Another example:
(To get paginated results use page=[page number] and offset=[max records to return])
** type = blocks (full blocks only)
This is a POST request.
Here are some example of how this api may be used:
name | type | required | desc |
---|---|---|---|
contract_address | string | true | The address of the contract to be verified. |
compiler_type | string | true | SingleFile or MultiFile or Vyper. |
compiler_version | string | true | Version of the compiler. |
license_type | string | optional | Types of open source protocols. |
contract_code | string | true | Contract source code. |
contract_name | string | optional | Contract name. |
evm_version | string | optional | Use 'default'. |
abi | string | optional | JSON ABI of the contract. |
optimization | string | optional | Enable optimization. |
optimizer_runs | string | optional | Optimize the number of runs. |
Note: status: 0 = Fail, 1 = Pass.
[Parameters] timestamp format: Unix timestamp (supports Unix timestamps in seconds), closest value: 'before' or 'after'
The Event Log API was designed to provide an alternative to the native eth_getLogs. This is a POST request.
Here are some example of how this api may be used:
Get event logs from block number 13920 to block number 13930, where log address is 0x715aA09E6950ffDBda55Cea77f72dd7F52Ae1A62 and topic0 is "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
Get event logs from block number 13920 to block number 13930, where log address is 0x715aA09E6950ffDBda55Cea77f72dd7F52Ae1A62 and topic0,topic1 is nay and topic3 is "0x00000000000000000000000075ecd1ab06c4e34763a47e1033e80de614d09fa4"
Tips: max range between "fromBlock" and "toBlock" is 10000.
The following are the limited list of supported Proxied APIs for CMP available through HScan.
Returns the number of most recent block
Returns information about a block by block number
Returns the number of transactions in a block from a block matching the given block number
Returns the information about a transaction requested by transaction hash
Returns information about a transaction by block number and transaction index position
Returns the number of transactions sent from an address
Creates new message call transaction or a contract creation for signed transactions
(Replace the hex value with your raw hex encoded transaction that you want to send.)
Returns the receipt of a transaction by transaction hash
Executes a new message call immediately without creating a transaction on the block chain
(The gas parameter to eth_call is 10000000)
Returns code at a given address
Returns the value from a storage position at a given address
Returns the current price per gas in wei
Makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas
(The gas parameter to eth_estimateGas is 10000000)
name | type | required | desc |
---|---|---|---|
contractAddress | string | true | NFT contract address, eg: 0x8cee805fe5fa49e81266fcbc27f37d85062c1707 |
name | type | desc |
---|---|---|
» address | string | contract address |
» contractMetadata | object | |
»» name | string | The name attribute of the contract |
»» symbol | string | The symbol attribute of the contract |
»» totalSupply | string | The totalSupply attribute of the contract |
»» tokenType | string | NFT type, ERC721, ERC1155, UNKNOWN |
»» contractDeployer | string | Contract deployer |
»» deployedBlockNumber | integer | The height of the block where the contract is deployed |
»» openSea | object | |
name | type | required | desc |
---|---|---|---|
contractAddress | string | true | NFT contract address |
tokenId | string | true | NFT token ID, decimal number |
tokenType | string | optional | optional. ERC721 or ERC1155 |
name | type | desc |
---|---|---|
» contract | object | |
»» address | string | NFT contract address |
» id | object | |
»» tokenId | string | NFT token ID |
»» tokenMetadata | object | |
»»» tokenType | string | ERC721 or ERC1155 |
» title | string | The name attribute of the metadata |
» description | string | The description attribute of the metadata |
» tokenUri | object | |
»» gateway | string | IPFS proxy gateway |
»» raw | string | The token uri attribute of the contract |
» media | object | |
»» gateway | string | Image gateway |
»» thumbnail | string | Thumbnail gateway |
»» raw | string | Raw image |
»» format | string | Image format |
»» bytes | integer | Image length |
» metadata | object | The metadata of the token uri |
» timeLastUpdated | string | Last update time |
» contractMetadata | object | Same as returned by getcontractmetadata |
»» name | string | |
»» symbol | string | |
»» totalSupply | string | |
»» tokenType | string | |
»» contractDeployer | string | |
»» deployedBlockNumber | integer | |
»» openSea | object | |
name | type | required | desc |
---|---|---|---|
owner | string | true | owner address |
withMetadata | string | optional | optional. Return metadata, true or false. Defaults to true. |
contractAddresses | array | optional | optional. Array of contract addresses to filter the responses with. Max limit 45 contracts. |
pageSize | string | optional | optional. Number of NFTs to be returned per page. Defaults to 100. Max is 100. |
pageKey | string | optional | optional. key for pagination. If more results are available, a pageKey will be returned in the response. Pass back the pageKey as a param to fetch the next page of results. |
name | type | desc |
---|---|---|
» ownedNfts | object | |
»» contract | object | |
»»» address | string | NFT contract address |
»» id | object | |
»»» tokenId | string | NFT token ID |
»»» tokenMetadata | object | |
»»»» tokenType | string | ERC721 or ERC1155 |
»» balance | string | Token balance |
»» title | string | The name attribute of the metadata |
»» description | string | The description attribute of the metadata |
»» tokenUri | object | |
»»» gateway | string | IPFS proxy gateway |
»»» raw | string | The token uri attribute of the contract |
»» media | object | |
»»» gateway | string | Image gateway |
»»» thumbnail | string | Thumbnail gateway |
»»» raw | string | Raw image |
»»» format | string | Image format |
»»» bytes | integer | Image length |
»» metadata | object | The metadata of the token uri |
»» timeLastUpdated | string | Last update time |
»» contractMetadata | object | Same as returned by getContractMetadata |
»»» name | string | |
»»» symbol | string | |
»»» totalSupply | string | |
»»» tokenType | string | |
»»» contractDeployer | string | |
»»» deployedBlockNumber | integer | |
»»» openSea | object | |
»» spamInfo | object | |
»»» isSpam | string | |
»»» classifications | string | |
» totalCount | integer | Total number of NFTs (distinct tokenIds) owned by the given address |
» pageKey | string | key for pagination. If more results are available, a pageKey will be returned in the response. Pass back the pageKey as a param to fetch the next page of results. |
» blockHash | string | The canonical head block hash of when your request was received |