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

Suggest improvements #1

Merged
merged 15 commits into from
May 10, 2024
Merged

Suggest improvements #1

merged 15 commits into from
May 10, 2024

Conversation

saefstroem
Copy link
Owner

Please suggest improvements in alignment with release.

Imported sled database interface from JetRPC
- Builtin erc20 abi used Ethereum Binance Pegged Contract.
- Wrapper struct for erc20 token
- get_balance for erc20 token
- refactored sled db interface
- set gateway callback function to be async
- drafted poller function (untested)
- invoice struct

todo: test the poller by using this as external library and also draft test cases to test the poller to the extent possible without involving private keys into the repo
- changed project structure to prevent internal interfaces from being exported to the public API.
- added custom expiration for invoices
- added descriptive names for payment gateways
Refactored according to suggestions by clippy.
Added description of how the library functions
- Deprecated rust-web3 in favor of alloy-rs due to rust-web3 being deprecated in the future
- Replaced eth abi with IERC20 abi.
- Transfer paid invoice funds to treasury when paid

TODO: in the near future token transfers also need to be included so that it is possible to configure payments via tokens.
Add basic rust pipeline
@saefstroem saefstroem self-assigned this May 10, 2024
src/audit/mod.rs Outdated Show resolved Hide resolved
src/common/mod.rs Outdated Show resolved Hide resolved
src/db/mod.rs Outdated Show resolved Hide resolved
src/audit/mod.rs Outdated Show resolved Hide resolved
src/db/mod.rs Outdated Show resolved Hide resolved
src/db/mod.rs Outdated Show resolved Hide resolved
src/erc20/mod.rs Outdated Show resolved Hide resolved
src/poller/mod.rs Outdated Show resolved Hide resolved
src/poller/mod.rs Outdated Show resolved Hide resolved
src/poller/mod.rs Outdated Show resolved Hide resolved
src/poller/mod.rs Outdated Show resolved Hide resolved
src/types/mod.rs Outdated Show resolved Hide resolved
- use RUST_LOG
- simplify functions
- convert sled errors to custom db error
- deprecate audit module
- reduce cloning and replace with ref usage
- add zeroize type for wallet bytes
@saefstroem
Copy link
Owner Author

@biryukovmaxim Please review new commits for your requested changes

@saefstroem saefstroem merged commit 130bda9 into suggested-improvements May 10, 2024
1 check passed
saefstroem added a commit that referenced this pull request May 10, 2024
Merge pull request #1 from starkbamse/main
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