Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: not possible to cancel SendToEthereum transactions #389

Closed
thomas-nguy opened this issue Mar 10, 2022 · 4 comments
Closed

Problem: not possible to cancel SendToEthereum transactions #389

thomas-nguy opened this issue Mar 10, 2022 · 4 comments
Assignees
Labels
gravity bridge This issue or pull request is related to the Gravity Bridge functionality

Comments

@thomas-nguy
Copy link
Collaborator

thomas-nguy commented Mar 10, 2022

Implement a new events in the EVM hooks to be able to cancel an "unbatched" transaction.

Critical points are:

  • Verify the sender address and allows to unbatch only transactions related to him.
  • Contract needs also to refund the user if it is successfull
@thomas-nguy thomas-nguy changed the title Feature: Being able to cancel sendToEthereum transaction through SC Feature: Being able to cancel SendToEthereum through SC Mar 10, 2022
@yihuang
Copy link
Collaborator

yihuang commented Mar 10, 2022

Maybe with the eip-712 feature in ethermint now, we don't need to add these events anymore, instead ask the client to sign a cosmos message directly using metamask.

@thomas-nguy
Copy link
Collaborator Author

hmmm with our current design, cosmos native tokens are still managed by the smart contract. We cannot use EIP-712 without major architecture change.

@yihuang
Copy link
Collaborator

yihuang commented Mar 10, 2022

hmmm with our current design, cosmos native tokens are still managed by the smart contract. We cannot use EIP-712 without major architecture change.

I see, currently, the internal MsgSendToEthereum's sender is the contract, if we transfer the native token to user first, we can set the sender to the user. But then when the user cancels the msg, he'll be left with the native tokens, need another action to move it back to erc20 again. maybe indeed make sense to add a cancel event for it since we are already here.
Is it possible to do a major architecture change right now though, are the related frontend support already done?

@thomas-nguy
Copy link
Collaborator Author

I think it is still possible the change the architecture but we might consider that we have a lot of tokens already bridged
(CRO + solo machine bridged tokens + cosmos tokens)

But we can spend some time to think about a better architecture

@yihuang yihuang added the gravity bridge This issue or pull request is related to the Gravity Bridge functionality label Apr 19, 2022
@thomas-nguy thomas-nguy self-assigned this Jun 1, 2022
@tomtau tomtau changed the title Feature: Being able to cancel SendToEthereum through SC Problem: not possible to cancel SendToEthereum transactions Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gravity bridge This issue or pull request is related to the Gravity Bridge functionality
Projects
None yet
Development

No branches or pull requests

2 participants