-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate events emitted when selling canvas #16
Comments
@k-misztal it may be caused because Solidity uses pointers instead of copying variables... check this out. If that's the case you might need to review the whole contract for this kind of bugs |
Same error as above, but in function First, you make the sender the owner of the canvas (correct). canvas.owner = msg.sender;
cancelSellOffer(_canvasId);
emit CanvasSold(_canvasId, msg.value, sellOffer.seller, msg.sender); But then you execute require(canvas.owner == msg.sender);
canvasForSale[_canvasId] = SellOffer(false, msg.sender, 0, 0x0); where you change the sell offer seller to |
FYI moving emitting events above the critical lines solves the problem, but I'd still take a deeper look into the whole contract and other events |
One more thing, event |
Fixed. |
There seems to be something wrong with emitted events.
When accepting Sell offer,
from
andto
addresses are the same.When accepting Buy offer by the owner, the amount is 0 and
to
address is 0x0The text was updated successfully, but these errors were encountered: