-
Notifications
You must be signed in to change notification settings - Fork 0
feature: Reimplement lib transfers and an helper to unwrap token #55
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
base: mainnet
Are you sure you want to change the base?
Conversation
bytes4 selector = IERC20.transferFrom.selector; | ||
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(selector, from, to, value)); |
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.
use standard logic for handling ERC20 transfer
src/transfers/LibTransferHelper.sol
Outdated
bytes4 selector = IERC20.transfer.selector; | ||
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(selector, to, value)); |
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.
^
src/transfers/LibTransferHelper.sol
Outdated
bytes4 selector = IERC20.transfer.selector; | ||
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(selector, to, value)); |
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.
use encode call
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.
Pull Request Overview
This pull request streamlines CI/CD by removing redundant GitHub Actions workflows and updates the Solidity development configuration while introducing new code for enhanced token transfer functionalities.
- Updated Solidity compiler settings and enabled optimizations in foundry.toml
- Changed the Foundry toolchain version used in tests from nightly to stable
Reviewed Changes
Copilot reviewed 2 out of 11 changed files in this pull request and generated no comments.
File | Description |
---|---|
foundry.toml | Updated compiler version, EVM target, and optimization settings |
.github/workflows/test.yml | Changed the Foundry toolchain version from nightly to stable |
Files not reviewed (9)
- .github/workflows/create-PR-deploy-to-release.yml: Language not supported
- .github/workflows/create-PR-implement-to-feature.yml: Language not supported
- .github/workflows/create-PR-release-to-feature.yml: Language not supported
- .github/workflows/create-PR-release-to-network.yml: Language not supported
- src/transfers/LibNativeTransfer.sol: Language not supported
- src/transfers/LibRONTransferHelperExtended.sol: Language not supported
- src/transfers/LibTransferFromHelper.sol: Language not supported
- src/transfers/LibTransferHelper.sol: Language not supported
- src/transfers/helpers/UnwrapTokenAndTransferHelpers.sol: Language not supported
Comments suppressed due to low confidence (2)
foundry.toml:10
- Confirm that the updated EVM version 'cancun' is fully supported by all project dependencies and testing setups, as this major update may have compatibility implications.
evm_version = 'cancun'
.github/workflows/test.yml:35
- Validate that switching from the nightly to a stable Foundry toolchain does not inadvertently disable required experimental features or affect test behavior.
version: stable
This pull request includes several significant changes to the repository, primarily focusing on the removal of various GitHub Actions workflows and the addition of new Solidity libraries and helper functions for token transfers. Below is a summary of the most important changes:
Removal of GitHub Actions Workflows:
.github/workflows/create-PR-deploy-to-release.yml
: Removed the workflow responsible for creating pull requests to deploy to the release branch..github/workflows/create-PR-implement-to-feature.yml
: Removed the workflow for creating pull requests from implement to feature branches..github/workflows/create-PR-release-to-feature.yml
: Removed the workflow for creating pull requests from release to feature branches..github/workflows/create-PR-release-to-network.yml
: Removed the workflow for creating pull requests from release to network branches.Solidity Code Enhancements:
foundry.toml
: Updated the Solidity compiler version to0.8.27
and enabled optimization with 200 optimizer runs.src/transfers/LibNativeTransfer.sol
: Added a constantDEFAULT_GAS_AMOUNT
and a new functionsafeTransfer
for transferring native coins with a fixed gas amount.src/transfers/LibRONTransferHelperExtended.sol
: Introduced a new libraryLibRONTransferHelperExtended
for safely unwrapping WRON tokens and transferring them, with support for proxy contracts.src/transfers/LibTransferFromHelper.sol
: Added a new libraryLibTransferFromHelper
to wrap transfer-from methods for ERC20 tokens.src/transfers/LibTransferHelper.sol
: Added a new libraryLibTransferHelper
to wrap transfer methods for ERC20/native tokens.src/transfers/helpers/UnwrapTokenAndTransferHelpers.sol
: Introduced a new contractUnwrapTokenAndTransferHelpers
for unwrapping WRON tokens and batch transferring RON to recipients.These changes aim to streamline the CI/CD process by removing redundant workflows and enhance the Solidity codebase with new functionalities for token transfers.
Checklist