Skip to content

Commit

Permalink
USDT fork from mainnet for better consistent scenario cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Wang committed Aug 30, 2023
1 parent 6c6e5bf commit e791775
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion deployments/goerli/usdt/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "Compound USDT",
"symbol": "cUSDTv3",
"baseToken": "USDT",
"baseTokenAddress": "0x79C950C7446B234a6Ad53B908fBF342b01c4d446",
"baseTokenPriceFeed": "0xAb5c49580294Aff77670F839ea425f5b78ab3Ae7",
"borrowMin": "10e6",
"governor": "0x8Fa336EB4bF58Cfc508dEA1B0aeC7336f55B1399",
Expand Down
8 changes: 7 additions & 1 deletion deployments/goerli/usdt/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { Deployed, DeploymentManager } from '../../../plugins/deployment_manager';
import { debug, DeploySpec, deployComet, exp, sameAddress, wait } from '../../../src/deploy';

const clone = {
usdt: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
};

export default async function deploy(deploymentManager: DeploymentManager, deploySpec: DeploySpec): Promise<Deployed> {
const ethers = deploymentManager.hre.ethers;
const signer = await deploymentManager.getSigner();

// Clone/fork USDT from mainnet which is non-standard erc20 to testnet
const USDT = await deploymentManager.clone('USDT', clone.usdt, [100_000_000_000_000, 'Tether USD', 'USDT', 6]);

// Declare existing assets as aliases
const USDT = await deploymentManager.existing('USDT', '0x79C950C7446B234a6Ad53B908fBF342b01c4d446', 'goerli');
const COMP = await deploymentManager.existing('COMP', '0x3587b2F7E0E2D6166d6C14230e7Fe160252B0ba4', 'goerli');
const WBTC = await deploymentManager.existing('WBTC', '0xAAD4992D949f9214458594dF92B44165Fb84dC19', 'goerli');
const WETH = await deploymentManager.existing('WETH', '0x42a71137C09AE83D8d05974960fd607d40033499', 'goerli');
Expand Down

0 comments on commit e791775

Please sign in to comment.