-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test +account-abstraction submodule + test contracts
- Loading branch information
1 parent
be93d6c
commit 6f59d52
Showing
10 changed files
with
452 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,5 @@ typechain-types | |
#Hardhat files | ||
cache | ||
artifacts | ||
account-abstraction | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "account-abstraction"] | ||
path = account-abstraction | ||
url = https://github.com/eth-infinitism/account-abstraction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ coverage | |
walletUtils.* | ||
coverage.json | ||
arguments.js | ||
typings/ | ||
typings/ | ||
account-abstraction |
Submodule account-abstraction
added at
abff2a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; | ||
|
||
//@review againsnt chainlink reference PriceConverter https://docs.chain.link/docs/get-the-latest-price/ | ||
//@review decimals for individual feeds | ||
contract MockPriceFeed { | ||
AggregatorV3Interface internal priceFeed1; | ||
AggregatorV3Interface internal priceFeed2; | ||
|
||
constructor() { | ||
// todo // do not hard code // polygon values | ||
priceFeed1 = AggregatorV3Interface( | ||
0xAB594600376Ec9fD91F8e885dADF0CE036862dE0 | ||
); // matic usd | ||
priceFeed2 = AggregatorV3Interface( | ||
0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7 | ||
); // usdc usd | ||
} | ||
|
||
function decimals() public view returns (uint8) { | ||
return 18; | ||
} | ||
|
||
function getThePrice() public view returns (int) { | ||
// Always using decimals 18 for derived price feeds | ||
int usdcMatic = 1043 * 1e15; | ||
return usdcMatic; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.