-
Notifications
You must be signed in to change notification settings - Fork 33
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 auto transfer mode #235
base: development
Are you sure you want to change the base?
Conversation
@gentlementlegen There should be formatting checks with linter and cspell |
@0x4007 Yes they seems to happen? The following run failed: https://github.com/ubiquity-os-marketplace/text-conversation-rewards/actions/runs/12629551075/job/35187679129?pr=235 |
52b8f03
to
c7d396e
Compare
@hhio618 I saw you marked it as |
@gentlementlegen I'll definitely keep that in mind for the future! For now, this task is ready for review. |
@hhio618 If you can please fix the tests:
|
@gentlementlegen I'm on it! I'll update the PR once the tests are fixed. |
acd3ea1
to
a205697
Compare
@hhio618 next time please don't force push because I have to check the whole code again |
Sure, no problem! I'll avoid force-pushing next time to make reviewing easier. |
! No question provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to handle RPC retries (exponential backoff), handling reopen issue to avoid transferring multiple times and transaction failures for fatal errors like not enough funds.
For handling reopen issues, you can look at the previous comment and check transaction hashes.
For transaction failures, you proposed Multicall contract but I don't think that will work because msg.sender
changes when the Multicall contract calls transfer
on the ERC20 contract. @rndquu can you confirm this?
! No question provided |
1 similar comment
! No question provided |
ERC20 |
As far as I understand we're trying to solve an issue of transferring ERC20 token to multiple addresses in a single transaction. While it's technically possible to do so via Multicall it's not safe because user has to set allowance for the For such kind kind of task we need a contract responsible solely for transferring tokens from |
@hhio618, this task has been idle for a while. Please provide an update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you QA this? I've just tested it and it doesn't work because when it checks allowance it fails because the ERC20 ABI doesn't contain allowance
function. Next time please QA your work to avoid unnecessary reviews.
I apologize for the inconvenience. I’ve attached the QA for reference. Please let me know if there’s anything else I can assist with. |
@hhio618 Would be nice to fix CI runs as well, thanks. |
@gentlementlegen I’ve addressed the problem. Let me know if you notice anything else or if there’s anything further I can assist with. |
src/parser/payment-module.ts
Outdated
const { data: walletData } = await this._supabase.from("wallets").select("address").eq("id", userId).single(); | ||
if (!walletData?.address) { | ||
this.context.logger.error("Beneficiary wallet not found"); | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you are QA-ing correctly, I think you're just generating permits?
When testing I got this error: Beneficiary wallet not found
and the error is because the id
in wallets
table is not an id of a user but an id of a wallet. You can check permit-generation for reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whilefoo I’ve double-checked this, and it’s working as expected. Here’s the transaction for QA reference: https://sepolia.etherscan.io/tx/0xec56a4d482fde94a3528e4745ea30145f0d5849fa0d8fe8cc4447952b3a068e2.
Just to note, when I attempted to close the issue for the second time, the result comment was edited. Due to the nonce being invalid, it resulted in no second transfer. Additionally, it seems the GithubCommentModule inadvertently inserted an invalid link into the edited comment.
When testing I got this error: Beneficiary wallet not found and the error is because the id in wallets table is not an id of a user but an id of a wallet. You can check permit-generation for reference
No, I didn't get that error! It might be related to your database configuration. By the way, I'll update it according to the reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whilefoo You're absolutely right about the database part! It looks like my wallets/users table doesn't match the reference. I'm fixing it now!
Resolves #226