Skip to content

Commit

Permalink
Zap Curve token to Principal token (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Padraic-O-Mhuiris authored Dec 20, 2021
1 parent f01c51a commit 65fddc8
Show file tree
Hide file tree
Showing 18 changed files with 2,294 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Coverage
run: npm run build && npm run coverage
- name: Edit lcov.info
run: cat coverage/lcov.info | sed '/.*\/balancer-core-v2\/.*/,/TN:/d' | sed '/.*\/test\/.*/,/TN:/d' > coverage/tmp.info && mv coverage/tmp.info coverage/lcov.info
run: cat coverage/lcov.info | sed '/.*\/balancer-core-v2\/.*/,/TN:/d' | sed '/.*\/test\/.*/,/TN:/d' | sed '/.*\/zaps\/.*/,/TN:/d' > coverage/tmp.info && mv coverage/tmp.info coverage/lcov.info
- name: Coveralls
uses: coverallsapp/[email protected]
with:
Expand Down
7 changes: 6 additions & 1 deletion cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"destinatary",
"ecsign",
"EIP",
"ePyvCurveLUSD",
"ePyvcrv3crypto",
"ePyvcrvSTETH",
"ERC",
"ethersproject",
"exitswap",
Expand All @@ -37,6 +40,7 @@
"IWETH",
"joinswap",
"keccak",
"LUSD",
"mixedcase",
"mkdirp",
"mload",
Expand All @@ -55,6 +59,7 @@
"returndatasize",
"secp",
"selfdestruct",
"Sighash",
"sload",
"sloads",
"solhint",
Expand Down Expand Up @@ -120,4 +125,4 @@
"contracts/balancer-core-v2/**/*"
],
"allowCompoundWords": false
}
}
7 changes: 7 additions & 0 deletions contracts/interfaces/IAsset.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pragma solidity ^0.8.0;

// This interface is used instead of importing one from balancer contracts to
// resolve version conflicts
interface IAsset {

}
46 changes: 46 additions & 0 deletions contracts/interfaces/IVault.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
pragma solidity ^0.8.0;

import "./IAsset.sol";

// This interface is used instead of importing one from balancer contracts to
// resolve version conflicts
interface IVault {
enum SwapKind {
GIVEN_IN,
GIVEN_OUT
}

enum PoolSpecialization {
GENERAL,
MINIMAL_SWAP_INFO,
TWO_TOKEN
}

struct SingleSwap {
bytes32 poolId;
SwapKind kind;
IAsset assetIn;
IAsset assetOut;
uint256 amount;
bytes userData;
}

struct FundManagement {
address sender;
bool fromInternalBalance;
address payable recipient;
bool toInternalBalance;
}

function swap(
SingleSwap memory singleSwap,
FundManagement memory funds,
uint256 limit,
uint256 deadline
) external payable returns (uint256);

function getPool(bytes32 poolId)
external
view
returns (address, PoolSpecialization);
}
Loading

0 comments on commit 65fddc8

Please sign in to comment.