List and query verified Ethereum smart contracts based on etherscan.io
$ npm install eth-contract-search
Because Etherscan.io does not provide an CORS endpoint, the package needs to be used on NodeJS application and not browser application
Find a contract name DAO
let ethContractSearch = require('eth-contract-search')
let results = await ethContractSearch.query('DAO')
Return:
{
"data": [
{
"address": "0x00000000000",
"name": "MyContract",
"compiler": "v0.4.21",
"balance": "1 Ether",
"txCount": "500",
"verificationDate": "4/19/2018"
}
],
"pagination": {
"next": "2",
"last": "502"
}
}
Using pagination:
let resultsOnSecondPage = await ethContractSearch.query('DAO', 2)
MIT