Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squash Unichain Mainnet USDC #122

Open
wants to merge 83 commits into
base: squash-unichain-mainnet
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
bba7d99
feat: create comet with extended asset list
MishaShWoof Aug 9, 2024
fc16ae0
feat: move new cometExt to its own contract
MishaShWoof Aug 12, 2024
6b62ee6
fix: clean up
MishaShWoof Aug 12, 2024
d06a3f6
fix: gas optimization
MishaShWoof Aug 12, 2024
d2873ad
fix: more gas optimization
MishaShWoof Aug 12, 2024
5e867a0
fix: linter fix
MishaShWoof Aug 12, 2024
8ab1786
fix: natspec
MishaShWoof Aug 12, 2024
171eb7a
fix: more natspec
MishaShWoof Aug 12, 2024
53f1513
Update index.ts
MishaShWoof Aug 23, 2024
8df38e6
fix: remove unused iterface
MishaShWoof Aug 26, 2024
70e8a73
feat: add prepare and enact for simulation
MishaShWoof Aug 26, 2024
4c0a8f4
fix: fix to workflow
MishaShWoof Aug 26, 2024
c29f4b9
Update enact-migration.yaml
MishaShWoof Aug 26, 2024
cf08c19
fix: reverse
MishaShWoof Aug 26, 2024
71fee7b
feat: add prepare and enact workflow
MishaShWoof Aug 26, 2024
57d04f7
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
f0c33a1
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
df2d152
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
92937aa
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
b72092c
fix: remove verification from simulatative migration
MishaShWoof Aug 27, 2024
ea15450
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
MishaShWoof Sep 17, 2024
dfe98c9
feat: fixes after audit
MishaShWoof Sep 19, 2024
4f2ba04
fix: working tests
MishaShWoof Sep 19, 2024
e641f95
fix: no network issue resolved
MishaShWoof Dec 13, 2024
986efa2
Merge branch 'main' into woof-software/collateral-extension
MishaShWoof Dec 20, 2024
5c75787
fix: audit fixes
MishaShWoof Dec 23, 2024
4e41a94
fix
MishaShWoof Dec 23, 2024
547e934
Merge branch 'woof-software/fix-to-no-network' of github.com:woof-sof…
MishaShWoof Dec 23, 2024
6635049
feat: working scenarios
MishaShWoof Dec 26, 2024
4ba3b92
feat: migrations and working scenarios
MishaShWoof Dec 27, 2024
c792011
fix
MishaShWoof Dec 27, 2024
9d67b33
fix: secret fix for scroll
MishaShWoof Dec 27, 2024
978dec0
fix: increase arbitrary number
MishaShWoof Dec 27, 2024
b6fb6a2
fix: scroll scan fix
MishaShWoof Dec 27, 2024
6a7f18a
feat: migrations and descriptions
MishaShWoof Jan 6, 2025
d7d9c2c
fix
MishaShWoof Jan 6, 2025
262fb3b
update descriptions
dmitriy-woof-software Jan 14, 2025
1b4307b
fix
MishaShWoof Jan 14, 2025
2381830
fix: review fix
MishaShWoof Jan 14, 2025
40e0370
fix: naming fix
MishaShWoof Jan 14, 2025
fb9f9b5
fix: optimizer
MishaShWoof Jan 14, 2025
f4860cf
fix: second optimizer fix
MishaShWoof Jan 14, 2025
94131ad
fix: optimization
MishaShWoof Jan 15, 2025
b6ff78e
Merge pull request #100 from woof-software/woof-software/collateral-e…
MishaShWoof Jan 17, 2025
5fe26a2
fix: merge fix
MishaShWoof Jan 17, 2025
d3522dc
fix: extension delegate fix and linter fix
MishaShWoof Jan 23, 2025
d8ac7a5
feat: add force push for ext deployment
dmitriy-woof-software Jan 28, 2025
370f22a
fix: clean up debug
MishaShWoof Jan 28, 2025
4351754
Modified migration from GitHub Actions
Jan 28, 2025
56e20cc
fix: fixes after audit
MishaShWoof Jan 30, 2025
7e9df6c
feat: unichain-testnet
MishaShWoof Feb 4, 2025
ae82bb2
squash 24 collaterals
MishaShWoof Feb 7, 2025
7521336
Merge branch 'squash-unichain-sepolia' of github.com:woof-software/co…
MishaShWoof Feb 7, 2025
d196a86
wip
MishaShWoof Feb 7, 2025
7655616
feat: unichain usdc
MishaShWoof Feb 11, 2025
edc43d7
Merge branch 'squash-unichain-mainnet' of github.com:woof-software/co…
MishaShWoof Feb 11, 2025
f657b7c
fix
MishaShWoof Feb 11, 2025
431e6e1
fix
MishaShWoof Feb 11, 2025
b4b9004
fix: workflow
MishaShWoof Feb 11, 2025
7a79118
feat: description
MishaShWoof Feb 11, 2025
c2f4205
remove uni testnet
MishaShWoof Feb 12, 2025
2c412fd
fix: linter
MishaShWoof Feb 12, 2025
05f3c79
fix: review fixes
MishaShWoof Feb 14, 2025
2f43ee4
feat: specs from gauntlet
MishaShWoof Feb 17, 2025
fcf19d1
fix: review fix
MishaShWoof Feb 18, 2025
898c178
feat: update version of hayesgm/seacrest to support unichain
dmitriy-woof-software Feb 18, 2025
30651ae
clean up PR
dmitriy-woof-software Feb 18, 2025
d30cd80
clean up PR
dmitriy-woof-software Feb 18, 2025
7942c6e
Modified deployment roots from GitHub Actions
Feb 18, 2025
b414c9d
feat: update description, caps and speeds
dmitriy-woof-software Feb 18, 2025
14847bd
fix: verification and reward scenario fix
MishaShWoof Feb 19, 2025
f82afac
Add usds on base and wbtc on mainnet roots (#968)
dmitriy-woof-software Feb 24, 2025
ffd68b7
Add linea USDC roots (#969)
dmitriy-woof-software Feb 25, 2025
2ec6b45
Update LICENSE (#960)
maximevtush Feb 25, 2025
980f128
fix: audit fixes
MishaShWoof Feb 27, 2025
e155e64
fix: update description
MishaShWoof Feb 27, 2025
ca88508
Modified migration from GitHub Actions
Feb 27, 2025
059c119
Сomet with extended asset list (#904)
MishaShWoof Mar 6, 2025
e270b2a
Add Unichain USDC roots (#971)
dmitriy-woof-software Mar 6, 2025
12ff0d1
Proposal for Base USDS market (#959)
MishaShWoof Mar 7, 2025
2a132d2
Deploy WBTC market on Mainnet (#954)
MishaShWoof Mar 7, 2025
1b62da7
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
dmitriy-woof-software Mar 7, 2025
38864f5
CCTP
MishaShWoof Mar 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: review fixes
  • Loading branch information
MishaShWoof committed Feb 14, 2025
commit 05f3c799ada91208737d7b2959ee1f932116e283
75 changes: 0 additions & 75 deletions contracts/IGovernorTestnet.sol

This file was deleted.

4 changes: 1 addition & 3 deletions deployments/sepolia/usdc/roots.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,5 @@
"configurator": "0xc28aD44975C614EaBe0Ed090207314549e1c6624",
"rewards": "0x8bF5b658bdF0388E8b482ED51B14aef58f90abfD",
"fauceteer": "0x68793eA49297eB75DFB4610B68e076D2A5c7646C",
"bulker": "0x157c001bb1F8b33743B14483Be111C961d8e11dE",
"unichainSepoliaL1CrossDomainMessenger": "0x448A37330A60494E666F6DD60aD48d930AEbA381",
"unichainSepoliaL1StandardBridge": "0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"
"bulker": "0x157c001bb1F8b33743B14483Be111C961d8e11dE"
}
2 changes: 1 addition & 1 deletion deployments/unichain/usdc/configuration.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"borrowMin": "0.01e6",
"storeFrontPriceFactor": 0.6,
"targetReserves": "5_000_000e6",
"pauseGuardian": "",
"pauseGuardian": "0x6784FC9e931D7d5B1075e665A4016c299ee6C31B",
"rates": {
"borrowBase": 0.015,
"borrowSlopeLow": 0.0333,
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ import {
proposal,
} from '../../../../src/deploy';
import { expect } from 'chai';
import { utils } from 'ethers';
import { forkedHreForBase } from '../../../../plugins/scenario/utils/hreForBase';
import { utils, Contract, constants } from 'ethers';
import { diffState, getCometConfig } from '../../../../plugins/deployment_manager/DiffState';

const ENSName = 'compound-community-licenses.eth';
@@ -34,7 +35,6 @@ export default migration('1727774346_configurate_and_ens', {
bridgeReceiver,
comet,
cometAdmin,
cometFactory,
configurator,
rewards,
COMP: COMP_L2,
@@ -68,12 +68,6 @@ export default migration('1727774346_configurate_and_ens', {
}

const configuration = await getConfigurationStruct(deploymentManager);
const setFactoryCalldata = await calldata(
configurator.populateTransaction.setFactory(
comet.address,
cometFactory.address
)
);
const setConfigurationCalldata = await calldata(
configurator.populateTransaction.setConfiguration(
comet.address,
@@ -93,20 +87,17 @@ export default migration('1727774346_configurate_and_ens', {
['address[]', 'uint256[]', 'string[]', 'bytes[]'],
[
[
configurator.address,
configurator.address,
cometAdmin.address,
rewards.address,
],
[0, 0, 0, 0],
[0, 0, 0],
[
'setFactory(address,address)',
'setConfiguration(address,(address,address,address,address,address,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint104,uint104,uint104,(address,address,uint8,uint64,uint64,uint64,uint128)[]))',
'deployAndUpgradeTo(address,address)',
'setRewardConfig(address,address)'
],
[
setFactoryCalldata,
setConfigurationCalldata,
deployAndUpgradeToCalldata,
setRewardConfigCalldata
@@ -225,6 +216,44 @@ export default migration('1727774346_configurate_and_ens', {
expect(config.token.toLowerCase()).to.be.equal(COMP.address.toLowerCase());
expect(config.rescaleFactor).to.be.equal(exp(1, 12));
expect(config.shouldUpscale).to.be.equal(true);

const cometNew = new Contract(
comet.address,
[
'function assetList() external view returns (address)',
],
await deploymentManager.getSigner()
);

const assetListAddress = await cometNew.assetList();

expect(assetListAddress).to.not.be.equal(constants.AddressZero);

const pauseGuardian = new Contract(
await comet.pauseGuardian(),
[
'function getOwners() external view returns (address[] memory)',
],
await deploymentManager.getSigner()
);

const hreMainnet = await forkedHreForBase({ name: '', network: 'mainnet', deployment: '' });
const dm = new DeploymentManager('mainnet', 'usdc', hreMainnet);

const cometMainnet = await dm.contract('comet') as Contract;
const guardian = await cometMainnet.pauseGuardian();
const GnosisSafeContract = new Contract(
guardian,
[
'function getOwners() external view returns (address[] memory)',
],
await dm.getSigner()
);
const ownersMainnet = await GnosisSafeContract.getOwners();

const owners = await pauseGuardian.getOwners();
expect(owners).to.deep.equal(ownersMainnet);
expect(owners.length).to.not.be.equal(0);

// 1.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add checks:

  • 24 collaterals comet
  • Bridge receiver is initialized

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Addresses in pauseGauardian should be the same as on Mainnet

expect(await COMP.balanceOf(rewards.address)).to.be.equal(COMPAmountToBridge);
18 changes: 10 additions & 8 deletions scripts/clone-multisig.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import hre from 'hardhat';
import { DeploymentManager } from '../plugins/deployment_manager/DeploymentManager';
import { SafeFactory } from '@safe-global/safe-core-sdk';
import EthersAdapter from '@safe-global/safe-ethers-lib';
import { nonForkedHreForBase, forkedHreForBase } from '../plugins/scenario/utils/hreForBase';
import { ethers } from 'ethers';
import type { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';

const SRC_NETWORK = process.env['SRC_NETWORK'] ?? 'mainnet';
const DST_NETWORK = process.env['DST_NETWORK'] ?? 'hardhat';

async function main() {
await hre.changeNetwork(SRC_NETWORK);
const hreSRC = await forkedHreForBase({ name: SRC_NETWORK, network: SRC_NETWORK, deployment: '' });

const dm = new DeploymentManager(SRC_NETWORK, 'usdc', hre);
const dm = new DeploymentManager(SRC_NETWORK, 'usdc', hreSRC);

const signer_ = await dm.getSigner();
const comet = await dm.contract('comet');
const guardian = await comet.pauseGuardian();

@@ -20,17 +21,18 @@ async function main() {
{'constant':true,'inputs':[],'name':'getOwners','outputs':[{'internalType':'address[]','name':'','type':'address[]'}],'payable':false,'stateMutability':'view','type':'function'},
{'constant':true,'inputs':[],'name':'getThreshold','outputs':[{'internalType':'uint256','name':'','type':'uint256'}],'payable':false,'stateMutability':'view','type':'function'},
];
const GnosisSafeContract = new hre.ethers.Contract(guardian, GnosisABI, hre.ethers.provider);
const GnosisSafeContract = new hreSRC.ethers.Contract(guardian, GnosisABI, hreSRC.ethers.provider);
const owners = await GnosisSafeContract.getOwners();
const threshold = await GnosisSafeContract.getThreshold();
const safeAccountConfig = { owners: owners, threshold: threshold};
console.log(safeAccountConfig);
console.log(guardian);

await hre.changeNetwork(DST_NETWORK);
const hreDST = await nonForkedHreForBase({ name: '', network: DST_NETWORK, deployment: '' });
const wallet = new ethers.Wallet(process.env.ETH_PK!, hreDST.ethers.provider);
const signer: SignerWithAddress = wallet as unknown as SignerWithAddress;

const signer = await hre.ethers.provider.getSigner(signer_.address);
const ethAdapter = new EthersAdapter({ ethers: hre.ethers, signerOrProvider: signer });
const ethAdapter = new EthersAdapter({ ethers: hreDST.ethers, signerOrProvider: signer });
const safeFactory = await SafeFactory.create({ ethAdapter: ethAdapter });
const safeSdk = await safeFactory.deploySafe({ safeAccountConfig });
console.log(safeSdk);
Loading