feat(curve): Add CurveEncoder
We don't know the pool tokens in the ProtocolComponent, so we can't infer the indexes correctly. Added a call to the MetaRegistry curve contract to get the correct token indexes. To do this, I had to move the get_client to utils. We could actually refactor the transaction logic into its' own struct and use it here and in the approval logic It was assumed that all the pools will have a "factory" static attribute, even if empty --- don't change below this line --- ENG-4306 Took 2 hours 28 minutes Took 27 seconds
This commit is contained in:
@@ -21,19 +21,6 @@ interface MetaRegistry {
|
||||
returns (int128, int128, bool);
|
||||
}
|
||||
|
||||
interface IAaveLendingPool {
|
||||
function deposit(
|
||||
address asset,
|
||||
uint256 amount,
|
||||
address onBehalfOf,
|
||||
uint16 referralCode
|
||||
) external;
|
||||
|
||||
function withdraw(address asset, uint256 amount, address to)
|
||||
external
|
||||
returns (uint256);
|
||||
}
|
||||
|
||||
contract CurveExecutorExposed is CurveExecutor {
|
||||
constructor(address _nativeToken) CurveExecutor(_nativeToken) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user