livepeer / protocol

Livepeer protocol
MIT License
152 stars 45 forks source link

Consider using <address>.call() instead of inline assembly in redeemWinningTicketNoRevert() #345

Closed yondonfu closed 5 years ago

yondonfu commented 5 years ago

TicketBroker.batchRedeemWinningTickets() uses the redeemWinningTicketNoRevert() helper in order to redeem each of the tickets in a batch without reverting if any individual ticket redemption fails. Currently, the helper constructs the ABI encoded calldata for redeemWinningTicket() and then uses the calldata in an inline assembly call with the target contracts set to the TicketBroker itself. We should be able to accomplish the same thing with <address>.call() which requires less configuration. Since there does not seem to be a strong reason to use inline assembly here we should just not use it.

yondonfu commented 5 years ago

Closed by #351