I used this guide to deploy a smart contract with Node-js. I followed as far as my contract was created as an object. Because the mentioned guide is old some web3 methods changed nowadays. So it looks like i cannot continue following that. My question is "how do i assign address and data and gas to my contract object for deploying?". Please guide me with an appropriate code to deploy contract.
app.js:
var Web3=require('web3');
var fs=require('fs');
var solc=require('solc');
var web3=new Web3('ws://127.0.0.1:8545');
var address="0xdC3881248306fd62bbA5d9F0FDD39b5693bd1737";
var contractAbi=[
{
"constant": true,
"inputs": [],
"name": "notation",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
];
var contract_sol=fs.readFileSync('E:/Deploy/contracts/Deploy.sol','utf8');
var contract_compiled=solc.compile(contract_sol);
for (let contractName in contract_compiled.contracts) {
var contract_byteCode=contract_compiled.contracts[contractName].bytecode;
}
var gasEstimate=web3.eth.estimateGas({data:contract_byteCode});
var contract_object=new web3.eth.Contract(contractAbi);
var address="0xdC3881248306fd62bbA5d9F0FDD39b5693bd1737";
for???