-
Notifications
You must be signed in to change notification settings - Fork 144
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
list yearn bridge for both deposit/withdraw, as gas differs #225
Conversation
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.
Minor comments.
Also please rename _depositAmount
to depositAmount
on line 112 in YearnBridgeE2E.t.sol. Would like to not modify params if possible.
@@ -49,7 +49,8 @@ abstract contract BaseDeployment is Test { | |||
bool envMode = vm.envBool(modeKey); | |||
MODE = envMode ? Mode.BROADCAST : Mode.SIMULATE; | |||
|
|||
bytes32 envNetwork = keccak256(abi.encodePacked(vm.envString(networkKey))); | |||
string memory nw = vm.envString(networkKey); | |||
bytes32 envNetwork = keccak256(abi.encodePacked(nw)); |
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.
I think better naming here would be string memory envNetwork
and bytes32 envNetworkHash
.
deal(underlyingToken, address(_vault), _depositAmount / 2); | ||
} | ||
|
||
uint256 _withdrawAmount = outputAssetAMid; |
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.
Please use underscores only for params.
@@ -154,8 +178,20 @@ contract YearnBridgeE2ETest is BridgeTestBase { | |||
assertEq(inputAssetAMid, inputAssetABefore - _depositAmount, "Balance missmatch after deposit"); | |||
assertGt(outputAssetAMid, outputAssetABefore, "No change in output asset balance after deposit"); | |||
|
|||
_withdrawAmount = outputAssetAMid; | |||
bridgeCallData = encodeBridgeCallData(id, depositOutputAssetA, emptyAsset, depositInputAssetA, emptyAsset, 1); | |||
// Move some funds to strategies to have underlying balance be less than the required. |
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.
I don't fully understand this. Is this supposed to cause revert or something else? Please expand a bit on what this will achieve.
Description
Update gas constraints in the yearn tests + deployment.
Checklist:
forge coverage --match-contract MyContract
returns 100% line coverage.