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

feat: Update CrossChainController implementation and CCIP adapters #246

Merged
merged 10 commits into from
Mar 21, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {MiscArbitrum} from 'aave-address-book/MiscArbitrum.sol';
import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol';
import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdatePayload.sol';

/**
* @title aDI and bridge adapters update
* @author BGD Labs @bgdlabs
* - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21
*/
contract AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313 is
BaseCCCImplementationUpdatePayload(
BaseCCCImplementationUpdatePayload.CCCImplementationUpdateInput({
ccc: GovernanceV3Arbitrum.CROSS_CHAIN_CONTROLLER,
proxyAdmin: MiscArbitrum.PROXY_ADMIN,
newCCCImplementation: 0x6e633269af45F37c44659D98f382dd0DD524E5Df
})
)
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {MiscArbitrum} from 'aave-address-book/MiscArbitrum.sol';
import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol';

import {AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313.sol';
import {BaseCCCImplementationUpdatePayloadTest} from './BaseCCCImplementationUpdatePayloadTest.sol';

/**
* @dev Test for AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313
* command: make test-contract filter=AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313
*/
contract AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313_Test is
BaseCCCImplementationUpdatePayloadTest(
GovernanceV3Arbitrum.CROSS_CHAIN_CONTROLLER,
MiscArbitrum.PROXY_ADMIN,
type(AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313).creationCode,
'arbitrum',
189596312
)
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {ChainIds} from 'aave-helpers/ChainIds.sol';
import {MiscAvalanche} from 'aave-address-book/MiscAvalanche.sol';
import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol';
import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol';

/**
* @title aDI and bridge adapters update
* @author BGD Labs @bgdlabs
* - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21
*/
contract AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313 is
BaseAdaptersUpdatePayload(
BaseAdaptersUpdatePayload.ConstructorInput({
ccc: GovernanceV3Avalanche.CROSS_CHAIN_CONTROLLER,
proxyAdmin: MiscAvalanche.PROXY_ADMIN,
newCCCImplementation: 0x5Ef80c5eB6CF65Dab8cD1C0ee258a6D2bD38Bd22,
ccipNewAdapter: 0x2b88C83727B0E290B76EB3F6133994fF81B7f355,
ccipAdapterToRemove: 0x3F006299eC88985c18E6e885EeA29A49eC579882
})
)
{
function getChainsToReceive() public pure override returns (uint256[] memory) {
uint256[] memory chains = new uint256[](1);
chains[0] = ChainIds.MAINNET;
return chains;
}

function getDestinationAdapters()
public
pure
override
returns (DestinationAdaptersInput[] memory)
{
DestinationAdaptersInput[] memory destinationAdapters = new DestinationAdaptersInput[](1);

destinationAdapters[0].adapter = 0xB7a6618df58626C3a122ABAFD6Ee63Af63f3Ef29;
destinationAdapters[0].chainId = ChainIds.MAINNET;

return destinationAdapters;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Avalanche} from 'aave-address-book/AaveV3Avalanche.sol';
import {MiscAvalanche} from 'aave-address-book/MiscAvalanche.sol';
import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';

import './BaseTest.sol';

import {AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313.sol';

/**
* @dev Test for AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313
* command: make test-contract filter=AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313
*/
contract AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313_Test is BaseTest {
constructor()
BaseTest(
GovernanceV3Avalanche.CROSS_CHAIN_CONTROLLER,
MiscAvalanche.PROXY_ADMIN,
type(AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313).creationCode,
'avalanche',
42801819
)
{}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {ChainIds} from 'aave-helpers/ChainIds.sol';
import {MiscBNB} from 'aave-address-book/MiscBNB.sol';
import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol';
import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol';

/**
* @title aDI and bridge adapters update
* @author BGD Labs @bgdlabs
* - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21
*/
contract AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313 is
BaseAdaptersUpdatePayload(
BaseAdaptersUpdatePayload.ConstructorInput({
ccc: GovernanceV3BNB.CROSS_CHAIN_CONTROLLER,
proxyAdmin: MiscBNB.PROXY_ADMIN,
newCCCImplementation: 0xf41193E25408F652AF878c47E4401A01B5E4B682,
ccipNewAdapter: 0xAE93BEa44dcbE52B625169588574d31e36fb3A67,
ccipAdapterToRemove: 0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf
})
)
{
function getChainsToReceive() public pure override returns (uint256[] memory) {
uint256[] memory chains = new uint256[](1);
chains[0] = ChainIds.MAINNET;
return chains;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3BNB} from 'aave-address-book/AaveV3BNB.sol';
import {MiscBNB} from 'aave-address-book/MiscBNB.sol';
import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import './BaseTest.sol';

import {AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.sol';

/**
* @dev Test for AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313
* command: make test-contract filter=AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313
*/
contract AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313_Test is BaseTest {
constructor()
BaseTest(
GovernanceV3BNB.CROSS_CHAIN_CONTROLLER,
MiscBNB.PROXY_ADMIN,
type(AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313).creationCode,
'bnb',
37073128
)
{}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {MiscBase} from 'aave-address-book/MiscBase.sol';
import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol';
import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdatePayload.sol';

/**
* @title aDI and bridge adapters update
* @author BGD Labs @bgdlabs
* - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21
*/
contract AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313 is
BaseCCCImplementationUpdatePayload(
BaseCCCImplementationUpdatePayload.CCCImplementationUpdateInput({
ccc: GovernanceV3Base.CROSS_CHAIN_CONTROLLER,
proxyAdmin: MiscBase.PROXY_ADMIN,
newCCCImplementation: 0x9b6f5ef589A3DD08670Dd146C11C4Fb33E04494F
})
)
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {MiscBase} from 'aave-address-book/MiscBase.sol';
import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol';

import {AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313.sol';
import {BaseCCCImplementationUpdatePayloadTest} from './BaseCCCImplementationUpdatePayloadTest.sol';

/**
* @dev Test for AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313
* command: make test-contract filter=AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313
*/
contract AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313_Test is
BaseCCCImplementationUpdatePayloadTest(
GovernanceV3Base.CROSS_CHAIN_CONTROLLER,
MiscBase.PROXY_ADMIN,
type(AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313).creationCode,
'base',
11725901
)
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {ChainIds} from 'aave-helpers/ChainIds.sol';
import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol';

/**
* @title aDI and bridge adapters update
* @author BGD Labs @bgdlabs
* - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21
*/
contract AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313 is
BaseAdaptersUpdatePayload(
BaseAdaptersUpdatePayload.ConstructorInput({
ccc: GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER,
proxyAdmin: MiscEthereum.PROXY_ADMIN,
newCCCImplementation: 0x28559c2F4B038b1E836fA419DCcDe7454d8Fe215,
ccipNewAdapter: 0xB7a6618df58626C3a122ABAFD6Ee63Af63f3Ef29,
ccipAdapterToRemove: 0xDB8953194810b1942544fA528791278D458719D5
})
)
{
function getChainsToReceive() public pure override returns (uint256[] memory) {
uint256[] memory chains = new uint256[](2);
chains[0] = ChainIds.AVALANCHE;
chains[1] = ChainIds.POLYGON;
return chains;
}

function getDestinationAdapters()
public
pure
override
returns (DestinationAdaptersInput[] memory)
{
DestinationAdaptersInput[] memory destinationAdapters = new DestinationAdaptersInput[](3);

destinationAdapters[0].adapter = 0x2b88C83727B0E290B76EB3F6133994fF81B7f355;
destinationAdapters[0].chainId = ChainIds.AVALANCHE;

destinationAdapters[1].adapter = 0xe79757D55a1600eF28D816a893E78E9FCDE2019E;
destinationAdapters[1].chainId = ChainIds.POLYGON;

destinationAdapters[2].adapter = 0xAE93BEa44dcbE52B625169588574d31e36fb3A67;
destinationAdapters[2].chainId = ChainIds.BNB;

return destinationAdapters;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol';
import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol';
import './BaseTest.sol';
import {AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313.sol';
import {AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.sol';
import {AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313.sol';
import {AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313.sol';

/**
* @dev Test for AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313
* command: make test-contract filter=AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313
*/
contract AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313_Test is BaseTest {
constructor()
BaseTest(
GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER,
MiscEthereum.PROXY_ADMIN,
type(AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313).creationCode,
'mainnet',
19418547
)
{}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {MiscGnosis} from 'aave-address-book/MiscGnosis.sol';
import {GovernanceV3Gnosis} from 'aave-address-book/GovernanceV3Gnosis.sol';
import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdatePayload.sol';

/**
* @title aDI and bridge adapters update
* @author BGD Labs @bgdlabs
* - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21
*/
contract AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313 is
BaseCCCImplementationUpdatePayload(
BaseCCCImplementationUpdatePayload.CCCImplementationUpdateInput({
ccc: GovernanceV3Gnosis.CROSS_CHAIN_CONTROLLER,
proxyAdmin: MiscGnosis.PROXY_ADMIN,
newCCCImplementation: 0x5e06b10B3b9c3E1c0996D2544A35B9839Be02922
})
)
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {MiscGnosis} from 'aave-address-book/MiscGnosis.sol';
import {GovernanceV3Gnosis} from 'aave-address-book/GovernanceV3Gnosis.sol';

import {AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313} from './AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.sol';
import {BaseCCCImplementationUpdatePayloadTest} from './BaseCCCImplementationUpdatePayloadTest.sol';

/**
* @dev Test for AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313
* command: make test-contract filter=AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313
*/
contract AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313_Test is
BaseCCCImplementationUpdatePayloadTest(
GovernanceV3Gnosis.CROSS_CHAIN_CONTROLLER,
MiscGnosis.PROXY_ADMIN,
type(AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313).creationCode,
'gnosis',
32990165
)
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {MiscMetis} from 'aave-address-book/MiscMetis.sol';
import {GovernanceV3Metis} from 'aave-address-book/GovernanceV3Metis.sol';
import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdatePayload.sol';

/**
* @title aDI and bridge adapters update
* @author BGD Labs @bgdlabs
* - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21
*/
contract AaveV3Metis_UpdateADIImplementationAndCCIPAdapters_20240313 is
BaseCCCImplementationUpdatePayload(
BaseCCCImplementationUpdatePayload.CCCImplementationUpdateInput({
ccc: GovernanceV3Metis.CROSS_CHAIN_CONTROLLER,
proxyAdmin: MiscMetis.PROXY_ADMIN,
newCCCImplementation: 0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04
})
)
{

}
Loading
Loading