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

Warp Route deployers should be able to dust token recipients with small amounts of gas tokens #4595

Open
nambrot opened this issue Sep 30, 2024 · 5 comments

Comments

@nambrot
Copy link
Contributor

nambrot commented Sep 30, 2024

When deploying a warp route, a common problem is that token recipients sometimes do not have gas tokens to do anything with the warped tokens. This bounty specifies a simple tool that can observe (configurable) warp transfers and sends token recipients some dust to at least move the tokens, maybe even back if they did so erronously. This should be pretty easily built by just listening to events on the warp route contract and then checking that the token recipient has no native balance.

@felipesqueloto
Copy link

good

@leovigna
Copy link

leovigna commented Oct 3, 2024

https://www.npmjs.com/package/@owlprotocol/hyperlane-duster
Duster Logic: https://github.com/owlprotocol/workspace-public/blob/develop/packages/contracts-hyperlane/src/token/dustTokenRecipients.ts
CLI: https://github.com/owlprotocol/workspace-public/tree/develop/packages/hyperlane-duster

Built with: https://oclif.io/, https://viem.sh/, https://github.com/hyperlane-xyz/hyperlane-monorepo/tree/main/solidity/contracts

Demo is a bit slow because of how long ETH > Ancient8 bridging takes. I also only dust 100 wei but it's easily configurable.

Screencast.from.10-03-2024.07.51.03.AM.webm

Try this with a private key that ideally has only funds on Ancient8 and is non-critical (just as a best practice).

pnpm dlx @owlprotocol/hyperlane-duster dust --chainId 888888888 --token 0x97423A68BAe94b5De52d767a17aBCc54c157c0E5 --privateKey $PRIVATE_KEY --amount 100

@jakadot
Copy link

jakadot commented Oct 3, 2024

very good explanation

@nambrot
Copy link
Contributor Author

nambrot commented Oct 8, 2024

The links are not public I believe

@leovigna
Copy link

leovigna commented Oct 8, 2024

The links are not public I believe

Updated links to develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants