hashport-validator
hashport-validator copied to clipboard
Implementation of the Wrapped to Wrapped logic
High-level spec link
Description:
- In the
app/process/watcher/transfer/watcher.go
in the methodprocessTransaction
there isif
with error messageWrapped to Wrapped transfers currently not supported
. - In the
app/process/watcher/evm/watcher.go
the methodhandleBurnLog
there isif
with error messageWrapped 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 theburnEvent.TargetChainId == burnEvent.NativeChainId
- 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)
- 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