-
Notifications
You must be signed in to change notification settings - Fork 61
feat: update SafeErc20 to newer Solidity version #652
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
Open
simon0x1800
wants to merge
21
commits into
OpenZeppelin:main
Choose a base branch
from
simon0x1800:feature/620-update-safe-erc20
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+297
−110
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7888698
feat: SafeErc20.rs match the solidity version
simon0x1800 06565ee
refactor: Update force_approve method in ISafeErc20 trait to include …
simon0x1800 c193733
feat: Update SafeErc20 to match the new Solidity version of the Contract
simon0x1800 8d99290
refactor: Simplify force_approve method and improve code readability …
simon0x1800 2457829
refactor: Rename 'to' parameter to 'spender' in approve_and_call_rela…
simon0x1800 84bd984
refactor: Remove SafeErc20 trait and related tests to streamline the …
simon0x1800 b96f2e5
Update contracts/src/token/erc20/utils/safe_erc20.rs
simon0x1800 b81ad53
Update contracts/src/token/erc20/utils/safe_erc20.rs
simon0x1800 6765b4d
Update contracts/src/token/erc20/utils/safe_erc20.rs
simon0x1800 342d74c
refactor: Update safe_erc20.rs to improve method calls and code clarity
simon0x1800 174b634
Merge branch 'feature/620-update-safe-erc20' of https://github.com/si…
simon0x1800 10840e1
Update contracts/src/token/erc20/utils/safe_erc20.rs
simon0x1800 46ea88f
Update contracts/src/token/erc20/utils/safe_erc20.rs
simon0x1800 e88951a
refactor: Enhance SafeErc20 method calls by replacing RawCall encodin…
simon0x1800 d19173a
Merge branch 'feature/620-update-safe-erc20' of https://github.com/si…
simon0x1800 49f9b00
refactor: Update SafeErc20 method calls to use data conversion for im…
simon0x1800 aa2a535
feat: Update SafeERC20 to match latest Solidity version
simon0x1800 b918696
Merge branch 'main' into feature/620-update-safe-erc20
simon0x1800 bbcff79
review implementation
simon0x1800 6ae9cc3
Merge branch 'feature/620-update-safe-erc20' of https://github.com/si…
simon0x1800 155e686
Merge branch 'main' into feature/620-update-safe-erc20
bidzyyys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ mod sol { | |
#[derive(Debug)] | ||
#[allow(missing_docs)] | ||
error ERC20InvalidReceiver(address receiver); | ||
/// Indicates a failure with the `spender`’s `allowance`. Used in | ||
/// Indicates a failure with the `spender`'s `allowance`. Used in | ||
/// transfers. | ||
/// | ||
/// * `spender` - Address that may be allowed to operate on tokens without | ||
|
@@ -109,7 +109,7 @@ pub enum Error { | |
InvalidSender(ERC20InvalidSender), | ||
/// Indicates a failure with the token `receiver`. Used in transfers. | ||
InvalidReceiver(ERC20InvalidReceiver), | ||
/// Indicates a failure with the `spender`’s `allowance`. Used in | ||
/// Indicates a failure with the `spender`'s `allowance`. Used in | ||
/// transfers. | ||
InsufficientAllowance(ERC20InsufficientAllowance), | ||
/// Indicates a failure with the `spender` to be approved. Used in | ||
|
@@ -272,11 +272,6 @@ pub trait IErc20 { | |
) -> Result<bool, Self::Error>; | ||
} | ||
|
||
#[public] | ||
#[implements(IErc20<Error = Error>)] | ||
impl Erc20 {} | ||
|
||
#[public] | ||
Comment on lines
-275
to
-279
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revert this |
||
impl IErc20 for Erc20 { | ||
type Error = Error; | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
format all code with
cargo +nightly fmt --all