Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (json.crypto.kdf === 'scrypt') {
- ^
- TypeError: Cannot read property 'kdf' of undefined
- at Accounts.decrypt
- const Web3 = require('web3');
- const Tx = require('ethereumjs-tx')
- const web3 = new Web3(new Web3.providers.HttpProvider("https://mainnet.infura.io/v3/f..."));
- var fs = require('fs');
- const contractAddress = "0x...";
- const sendingAccount = "0x...";
- const password = "...";
- var abiArray = JSON.parse(getAbi());
- var contract = new web3.eth.Contract(abiArray,contractAddress);
- const keystore = fs.readFileSync("UTC--...", 'utf8');
- const decryptedAccount =
- web3.eth.accounts.decrypt(JSON.parse(keystore), password);
Add Comment
Please, Sign In to add comment