Skip to content

Commit

Permalink
chg: update contract and test
Browse files Browse the repository at this point in the history
  • Loading branch information
twygod committed Mar 26, 2024
1 parent a4a5f81 commit cf09374
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions contracts/mocks/FaucetERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
pragma solidity 0.8.16;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Test} from "forge-std/Test.sol";

contract FaucetERC20 is ERC20, Test {
// import {Test} from "forge-std/Test.sol";

contract FaucetERC20 is ERC20 {
constructor(string memory name, string memory symbol) ERC20(name, symbol) {}

function mint(address to, uint256 value) public returns (bool) {
Expand All @@ -19,6 +20,7 @@ contract FaucetERC20 is ERC20, Test {
}

function decimals() public view override returns (uint8) {
return uint8(vm.envUint("DECIMALS"));
return 6;
//return uint8(vm.envUint("DECIMALS"));
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"hh:sim": "yarn hardhat test --config hardhat-sim.config.ts",
"task": "yarn hardhat --config hardhat-task.config.ts",
"f:compile": "forge build",
"f:test": "DECIMALS=6 forge test -vvv",
"f:test": "forge test -vvv",
"clean": "forge clean && yarn hardhat clean && rm -rf ./typechain-types",
"coverage": "./run-coverage.sh",
"deploy:op": "yarn clean && yarn hardhat compile && CONFIG=optimism-goerli yarn hardhat --config hardhat-task.config.ts deploy:op --network optimism-goerli",
Expand Down
3 changes: 2 additions & 1 deletion test/foundry/TestWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ contract TestWrapper is Test {
MarketRegistryMock public marketRegistryMock;
UserManagerMock public userManagerMock;
FixedInterestRateModelMock public interestRateMock;
uint256 public UNIT = 10 ** uint8(vm.envUint("DECIMALS"));
// uint256 public UNIT = 10 ** uint8(vm.envUint("DECIMALS"));
uint256 public UNIT = 1e6;

function deployProxy(address implementation, bytes memory signature) public returns (address) {
ERC1967Proxy proxy = new ERC1967Proxy(implementation, signature);
Expand Down

0 comments on commit cf09374

Please sign in to comment.