-
Notifications
You must be signed in to change notification settings - Fork 58
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
add misc contract to help with repays #2106
base: main
Are you sure you want to change the base?
Conversation
auxiliary/misc/script/Counter.s.sol
Outdated
pragma solidity ^0.8.13; | ||
|
||
import {Script, console} from "forge-std/Script.sol"; | ||
|
||
contract CounterScript is Script { | ||
function setUp() public {} | ||
|
||
function run() public { | ||
vm.broadcast(); | ||
} |
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.
This file can be removed
auxiliary/misc/src/DebtRepayer.sol
Outdated
IUSDToken(toWrapToken).transferFrom(msg.sender, address(this), uint256(neededSynth)); | ||
IUSDToken(toWrapToken).approve(address(spotMarket), neededSynth); |
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.
neededSynth
is 18 decimals. The transfer amount should be parsed into wrapToken decimals.
auxiliary/misc/src/DebtRepayer.sol
Outdated
(address toWrapToken,) = spotMarket.getWrapper(spotMarketId); | ||
IUSDToken(toWrapToken).transferFrom(msg.sender, address(this), uint256(neededSynth)); | ||
IUSDToken(toWrapToken).approve(address(spotMarket), neededSynth); | ||
spotMarket.wrap(spotMarketId, neededSynth, neededSynth); |
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.
spotMarket.wrap(spotMarketId, toWrapTokenAmount, neededSynth);
this should eventually be merged because the code here is in use on base (it was independently deployed and used by the frontend, extremely low risk so kind of skirted the process) @Rickk137 are your comments documentation of all the changes that were needed to get the project up and running? do you jus twant to add commits directly to this project? you are free to do so |
@dbeal-eth I think you have already fixed the issues i mentioned. The contract is already deployed and tested. so i think it's ready to be merged |
@dbeal-eth I can see there are some extra generated files like test.json wanna clean those up before merging? |
No description provided.