-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feat: add utility function check for ERC-20 token allowance #23
base: main
Are you sure you want to change the base?
Conversation
Hi @GideonBature Great job so far, but a bit of misunderstanding I see... This function is to read allowance for ERC20 tokens deployed on Starknet, not on Ethereum. |
Oh... 😅 I see, I misunderstood it then. I will make necessary changes and push again. Thank you for the review! |
@Abeeujah Please do check. I have re-implemented it for Starknet Blockchain. |
Hi @GideonBature, Thank you for your submission, here's a few suggestions:
|
Noted, I will do all these. For the tests, I thought about that, but seeing that the issue said unit tests, that was why I put it in same directory with the function. But I will do this. Thank you so much for these reviews. I will implement these and push again. |
Please do check if it's okay now, for the |
This utility function interacts with the blockchain to call the allowance function which returns the price/value/number of allowance. Also, there are unit tests covering several test-cases.
Please do have a look at it, to run the test cases one will need the
token address
as well as therpc provider
which thetoken
was deployed on. Thank you!ref: Connect to an Ethereum Node (ethers_rs docs)