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

Feat/token paymaster test refactor #34

Merged
merged 13 commits into from
Nov 5, 2024

Conversation

livingrockrises
Copy link
Contributor

@livingrockrises livingrockrises commented Oct 30, 2024

  • Tests are refactored to avoid stack too deep issues.
  • Added maxPenalty logic in validation stage
  • Updated type of tokenPrice var
  • Added approve to router logic in constructor
  • updated swap router and native address as per base mainnet
  • added fork test for base mainnet

Note: some of the accounting tests are still unclear/unsatisfactory.
Also, left some console logs (to be removed) for now

Comment on lines +19 to +20
// Todo: marked for removal
import "forge-std/console2.sol";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to remove it after audit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I will

@@ -56,7 +58,8 @@ contract BiconomyTokenPaymaster is
// supported in // independent mode

// PAYMASTER_ID_OFFSET
uint256 private constant _UNACCOUNTED_GAS_LIMIT = 50_000; // Limit for unaccounted gas cost
// Note: Temp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it for testing purposes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, haven't gotten to right accounting yet.

contracts/token/BiconomyTokenPaymaster.sol Outdated Show resolved Hide resolved
@livingrockrises livingrockrises merged commit 6143d26 into develop Nov 5, 2024
1 of 3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants