hop-protocol / contracts

🐰 Hop Protocol v1 smart contracts
https://hop.exchange
238 stars 98 forks source link

contracts: Add force commit #6

Closed cwhinfrey closed 3 years ago

cwhinfrey commented 3 years ago

Allow anyone to call commit after 4 hours has passed without any commits.

cwhinfrey commented 3 years ago

Back at you @shanefontaine

I changed the TransferRoots to be indexed by the "Transfer Root Id" which is a hash of the root and totalAmount. This fixes some issues where the Bonder bonds a valid TransferRoot with a very low amount as a griefing attack.

cwhinfrey commented 3 years ago

If this looks good, I'm going to do a pass to clean up the naming. It's pretty inconsistent right now.