const HDWalletProvider=require('truffle-hdwallet-provider');
const Web3=require('web3');
const{interface,bytecode}=require('./compile');
const provider=new HDWalletProvider(
'rotate private anger humor social predict title//i pearput numbermy firmaccount mercyprase reopen','https://sepolia.infura.io/v3/9d4945325d2c4515a117aaafa6b5af54'here
);
const web3 =new Web3(provider);
const deploy= async()=>{
const accounts=await web3.eth.getAccounts();
console.log('Attempting to deploy from account',accounts[0]);
const result= await new web3.eth.Contract(JSON.parse(interface))
.deploy({data:'0x0'+bytecode,arguments:['Hi,there']})
.send({gas:"1000000",from:accounts[0]});
console.log('Contract deployed to',result.options.address);
};
deploy();
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user