0

Hey I am new with Solidity. And I just tried to link my front end view with the smart contract. With the simplest possible approach.

My contract:-

enter image description here

My JS code:-

enter image description here

Console keep printing 'null' I don't know why? I am sure about contract initialization because I used web-pack box.Thanks in advance.

0

Try this

await Test().call().then((data) => console.log(data));

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.