Links

The API for Ethereum Contract Data

Create rich applications using Ethereum data from the Sort API.
  • Quickly determine what a smart contract transaction did
  • View decoded transactions and transaction logs
  • Use SQL to query data across multiple transactions
  • View contract names and decimals with a simple SQL join

What is Decoded Ethereum Data?

A standard Ethereum blockchain transaction has the following form:
Sample OpenSea (Wyvern Exchange Contract) Transaction:
{
"hash" : "0xbeec634b15df6ae5079edfbba2307cba6cef97bd80dc1ba9055c7cfd7d679802",
"nonce" : "0x154",
"block_hash" : "0x3ed036270616f2827afd19516d88b461e758f9d41ebdfe7a47accdb68a93b986",
"block_number" : "0xda0a51",
"transaction_index" : "0xbd",
"input" : "0xab834bab0000000000000000000000007f268357a8c2552623316e2562d90e642b ..."
"chain_id" : "0x1",
"v" : "0x1",
"r" : "0x3acb399b0dcd9b7de67fce7791c8dc6c6226089198e0a22fe300240dc544a862",
"s" : "0x904c61ae7f9d23736e377025a1a45ef93a0535024214b2d268f1add322ec1ae",
"timestamp" : 1648523911,
"accessList" : [],
"type" : "0x2",
"gas" : "0x43802",
"gas_price" : "0xe6665dcc5",
"max_fee_per_gas" : "0x10918f7bfa",
"max_priority_fee_per_gas" : "0x59682f00",
"value" : "0x5f9e327ec6710000",
"to" : "0x7f268357a8c2552623316e2562d90e642bb538e5",
"from" : "0x8c35933c469406c8899882f5c2119649cd5b617f"
}
Applications that would like to use data from this transaction need to perform a lot of work to access smart contract information, applications such as:
  • Decentralized Finance (DeFi) applications
  • NFT communities
  • Marketplaces
  • Gaming
  • DAOs
  • Web2 and Web3 applications
In addition to transforming a single blockchain transaction to usable data for an application, what if the application (or user) wants to query across hundreds of thousands or even millions of transactions? It becomes a very hard problem to solve as a blockchain application developer.
Sort makes it simple to access ALL data within a blockchain transaction, search across all blockchain transactions, and even create charts, graphs, and visualizations from data within blockchain transactions.

Sample Decoded Transaction

Sort decodes every transaction:
  • All data decoded with the contract's ABI
  • Function call decoded with all parameters listed
  • Logs decoded with all function names and parameters listed
  • Any contract addresses resolved with name, symbol, and decimals (if applicable)
  • Transaction status
Sample Decoded OpenSea Transaction (from above):
{
"chain_id": null,
"type": 2,
"_id": "0xbeec634b15df6ae5079edfbba2307cba6cef97bd80dc1ba9055c7cfd7d679802",
"_event_time": "2022-06-29T18:07:24.335000Z",
"timestamp": "2022-06-29T18:07:06.000000Z",
"nonce": 114,
"value_eth": 0.0389,
"block_number": 15046243,
"confirmations": 1,
"value": 38900000000000000,
"timestamp_decoded": "2022-06-29T18:07:24.305000Z",
"decode": true,
"transaction_index": 183,
"input" : "0xab834bab0000000000000000000000007f268357a8c2552623316e2562d90e642b ...",
"function": {
"name": "atomicMatch_",
"params": [
{
"value": [
"0x7f268357a8c2552623316e2562d90e642bb538e5",
"0x9f7fa8680220521270e5255b9bf13ce5328844ec",
"0x6a4406f5be648b406c0c20334e8a5de6b4999516",
"0x0000000000000000000000000000000000000000",
"0xbaf2127b49fc93cbca6269fade0f7f31df4c88a7",
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000",
"0x7f268357a8c2552623316e2562d90e642bb538e5",
"0x6a4406f5be648b406c0c20334e8a5de6b4999516",
"0x0000000000000000000000000000000000000000",
"0x5b3256965e7c3cf26e11fcaf296dfc8807c01073",
"0xbaf2127b49fc93cbca6269fade0f7f31df4c88a7",
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000"
],
"name": "addrs",
"type": "address[14]"
},
{
"value": [
"1000",
"0",
"0",
"0",
"38900000000000000",
"0",
"1656525921",
"0",
"56534898162136433739011620609967793465773805221257418866848769008063983883112",
"1000",
"0",
"0",
"0",
"38900000000000000",
"0",
"1656485548",
"1658854264",
"75476606818722998781236781981654581534179602272440573404497195704307848839984"
],
"name": "uints",
"type": "uint256[18]"
},
{
"value": [
"1",
"0",
"0",
"1",
"1",
"1",
"0",
"1"
],
"name": "feeMethodsSidesKindsHowToCalls",
"type": "uint8[8]"
},
{
"value": "0x96809f9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009f7fa8680220521270e5255b9bf13ce5328844ec000000000000000000000000495f947276749ce646f68ac8c248420045cb7b5eadf9e26e125d64dd1df6482d8f3a62f704122cc3000000000011e800000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000",
"name": "calldataBuy",
"type": "bytes"
},
{
"value": "0x96809f900000000000000000000000006a4406f5be648b406c0c20334e8a5de6b49995160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000495f947276749ce646f68ac8c248420045cb7b5eadf9e26e125d64dd1df6482d8f3a62f704122cc3000000000011e800000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000",
"name": "calldataSell",
"type": "bytes"
},
{
"value": "0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"name": "replacementPatternBuy",
"type": "bytes"
},
{
"value": "0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"name": "replacementPatternSell",
"type": "bytes"
},
{
"value": null,
"name": "staticExtradataBuy",
"type": "bytes"
},
{
"value": null,
"name": "staticExtradataSell",
"type": "bytes"
},
{
"value": [
"27",
"27"
],
"name": "vs",
"type": "uint8[2]"
},
{
"value": [
"0x6e2c3843979afe49fddb9b3ba14e6ab760103d443b80e0290ddffcf330ea5a56",
"0x0da663b9ce0da5bbdbc4ce38e13c91d4cb8e9c79c13b4305f099216e3959111a",
"0x6e2c3843979afe49fddb9b3ba14e6ab760103d443b80e0290ddffcf330ea5a56",
"0x0da663b9ce0da5bbdbc4ce38e13c91d4cb8e9c79c13b4305f099216e3959111a",
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
"name": "rssMetadata",
"type": "bytes32[5]"
}
]
},
"to": "0x7f268357a8c2552623316e2562d90e642bb538e5",
"gas": {
"limit": 271531,
"transaction_fee": {
"eth": 0.017217075075271225
},
"effective_gas_price": {
"wei": "86461917025",
"gwei": 86.461917025
},
"max_fee_per_gas": {
"wei": "103289564910",
"gwei": 103.28956491
},
"used": 199129,
"max_priority_fee_per_gas": {
"wei": "1000000000",
"gwei": 1
}
},
"from": "0x9f7fa8680220521270e5255b9bf13ce5328844ec"
}
// logs for this transaction
{
"transaction_hash": "0xbeec634b15df6ae5079edfbba2307cba6cef97bd80dc1ba9055c7cfd7d679802",
"name": "OrdersMatched",
"type": "event",
"_id": "0xbeec634b15df6ae5079edfbba2307cba6cef97bd80dc1ba9055c7cfd7d679802_231",
"_event_time": "2022-06-29T18:07:24.370000Z",
"timestamp": "2022-06-29T18:07:06.000Z",
"function_address": "0x7f268357a8c2552623316e2562d90e642bb538e5",
"index": 231,
"params": [
{
"value": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"name": "buyHash",
"type": "bytes32"
},
{
"value": "0x1398f87581bbfdbf181430f82ff36c998d87e90e50854cf0ebc66af6c2ff7f81",
"indexed": false,
"name": "sellHash",
"type": "bytes32"
},
{
"value": "0x6A4406F5be648B406c0c20334E8a5DE6B4999516",
"indexed": true,
"name": "maker",
"type": "address"
},
{
"value": "0x9f7FA8680220521270E5255B9Bf13Ce5328844eC",
"indexed": true,
"name": "taker",
"type": "address"
},
{
"value": "38900000000000000",
"indexed": false,
"name": "price",
"type": "uint256"
},
{
"value": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": true,
"name": "metadata",
"type": "bytes32"
}
],
"block_number": 15046243
},
{
"transaction_hash": "0xbeec634b15df6ae5079edfbba2307cba6cef97bd80dc1ba9055c7cfd7d679802",
"timestamp": "2022-06-29T18:07:06.000Z",
"_id": "0xbeec634b15df6ae5079edfbba2307cba6cef97bd80dc1ba9055c7cfd7d679802_230",
"_event_time": "2022-06-29T18:07:24.370000Z",
"index": 230,
"block_number": 15046243
}

Want to jump right in?

Jump in to the quick start docs and get making your first request:

Want to deep dive?

Dive a little deeper and start exploring our API reference to get an idea of everything that's possible with the API:
Last modified 7mo ago