Skip to content

Commit

Permalink
deploy: 02052eb
Browse files Browse the repository at this point in the history
  • Loading branch information
EridianAlpha committed Apr 22, 2024
1 parent fbbe9d6 commit 2ecf263
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 48 deletions.
13 changes: 7 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ <h1 id="aavepm---aave-position-manager"><a class="header" href="#aavepm---aave-p
<li><a href="#7-interactions">7. Interactions</a>
<ul>
<li><a href="#71-fund-proxy-with-eth">7.1. Fund proxy with ETH</a></li>
<li><a href="#72-set-health-factor">7.2. Set Health Factor</a></li>
<li><a href="#72-update-health-factor-target">7.2. Update Health Factor Target</a></li>
</ul>
</li>
<li><a href="#8-build-and-deploy-documentation">8. Build and Deploy Documentation</a></li>
Expand Down Expand Up @@ -271,18 +271,19 @@ <h2 id="5-deployment"><a class="header" href="#5-deployment">5. Deployment</a></
<h2 id="6-upgrades"><a class="header" href="#6-upgrades">6. Upgrades</a></h2>
<p>Under development 🏗️</p>
<h2 id="7-interactions"><a class="header" href="#7-interactions">7. Interactions</a></h2>
<p>Interactions are defined in <a href="./script/Interactions.s.sol">Interactions.s.sol</a>.</p>
<h3 id="71-fund-proxy-with-eth"><a class="header" href="#71-fund-proxy-with-eth">7.1. Fund proxy with ETH</a></h3>
<p>Input value in ETH.</p>
<div class="table-wrapper"><table><thead><tr><th>Chain</th><th>Command</th></tr></thead><tbody>
<tr><td>Anvil</td><td><code>make send-ETH-anvil</code></td></tr>
<tr><td>Holesky</td><td><code>make send-ETH-base</code></td></tr>
<tr><td>Base</td><td><code>make send-ETH-base</code></td></tr>
</tbody></table>
</div>
<h3 id="72-set-health-factor"><a class="header" href="#72-set-health-factor">7.2. Set Health Factor</a></h3>
<p>Input value to 2 decimal places e.g. 1.25.</p>
<h3 id="72-update-health-factor-target"><a class="header" href="#72-update-health-factor-target">7.2. Update Health Factor Target</a></h3>
<p>Input value to 2 decimal places e.g. 125.</p>
<div class="table-wrapper"><table><thead><tr><th>Chain</th><th>Command</th></tr></thead><tbody>
<tr><td>Anvil</td><td><code>make update-hf-anvil</code></td></tr>
<tr><td>Holesky</td><td><code>make update-hf-base</code></td></tr>
<tr><td>Anvil</td><td><code>make update-hft-anvil</code></td></tr>
<tr><td>Base</td><td><code>make update-hft-base</code></td></tr>
</tbody></table>
</div>
<h2 id="8-build-and-deploy-documentation"><a class="header" href="#8-build-and-deploy-documentation">8. Build and Deploy Documentation</a></h2>
Expand Down
47 changes: 24 additions & 23 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ <h1 id="aavepm---aave-position-manager"><a class="header" href="#aavepm---aave-p
<li><a href="index.html#7-interactions">7. Interactions</a>
<ul>
<li><a href="index.html#71-fund-proxy-with-eth">7.1. Fund proxy with ETH</a></li>
<li><a href="index.html#72-set-health-factor">7.2. Set Health Factor</a></li>
<li><a href="index.html#72-update-health-factor-target">7.2. Update Health Factor Target</a></li>
</ul>
</li>
<li><a href="index.html#8-build-and-deploy-documentation">8. Build and Deploy Documentation</a></li>
Expand Down Expand Up @@ -272,18 +272,19 @@ <h2 id="5-deployment"><a class="header" href="#5-deployment">5. Deployment</a></
<h2 id="6-upgrades"><a class="header" href="#6-upgrades">6. Upgrades</a></h2>
<p>Under development 🏗️</p>
<h2 id="7-interactions"><a class="header" href="#7-interactions">7. Interactions</a></h2>
<p>Interactions are defined in <a href="./script/Interactions.s.sol">Interactions.s.sol</a>.</p>
<h3 id="71-fund-proxy-with-eth"><a class="header" href="#71-fund-proxy-with-eth">7.1. Fund proxy with ETH</a></h3>
<p>Input value in ETH.</p>
<div class="table-wrapper"><table><thead><tr><th>Chain</th><th>Command</th></tr></thead><tbody>
<tr><td>Anvil</td><td><code>make send-ETH-anvil</code></td></tr>
<tr><td>Holesky</td><td><code>make send-ETH-base</code></td></tr>
<tr><td>Base</td><td><code>make send-ETH-base</code></td></tr>
</tbody></table>
</div>
<h3 id="72-set-health-factor"><a class="header" href="#72-set-health-factor">7.2. Set Health Factor</a></h3>
<p>Input value to 2 decimal places e.g. 1.25.</p>
<h3 id="72-update-health-factor-target"><a class="header" href="#72-update-health-factor-target">7.2. Update Health Factor Target</a></h3>
<p>Input value to 2 decimal places e.g. 125.</p>
<div class="table-wrapper"><table><thead><tr><th>Chain</th><th>Command</th></tr></thead><tbody>
<tr><td>Anvil</td><td><code>make update-hf-anvil</code></td></tr>
<tr><td>Holesky</td><td><code>make update-hf-base</code></td></tr>
<tr><td>Anvil</td><td><code>make update-hft-anvil</code></td></tr>
<tr><td>Base</td><td><code>make update-hft-base</code></td></tr>
</tbody></table>
</div>
<h2 id="8-build-and-deploy-documentation"><a class="header" href="#8-build-and-deploy-documentation">8. Build and Deploy Documentation</a></h2>
Expand All @@ -295,7 +296,7 @@ <h2 id="9-license"><a class="header" href="#9-license">9. License</a></h2>
<li><a href="src/interfaces/IAavePM.sol/interface.IAavePM.html">IAavePM</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="iaavepm"><a class="header" href="#iaavepm">IAavePM</a></h1>
<p><a href="https://github.com/EridianAlpha/aave-position-manager/blob/748756aef2351bcf89917e29e49ac39bbb10e08f/src/interfaces/IAavePM.sol">Git Source</a></p>
<p><a href="https://github.com/EridianAlpha/aave-position-manager/blob/02052eb9558d0d945df5cfa39ea2cd97540ce437/src/interfaces/IAavePM.sol">Git Source</a></p>
<p>This interface defines the essential structures and functions for the AavePM contract.</p>
<h2 id="functions"><a class="header" href="#functions">Functions</a></h2>
<h3 id="initialize"><a class="header" href="#initialize">initialize</a></h3>
Expand All @@ -304,7 +305,7 @@ <h3 id="initialize"><a class="header" href="#initialize">initialize</a></h3>
ContractAddress[] memory contractAddresses,
TokenAddress[] memory tokenAddresses,
UniswapV3Pool[] memory uniswapV3Pools,
uint256 initialHealthFactorTarget
uint16 initialHealthFactorTarget
) external;
</code></pre>
<h3 id="updatecontractaddress"><a class="header" href="#updatecontractaddress">updateContractAddress</a></h3>
Expand All @@ -318,7 +319,7 @@ <h3 id="updateuniswapv3pool"><a class="header" href="#updateuniswapv3pool">updat
external;
</code></pre>
<h3 id="updatehealthfactortarget"><a class="header" href="#updatehealthfactortarget">updateHealthFactorTarget</a></h3>
<pre><code class="language-solidity">function updateHealthFactorTarget(uint256 _healthFactorTarget) external;
<pre><code class="language-solidity">function updateHealthFactorTarget(uint16 _healthFactorTarget) external;
</code></pre>
<h3 id="rescueeth"><a class="header" href="#rescueeth">rescueEth</a></h3>
<pre><code class="language-solidity">function rescueEth(address rescueAddress) external;
Expand Down Expand Up @@ -352,10 +353,10 @@ <h3 id="getuniswapv3pool"><a class="header" href="#getuniswapv3pool">getUniswapV
returns (address uniswapV3PoolAddress, uint24 uniswapV3PoolFee);
</code></pre>
<h3 id="gethealthfactortarget"><a class="header" href="#gethealthfactortarget">getHealthFactorTarget</a></h3>
<pre><code class="language-solidity">function getHealthFactorTarget() external view returns (uint256 healthFactorTarget);
<pre><code class="language-solidity">function getHealthFactorTarget() external view returns (uint16 healthFactorTarget);
</code></pre>
<h3 id="gethealthfactortargetminimum"><a class="header" href="#gethealthfactortargetminimum">getHealthFactorTargetMinimum</a></h3>
<pre><code class="language-solidity">function getHealthFactorTargetMinimum() external view returns (uint256 healthFactorTargetMinimum);
<pre><code class="language-solidity">function getHealthFactorTargetMinimum() external view returns (uint16 healthFactorTargetMinimum);
</code></pre>
<h3 id="getcontractbalance"><a class="header" href="#getcontractbalance">getContractBalance</a></h3>
<pre><code class="language-solidity">function getContractBalance(string memory _identifier) external view returns (uint256 contractBalance);
Expand Down Expand Up @@ -386,7 +387,7 @@ <h3 id="uniswapv3poolupdated"><a class="header" href="#uniswapv3poolupdated">Uni
);
</code></pre>
<h3 id="healthfactortargetupdated"><a class="header" href="#healthfactortargetupdated">HealthFactorTargetUpdated</a></h3>
<pre><code class="language-solidity">event HealthFactorTargetUpdated(uint256 previousHealthFactorTarget, uint256 newHealthFactorTarget);
<pre><code class="language-solidity">event HealthFactorTargetUpdated(uint16 previousHealthFactorTarget, uint16 newHealthFactorTarget);
</code></pre>
<h2 id="errors"><a class="header" href="#errors">Errors</a></h2>
<h3 id="aavepm__functiondoesnotexist"><a class="header" href="#aavepm__functiondoesnotexist">AavePM__FunctionDoesNotExist</a></h3>
Expand Down Expand Up @@ -428,7 +429,7 @@ <h3 id="uniswapv3pool"><a class="header" href="#uniswapv3pool">UniswapV3Pool</a>
}
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="aavepm"><a class="header" href="#aavepm">AavePM</a></h1>
<p><a href="https://github.com/EridianAlpha/aave-position-manager/blob/748756aef2351bcf89917e29e49ac39bbb10e08f/src/AavePM.sol">Git Source</a></p>
<p><a href="https://github.com/EridianAlpha/aave-position-manager/blob/02052eb9558d0d945df5cfa39ea2cd97540ce437/src/AavePM.sol">Git Source</a></p>
<p><strong>Inherits:</strong>
<a href="src/AavePM.sol//src/interfaces/IAavePM.sol/interface.IAavePM.html">IAavePM</a>, Initializable, AccessControlUpgradeable, UUPSUpgradeable</p>
<p><strong>Author:</strong>
Expand All @@ -448,7 +449,7 @@ <h3 id="s_uniswapv3pools"><a class="header" href="#s_uniswapv3pools">s_uniswapV3
<pre><code class="language-solidity">mapping(string =&gt; UniswapV3Pool) private s_uniswapV3Pools;
</code></pre>
<h3 id="s_healthfactortarget"><a class="header" href="#s_healthfactortarget">s_healthFactorTarget</a></h3>
<pre><code class="language-solidity">uint256 private s_healthFactorTarget;
<pre><code class="language-solidity">uint16 private s_healthFactorTarget;
</code></pre>
<h3 id="version"><a class="header" href="#version">VERSION</a></h3>
<p>The version of the contract.</p>
Expand All @@ -470,7 +471,7 @@ <h3 id="health_factor_target_minimum"><a class="header" href="#health_factor_tar
<p>The minimum Health Factor target.</p>
<p><em>The value is hardcoded in the contract to prevent the position from being liquidated due to a low target.
A contract upgrade is required to change this value.</em></p>
<pre><code class="language-solidity">uint256 private constant HEALTH_FACTOR_TARGET_MINIMUM = 2;
<pre><code class="language-solidity">uint16 private constant HEALTH_FACTOR_TARGET_MINIMUM = 200;
</code></pre>
<h2 id="functions-1"><a class="header" href="#functions-1">Functions</a></h2>
<h3 id="constructor"><a class="header" href="#constructor">constructor</a></h3>
Expand All @@ -494,7 +495,7 @@ <h3 id="initialize-1"><a class="header" href="#initialize-1">initialize</a></h3>
ContractAddress[] memory contractAddresses,
TokenAddress[] memory tokenAddresses,
UniswapV3Pool[] memory uniswapV3Pools,
uint256 initialHealthFactorTarget
uint16 initialHealthFactorTarget
) public initializer;
</code></pre>
<p><strong>Parameters</strong></p>
Expand All @@ -503,7 +504,7 @@ <h3 id="initialize-1"><a class="header" href="#initialize-1">initialize</a></h3>
<tr><td><code>contractAddresses</code></td><td><code>ContractAddress[]</code></td><td>An array of <code>ContractAddress</code> structures containing addresses of related contracts.</td></tr>
<tr><td><code>tokenAddresses</code></td><td><code>TokenAddress[]</code></td><td>An array of <code>TokenAddress</code> structures containing addresses of relevant ERC-20 tokens.</td></tr>
<tr><td><code>uniswapV3Pools</code></td><td><code>UniswapV3Pool[]</code></td><td>An array of <code>UniswapV3Pool</code> structures containing the address and fee of the UniswapV3 pools.</td></tr>
<tr><td><code>initialHealthFactorTarget</code></td><td><code>uint256</code></td><td>The initial target health factor, used to manage risk.</td></tr>
<tr><td><code>initialHealthFactorTarget</code></td><td><code>uint16</code></td><td>The initial target health factor, used to manage risk.</td></tr>
</tbody></table>
</div>
<h3 id="_authorizeupgrade"><a class="header" href="#_authorizeupgrade">_authorizeUpgrade</a></h3>
Expand Down Expand Up @@ -552,11 +553,11 @@ <h3 id="updatehealthfactortarget-1"><a class="header" href="#updatehealthfactort
<p>Update the Health Factor target.</p>
<p><em>Caller must have <code>OWNER_ROLE</code>.
Emits a <code>HealthFactorTargetUpdated</code> event.</em></p>
<pre><code class="language-solidity">function updateHealthFactorTarget(uint256 _healthFactorTarget) external onlyRole(OWNER_ROLE);
<pre><code class="language-solidity">function updateHealthFactorTarget(uint16 _healthFactorTarget) external onlyRole(OWNER_ROLE);
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>_healthFactorTarget</code></td><td><code>uint256</code></td><td>The new Health Factor target.</td></tr>
<tr><td><code>_healthFactorTarget</code></td><td><code>uint16</code></td><td>The new Health Factor target.</td></tr>
</tbody></table>
</div>
<h3 id="rescueeth-1"><a class="header" href="#rescueeth-1">rescueEth</a></h3>
Expand Down Expand Up @@ -681,21 +682,21 @@ <h3 id="getuniswapv3pool-1"><a class="header" href="#getuniswapv3pool-1">getUnis
<h3 id="gethealthfactortarget-1"><a class="header" href="#gethealthfactortarget-1">getHealthFactorTarget</a></h3>
<p>Getter function to get the Health Factor target.</p>
<p><em>Public function to allow anyone to view the Health Factor target value.</em></p>
<pre><code class="language-solidity">function getHealthFactorTarget() public view returns (uint256 healthFactorTarget);
<pre><code class="language-solidity">function getHealthFactorTarget() public view returns (uint16 healthFactorTarget);
</code></pre>
<p><strong>Returns</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>healthFactorTarget</code></td><td><code>uint256</code></td><td>The Health Factor target.</td></tr>
<tr><td><code>healthFactorTarget</code></td><td><code>uint16</code></td><td>The Health Factor target.</td></tr>
</tbody></table>
</div>
<h3 id="gethealthfactortargetminimum-1"><a class="header" href="#gethealthfactortargetminimum-1">getHealthFactorTargetMinimum</a></h3>
<p>Getter function to get the Health Factor Target minimum.</p>
<p><em>Public function to allow anyone to view the Health Factor Target minimum value.</em></p>
<pre><code class="language-solidity">function getHealthFactorTargetMinimum() public pure returns (uint256 healthFactorTargetMinimum);
<pre><code class="language-solidity">function getHealthFactorTargetMinimum() public pure returns (uint16 healthFactorTargetMinimum);
</code></pre>
<p><strong>Returns</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>healthFactorTargetMinimum</code></td><td><code>uint256</code></td><td>The Health Factor Target minimum value.</td></tr>
<tr><td><code>healthFactorTargetMinimum</code></td><td><code>uint16</code></td><td>The Health Factor Target minimum value.</td></tr>
</tbody></table>
</div>
<h3 id="getcontractbalance-1"><a class="header" href="#getcontractbalance-1">getContractBalance</a></h3>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

Loading

0 comments on commit 2ecf263

Please sign in to comment.