hashport-validator icon indicating copy to clipboard operation
hashport-validator copied to clipboard

Implementation of the Wrapped to Wrapped logic

Open svetlio8 opened this issue 3 years ago • 0 comments

High-level spec link

Description:

  • In the app/process/watcher/transfer/watcher.go in the method processTransaction there is if with error message Wrapped to Wrapped transfers currently not supported.
  • In the app/process/watcher/evm/watcher.go the method handleBurnLog there is if with error message Wrapped to Wrapped transfers currently not supported.
  • Implementation of the logic for Burn and Mint in the handlers.
    • Ex: in the EVM watcher to be called new handler for the burn logic of wrapped to wrapped if the network is EVM (not Hedera == 0) burnEvent.TargetChainId != 0 and IF the burnEvent.TargetChainId == burnEvent.NativeChainId
  • Rollback scenario in case of TX fail / network down / etc.
    • Source network burn issue > do not mint on the destination.
    • Destination network mint issue > mint on Source network what was already burned.
  • Every validator should sign the transfer.
  • ‼️ In case there is no wrapped token on one of the networks > throw an error message. This case should be also handled at the FE.

Subtasks:

  • [ ] Brun handler implementation
  • [ ] Mint handler implementation
  • [ ] Rollback scenario implementation
  • [ ] unit tests, docks, PR reviews & fixes

svetlio8 avatar Feb 02 '22 07:02 svetlio8