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

Implementation of approve for a token before swapping #1

Open
IljaziEzan opened this issue Dec 7, 2022 · 0 comments
Open

Implementation of approve for a token before swapping #1

IljaziEzan opened this issue Dec 7, 2022 · 0 comments

Comments

@IljaziEzan
Copy link

With this implementation i see that the connector listens for events and retrieves the payload whether it is a swap or an approve (enabling USDC on Pancake for example), but the payload data is unclear to me because for approving (enabling USDC) requires the amount that you want to be approved, i get this payload:
{ "id":xxxxxxxxxxxxxxxxxxxxxxx, "jsonrpc":"2.0", "method":"eth_sendTransaction", "params":[ { "gas":"0xbee9", "gasPrice":"0x12a05f200", "from":"0x0d4d95cd9204eb9032778226fdbaf1c9caf43f3b", "to":"0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82", "data":"0x095ea7b300000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" } ] }
I tried decoding the data but nothing, cant seem to find anything, i will need the value but cant seem to find anything.
Any help is appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant