Skip to content

Commit

Permalink
fix: prepare for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaShWoof committed Jan 16, 2025
1 parent 543944c commit 1922b02
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 8 deletions.
10 changes: 10 additions & 0 deletions deployments/linea/usdt/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ async function deployContracts(
],
'linea'
);

// Import shared contracts from cUSDCv3
// const cometAdmin = await deploymentManager.fromDep('cometAdmin', 'linea', 'usdc');
// const cometFactory = await deploymentManager.fromDep('cometFactory', 'linea', 'usdc');
// const $configuratorImpl = await deploymentManager.fromDep('configurator:implementation', 'linea', 'usdc');
// const configurator = await deploymentManager.fromDep('configurator', 'linea', 'usdc');
// const rewards = await deploymentManager.fromDep('rewards', 'linea', 'usdc');
// const bulker = await deploymentManager.fromDep('bulker', 'linea', 'usdc');
// const localTimelock = await deploymentManager.fromDep('timelock', 'linea', 'usdc');
// const bridgeReceiver = await deploymentManager.fromDep('bridgeReceiver', 'linea', 'usdc');

// Deploy LineaBridgeReceiver
const bridgeReceiver = await deploymentManager.deploy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export default migration('1736946439_configurate_and_ens', {
const subdomainHash = ethers.utils.namehash(ENSSubdomain);
const officialMarketsJSON = await ENSResolver.text(subdomainHash, ENSTextRecordKey);
const officialMarkets = JSON.parse(officialMarketsJSON);

// if (!officialMarketsJSON[42161].find(market => market.baseSymbol === 'USDC')){
// officialMarketsJSON[42161].push({ baseSymbol: 'USDC', cometAddress: '<>' });
// }

const updatedMarkets = {
...officialMarkets,
42161: [
Expand Down Expand Up @@ -126,25 +131,25 @@ export default migration('1736946439_configurate_and_ens', {
signature: 'approve(address,uint256)',
calldata: approveCalldata
},
// 3. Bridge USDT from mainnet to Linea Comet
// 5. Bridge USDT from mainnet to Linea Comet
{
contract: lineaL1TokenBridge,
signature: 'bridgeToken(address,uint256,address)',
args: [mainnetUsdtAddress, USDTAmountToBridge, comet.address]
},
// 4. Approve the COMP gateway to take Timelock's COMP for bridging
// 6. Approve the COMP gateway to take Timelock's COMP for bridging
{
contract: COMP,
signature: 'approve(address,uint256)',
args: [lineaL1TokenBridge.address, COMPAmountToBridge]
},
// 5. Bridge COMP from mainnet to Linea rewards
// 7. Bridge COMP from mainnet to Linea rewards
{
contract: lineaL1TokenBridge,
signature: 'bridgeToken(address,uint256,address)',
args: [COMP.address, COMPAmountToBridge, rewards.address]
},
// 6. Update the list of official markets
// 8. Update the list of official markets
{
target: ENSResolverAddress,
signature: 'setText(bytes32,string,string)',
Expand Down Expand Up @@ -294,6 +299,10 @@ export default migration('1736946439_configurate_and_ens', {
},
],
42161: [
// {
// baseSymbol: 'USDC',
// cometAddress: '<>',
// },
{
baseSymbol: 'USDT',
cometAddress: comet.address,
Expand Down
10 changes: 10 additions & 0 deletions deployments/linea/weth/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ async function deployContracts(
],
'linea'
);

// Import shared contracts from cUSDCv3
// const cometAdmin = await deploymentManager.fromDep('cometAdmin', 'linea', 'usdc');
// const cometFactory = await deploymentManager.fromDep('cometFactory', 'linea', 'usdc');
// const $configuratorImpl = await deploymentManager.fromDep('configurator:implementation', 'linea', 'usdc');
// const configurator = await deploymentManager.fromDep('configurator', 'linea', 'usdc');
// const rewards = await deploymentManager.fromDep('rewards', 'linea', 'usdc');
// const bulker = await deploymentManager.fromDep('bulker', 'linea', 'usdc');
// const localTimelock = await deploymentManager.fromDep('timelock', 'linea', 'usdc');
// const bridgeReceiver = await deploymentManager.fromDep('bridgeReceiver', 'linea', 'usdc');

// Deploy LineaBridgeReceiver
const bridgeReceiver = await deploymentManager.deploy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ export default migration('1737020138_configurate_and_ens', {
const subdomainHash = ethers.utils.namehash(ENSSubdomain);
const officialMarketsJSON = await ENSResolver.text(subdomainHash, ENSTextRecordKey);
const officialMarkets = JSON.parse(officialMarketsJSON);

// if (!officialMarketsJSON[42161].find(market => market.baseSymbol === 'USDC')){
// officialMarketsJSON[42161].push({ baseSymbol: 'USDC', cometAddress: '<>' });
// }

// if (!officialMarketsJSON[42161].find(market => market.baseSymbol === 'USDT')){
// officialMarketsJSON[42161].push({ baseSymbol: 'USDT', cometAddress: '<>' });
// }

const updatedMarkets = {
...officialMarkets,
42161: [
Expand All @@ -93,7 +102,7 @@ export default migration('1737020138_configurate_and_ens', {
}
],
};
// 200 000000000000000000

const mainnetActions = [
// 1. Set Comet configuration and deployAndUpgradeTo new Comet on Linea.
{
Expand All @@ -102,19 +111,19 @@ export default migration('1737020138_configurate_and_ens', {
args: [bridgeReceiver.address, 0, l2ProposalData],
value: WETHAmountToBridge
},
// 4. Approve the COMP gateway to take Timelock's COMP for bridging
// 2. Approve the COMP gateway to take Timelock's COMP for bridging
{
contract: COMP,
signature: 'approve(address,uint256)',
args: [lineaL1TokenBridge.address, COMPAmountToBridge]
},
// 5. Bridge COMP from mainnet to Linea rewards
// 3. Bridge COMP from mainnet to Linea rewards
{
contract: lineaL1TokenBridge,
signature: 'bridgeToken(address,uint256,address)',
args: [COMP.address, COMPAmountToBridge, rewards.address]
},
// 6. Update the list of official markets
// 4. Update the list of official markets
{
target: ENSResolverAddress,
signature: 'setText(bytes32,string,string)',
Expand Down Expand Up @@ -270,6 +279,14 @@ export default migration('1737020138_configurate_and_ens', {
},
],
42161: [
// {
// baseSymbol: 'USDC',
// cometAddress: '<>',
// },
// {
// baseSymbol: 'USDT',
// cometAddress: '<>',
// },
{
baseSymbol: 'WETH',
cometAddress: comet.address,
Expand Down

0 comments on commit 1922b02

Please sign in to comment.