Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/certora-prover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ jobs:

# Install the Foundry toolchain
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e
with:
version: stable
version: v1.4.0

# Install dependencies using Forge
- name: Install forge dependencies
Expand Down Expand Up @@ -111,9 +111,9 @@ jobs:

# Install the Foundry toolchain.
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e
with:
version: stable
version: v1.4.0

# Install dependencies using Forge
- name: Install forge dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/certora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
# with:
# version: stable
# version: v1.4.0

# - name: Install forge dependencies
# run: forge install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/foundry-post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e
with:
version: stable
version: v1.4.0

# Build the project and display contract sizes.
- name: "Forge Build"
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:

# Install the Foundry toolchain.
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e
with:
version: stable
version: v1.4.0

# Run Forge's formatting checker to ensure consistent code style.
- name: "Forge Fmt"
Expand Down Expand Up @@ -121,9 +121,9 @@ jobs:

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e
with:
version: stable
version: v1.4.0

# Run storage diff check to detect storage layout incompatibilities.
- name: "Mainnet Storage Diff"
Expand Down Expand Up @@ -168,9 +168,9 @@ jobs:

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e
with:
version: stable
version: v1.4.0

# Install LCOV for coverage report generation.
- name: Install LCOV (Prebuilt)
Expand Down Expand Up @@ -254,9 +254,9 @@ jobs:

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e
with:
version: stable
version: v1.4.0

- name: Build contracts on PR branch
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-deployment-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:

# Install the Foundry toolchain.
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e
with:
version: stable
version: v1.4.0

# Run Forge's formatting checker to ensure consistent code style.
- name: "Forge Fmt"
Expand Down
8 changes: 4 additions & 4 deletions script/deploy/devnet/deploy_from_scratch.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,15 @@ contract DeployFromScratch is Script, Test {
);
require(
eigenLayerProxyAdmin.getProxyImplementation(
ITransparentUpgradeableProxy(payable(address(rewardsCoordinator)))
) == address(rewardsCoordinatorImplementation),
ITransparentUpgradeableProxy(payable(address(rewardsCoordinator)))
) == address(rewardsCoordinatorImplementation),
"rewardsCoordinator: implementation set incorrectly"
);

require(
eigenLayerProxyAdmin.getProxyImplementation(
ITransparentUpgradeableProxy(payable(address(allocationManager)))
) == address(allocationManagerImplementation),
ITransparentUpgradeableProxy(payable(address(allocationManager)))
) == address(allocationManagerImplementation),
"allocationManager: implementation set incorrectly"
);

Expand Down
8 changes: 4 additions & 4 deletions script/deploy/local/deploy_from_scratch.slashing.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -513,15 +513,15 @@ contract DeployFromScratch is Script, Test {
);
require(
eigenLayerProxyAdmin.getProxyImplementation(
ITransparentUpgradeableProxy(payable(address(rewardsCoordinator)))
) == address(rewardsCoordinatorImplementation),
ITransparentUpgradeableProxy(payable(address(rewardsCoordinator)))
) == address(rewardsCoordinatorImplementation),
"rewardsCoordinator: implementation set incorrectly"
);

require(
eigenLayerProxyAdmin.getProxyImplementation(
ITransparentUpgradeableProxy(payable(address(allocationManager)))
) == address(allocationManagerImplementation),
ITransparentUpgradeableProxy(payable(address(allocationManager)))
) == address(allocationManagerImplementation),
"allocationManager: implementation set incorrectly"
);

Expand Down
11 changes: 9 additions & 2 deletions script/deploy/multichain/create_generator_config.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ contract CreateGeneratorConfig is Script, Test {
using Merkle for bytes32[];
using BN254 for BN254.G1Point;

function run(string memory network, uint256 xCoord, uint256 yCoord) public {
function run(
string memory network,
uint256 xCoord,
uint256 yCoord
) public {
// Network must be preprod, testnet-sepolia, or mainnet
require(
_strEq(network, "preprod") || _strEq(network, "testnet-sepolia") || _strEq(network, "mainnet"),
Expand Down Expand Up @@ -113,7 +117,10 @@ contract CreateGeneratorConfig is Script, Test {
vm.writeToml(finalJson, outputPath);
}

function _strEq(string memory a, string memory b) internal pure returns (bool) {
function _strEq(
string memory a,
string memory b
) internal pure returns (bool) {
return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b));
}

Expand Down
18 changes: 13 additions & 5 deletions script/deploy/multichain/deploy_generator.s.sol.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ contract DeployGenerator is Script, Test {
using Merkle for bytes32[];
using BN254 for BN254.G1Point;

function run(string memory network, string memory salt) public {
function run(
string memory network,
string memory salt
) public {
/**
*
* WALLET CREATION
Expand Down Expand Up @@ -58,8 +61,7 @@ contract DeployGenerator is Script, Test {
operatorInfoLeaves[0] = keccak256(
abi.encode(
IOperatorTableCalculatorTypes.BN254OperatorInfo({
pubkey: operator.signingKey.publicKeyG1,
weights: weights
pubkey: operator.signingKey.publicKeyG1, weights: weights
})
)
);
Expand All @@ -84,7 +86,10 @@ contract DeployGenerator is Script, Test {
_writeOperatorData(operator, network);
}

function _writeOperatorData(Operator memory operator, string memory network) internal {
function _writeOperatorData(
Operator memory operator,
string memory network
) internal {
string memory operator_object = "operator";

// Serialize regular wallet info
Expand Down Expand Up @@ -162,7 +167,10 @@ contract DeployGenerator is Script, Test {
vm.writeToml(finalJson, outputPath);
}

function _strEq(string memory a, string memory b) internal pure returns (bool) {
function _strEq(
string memory a,
string memory b
) internal pure returns (bool) {
return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b));
}

Expand Down
6 changes: 4 additions & 2 deletions script/operations/update-generator/1-updateGenerator.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ contract QueueTransferProxyAdmin is MultisigBuilder {
"certificateVerifier.operatorSetOwner invalid"
);
// Get the operatorSetInfo
IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = certificateVerifier
.getOperatorSetInfo(generatorParams.generator, operatorTableUpdater.GENERATOR_REFERENCE_TIMESTAMP());
IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo =
certificateVerifier.getOperatorSetInfo(
generatorParams.generator, operatorTableUpdater.GENERATOR_REFERENCE_TIMESTAMP()
);
assertEq(
operatorSetInfo.numOperators,
generatorParams.generatorInfo.numOperators,
Expand Down
18 changes: 14 additions & 4 deletions script/releases/CrosschainDeployLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import "src/test/mocks/EmptyContract.sol";
ICreateX constant createx = ICreateX(0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed);

interface ICreateX {
function deployCreate2(bytes32 salt, bytes memory initCode) external payable returns (address newContract);
function deployCreate2(
bytes32 salt,
bytes memory initCode
) external payable returns (address newContract);
function computeCreate2Address(
bytes32 salt,
bytes32 initCodeHash
Expand Down Expand Up @@ -44,7 +47,7 @@ library CrosschainDeployLib {
* ```solidity
* bytes11 salt = bytes11(uint88(0xffffffffffffffffffffff));
* address emptyContract = type(EmptyContract).creationCode.deployCrosschain(deployer);
* address proxy = emptyContract.deployCrosschainProxy(deployer, salt);
* address proxy = emptyContract.deployCrosschainProxy(deployer, salt);
* ITransparentUpgradeableProxy(address(proxy)).upgradeTo(address(implementation));
* ITransparentUpgradeableProxy(address(proxy)).changeAdmin(address(admin));
* ```
Expand All @@ -67,7 +70,11 @@ library CrosschainDeployLib {
* type(EmptyContract).creationCode.deployCrosschain(deployer, EMPTY_CONTRACT_SALT)
* ```
*/
function _deployCrosschain(address deployer, bytes memory initCode, string memory name) private returns (address) {
function _deployCrosschain(
address deployer,
bytes memory initCode,
string memory name
) private returns (address) {
return createx.deployCreate2(computeProtectedSalt(deployer, name), initCode);
}

Expand All @@ -81,7 +88,10 @@ library CrosschainDeployLib {
* @dev The salt is structured as: Deployer EOA (20 bytes) | Cross-chain flag (1 byte) | Entropy (11 bytes)
* @dev Example: 0xbebebebebebebebebebebebebebebebebebebebe|ff|1212121212121212121212
*/
function computeProtectedSalt(address deployer, string memory name) internal pure returns (bytes32) {
function computeProtectedSalt(
address deployer,
string memory name
) internal pure returns (bytes32) {
return bytes32(
bytes.concat(
bytes20(deployer),
Expand Down
15 changes: 12 additions & 3 deletions script/releases/Env.sol
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,10 @@ library Env {
}

// Returns the proxy instance at index `i`
function strategyBaseTVLLimits(DeployedInstance, uint256 i) internal view returns (StrategyBaseTVLLimits) {
function strategyBaseTVLLimits(
DeployedInstance,
uint256 i
) internal view returns (StrategyBaseTVLLimits) {
return StrategyBaseTVLLimits(_deployedInstance(type(StrategyBaseTVLLimits).name, i));
}

Expand Down Expand Up @@ -494,7 +497,10 @@ library Env {
/**
* Helpers
*/
function _deployedInstance(string memory name, uint256 idx) private view returns (address) {
function _deployedInstance(
string memory name,
uint256 idx
) private view returns (address) {
return ZEnvHelpers.state().deployedInstance(name, idx);
}

Expand Down Expand Up @@ -585,7 +591,10 @@ library Env {
return ProxyAdmin(Env.proxyAdmin()).getProxyAdmin(ITransparentUpgradeableProxy(_proxy));
}

function _strEq(string memory a, string memory b) internal pure returns (bool) {
function _strEq(
string memory a,
string memory b
) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,17 @@ contract DeploySourceChain is EOADeployer {
// ReleaseManager and KeyRegistrar don't have initialize functions
}

function _assertTrue(bool b, string memory err) private pure {
function _assertTrue(
bool b,
string memory err
) private pure {
assertTrue(b, err);
}

function _assertFalse(bool b, string memory err) private pure {
function _assertFalse(
bool b,
string memory err
) private pure {
assertFalse(b, err);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@ contract DeployDestinationChainProxies is MultisigBuilder {
}

/// @dev Compute the expected proxy address for a given name and empty contract
function _computeExpectedProxyAddress(string memory name, address emptyContract) internal view returns (address) {
function _computeExpectedProxyAddress(
string memory name,
address emptyContract
) internal view returns (address) {
return CrosschainDeployLib.computeCrosschainUpgradeableProxyAddress({
adminAndDeployer: Env.multichainDeployerMultisig(),
implementation: emptyContract,
name: name
adminAndDeployer: Env.multichainDeployerMultisig(), implementation: emptyContract, name: name
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi
name: type(ECDSACertificateVerifier).name,
deployedTo: address(
new ECDSACertificateVerifier({
_operatorTableUpdater: Env.proxy.operatorTableUpdater(),
_version: Env.deployVersion()
_operatorTableUpdater: Env.proxy.operatorTableUpdater(), _version: Env.deployVersion()
})
)
});
Expand All @@ -58,8 +57,7 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi
name: type(BN254CertificateVerifier).name,
deployedTo: address(
new BN254CertificateVerifier({
_operatorTableUpdater: Env.proxy.operatorTableUpdater(),
_version: Env.deployVersion()
_operatorTableUpdater: Env.proxy.operatorTableUpdater(), _version: Env.deployVersion()
})
)
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,17 @@ contract InstantiateDestinationChainProxies is DeployDestinationChainImpls {
// ECDSACertificateVerifier and BN254CertificateVerifier don't have initialize functions
}

function _assertTrue(bool b, string memory err) private pure {
function _assertTrue(
bool b,
string memory err
) private pure {
assertTrue(b, err);
}

function _assertFalse(bool b, string memory err) private pure {
function _assertFalse(
bool b,
string memory err
) private pure {
assertFalse(b, err);
}

Expand Down
Loading
Loading