ethereumclassic / explorer

EthereumClassic Block Explorer
MIT License
263 stars 252 forks source link

Cannot read property 'transaction' of undefined #167

Open d3s4x opened 6 years ago

d3s4x commented 6 years ago

When I open a transaction e.g. (../tx/0xdd08cd98fd7b14b0a1924d263a3914b3a372f0a1a6....) I see in console this error:

Cannot read property 'transaction' of undefined TypeError: Cannot read property 'transaction' of undefined at exports.data (/Users/denis/Workspace/explorer/routes/web3relay.js:102:16) at Layer.handle [as handle_request] (/Users/denis/Workspace/explorer/node_modules/express/lib/router/layer.js:95:5) at next (/Users/denis/Workspace/explorer/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/denis/Workspace/explorer/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/denis/Workspace/explorer/node_modules/express/lib/router/layer.js:95:5) at /Users/denis/Workspace/explorer/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/Users/denis/Workspace/explorer/node_modules/express/lib/router/index.js:335:12) at next (/Users/denis/Workspace/explorer/node_modules/express/lib/router/index.js:275:10) at serveStatic (/Users/denis/Workspace/explorer/node_modules/serve-static/index.js:75:16) at Layer.handle [as handle_request] (/Users/denis/Workspace/explorer/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/Users/denis/Workspace/explorer/node_modules/express/lib/router/index.js:317:13) at /Users/denis/Workspace/explorer/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/Users/denis/Workspace/explorer/node_modules/express/lib/router/index.js:335:12) at next (/Users/denis/Workspace/explorer/node_modules/express/lib/router/index.js:275:10) at urlencodedParser (/Users/denis/Workspace/explorer/node_modules/body-parser/lib/types/urlencoded.js:82:7) at Layer.handle [as handle_request] (/Users/denis/Workspace/explorer/node_modules/express/lib/router/layer.js:95:5)

mikeyb commented 6 years ago

Is your node fully synced?

d3s4x commented 6 years ago

I think so. But checking the code, how its supposed to work? I did not found in web3js property 'trace'

web3.trace.transaction

function Web3 (provider) {
    this._requestManager = new RequestManager(provider);
    this.currentProvider = provider;
    this.eth = new Eth(this);
    this.db = new DB(this);
    this.shh = new Shh(this);
    this.net = new Net(this);
    this.personal = new Personal(this);
    this.debug = new Debug(this);
    this.bzz = new Swarm(this);
    this.settings = new Settings();
    this.version = {
        api: version.version
    };
    this.providers = {
        HttpProvider: HttpProvider,
        IpcProvider: IpcProvider
    };
    this._extend = extend(this);
    this._extend({
        properties: properties()
    });
}
hackmod commented 6 years ago

Currently, the official web3.js does not support the parity extension named "trace", and I don't know why the parity extension used in the etc-explorer before, anyway, PR #136 use the parity extension conditionally and support token transaction/transfer using parity extension correctly.

d3s4x commented 6 years ago

Hey! Is it possible to achieve the same result "trace" with pure geth?

hackmod commented 6 years ago

@d3sh not exactly same functionality exists but a similar result can be obtained, PR #136 is updated now~