contract test{ function test1(string memory _name) public returns(address) uint tempData = uint (keccak256(abi.encodePacked(_name,block.timestamp))); address batchNo = address(tempData); return batchNo; }

when call this function using .call() it returns value but not getting written blockchain and when i call this function using .send() it get written on blockchain but not returning that value;

//how to catch this value in front end???

  • Emit an event containing the returned value, prior to returning that value. – goodvibration Oct 28 '20 at 12:26

Your Answer

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

Browse other questions tagged or ask your own question.