generated from FraxFinance/frax-template
-
Notifications
You must be signed in to change notification settings - Fork 2
(s)frxUSD Upgrades #11
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
pegahcarter
wants to merge
13
commits into
feat/freeze-array
Choose a base branch
from
frxusd-upgrade
base: feat/freeze-array
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.
Open
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
47419de
build: pin frax-standard-solidity
pegahcarter d8495e7
feat: freezers
pegahcarter 3517741
feat: fraxtal frxUSD with signatures
pegahcarter d438a83
ci: write to files
pegahcarter b48eba2
fix: pin versions
pegahcarter 59b078d
feat: 3009 to fraxtal sfrxUSD
pegahcarter 62277ef
feat: ethereum 3009 contracts
pegahcarter 32572f8
Clear 7702 Delegations
tom2o17 a4c744e
refactor: modules to shared dir
pegahcarter 9670b60
Update src/script/ethereum/frxUSD/DeployFrxUSD.s.sol
pegahcarter fc42d4d
Update src/contracts/fraxtal/frxUSD/versioning/FrxUSD2.sol
pegahcarter bc02b74
Update src/contracts/fraxtal/frxUSD/versioning/FrxUSD2.sol
pegahcarter b917a98
Update src/contracts/ethereum/frxUSD/versioning/FrxUSD2.sol
pegahcarter 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| //SPDX-License-Identifier: Unlicense | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import { FrxUSD2, ERC20, EIP712, Nonces, ERC20Permit } from "src/contracts/ethereum/frxUSD/versioning/FrxUSD2.sol"; | ||
| import { PermitModule } from "src/contracts/shared/core/modules/PermitModule.sol"; | ||
| import { EIP3009Module, SignatureModule } from "src/contracts/shared/core/modules/EIP3009Module.sol"; | ||
|
|
||
| /// @title FrxUSD v3.0.0 | ||
| /// @notice Frax USD Stablecoin by Frax Finance | ||
| /// @dev v3.0.0 adds ERC-1271 and EIP-3009 support | ||
| contract FrxUSD3 is FrxUSD2, EIP3009Module, PermitModule { | ||
| constructor() FrxUSD2(address(1), "Frax USD", "frxUSD") {} | ||
|
|
||
| /*////////////////////////////////////////////////////////////// | ||
| Module Overrides | ||
| //////////////////////////////////////////////////////////////*/ | ||
|
|
||
| function __transfer(address from, address to, uint256 amount) internal override returns (bool) { | ||
| ERC20._transfer(from, to, amount); | ||
| return true; | ||
| } | ||
|
|
||
| function __hashTypedDataV4(bytes32 structHash) internal view override(SignatureModule) returns (bytes32) { | ||
| return EIP712._hashTypedDataV4(structHash); | ||
| } | ||
|
|
||
| function __approve(address owner, address spender, uint256 amount) internal override(PermitModule) { | ||
| ERC20._approve(owner, spender, amount); | ||
| } | ||
|
|
||
| function __useNonce(address owner) internal override(PermitModule) returns (uint256) { | ||
| return Nonces._useNonce(owner); | ||
| } | ||
|
|
||
| function __domainSeparatorV4() internal view override(PermitModule) returns (bytes32) { | ||
| return EIP712._domainSeparatorV4(); | ||
| } | ||
|
|
||
| function permit( | ||
| address owner, | ||
| address spender, | ||
| uint256 value, | ||
| uint256 deadline, | ||
| uint8 v, | ||
| bytes32 r, | ||
| bytes32 s | ||
| ) public override(ERC20Permit, PermitModule) { | ||
| return | ||
| PermitModule.permit({ owner: owner, spender: spender, value: value, deadline: deadline, v: v, r: r, s: s }); | ||
| } | ||
| } |
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
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.
Uh oh!
There was an error while loading. Please reload this page.