genesisdotre / trustless-token-transfer-trade

Deployed to GitHub pages. Contract deployed to Ropsten (testnet), do not send real ETH.
https://genesis.re/trustless-token-transfer-trade/
3 stars 6 forks source link

improvement: check if _validTo is in the past #3

Open fosgate29 opened 5 years ago

fosgate29 commented 5 years ago

https://github.com/genesisdotre/trustless-token-transfer-trade/blob/3cd68a1231ae5508c120cf309470289aff82a627/contracts/TrustlessTokenTransfer.sol#L29

Add a require to check if it is a valid timestamp. I couldn't figure out if there is a situation where you want an invalid timestamp, but it is something to think. Should it be always in the future?

fosgate29 commented 5 years ago

It should also improve the Event and add the timestamp into it.

marsrobertson commented 5 years ago

Good catch.

Should update the event.

I'm actually OK with setting _validTo in the past - to effectively stop transfers.