mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
code restruturing
This commit is contained in:
parent
d9f86e3b68
commit
09a6932acc
|
@ -90,7 +90,7 @@ contract BasicResolver is AaveHelpers {
|
||||||
* @param getId Get token amount at this ID from `InstaMemory` Contract.
|
* @param getId Get token amount at this ID from `InstaMemory` Contract.
|
||||||
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
||||||
*/
|
*/
|
||||||
function deposit(address token, uint amt, uint getId, uint setId) external payable{
|
function deposit(address token, uint amt, uint getId, uint setId) external payable {
|
||||||
uint _amt = getUint(getId, amt);
|
uint _amt = getUint(getId, amt);
|
||||||
AaveInterface aave = AaveInterface(getAaveAddress());
|
AaveInterface aave = AaveInterface(getAaveAddress());
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ contract BasicResolver is AaveHelpers {
|
||||||
* @param getId Get token amount at this ID from `InstaMemory` Contract.
|
* @param getId Get token amount at this ID from `InstaMemory` Contract.
|
||||||
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
||||||
*/
|
*/
|
||||||
function withdraw(address token, uint amt, uint getId, uint setId) external payable{
|
function withdraw(address token, uint amt, uint getId, uint setId) external payable {
|
||||||
uint _amt = getUint(getId, amt);
|
uint _amt = getUint(getId, amt);
|
||||||
AaveCoreInterface aaveCore = AaveCoreInterface(getAaveCoreAddress());
|
AaveCoreInterface aaveCore = AaveCoreInterface(getAaveCoreAddress());
|
||||||
ATokenInterface atoken = ATokenInterface(aaveCore.getReserveATokenAddress(token));
|
ATokenInterface atoken = ATokenInterface(aaveCore.getReserveATokenAddress(token));
|
||||||
|
@ -236,7 +236,6 @@ contract BasicResolver is AaveHelpers {
|
||||||
aave.repay.value(ethAmt)(token, _amt, payable(address(this)));
|
aave.repay.value(ethAmt)(token, _amt, payable(address(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setUint(setId, _amt);
|
setUint(setId, _amt);
|
||||||
|
|
||||||
emit LogPayback(token, _amt, getId, setId);
|
emit LogPayback(token, _amt, getId, setId);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user