Skip to content

Commit

Permalink
fix formatting for comptroller and redeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tkkwon1998 committed Oct 9, 2023
1 parent af48617 commit 29d4df5
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 512 deletions.
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "solhint:recommended",
"rules": {
"quotes": ["error", "double"],
"max-line-length": ["error", 200],
"max-line-length": ["error", 500],
"compiler-version": ["error", "^0.8.0"],
"reason-string": ["warn", { "maxLength": 128 }],
"not-rely-on-block-hash": "off",
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const config: HardhatUserConfig = {
tags: ["Deployment"],
},
canto_livenet: {
url: "",
url: "https://mainnode.plexnode.org:8545",
accounts: [process.env.PRIVATE_KEY],
},
new_testnet: {
Expand Down
45 changes: 25 additions & 20 deletions script/RWA/deployRWA.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,34 @@ const mainnet = {
};

async function main() {
const ComptrollerFactory = await ethers.getContractFactory("Comptroller");
const cRWA = await ethers.getContractFactory("CRWAToken");
const cERC20Delegator = await ethers.getContractFactory("cERC20Delegator");
const ComptrollerFactoryV2 = await ethers.getContractFactory(
"ComptrollerV2"
);
// const cRWA = await ethers.getContractFactory("CRWAToken");
// const cERC20Delegator = await ethers.getContractFactory("CErc20Delegator");

// deploy comptroller with updated max collateral factor
const comptroller = await (await ComptrollerFactory.deploy()).deployed();

// deploy cRWA token and the delegator
const cRWAToken = await (await cRWA.deploy()).deployed();
const cUSYC = await (
await cERC20Delegator.deploy(
mainnet.USYC, // underlying
mainnet.unitroller, // comptroller
mainnet.jumpRateModel, // interest rate model
1, // initial exchange rate
"cUSYC", // name
"cUSYC", // symbol
6, // decimals
"ADMIN", // admin
cRWAToken.address, // implementation
"BYTES" // become implementation data
)
const comptrollerV2 = await (
await ComptrollerFactoryV2.deploy()
).deployed();
console.log("Comptroller deployed to:", comptrollerV2.address);

// // deploy cRWA token and the delegator
// const cRWAToken = await (await cRWA.deploy()).deployed();
// const cUSYC = await (
// await cERC20Delegator.deploy(
// mainnet.USYC, // underlying
// mainnet.unitroller, // comptroller
// mainnet.jumpRateModel, // interest rate model
// 1, // initial exchange rate
// "cUSYC", // name
// "cUSYC", // symbol
// 6, // decimals
// "ADMIN", // admin
// cRWAToken.address, // implementation
// "BYTES" // become implementation data
// )
// ).deployed();
}

main()
Expand Down
Loading

0 comments on commit 29d4df5

Please sign in to comment.