diff --git a/README.md b/README.md index d6eeea3..cbae768 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Aldex Contracts +## Old repo (contains issues/releases that were not migrated) + +[Previous repo](https://github.com/alpaca-finance/aldex-contracts) + ## Get Started [Environment setup](https://alpacafinance.atlassian.net/wiki/spaces/ALDEX/pages/9109505/Environment+setup) @@ -28,42 +32,3 @@ - x - Major (protocol api significant change, for example when a roadmap milestone acomplished) - y - Minor (may have some minor api changes and deployment script changes) - z - Patch (bugfix/optimization that doesn't affect deployment script/api) - -NOTE: In an agile development we will do at least one Patch-level release each sprint. - -### How to Deploy Aldex Contracts on FORK - -important -``` -use .mainnet.empty.json as initial file to update contracts information while deploy - -define env value - -FORK_RPC_URL= -IMPERSONATE_ACCOUNT= -``` - -note -``` -if found `failed ProviderError: resource not found` try remove `.mainnet.json` in `.openzeppelin` -``` - -1. run `yarn compile` if contracts is already compiled with stabled code, you can skip this step -2. run `yarn deploy:aldex-core`\ - deploy Libraries, AldexDeployer, AldexBank, Ausd, AldexBankConfig, ConcentratedLiquidityPoolFactory, etc.. -3. run `yarn deploy:oracle`\ - deploy ChainlinkPriceOracle, OracleChecker, setChainlinkPriceOracle on AldexBankConfig, setOracleChecker on AldexBank -4. run `yarn deploy:strategy-outside-swap`\ - deploy UniswapV3StrategyOutsideSwap and whitelist on AldexBank -5. run `yarn deploy:concentrated-pool`\ - deploy cl pools with custom inputs variable inside `concentrated-liquidity-pool.ts` -6. run `yarn deploy:concentrated-pool-helper` - -### How to set config on contract - -7. run `yarn config:set-oracle-checker-config`\ - set expired time and tolerance bps per token -8. run `yarn config:set-oracle-prices`\ - set price via chainlink address per token -9. run `yarn config:update-ausd-max-debt-limit` - set max debt per token on AldexBank diff --git a/contracts/v0.8.17/extras/ERC20FakeToken.sol b/contracts/v0.8.17/extras/ERC20FakeToken.sol new file mode 100644 index 0000000..0a04b94 --- /dev/null +++ b/contracts/v0.8.17/extras/ERC20FakeToken.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ERC20 } from "../../../lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; + +contract FakeERC20 is ERC20 { + address private owner; + + constructor(string memory name, string memory symbol) ERC20(name, symbol) { + owner = _msgSender(); + } + + function mint(address _to, uint256 _amount) external { + require(_msgSender() == owner, "Security violation"); + _mint(_to, _amount); + } + + function burn(address _account, uint256 _amount) external { + require(_msgSender() == owner, "Security violation"); + _burn(_account, _amount); + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index f2bfa0c..969111b 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -46,6 +46,7 @@ const config: HardhatUserConfig = { "tests", "pool", "strategies", + "extras", ], }, solidity: {