Hi everyone, I am a newbie at writing smart contract. I’ve just started playing around with Solidity and I had this really weird error that I do not know why.
I want to use a function that is already a built-in function in openzeppelin (for example, function
safeTransferFrom(address, address, uint256, uint256, bytes) in ERC1155.sol). For specific purposes, I want to use this function (
safeTransferFrom()) inside another function (for example, function
test()). But as you can see, once I call the
safeTransferFrom(), I just cannot write any code after that line (I tried in the hardhat/truffle console and I confirm this). For “after that line”, I mean, just inside the current function I am writing. I can write anything after that function, but not inside that function, after the line I used
I have no idea why I got this “issue” (not sure it’s an issue, maybe I just don’t really understand the concept).
So do you have any idea or suggest about this one?
I got a picture of my code below to represent my problem. Thanks for your support! I really appreciate it!
- Solidity: ^0.8.0
- Yarn: 1.22.10
- Hardhat: ^2.3.0
- OpenZeppelin: 4.x