Closed pedrovalido closed 1 year ago
@DaigaroCota @brozorec please verify the failing tests are not due to the the oracle
FYI @DaigaroCota I noticed the oracle wasnt a public var and I need it in the liquidation manager tests. So, had to do one more change.
@pedrovalido the following tests should not be failing. This is lower priority than any issue related to audits.
In the ConnextRouter.t.sol tests (both on Goerli and OptimismGoerli) I believe this is because the test tDAI address is not the same as the address set up in the oracle. Please check. This is the returned error "FujiOracle__noPriceFeed()"
Encountered 4 failing tests in test/forking/goerli/ConnextRouter.t.sol:ConnextRouterForkingTest [FAIL. Reason: Log != expected log] test_bridgeInbound() (gas: 1201057) [FAIL. Reason: Log != expected log] test_bridgeSlippageInbound() (gas: 1210521) [FAIL. Reason: Log != expected log] test_depositAndBorrowaAndTransfer() (gas: 585251) [FAIL. Reason: Assertion failed.] test_retryFailedInboundXReceive() (gas: 1386747)
Encountered 3 failing tests in test/forking/optimism-goerli/ConnextRouter.t.sol:ConnextRouterForkingTest [FAIL. Reason: Log != expected log] test_bridgeInbound() (gas: 1177240) [FAIL. Reason: Log != expected log] test_bridgeSlippageInbound() (gas: 1201656) [FAIL. Reason: Log != expected log] test_depositAndBorrowaAndTransfer() (gas: 584880)
The setup was not updated, see: https://github.com/Fujicracy/fuji-v2/blob/9ba9889d4f707ea094f4a72df05100a8a5eca00f/packages/protocol/test/forking/polygon/SimpleRouter.t.sol#L56 https://github.com/Fujicracy/fuji-v2/blob/9ba9889d4f707ea094f4a72df05100a8a5eca00f/packages/protocol/test/forking/polygon/SimpleRouter.t.sol#L64
Also ensure the test passes after updates.
Encountered 1 failing test in test/forking/polygon/SimpleRouter.t.sol:SimpleRouterForkingTest [FAIL. Reason: Setup failed: EvmError: Revert] setUp() (gas: 0)
@DaigaroCota The issue has been fixed and the same tests that are passing on main are now passing on this branch. Let me know if I should change anything else
As discussed in the issue, a ChainlinkFeeds.sol was added and ForkingSetup inherits from it. In this added contract, there is info about both the erc20 tokens and the chainlink feeds addresses, correlating to each domain. Side note: the option 1 was taken( domain->assets[] and domain->priceFeeds). This way, setting the FujiOracle is easier in the ForkingSetup.