0
web3.eth.accounts.signTransaction(transactionObject, process.env.WALLET_PRIVATE_KEY, function (error, signedTx) {
    if (error) {
        log(`${error}`.red);
    } else {
        web3.eth.sendSignedTransaction(signedTx.rawTransaction)
            .on('confirmation', function (number) {//dostuff
                log(`Success: ${number}`.green);

            });

        // Note this address. It will be used to create contract instance from Angular 5 application.
        //console.log("contract deployed to", result.options.address);
    }
}).catch(function(err){
    log(`${err}`.red);
});

I get:

TypeError: Cannot read property 'slice' of undefined

in proximity of web3.eth.accounts.signTransaction, why?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.