How can I manipulate asset prices in a test/forked environment to test out a liquidation contract?
- undefined Aave
How can I manipulate asset prices in a test/forked environment to test out an Aave liquidation contract?
Answers 1
These are the steps to update an asset oracle: 1. Deploy a mock oracle with the new price passed by constructor 2. Call to AaveOracle contract to the method `setAssetSources` with the underlying asset address and the new MockAggregator contract address; *1. Mock aggregator [code](https://github.com/aave/aave-v3-core/blob/1aae831f9c25f6dbfe30770b69fbe74366bdbb32/contracts/mocks/oracle/CLAggregators/MockAggregator.sol ); *2. [Method ](https://github.com/aave/aave-v3-core/blob/e0bfed13240adeb7f05cb6cbe5e7ce78657f0621/contracts/misc/AaveOracle.sol#L64)`setAssetSouces `at Aave Oracle;