-
Notifications
You must be signed in to change notification settings - Fork 93
ETH / sfrxeth zapper #1316
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
Merged
Merged
ETH / sfrxeth zapper #1316
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6af7d30
Initial draft zapper
DanielVF 4b0154e
Initial draft zapper
DanielVF 2643b66
Merge branch 'DanielVF/oeth' into DanielVF/oeth-zapper
DanielVF 0374f5e
Add deploy file for zapper
DanielVF ef4a028
Remove WETH partial support, out of scope in this PR
DanielVF 94b5d58
Merge branch 'DanielVF/oeth' into DanielVF/oeth-zapper
DanielVF 047dadb
Happy Slither
DanielVF 9bda0c3
WETH support
DanielVF 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| [ | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "_oeth", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "internalType": "address", | ||
| "name": "_vault", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "stateMutability": "nonpayable", | ||
| "type": "constructor" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": true, | ||
| "internalType": "address", | ||
| "name": "minter", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "indexed": true, | ||
| "internalType": "address", | ||
| "name": "asset", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "indexed": false, | ||
| "internalType": "uint256", | ||
| "name": "amount", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "name": "MintFrom", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "deposit", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "stateMutability": "payable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "amount", | ||
| "type": "uint256" | ||
| }, | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "minOETH", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "name": "depositSFRXETH", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "rebaseOptIn", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "stateMutability": "payable", | ||
| "type": "receive" | ||
| } | ||
| ] |
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,117 @@ | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| interface IOUSD { | ||
| event Approval( | ||
| address indexed owner, | ||
| address indexed spender, | ||
| uint256 value | ||
| ); | ||
| event GovernorshipTransferred( | ||
| address indexed previousGovernor, | ||
| address indexed newGovernor | ||
| ); | ||
| event PendingGovernorshipTransfer( | ||
| address indexed previousGovernor, | ||
| address indexed newGovernor | ||
| ); | ||
| event TotalSupplyUpdatedHighres( | ||
| uint256 totalSupply, | ||
| uint256 rebasingCredits, | ||
| uint256 rebasingCreditsPerToken | ||
| ); | ||
| event Transfer(address indexed from, address indexed to, uint256 value); | ||
|
|
||
| function _totalSupply() external view returns (uint256); | ||
|
|
||
| function allowance(address _owner, address _spender) | ||
| external | ||
| view | ||
| returns (uint256); | ||
|
|
||
| function approve(address _spender, uint256 _value) external returns (bool); | ||
|
|
||
| function balanceOf(address _account) external view returns (uint256); | ||
|
|
||
| function burn(address account, uint256 amount) external; | ||
|
|
||
| function changeSupply(uint256 _newTotalSupply) external; | ||
|
|
||
| function claimGovernance() external; | ||
|
|
||
| function creditsBalanceOf(address _account) | ||
| external | ||
| view | ||
| returns (uint256, uint256); | ||
|
|
||
| function creditsBalanceOfHighres(address _account) | ||
| external | ||
| view | ||
| returns ( | ||
| uint256, | ||
| uint256, | ||
| bool | ||
| ); | ||
|
|
||
| function decimals() external view returns (uint8); | ||
|
|
||
| function decreaseAllowance(address _spender, uint256 _subtractedValue) | ||
| external | ||
| returns (bool); | ||
|
|
||
| function governor() external view returns (address); | ||
|
|
||
| function increaseAllowance(address _spender, uint256 _addedValue) | ||
| external | ||
| returns (bool); | ||
|
|
||
| function initialize( | ||
| string memory _nameArg, | ||
| string memory _symbolArg, | ||
| address _vaultAddress | ||
| ) external; | ||
|
|
||
| function isGovernor() external view returns (bool); | ||
|
|
||
| function isUpgraded(address) external view returns (uint256); | ||
|
|
||
| function mint(address _account, uint256 _amount) external; | ||
|
|
||
| function name() external view returns (string memory); | ||
|
|
||
| function nonRebasingCreditsPerToken(address) | ||
| external | ||
| view | ||
| returns (uint256); | ||
|
|
||
| function nonRebasingSupply() external view returns (uint256); | ||
|
|
||
| function rebaseOptIn() external; | ||
|
|
||
| function rebaseOptOut() external; | ||
|
|
||
| function rebaseState(address) external view returns (uint8); | ||
|
|
||
| function rebasingCredits() external view returns (uint256); | ||
|
|
||
| function rebasingCreditsHighres() external view returns (uint256); | ||
|
|
||
| function rebasingCreditsPerToken() external view returns (uint256); | ||
|
|
||
| function rebasingCreditsPerTokenHighres() external view returns (uint256); | ||
|
|
||
| function symbol() external view returns (string memory); | ||
|
|
||
| function totalSupply() external view returns (uint256); | ||
|
|
||
| function transfer(address _to, uint256 _value) external returns (bool); | ||
|
|
||
| function transferFrom( | ||
| address _from, | ||
| address _to, | ||
| uint256 _value | ||
| ) external returns (bool); | ||
|
|
||
| function transferGovernance(address _newGovernor) external; | ||
|
|
||
| function vaultAddress() external view returns (address); | ||
| } |
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,127 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| interface ISfrxETH { | ||
| event Approval( | ||
| address indexed owner, | ||
| address indexed spender, | ||
| uint256 amount | ||
| ); | ||
| event Deposit( | ||
| address indexed caller, | ||
| address indexed owner, | ||
| uint256 assets, | ||
| uint256 shares | ||
| ); | ||
| event NewRewardsCycle(uint32 indexed cycleEnd, uint256 rewardAmount); | ||
| event Transfer(address indexed from, address indexed to, uint256 amount); | ||
| event Withdraw( | ||
| address indexed caller, | ||
| address indexed receiver, | ||
| address indexed owner, | ||
| uint256 assets, | ||
| uint256 shares | ||
| ); | ||
|
|
||
| function DOMAIN_SEPARATOR() external view returns (bytes32); | ||
|
|
||
| function allowance(address, address) external view returns (uint256); | ||
|
|
||
| function approve(address spender, uint256 amount) external returns (bool); | ||
|
|
||
| function asset() external view returns (address); | ||
|
|
||
| function balanceOf(address) external view returns (uint256); | ||
|
|
||
| function convertToAssets(uint256 shares) external view returns (uint256); | ||
|
|
||
| function convertToShares(uint256 assets) external view returns (uint256); | ||
|
|
||
| function decimals() external view returns (uint8); | ||
|
|
||
| function deposit(uint256 assets, address receiver) | ||
| external | ||
| returns (uint256 shares); | ||
|
|
||
| function depositWithSignature( | ||
| uint256 assets, | ||
| address receiver, | ||
| uint256 deadline, | ||
| bool approveMax, | ||
| uint8 v, | ||
| bytes32 r, | ||
| bytes32 s | ||
| ) external returns (uint256 shares); | ||
|
|
||
| function lastRewardAmount() external view returns (uint192); | ||
|
|
||
| function lastSync() external view returns (uint32); | ||
|
|
||
| function maxDeposit(address) external view returns (uint256); | ||
|
|
||
| function maxMint(address) external view returns (uint256); | ||
|
|
||
| function maxRedeem(address owner) external view returns (uint256); | ||
|
|
||
| function maxWithdraw(address owner) external view returns (uint256); | ||
|
|
||
| function mint(uint256 shares, address receiver) | ||
| external | ||
| returns (uint256 assets); | ||
|
|
||
| function name() external view returns (string memory); | ||
|
|
||
| function nonces(address) external view returns (uint256); | ||
|
|
||
| function permit( | ||
| address owner, | ||
| address spender, | ||
| uint256 value, | ||
| uint256 deadline, | ||
| uint8 v, | ||
| bytes32 r, | ||
| bytes32 s | ||
| ) external; | ||
|
|
||
| function previewDeposit(uint256 assets) external view returns (uint256); | ||
|
|
||
| function previewMint(uint256 shares) external view returns (uint256); | ||
|
|
||
| function previewRedeem(uint256 shares) external view returns (uint256); | ||
|
|
||
| function previewWithdraw(uint256 assets) external view returns (uint256); | ||
|
|
||
| function pricePerShare() external view returns (uint256); | ||
|
|
||
| function redeem( | ||
| uint256 shares, | ||
| address receiver, | ||
| address owner | ||
| ) external returns (uint256 assets); | ||
|
|
||
| function rewardsCycleEnd() external view returns (uint32); | ||
|
|
||
| function rewardsCycleLength() external view returns (uint32); | ||
|
|
||
| function symbol() external view returns (string memory); | ||
|
|
||
| function syncRewards() external; | ||
|
|
||
| function totalAssets() external view returns (uint256); | ||
|
|
||
| function totalSupply() external view returns (uint256); | ||
|
|
||
| function transfer(address to, uint256 amount) external returns (bool); | ||
|
|
||
| function transferFrom( | ||
| address from, | ||
| address to, | ||
| uint256 amount | ||
| ) external returns (bool); | ||
|
|
||
| function withdraw( | ||
| uint256 assets, | ||
| address receiver, | ||
| address owner | ||
| ) external returns (uint256 shares); | ||
| } |
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,35 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| interface IWETH9 { | ||
| event Approval(address indexed src, address indexed guy, uint256 wad); | ||
| event Deposit(address indexed dst, uint256 wad); | ||
| event Transfer(address indexed src, address indexed dst, uint256 wad); | ||
| event Withdrawal(address indexed src, uint256 wad); | ||
|
|
||
| function allowance(address, address) external view returns (uint256); | ||
|
|
||
| function approve(address guy, uint256 wad) external returns (bool); | ||
|
|
||
| function balanceOf(address) external view returns (uint256); | ||
|
|
||
| function decimals() external view returns (uint8); | ||
|
|
||
| function deposit() external payable; | ||
|
|
||
| function name() external view returns (string memory); | ||
|
|
||
| function symbol() external view returns (string memory); | ||
|
|
||
| function totalSupply() external view returns (uint256); | ||
|
|
||
| function transfer(address dst, uint256 wad) external returns (bool); | ||
|
|
||
| function transferFrom( | ||
| address src, | ||
| address dst, | ||
| uint256 wad | ||
| ) external returns (bool); | ||
|
|
||
| function withdraw(uint256 wad) external; | ||
| } | ||
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.