Contract

Object schema

  • address: String- address of the deployed contract.
  • abi: String - the application binary interface of the deployed contract, formatted in JSON.
  • probability: Float - the truthness of this contract information. 1.0 is the best.

Mapping

For some fields, there are multiple encodings available, which are nested as properties on the field. More information on those data types can be found here.

The following is the output of the Elasticsearch mapping for the Contract type:

{
	"mappings": {
		"contract": {
			"dynamic": "false",
			"properties": {
				"address": {
					"type": "text",
					"fields": {
						"raw": {
							"type": "keyword",
							"ignore_above": 256
						}
					}
				},
				"abi": {
					"type": "binary"
				},
				"name": {
					"type": "text",
					"fields": {
						"raw": {
							"type": "keyword",
							"ignore_above": 256
						}
					}
				},
				"runs": {
					"properties": {
						"num": {
							"type": "long"
						},
						"raw": {
							"type": "keyword",
							"ignore_above": 256
						}
					}
				},
				"bytecode": {
					"type": "binary"
				},
				"source": {
					"type": "binary"
				},
				"compiler": {
					"type": "keyword"
				},
				"library": {
					"type": "keyword"
				},
				"createdAt": {
					"type": "date",
					"format": "epoch_second"
				},
				"optimizations": {
					"type": "boolean"
				},
				"probability": {
					"type": "double"
				},
				"links": {
					"type": "nested",
					"properties": {
						"description": {
							"type": "text",
							"fields": {
								"raw": {
									"type": "keyword",
									"ignore_above": 256
								}
							}
						},
						"link": {
							"type": "keyword"
						}
					}
				},
				"constructorArgs": {
					"type": "nested",
					"properties": {
						"name": {
							"type": "keyword",
							"ignore_above": 256
						},
						"pos": {
							"type": "long"
						},
						"value": {
							"properties": {
								"hex": {
									"type": "keyword",
									"ignore_above": 256
								},
								"num": {
									"type": "long"
								},
								"scaled": {
									"type": "double"
								},
								"type": {
									"type": "keyword",
									"ignore_above": 256
								}
							}
						}
					}
				}
			}
		}
	}
}