├── .DS_Store ├── .env ├── .gitignore ├── Dockerfile ├── README.md ├── app.js ├── app └── app.js ├── config.example.json ├── config.json ├── contractTpl └── contracts.js ├── db-dao.js ├── db-internal.js ├── db-stats.js ├── db.js ├── helpers ├── RESPONSE.js ├── axiosHelper.js └── masterNodeHelper.js ├── lib ├── BloomFilter.js ├── etherUnits.js ├── murmurHash3.js ├── murmurHash3.min.js └── trace.js ├── local_modules └── solc │ ├── LICENSE │ ├── README.md │ ├── downloadCurrentVersion.js │ ├── index.js │ ├── package.json │ ├── solcjs │ ├── soljson.js │ └── wrapper.js ├── models ├── masterNodeDetails.js └── masterNodeRewardsDetails.js ├── package.json ├── public ├── .DS_Store ├── TOKENS.JSON ├── css │ ├── animate.css │ ├── blue-hoki.min.css │ ├── bootstrap-theme.css │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── common.css │ ├── components.min.css │ ├── custom.css │ ├── default.css │ ├── font-awesome.css │ ├── fonts │ │ ├── Roboto-Bold.ttf │ │ ├── Roboto-Light.ttf │ │ ├── Roboto-Regular.ttf │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ ├── green-haze.min.css │ ├── isotope.css │ ├── jquery.mCustomScrollbar.css │ ├── layout.css │ ├── megamenu.css │ ├── menu.css │ ├── normalize.css │ ├── overwrite.css │ ├── plugins.min.css │ ├── select2 │ │ └── select2.min.css │ ├── splide │ │ ├── splide.min.css │ │ └── splide.min.js │ ├── stats.css │ ├── style.css │ └── todo-2.min.css ├── datatables │ ├── datatables.net-bs4 │ │ ├── css │ │ │ └── dataTables.bootstrap4.css │ │ └── js │ │ │ └── dataTables.bootstrap4.js │ └── datatables.net │ │ └── js │ │ └── jquery.dataTables.js ├── favicon.ico ├── fonts │ ├── fontawesome │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.eot@ │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ ├── minimal-iconsd4a9.eot │ └── minimal-iconsd4a9.svg ├── img │ ├── .DS_Store │ ├── 512x512bb.jpg │ ├── FAIL.png │ ├── address-icon - Copy.png │ ├── address-icon.png │ ├── comment-white.png │ ├── currency-icon │ │ ├── EUR.svg │ │ ├── INR.svg │ │ └── USD.svg │ ├── dapps │ │ ├── airnetz-logo.png │ │ ├── alphaex-logo.png │ │ ├── blockdegree-logo.png │ │ ├── dcb-bank-logo.png │ │ ├── infactor-logo.png │ │ ├── kramaa-logo.png │ │ ├── landregistry-logo.png │ │ ├── mycontract-logo.png │ │ ├── tradefinex-logo.png │ │ ├── turantpay-logo.png │ │ └── xdc-logo.png │ ├── explorer-logo.png │ ├── extraimg │ │ ├── bitfi_321x101.jpg │ │ ├── bitfi_730X90.jpg │ │ ├── blockdegree_321x101.jpg │ │ ├── blockdegree_730x90.jpg │ │ ├── christmas_321x101.jpg │ │ ├── christmas_730X90.jpg │ │ ├── dcentWallet_321x101.jpg │ │ ├── dcentWallet_730x90.jpg │ │ ├── mycontract_321x101.jpg │ │ ├── mycontract_730x90.jpg │ │ ├── storx_321x101.jpg │ │ ├── storx_730X90.jpg │ │ ├── tradefinex_321x101.jpg │ │ ├── tradefinex_730X90.jpg │ │ ├── xceltrip_321x101.jpg │ │ └── xceltrip_730X90.jpg │ ├── favicon.ico │ ├── favicon │ │ ├── android-icon-144x144.png │ │ ├── android-icon-192x192.png │ │ ├── android-icon-36x36.png │ │ ├── android-icon-48x48.png │ │ ├── android-icon-72x72.png │ │ ├── android-icon-96x96.png │ │ ├── apple-icon-114x114.png │ │ ├── apple-icon-120x120.png │ │ ├── apple-icon-144x144.png │ │ ├── apple-icon-152x152.png │ │ ├── apple-icon-180x180.png │ │ ├── apple-icon-57x57.png │ │ ├── apple-icon-60x60.png │ │ ├── apple-icon-72x72.png │ │ ├── apple-icon-76x76.png │ │ ├── apple-icon-precomposed.png │ │ ├── apple-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── manifest.json │ │ ├── ms-icon-144x144.png │ │ ├── ms-icon-150x150.png │ │ ├── ms-icon-310x310.png │ │ └── ms-icon-70x70.png │ ├── hero-gradient.png │ ├── icons │ │ ├── access-blockchain-data-icon.png │ │ ├── block-height-icon.png │ │ ├── block-time-icon.png │ │ ├── building-dapps-icon.png │ │ ├── burnt-xdc-icon.png │ │ ├── circulating-supply-icon.png │ │ ├── latest-blocks-icon.png │ │ ├── marketcap-icon.png │ │ ├── online-nodes-icon.png │ │ ├── producer-icon.png │ │ ├── total-xdc-supply-icon.png │ │ ├── tps-icon.png │ │ ├── trade-volume-icon.png │ │ ├── transactions-icon.png │ │ ├── verify-contracts-icon.png │ │ └── xdc-price-icon.png │ ├── loading-spinner-grey.gif │ ├── loading.gif │ ├── logo.png │ ├── social │ │ ├── Thumbs.db │ │ ├── behance.png │ │ ├── blogger.png │ │ ├── facebook.png │ │ ├── flickr.png │ │ ├── github.png │ │ ├── googleplus.png │ │ ├── gravatar.png │ │ ├── instagram.png │ │ ├── linkedin.png │ │ ├── picasa.png │ │ ├── pintrest.png │ │ ├── quora.png │ │ ├── reddit.png │ │ ├── rss.png │ │ ├── skype.png │ │ ├── stumbleupon.png │ │ ├── tumblr.png │ │ ├── twitter.png │ │ ├── vimeo.png │ │ ├── vk.png │ │ ├── wordpress.png │ │ ├── xing.png │ │ ├── yahoo.png │ │ └── youtube.png │ ├── tokens │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ ├── xdc-logo-footer.png │ └── xdc-logo.png ├── js │ ├── app.min.js │ ├── bootstrap.min.js │ ├── controllers │ │ ├── AccountsController.js │ │ ├── AddressController.js │ │ ├── AddressListController.js │ │ ├── BlockController.js │ │ ├── ContractController.js │ │ ├── ContractListController.js │ │ ├── ContractListController_BK.js │ │ ├── ContractVerifyController.js │ │ ├── DAOController.js │ │ ├── ErrController.js │ │ ├── ExportDataController.js │ │ ├── HomeController.js │ │ ├── PublicAPIDocController.js │ │ ├── StatsController.js │ │ ├── TokenController.js │ │ ├── TokenListController.js │ │ ├── TxController.js │ │ ├── UncleController.js │ │ ├── WitnessController.js │ │ └── WitnessListController.js │ ├── custom.js │ ├── datatables-init.js │ ├── directives.js │ ├── filters.js │ ├── jquery.mCustomScrollbar.concat.min.js │ ├── jquery.min.js │ ├── jquery.nicescroll.js │ ├── layout.js │ ├── layout.min.js │ ├── main.js │ ├── megamenu.js │ ├── mgmmenumain.js │ ├── popper.min.js │ ├── select2 │ │ └── select2.min.js │ ├── stats │ │ ├── The_bomb_chart_with_ECIP_1010.js │ │ ├── bundle_The_bomb_chart.js │ │ ├── bundle_The_bomb_chart_with_ECIP_1010.js │ │ ├── bundle_hashrate.js │ │ ├── bundle_hashrate_distribution.js │ │ ├── hashrate.js │ │ ├── hashrate_distribution.js │ │ └── package.json │ └── web3utils.js ├── list.json ├── plugins │ ├── angularjs │ │ ├── angular-cookies.min.js │ │ ├── angular-cookies.min.js.map │ │ ├── angular-recaptcha.min.js │ │ ├── angular-sanitize.min.js │ │ ├── angular-sanitize.min.js.map │ │ ├── angular-touch.min.js │ │ ├── angular-touch.min.js.map │ │ ├── angular.min.js │ │ ├── angular.min.js.map │ │ └── plugins │ │ │ ├── angular-ui-router.min.js │ │ │ ├── angular-ui-router.min.js.map │ │ │ ├── ocLazyLoad.min.js │ │ │ ├── ui-bootstrap-tpls.min.js │ │ │ └── ui-select │ │ │ ├── select.min.css │ │ │ └── select.min.js │ ├── async.min.js │ ├── bootstrap-hover-dropdown │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bootstrap-hover-dropdown.js │ │ └── bootstrap-hover-dropdown.min.js │ ├── bootstrap-switch │ │ ├── LICENSE │ │ ├── README.md │ │ ├── css │ │ │ ├── bootstrap-switch.css │ │ │ └── bootstrap-switch.min.css │ │ └── js │ │ │ ├── bootstrap-switch.js │ │ │ └── bootstrap-switch.min.js │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ └── bootstrap │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ ├── d3.v3.min.js │ ├── datatables │ │ ├── datatable.js │ │ ├── datatable.min.js │ │ ├── datatables.all.min.js │ │ ├── datatables.bootstrap.css │ │ ├── datatables.bootstrap.js │ │ ├── datatables.min.css │ │ ├── datatables.min.js │ │ └── images │ │ │ ├── Sorting icons.psd │ │ │ ├── back_disabled.png │ │ │ ├── back_enabled.png │ │ │ ├── back_enabled_hover.png │ │ │ ├── forward_disabled.png │ │ │ ├── forward_enabled.png │ │ │ ├── forward_enabled_hover.png │ │ │ ├── sort_asc.png │ │ │ ├── sort_asc_disabled.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ └── sort_desc_disabled.png │ ├── font-awesome │ │ ├── css │ │ │ ├── font-awesome.css │ │ │ └── font-awesome.min.css │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── minimal-iconsd4a9.eot │ │ │ └── minimal-iconsd4a9.svg │ ├── jquery-slimscroll │ │ ├── README.md │ │ ├── jquery.slimscroll.js │ │ ├── jquery.slimscroll.min.js │ │ └── slimScroll.jquery.json │ ├── jquery.blockui.min.js │ ├── jquery.cokie.min.js │ ├── jquery.min.js │ ├── jquery.sparkline.min.js │ ├── morris │ │ ├── README.md │ │ ├── examples │ │ │ ├── _template.html │ │ │ ├── area-as-line.html │ │ │ ├── area.html │ │ │ ├── bar-colors.html │ │ │ ├── bar-no-axes.html │ │ │ ├── bar.html │ │ │ ├── days.html │ │ │ ├── decimal-custom-hover.html │ │ │ ├── diagonal-xlabels-bar.html │ │ │ ├── diagonal-xlabels.html │ │ │ ├── donut-colors.html │ │ │ ├── donut-formatter.html │ │ │ ├── donut.html │ │ │ ├── dst.html │ │ │ ├── events.html │ │ │ ├── goals.html │ │ │ ├── lib │ │ │ │ ├── example.css │ │ │ │ └── example.js │ │ │ ├── months-no-smooth.html │ │ │ ├── negative.html │ │ │ ├── no-grid.html │ │ │ ├── non-continuous.html │ │ │ ├── non-date.html │ │ │ ├── quarters.html │ │ │ ├── resize.html │ │ │ ├── stacked_bars.html │ │ │ ├── timestamps.html │ │ │ ├── updating.html │ │ │ ├── weeks.html │ │ │ └── years.html │ │ ├── less │ │ │ └── morris.core.less │ │ ├── lib │ │ │ ├── morris.area.coffee │ │ │ ├── morris.bar.coffee │ │ │ ├── morris.coffee │ │ │ ├── morris.donut.coffee │ │ │ ├── morris.grid.coffee │ │ │ ├── morris.hover.coffee │ │ │ └── morris.line.coffee │ │ ├── morris.css │ │ ├── morris.js │ │ ├── morris.min.js │ │ ├── raphael-min.js │ │ └── spec │ │ │ ├── lib │ │ │ ├── area │ │ │ │ └── area_spec.coffee │ │ │ ├── bar │ │ │ │ ├── bar_spec.coffee │ │ │ │ └── colours.coffee │ │ │ ├── commas_spec.coffee │ │ │ ├── donut │ │ │ │ └── donut_spec.coffee │ │ │ ├── grid │ │ │ │ ├── auto_grid_lines_spec.coffee │ │ │ │ ├── set_data_spec.coffee │ │ │ │ └── y_label_format_spec.coffee │ │ │ ├── hover_spec.coffee │ │ │ ├── label_series_spec.coffee │ │ │ ├── line │ │ │ │ └── line_spec.coffee │ │ │ ├── pad_spec.coffee │ │ │ └── parse_time_spec.coffee │ │ │ ├── specs.html │ │ │ ├── support │ │ │ └── placeholder.coffee │ │ │ └── viz │ │ │ ├── examples.js │ │ │ ├── exemplary │ │ │ ├── area0.png │ │ │ ├── bar0.png │ │ │ ├── line0.png │ │ │ └── stacked_bar0.png │ │ │ ├── run.sh │ │ │ ├── test.html │ │ │ └── visual_specs.js │ ├── simple-line-icons │ │ ├── License.txt │ │ ├── Readme.txt │ │ ├── fonts │ │ │ ├── Simple-Line-Icons.dev.svg │ │ │ ├── Simple-Line-Icons.eot │ │ │ ├── Simple-Line-Icons.svg │ │ │ ├── Simple-Line-Icons.ttf │ │ │ └── Simple-Line-Icons.woff │ │ ├── icons-lte-ie7.js │ │ ├── simple-line-icons.css │ │ └── simple-line-icons.min.css │ └── uniform │ │ ├── README.md │ │ ├── css │ │ ├── uniform.default.css │ │ ├── uniform.default.min.css │ │ └── uniform.default.scss │ │ ├── images │ │ ├── bg-input-focus.png │ │ ├── bg-input.png │ │ ├── sprite.png │ │ └── sprite_original.png │ │ ├── jquery.uniform.js │ │ └── jquery.uniform.min.js ├── robots.txt ├── sitemap.xml ├── tokens.json ├── tpl │ ├── footer.html │ ├── header.html │ └── page-head.html └── views │ ├── accounts.html │ ├── address.html │ ├── addressList.html │ ├── block.html │ ├── contract-source.html │ ├── contract.html │ ├── contractVerify.html │ ├── contractlist.html │ ├── created-tokens.html │ ├── dao.html │ ├── dapps.html │ ├── err_404.html │ ├── exportData.html │ ├── home.html │ ├── publicAPIDoc.html │ ├── stats │ └── index.html │ ├── summary-stats.html │ ├── token.html │ ├── tokenlist.html │ ├── transfer-tokens.html │ ├── tx.html │ ├── witness.html │ ├── witnessList.html │ └── xdc_charts.html ├── routes ├── addressListData.js ├── coinMarketPrice.js ├── compiler.js ├── config.js ├── contractListData.js ├── contracts.js ├── dao.js ├── eventLog.js ├── exportData.js ├── fiat.js ├── filters.js ├── grabTokenTransfer.js ├── index.js ├── publicAPIData.js ├── richlist.js ├── stats.js ├── test.js ├── token copy.js ├── token.js ├── token.js.bak ├── tokenListData.js ├── tokenTransfer.js ├── transactionData.js ├── web3dummy.js ├── web3relay.js ├── witnessData.js ├── witnessListData.js └── xdc3LatestRelay.js ├── test ├── config.json ├── test.bat └── test.js ├── tools ├── blockHelper.js ├── blockTimeTest.js ├── config-fix.json ├── config.json ├── fill_token_holders.js ├── fix.js ├── fix_tx.js ├── get_balance_of_ERC20_token.js ├── get_byte_code_from_contract.js ├── grabTokenTransfer.js ├── grabber.js ├── grabber2.js ├── internals.js ├── patcher.js ├── priTools │ ├── clearDB.js │ ├── dealAddr.js │ ├── dealAddrBalance.js │ ├── dealContractAddr.js │ ├── dealCount.js │ ├── dealMasterAddr.js │ ├── dealNormalAddr.js │ ├── dealOldAddr.js │ ├── dealUpdateAddr.js │ ├── node_bloom_filter │ │ ├── .gitignore │ │ ├── README.md │ │ ├── bloomfilter.js │ │ ├── index.js │ │ ├── package.json │ │ └── test │ │ │ └── test.js │ ├── patch.js │ ├── patchByAutoCheck.js │ ├── patchOldBranch.js │ ├── patch_receipt.js │ ├── patch_receipt_add.js │ ├── patch_witness.js │ ├── test.js │ └── updateWitness.js ├── price.js ├── richlist.js ├── stats.js ├── sync.js ├── sync_all_contract_from_token_transfer.js ├── sync_original_block.js ├── sync_repatch.js ├── sync_tolower_case_all.js └── tokens │ └── daoTxns.js ├── views ├── error.ejs ├── index.ejs └── test.ejs └── web.config /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XinFinOrg/XDCScan/ff9e8e62049df2a368c29e973baa74e20f90ef93/.DS_Store -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | MONGO_URI=mongodb://localhost/BlockScanDB1 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | config.json 36 | 37 | # Optional REPL history 38 | .node_repl_history 39 | 40 | # local data 41 | data/ 42 | package-lock.json 43 | public/js/stats/The_bomb_chart.js 44 | .node-xmlhttprequest-* 45 | /nbproject/private/ 46 | public/views/richlist.js 47 | .idea 48 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest 2 | 3 | COPY . / 4 | 5 | RUN npm i 6 | 7 | EXPOSE 3000 8 | 9 | ENTRYPOINT ["node"] 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XDCScan Explorer 2 | 3 | ## Local installation 4 | 5 | Clone the repo 6 | 7 | Download [Nodejs and npm](https://docs.npmjs.com/getting-started/installing-node "Nodejs install") if you don't have them 8 | 9 | Install dependencies: 10 | 11 | `npm install` 12 | 13 | Install mongodb: 14 | 15 | MacOS: `brew install mongodb` 16 | 17 | Ubuntu: `sudo apt-get install -y mongodb-org` 18 | 19 | ### Run: 20 | The below will start both the web-gui and sync.js (which populates MongoDB with blocks/transactions). 21 | `npm run dev` 22 | 23 | You can leave sync.js running without app.js and it will sync and grab blocks based on config.json parameters 24 | `node ./tools/sync.js` 25 | 26 | First you have to run the following to update the current database: 27 | fill_token_holders is for update holders to DB when it partially synced and does not want to delete data and resync 28 | `node ./tools/fill_token_holders.js` 29 | 30 | sync_all_contract_from_token_transfer is for update contracts that not synced yet for better experience and it will be writting some additional infomation when sync or patcher run to specific block 31 | `node ./tools/sync_all_contract_from_token_transfer.js` 32 | -------------------------------------------------------------------------------- /app/app.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require( './db' ); 4 | 5 | var express = require('express'); 6 | var path = require('path'); 7 | var favicon = require('serve-favicon'); 8 | var logger = require('morgan'); 9 | var bodyParser = require('body-parser'); 10 | 11 | var app = express(); 12 | app.set('port', process.env.PORT || 3000); 13 | 14 | // view engine setup 15 | app.set('views', path.join(__dirname, 'views')); 16 | app.set('view engine', 'ejs'); 17 | 18 | app.use(favicon(__dirname + '/public/favicon.ico')); 19 | app.use(logger('dev')); 20 | app.use(bodyParser.json()); 21 | app.use(bodyParser.urlencoded({ extended: true })); 22 | app.use(express.static(path.join(__dirname, 'public'))); 23 | 24 | // app libraries 25 | global.__lib = __dirname + '/lib/'; 26 | 27 | 28 | // client 29 | 30 | app.get('/', function(req, res) { 31 | res.render('index'); 32 | }); 33 | 34 | require('./routes')(app); 35 | 36 | // let angular catch them 37 | app.use(function(req, res) { 38 | res.render('index'); 39 | }); 40 | 41 | // error handlers 42 | 43 | // development error handler 44 | // will print stacktrace 45 | if (app.get('env') === 'development') { 46 | app.use(function(err, req, res, next) { 47 | res.status(err.status || 500); 48 | res.render('error', { 49 | message: err.message, 50 | error: err 51 | }); 52 | }); 53 | } 54 | 55 | 56 | // production error handler 57 | // no stacktraces leaked to user 58 | app.use(function(err, req, res, next) { 59 | res.status(err.status || 500); 60 | res.render('error', { 61 | message: err.message, 62 | error: {} 63 | }); 64 | }); 65 | 66 | var http = require('http').Server(app); 67 | //var io = require('socket.io')(http); 68 | 69 | // web3socket(io); 70 | 71 | http.listen(app.get('port'), '0.0.0.0', function() { 72 | console.log('Express server listening on port ' + app.get('port')); 73 | }); -------------------------------------------------------------------------------- /config.example.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodeAddr": "localhost", 3 | "gethPort": 8545, 4 | "startBlock": 0, 5 | "endBlock": "latest", 6 | "quiet": true, 7 | "syncAll": true, 8 | "patch": true, 9 | "patchBlocks": 100, 10 | "settings": { 11 | "symbol": "XDC", 12 | "name": "XDCScan", 13 | "title": "XDC Block Explorer", 14 | "author": "XDC Network" 15 | } 16 | } -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodeAddr": "localhost", 3 | "gethPort": 8989, 4 | "WSURL": "ws://localhost:8888", 5 | "RPCURL": "http://localhost:8989", 6 | "epoch":900, 7 | "fRewards":500, 8 | "mnRewards":4500, 9 | "rewards":5000, 10 | "xdce_id":2634, 11 | "MONGO_URI":"mongodb://localhost/XDCScan", 12 | "startBlock": 0, 13 | "endBlock": "latest", 14 | "quiet": true, 15 | "syncAll": true, 16 | "patch": true, 17 | "patchBlocks": 100, 18 | "bulkSize": 100, 19 | "CMC_API_KEY": "", 20 | "wss": "ws://localhost:8888", 21 | "GOOGLE_RECAPTCHA_RESPONSE": "6LdM7jQbAAAAABvHByxwA6_wwCJW6FF7VofIlWDZ", 22 | "settings": { 23 | "useRichList": true, 24 | "useFiat": true, 25 | "symbol": "XDC", 26 | "name": "XinFin Network", 27 | "title": "XinFin Network XDC Blockchain Explorer", 28 | "author": "XinFin XDC Network Community", 29 | "useEthFiat": false, 30 | "tokenList": "tokens.json" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /db-dao.js: -------------------------------------------------------------------------------- 1 | var mongoose = require( 'mongoose' ); 2 | var Schema = mongoose.Schema; 3 | 4 | var DAOCreatedToken = new Schema( 5 | { 6 | "transactionHash": {type: String, index: {unique: true}}, 7 | "blockNumber": {type: Number, index: {unique: false}}, 8 | "amount": String, 9 | "to": String, 10 | "timestamp": Number 11 | }); 12 | 13 | var DAOTransferToken = new Schema( 14 | { 15 | "transactionHash": {type: String, index: {unique: true}}, 16 | "blockNumber": {type: Number, index: {unique: false}}, 17 | "amount": String, 18 | "to": String, 19 | "from": String, 20 | "timestamp": Number 21 | }); 22 | 23 | mongoose.model('DAOCreatedToken', DAOCreatedToken); 24 | mongoose.model('DAOTransferToken', DAOTransferToken); 25 | module.exports.DAOCreatedToken = mongoose.model('DAOCreatedToken'); 26 | module.exports.DAOTransferToken = mongoose.model('DAOTransferToken'); -------------------------------------------------------------------------------- /db-internal.js: -------------------------------------------------------------------------------- 1 | /****** 2 | DEPRECATED -- DO NOT USE 3 | *******/ 4 | var mongoose = require( 'mongoose' ); 5 | var Schema = mongoose.Schema; 6 | 7 | var InternalTransaction = new Schema( 8 | { 9 | "type": String, 10 | "action": { 11 | "from": String, // for call 12 | "to": String, 13 | "value": String, 14 | "gas": Number, 15 | "input":String, 16 | "callType":String, 17 | "init": String, // for create 18 | "address": String, // for suicide 19 | "refundAddress": String, 20 | "balance": String 21 | }, 22 | "result": { 23 | "gasUsed":Number, 24 | "output":String, 25 | "code": String, 26 | "address": String 27 | }, 28 | "error": String, 29 | "traceAddress":[String], 30 | "subtraces":Number, 31 | "transactionPosition":Number, 32 | "transactionHash": {type: String, index: {unique: false}}, // parent transaction 33 | "blockNumber":{type: Number, index: {unique: false}}, 34 | "timestamp": Number, 35 | "blockHash":String 36 | }); 37 | 38 | mongoose.model('InternalTransaction', InternalTransaction); 39 | module.exports.InternalTransaction = mongoose.model('InternalTransaction'); -------------------------------------------------------------------------------- /db-stats.js: -------------------------------------------------------------------------------- 1 | var mongoose = require( 'mongoose' ); 2 | var Schema = mongoose.Schema; 3 | 4 | var BlockStat = new Schema( 5 | { 6 | "number": {type: Number, index: {unique: true}}, 7 | "timestamp": Number, 8 | "difficulty": String, 9 | "hashrate": String, 10 | "txCount": Number, 11 | "gasUsed": Number, 12 | "gasLimit": Number, 13 | "miner": String, 14 | "blockTime": Number, 15 | "uncleCount": Number 16 | }, { capped: { size: 512000, max: 1000}}); 17 | 18 | 19 | mongoose.model('BlockStat', BlockStat); 20 | module.exports.BlockStat = mongoose.model('BlockStat'); 21 | -------------------------------------------------------------------------------- /lib/etherUnits.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var BigNumber = require('bignumber.js'); 3 | 4 | var etherUnits = function() {} 5 | etherUnits.unitMap = { 6 | 'wei': '1', 7 | 'kwei': '1000', 8 | 'ada': '1000', 9 | 'femtoether': '1000', 10 | 'mwei': '1000000', 11 | 'babbage': '1000000', 12 | 'picoether': '1000000', 13 | 'gwei': '1000000000', 14 | 'shannon': '1000000000', 15 | 'nanoether': '1000000000', 16 | 'nano': '1000000000', 17 | 'szabo': '1000000000000', 18 | 'microether': '1000000000000', 19 | 'micro': '1000000000000', 20 | 'finney': '1000000000000000', 21 | 'milliether': '1000000000000000', 22 | 'milli': '1000000000000000', 23 | 'ether': '1000000000000000000', 24 | 'kether': '1000000000000000000000', 25 | 'grand': '1000000000000000000000', 26 | 'einstein': '1000000000000000000000', 27 | 'mether': '1000000000000000000000000', 28 | 'gether': '1000000000000000000000000000', 29 | 'tether': '1000000000000000000000000000000' 30 | }; 31 | etherUnits.getValueOfUnit = function(unit) { 32 | unit = unit ? unit.toLowerCase() : 'ether'; 33 | var unitValue = this.unitMap[unit]; 34 | if (unitValue === undefined) { 35 | throw new Error(globalFuncs.errorMsgs[4] + JSON.stringify(this.unitMap, null, 2)); 36 | } 37 | return new BigNumber(unitValue, 10); 38 | } 39 | etherUnits.fiatToWei = function(number, pricePerEther) { 40 | var returnValue = new BigNumber(String(number)).div(pricePerEther).times(this.getValueOfUnit('ether')).round(0); 41 | return returnValue.toString(10); 42 | } 43 | 44 | etherUnits.toFiat = function(number, unit, multi) { 45 | var returnValue = new BigNumber(this.toEther(number, unit)).times(multi).round(5); 46 | return returnValue.toString(10); 47 | } 48 | 49 | etherUnits.toEther = function(number, unit) { 50 | var returnValue = new BigNumber(this.toWei(number, unit)).div(this.getValueOfUnit('ether')); 51 | return returnValue.toString(10); 52 | } 53 | 54 | etherUnits.toWei = function(number, unit) { 55 | var returnValue = new BigNumber(String(number)).times(this.getValueOfUnit(unit)); 56 | return returnValue.toString(10); 57 | } 58 | 59 | module.exports = etherUnits; -------------------------------------------------------------------------------- /local_modules/solc/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /local_modules/solc/downloadCurrentVersion.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // This is used to download the correct binary version 4 | // as part of the prepublish step. 5 | 6 | var pkg = require('./package.json'); 7 | var fs = require('fs'); 8 | var https = require('https'); 9 | var MemoryStream = require('memorystream'); 10 | 11 | function getVersionList (cb) { 12 | console.log('Retrieving available version list...'); 13 | 14 | var mem = new MemoryStream(null, { readable: false }); 15 | https.get('https://elaineo.github.io/solc-bin/bin/list.json', function (response) { 16 | if (response.statusCode !== 200) { 17 | console.log('Error downloading file: ' + response.statusCode); 18 | process.exit(1); 19 | } 20 | response.pipe(mem); 21 | response.on('end', function () { 22 | cb(mem.toString()); 23 | }); 24 | }); 25 | } 26 | 27 | function downloadBinary (version) { 28 | console.log('Downloading version', version); 29 | 30 | var file = fs.createWriteStream('soljson.js'); 31 | https.get('https://elaineo.github.io/solc-bin/bin/' + version, function (response) { 32 | if (response.statusCode !== 200) { 33 | console.log('Error downloading file: ' + response.statusCode); 34 | process.exit(1); 35 | } 36 | response.pipe(file); 37 | file.on('finish', function () { 38 | file.close(function () { 39 | console.log('Done.'); 40 | }); 41 | }); 42 | }); 43 | } 44 | 45 | console.log('Downloading correct solidity binary...'); 46 | 47 | getVersionList(function (list) { 48 | list = JSON.parse(list); 49 | var wanted = pkg.version.match(/^(\d+\.\d+\.\d+)$/)[1]; 50 | downloadBinary(list.releases[wanted]); 51 | }); 52 | -------------------------------------------------------------------------------- /local_modules/solc/index.js: -------------------------------------------------------------------------------- 1 | var wrapper = require('./wrapper.js'); 2 | 3 | module.exports = wrapper(require('./soljson.js')); 4 | -------------------------------------------------------------------------------- /local_modules/solc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solc", 3 | "version": "0.4.4", 4 | "description": "Solidity compiler", 5 | "main": "index.js", 6 | "bin": { 7 | "solcjs": "solcjs" 8 | }, 9 | "scripts": { 10 | "lint": "semistandard", 11 | "prepublish": "./downloadCurrentVersion.js", 12 | "test": "tape ./test/index.js" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/elaineo/solc-js.git" 17 | }, 18 | "keywords": [ 19 | "ethereum", 20 | "solidity", 21 | "compiler" 22 | ], 23 | "files": [ 24 | "index.js", 25 | "solcjs", 26 | "soljson.js", 27 | "wrapper.js" 28 | ], 29 | "author": "chriseth", 30 | "license": "MIT", 31 | "bugs": { 32 | "url": "https://github.com/elaineo/solc-js/issues" 33 | }, 34 | "homepage": "https://github.com/elaineo/solc-js#readme", 35 | "dependencies": { 36 | "memorystream": "^0.3.1", 37 | "require-from-string": "^1.1.0", 38 | "yargs": "^4.7.1" 39 | }, 40 | "devDependencies": { 41 | "semistandard": "^8.0.0", 42 | "tape": "^4.5.1", 43 | "tape-spawn": "^1.4.2" 44 | }, 45 | "semistandard": { 46 | "ignore": [ 47 | "soljson.js" 48 | ] 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /local_modules/solc/solcjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var fs = require('fs'); 4 | var path = require('path'); 5 | var solc = require('./index.js'); 6 | // FIXME: remove annoying exception catcher of Emscripten 7 | // see https://github.com/chriseth/browser-solidity/issues/167 8 | process.removeAllListeners('uncaughtException'); 9 | 10 | var yargs = require('yargs') 11 | .usage('Usage: $0 [options] [input_file...]') 12 | .option('version', { 13 | describe: 'Show version and exit.', 14 | type: 'boolean' 15 | }) 16 | .option('optimize', { 17 | describe: 'Enable bytecode optimizer.', 18 | type: 'boolean' 19 | }) 20 | .option('bin', { 21 | describe: 'Binary of the contracts in hex.', 22 | type: 'boolean' 23 | }) 24 | .option('abi', { 25 | describe: 'ABI of the contracts.', 26 | type: 'boolean' 27 | }) 28 | .option('output-dir', { 29 | alias: 'o', 30 | describe: 'Output directory for the contracts.', 31 | type: 'string' 32 | }) 33 | .global([ 'version', 'optimize' ]) 34 | .version(function() { return solc.version(); }) 35 | .showHelpOnFail(false, 'Specify --help for available options') 36 | .help() 37 | .demand(1, 'Must provide a file'); 38 | 39 | var argv = yargs.argv; 40 | var files = argv._; 41 | var destination = argv['output-dir'] || '.' 42 | 43 | function abort (msg) { 44 | console.log(msg || 'Error occured'); 45 | process.exit(1); 46 | } 47 | 48 | if (!(argv.bin || argv.abi)) { 49 | abort('Invalid option selected'); 50 | } 51 | 52 | var sources = {}; 53 | 54 | for (var i = 0; i < files.length; i++) { 55 | try { 56 | sources[ files[i] ] = fs.readFileSync(files[i]).toString(); 57 | } catch (e) { 58 | abort('Error reading ' + files[i] + ': ' + e); 59 | } 60 | } 61 | 62 | var output = solc.compile({ sources: sources }, argv.optimize ? 1 : 0); 63 | 64 | for (var contractName in output.contracts) { 65 | if (argv.bin) { 66 | fs.writeFileSync(path.join(destination, contractName + '.bin'), output.contracts[contractName].bytecode); 67 | } 68 | 69 | if (argv.abi) { 70 | fs.writeFileSync(path.join(destination, contractName + '.abi'), output.contracts[contractName].interface); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /models/masterNodeDetails.js: -------------------------------------------------------------------------------- 1 | var mongoose = require( 'mongoose' ); 2 | var Schema = mongoose.Schema; 3 | 4 | //masternodes details 5 | const MasterNodeDetails = new Schema( 6 | { 7 | "blockNumber":Number, 8 | "blockHash":String, 9 | "transactionHash":{type:String,index:{unique:true}}, 10 | "owner":String, 11 | "candidate":String, 12 | "address":String, 13 | "event":String 14 | } 15 | ); 16 | // mongoose.model('MasterNodeDetails',MasterNodeDetails); 17 | 18 | module.exports = mongoose.model('MasterNodeDetails',MasterNodeDetails); 19 | -------------------------------------------------------------------------------- /models/masterNodeRewardsDetails.js: -------------------------------------------------------------------------------- 1 | var mongoose = require( 'mongoose' ); 2 | var Schema = mongoose.Schema; 3 | 4 | //masternodes details 5 | const masterNodeRewardsDetails = new Schema( 6 | { 7 | "epochNumber":Number, 8 | "blockNumber":Number, 9 | "owner":String, 10 | "candidate":String, 11 | "rewards":String, 12 | "stakeAmount":Number, 13 | "createdAt":String, 14 | } 15 | ); 16 | 17 | module.exports = mongoose.model('masterNodeRewardsDetails',masterNodeRewardsDetails); 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XinFinScan", 3 | "private": false, 4 | "version": "3.0.0", 5 | "description": "A lightweight XinFinScan block explorer", 6 | "repository": "", 7 | "license": "MIT", 8 | "scripts": { 9 | "start": "pm2 start app.js --name XinFinScan && pm2 start tools/sync.js --node-args='--max-old-space-size=10001' --name Sync", 10 | "dev": "concurrently \"nodemon tools/sync.js \" \"nodemon app.js\" ", 11 | "grabber": " pm2 start tools/grabber.js -i 4", 12 | "sync": " pm2 start tools/sync.js --node-args='--max-old-space-size=2048'", 13 | "pretest": "copyfiles app.js app/ ", 14 | "test": "./node_modules/.bin/mocha --reporter spec " 15 | }, 16 | "dependencies": { 17 | "abi-decoder": "^1.1.0", 18 | "axios": "^0.19.2", 19 | "bignumber.js": "^5.0.0", 20 | "body-parser": "^1.12.2", 21 | "chart.js": "^2.7.2", 22 | "compression": "^1.7.4", 23 | "concurrently": "^3.5.1", 24 | "ejs": "~2.5.7", 25 | "ethereumjs-tx": "^1.3.4", 26 | "express": "^4.16.0", 27 | "form-data": "^4.0.0", 28 | "json2csv": "^5.0.6", 29 | "mongoose": "^4.13.8", 30 | "morgan": "^1.9.0", 31 | "node-fetch": "^2.6.0", 32 | "nodemon": "^1.18.10", 33 | "rlp": "^2.0.0", 34 | "serve-favicon": "~2.4.5", 35 | "socket.io": "^2.0.4", 36 | "solc": "^0.4.19", 37 | "ws": "^7.2.1", 38 | "xdc3": "^1.2.1211", 39 | "xdc3-old": "npm:xdc3@^0.20.8" 40 | }, 41 | "devDependencies": { 42 | "chai": "^4.1.2", 43 | "copyfiles": "^1.2.0", 44 | "ethereumjs-testrpc": "^6.0.3", 45 | "mocha": "^4.1.0", 46 | "request": "^2.83.0" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XinFinOrg/XDCScan/ff9e8e62049df2a368c29e973baa74e20f90ef93/public/.DS_Store -------------------------------------------------------------------------------- /public/TOKENS.JSON: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /public/css/common.css: -------------------------------------------------------------------------------- 1 | .paginationBox { 2 | width: 100%; 3 | overflow: auto; 4 | } 5 | -------------------------------------------------------------------------------- /public/css/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | #1 = 35A49C 3 | #2 = 79CDC0 4 | */ 5 | a { 6 | color: #35A49C; 7 | } 8 | a:hover { 9 | color: #79CDC0; 10 | } 11 | 12 | /* menu */ 13 | .nav>li>a:hover { 14 | color: #79CDC0; 15 | } 16 | 17 | .navbar .navbar-nav > .active > a { 18 | color: #79CDC0; 19 | } 20 | 21 | /* flexslider */ 22 | .flex-control-paging li a { 23 | background: #35A49C; 24 | } 25 | 26 | .flex-direction-nav a:hover{ 27 | background-color:#35A49C; 28 | } 29 | 30 | .testimonial span.author a { 31 | color: #79CDC0; 32 | } 33 | 34 | /* --- icon box hover --- */ 35 | .hi-icon-effect-5 .hi-icon { 36 | color: #35A49C; 37 | box-shadow: 0 0 0 4px #35A49C; 38 | } 39 | .no-touch .hi-icon-effect-5 .hi-icon:hover { 40 | background: #35A49C; 41 | box-shadow: 0 0 0 8px #79CDC0; 42 | } 43 | 44 | 45 | /* portfolio */ 46 | .portfolio-item .portfolio-desc { 47 | background: #35A49C; 48 | } 49 | 50 | /* btn */ 51 | .btn-theme { 52 | background: #79CDC0; 53 | } 54 | .btn-theme:hover,.btn-theme:focus,.btn-theme:active{ 55 | background: #35A49C; 56 | } 57 | .btn-cta,.btn-cta.btn-lg { 58 | background: #35A49C; 59 | border-color: #79CDC0; 60 | } 61 | 62 | .btn-cta:focus,.btn-cta:active{ 63 | border-color: #35A49C; 64 | } 65 | 66 | /* contact */ 67 | .validation { 68 | color:#35A49C; 69 | } 70 | 71 | /* footer */ 72 | .social-circle li a { 73 | background:#35A49C; 74 | } 75 | 76 | a.scrollup{ 77 | background:#35A49C; 78 | } -------------------------------------------------------------------------------- /public/css/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XinFinOrg/XDCScan/ff9e8e62049df2a368c29e973baa74e20f90ef93/public/css/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /public/css/fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XinFinOrg/XDCScan/ff9e8e62049df2a368c29e973baa74e20f90ef93/public/css/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /public/css/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XinFinOrg/XDCScan/ff9e8e62049df2a368c29e973baa74e20f90ef93/public/css/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /public/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XinFinOrg/XDCScan/ff9e8e62049df2a368c29e973baa74e20f90ef93/public/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XinFinOrg/XDCScan/ff9e8e62049df2a368c29e973baa74e20f90ef93/public/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/css/stats.css: -------------------------------------------------------------------------------- 1 | body { 2 | font: 12px Arial; 3 | } 4 | 5 | text.shadow { 6 | stroke: #fff; 7 | stroke-width: 2.5px; 8 | opacity: 0.9; 9 | } 10 | 11 | path { 12 | stroke: steelblue; 13 | stroke-width: 2; 14 | fill: none; 15 | } 16 | 17 | .axis path, 18 | .axis line { 19 | fill: none; 20 | stroke: grey; 21 | stroke-width: 1; 22 | shape-rendering: crispEdges; 23 | } 24 | 25 | .grid .tick { 26 | stroke: lightgrey; 27 | stroke-opacity: 0.7; 28 | shape-rendering: crispEdges; 29 | } 30 | .grid path { 31 | stroke-width: 0; 32 | } 33 | 34 | .area { 35 | fill: lightsteelblue; 36 | stroke-width: 0; 37 | } 38 | 39 | .overlay { 40 | fill: none; 41 | pointer-events: all; 42 | } 43 | 44 | .focus circle { 45 | fill: none; 46 | stroke: steelblue; 47 | } 48 | 49 | path.slice{ 50 | stroke-width:2px; 51 | } 52 | 53 | polyline{ 54 | opacity: .3; 55 | stroke: black; 56 | stroke-width: 2px; 57 | fill: none; 58 | } 59 | 60 | .labelValue 61 | { 62 | font-size: 60%; 63 | opacity: .5; 64 | 65 | } 66 | 67 | .toolTip { 68 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 69 | position: absolute; 70 | display: none; 71 | width: auto; 72 | height: auto; 73 | background: none repeat scroll 0 0 white; 74 | border: 0 none; 75 | border-radius: 8px 8px 8px 8px; 76 | box-shadow: -3px 3px 15px #888888; 77 | color: black; 78 | font: 12px sans-serif; 79 | padding: 5px; 80 | text-align: center; 81 | } 82 | text { 83 | font: 12px sans-serif; 84 | } -------------------------------------------------------------------------------- /public/datatables/datatables.net-bs4/js/dataTables.bootstrap4.js: -------------------------------------------------------------------------------- 1 | !function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,a){return e||(e=window),a&&a.fn.dataTable||(a=require("datatables.net")(e,a).$),t(a,e,e.document)}:t(jQuery,window,document)}(function(h,e,n,o){"use strict";var s=h.fn.dataTable;return h.extend(!0,s.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),h.extend(s.ext.classes,{sWrapper:"dataTables_wrapper container-fluid dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),s.ext.renderer.pageButton.bootstrap=function(i,e,d,a,l,c){var u,p,t,f=new s.Api(i),b=i.oClasses,m=i.oLanguage.oPaginate,g=i.oLanguage.oAria.paginate||{},x=0,w=function(e,a){var t,n,o,s,r=function(e){e.preventDefault(),h(e.currentTarget).hasClass("disabled")||f.page()==e.data.action||f.page(e.data.action).draw("page")};for(t=0,n=a.length;t",{class:b.sPageButton+" "+p,id:0===d&&"string"==typeof s?i.sTableId+"_"+s:null}).append(h("",{href:"#","aria-controls":i.sTableId,"aria-label":g[s],"data-dt-idx":x,tabindex:i.iTabIndex,class:"page-link"}).html(u)).appendTo(e),i.oApi._fnBindAction(o,{action:s},r),x++)}};try{t=h(e).find(n.activeElement).data("dt-idx")}catch(e){}w(h(e).empty().html('