Skip to content
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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

dbeal-eth
Copy link
Contributor

No description provided.

@dbeal-eth dbeal-eth added the Fix label Apr 11, 2024
@dbeal-eth dbeal-eth self-assigned this Apr 11, 2024
Comment on lines 2 to 11
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();
}
Copy link
Contributor

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

Comment on lines 24 to 25
IUSDToken(toWrapToken).transferFrom(msg.sender, address(this), uint256(neededSynth));
IUSDToken(toWrapToken).approve(address(spotMarket), neededSynth);
Copy link
Contributor

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.

(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);
Copy link
Contributor

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);

@dbeal-eth
Copy link
Contributor Author

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

@Rickk137
Copy link
Contributor

@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

@Rickk137
Copy link
Contributor

@dbeal-eth I can see there are some extra generated files like test.json wanna clean those up before merging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants