trufflesuite / truffle-hdwallet-provider

HD Wallet-enabled Web3 provider
MIT License
399 stars 167 forks source link

How to use truffle-hdwallet-provider to call the contract function,can you give a demo,I got some errs. #93

Open superman285 opened 5 years ago

superman285 commented 5 years ago

let note = ctx.request.body.note, uid = ctx.request.body.uid; var noteContractObj = new web3.eth.Contract(abi,contractAddr); await noteContractObj.methods.addNote(note).send({ from:uid, gas:300000, },(err,result)=>{}

the varibles I used I have defined ,but i can not call the function from my contract,how should i do? is my format wrong? can you give a demo to call the function with param from contract?thanks