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

Deploy Testnet Contracts #1312

Closed
wants to merge 12 commits into from
Closed

Conversation

aureliusbtc
Copy link
Contributor

@aureliusbtc aureliusbtc commented Sep 5, 2023

Summary by CodeRabbit

The existing bullet-point list is still valid based on the provided instructions.

@github-actions github-actions bot added M-contracts Module: Contracts 2-reviewers C-Protocol-Critical PRs that modify protocol-critical code. size/l labels Sep 5, 2023
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.13;

Check warning

Code scanning / Slither

Incorrect versions of Solidity Warning

Pragma version^0.8.13 allows old versions
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.6.0;

Check warning

Code scanning / Slither

Incorrect versions of Solidity Warning

Pragma version>=0.6.0 allows old versions
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (53d3fb7) 60.09064% compared to head (ba84238) 58.12856%.
Report is 253 commits behind head on master.

❗ Current head ba84238 differs from pull request most recent head f9fa721. Consider uploading reports for the commit f9fa721 to get more accurate results

Files Patch % Lines
...ontracts-core/contracts/create3/CREATE3Factory.sol 0.00000% 4 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##              master       #1312         +/-   ##
===================================================
- Coverage   60.09064%   58.12856%   -1.96209%     
===================================================
  Files            532         565         +33     
  Lines          32877       34102       +1225     
  Branches         277         277                 
===================================================
+ Hits           19756       19823         +67     
- Misses         11334       12464       +1130     
- Partials        1787        1815         +28     
Flag Coverage Δ
cctp-relayer 65.31303% <ø> (?)
ethergo 63.63778% <ø> (+0.06244%) ⬆️
explorer 53.51987% <ø> (+0.11498%) ⬆️
omnirpc 69.82429% <ø> (ø)
packages 83.42541% <ø> (ø)
promexporter 41.02564% <ø> (?)
scribe 57.25717% <ø> (+0.35564%) ⬆️
solidity 31.38686% <0.00000%> (-61.61559%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trajan0x
Copy link
Contributor

trajan0x commented Sep 8, 2023

LFG!

Not sure how we want to deal with the constructor stuff in 6fe7d4a consider testnet contracts already deployed, but I think I can just copy the deployments over to the devnet branch (#1274->#1381)

@trajan0x trajan0x changed the title Contracts deploy Testnets Deploy Testnet Contracts Sep 8, 2023
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 3, 2023
@github-actions github-actions bot closed this Oct 8, 2023
@aureliusbtc aureliusbtc reopened this Nov 10, 2023
Copy link
Contributor

coderabbitai bot commented Nov 10, 2023

It seems that the existing sections are still valid, so I'll keep them as they are.


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between ec312be and 7b7a068.
Files ignored due to filter (36)
  • packages/contracts-core/deployments/arb_sepolia/CREATE3.json
  • packages/contracts-core/deployments/arb_sepolia/Destination.json
  • packages/contracts-core/deployments/arb_sepolia/GasOracle.json
  • packages/contracts-core/deployments/arb_sepolia/LightInbox.json
  • packages/contracts-core/deployments/arb_sepolia/LightManager.json
  • packages/contracts-core/deployments/arb_sepolia/Origin.json
  • packages/contracts-core/deployments/arb_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/arb_sepolia/TestClient.json
  • packages/contracts-core/deployments/optimism_sepolia/CREATE3.json
  • packages/contracts-core/deployments/optimism_sepolia/Destination.json
  • packages/contracts-core/deployments/optimism_sepolia/GasOracle.json
  • packages/contracts-core/deployments/optimism_sepolia/LightInbox.json
  • packages/contracts-core/deployments/optimism_sepolia/LightManager.json
  • packages/contracts-core/deployments/optimism_sepolia/Origin.json
  • packages/contracts-core/deployments/optimism_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/optimism_sepolia/TestClient.json
  • packages/contracts-core/deployments/sepolia/CREATE3.json
  • packages/contracts-core/deployments/sepolia/Destination.json
  • packages/contracts-core/deployments/sepolia/GasOracle.json
  • packages/contracts-core/deployments/sepolia/LightInbox.json
  • packages/contracts-core/deployments/sepolia/LightManager.json
  • packages/contracts-core/deployments/sepolia/Origin.json
  • packages/contracts-core/deployments/sepolia/PingPongClient.json
  • packages/contracts-core/deployments/sepolia/TestClient.json
  • packages/contracts-core/deployments/synapse_sepolia/BondingManager.json
  • packages/contracts-core/deployments/synapse_sepolia/CREATE3.json
  • packages/contracts-core/deployments/synapse_sepolia/Destination.json
  • packages/contracts-core/deployments/synapse_sepolia/GasOracle.json
  • packages/contracts-core/deployments/synapse_sepolia/Inbox.json
  • packages/contracts-core/deployments/synapse_sepolia/Origin.json
  • packages/contracts-core/deployments/synapse_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/synapse_sepolia/Summit.json
  • packages/contracts-core/deployments/synapse_sepolia/TestClient.json
  • packages/contracts-core/foundry.toml
  • packages/contracts-core/script/configs/Messaging003.dc.json
  • packages/contracts-core/script/configs/Messaging003AgentRoot.dc.json
Files selected for processing (14)
  • .gitmodules (1 hunks)
  • ethergo/internal/test-data (1 hunks)
  • packages/contracts-core/contracts/create3/CREATE3Factory.sol (1 hunks)
  • packages/contracts-core/contracts/create3/ICREATE3Factory.sol (1 hunks)
  • packages/contracts-core/contracts/libs/Constants.sol (1 hunks)
  • packages/contracts-core/lib/create3-factory (1 hunks)
  • packages/contracts-core/lib/forge-std (1 hunks)
  • packages/contracts-core/lib/solmate (1 hunks)
  • packages/contracts-core/script/DeployCREATE3.s.sol (1 hunks)
  • packages/contracts-core/script/DeployClients003.s.sol (5 hunks)
  • packages/contracts-core/script/DeployMessaging003Base.s.sol (9 hunks)
  • packages/contracts-core/script/DeployMessaging003SynChain.s.sol (6 hunks)
  • packages/contracts-core/script/utils/DeployerUtils.sol (7 hunks)
  • services/cctp-relayer/external/synapse-contracts (1 hunks)
Files skipped from review due to trivial changes (8)
  • .gitmodules
  • packages/contracts-core/contracts/create3/ICREATE3Factory.sol
  • packages/contracts-core/lib/create3-factory
  • packages/contracts-core/lib/solmate
  • packages/contracts-core/script/DeployClients003.s.sol
  • packages/contracts-core/script/DeployMessaging003Base.s.sol
  • packages/contracts-core/script/DeployMessaging003SynChain.s.sol
  • packages/contracts-core/script/utils/DeployerUtils.sol
Additional comments: 10
services/cctp-relayer/external/synapse-contracts (1)
  • 1-1: The hunk provided is empty. Please provide a valid hunk for review.
packages/contracts-core/lib/forge-std (1)
  • 1-1: The hunk provided does not contain any code to review. Please provide the relevant code for review.
ethergo/internal/test-data (1)
  • 1-1: The hunk is empty, there is no code to review.
packages/contracts-core/contracts/libs/Constants.sol (1)
  • 47-53: The changes to MAX_CONTENT_BYTES and SYNAPSE_DOMAIN constants seem fine. However, ensure that these changes do not break any existing functionality that relies on these constants. Also, verify that the new value of SYNAPSE_DOMAIN is correct and aligns with your intended configuration.
packages/contracts-core/contracts/create3/CREATE3Factory.sol (3)
  • 2-2: The pragma version has been updated to ^0.8.13. Ensure that this version is compatible with the rest of your codebase and that it doesn't introduce any breaking changes. Also, consider using a fixed version to avoid unexpected behavior due to compiler updates.

  • 14-23: The deploy function now takes a bytes32 salt and bytes memory creationCode as parameters, and returns an address of the deployed contract. Ensure that all calls to this function throughout the codebase have been updated to match the new signature.

  • 26-35: The getDeployed function now takes an additional address deployer parameter. Ensure that all calls to this function throughout the codebase have been updated to match the new signature.

packages/contracts-core/script/DeployCREATE3.s.sol (3)
  • 1-26: The contract DeployCREATE3 is well-structured and follows Solidity best practices. The use of pragma solidity 0.8.17; ensures compatibility with the latest compiler features and security fixes. The contract imports necessary libraries and contracts, and defines a constructor and an external function run(). The run() function creates a new instance of CREATE3Factory and saves the deployment information. The contract also uses the stdJson and Strings libraries for string manipulation, which is a good practice for handling string data in Solidity.

  • 16-18: The constructor calls setupPK("CREATE3_PRIVATE_KEY") to set up a private key. Ensure that this private key is securely managed and not exposed in any public repositories or logs.

  • 20-25: The run() function creates a new instance of CREATE3Factory and saves the deployment information. Ensure that the startBroadcast(true) and stopBroadcast() functions are correctly managing the broadcast state, and that the saveDeployment function is correctly saving the deployment information.

@github-actions github-actions bot removed the Stale label Nov 11, 2023
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 7b7a068 and 11a799c.
Files ignored due to filter (29)
  • packages/contracts-core/deployments/arb_sepolia/Destination.json
  • packages/contracts-core/deployments/arb_sepolia/GasOracle.json
  • packages/contracts-core/deployments/arb_sepolia/LightInbox.json
  • packages/contracts-core/deployments/arb_sepolia/LightManager.json
  • packages/contracts-core/deployments/arb_sepolia/Origin.json
  • packages/contracts-core/deployments/arb_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/arb_sepolia/TestClient.json
  • packages/contracts-core/deployments/optimism_sepolia/Destination.json
  • packages/contracts-core/deployments/optimism_sepolia/GasOracle.json
  • packages/contracts-core/deployments/optimism_sepolia/LightInbox.json
  • packages/contracts-core/deployments/optimism_sepolia/LightManager.json
  • packages/contracts-core/deployments/optimism_sepolia/Origin.json
  • packages/contracts-core/deployments/optimism_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/optimism_sepolia/TestClient.json
  • packages/contracts-core/deployments/sepolia/Destination.json
  • packages/contracts-core/deployments/sepolia/GasOracle.json
  • packages/contracts-core/deployments/sepolia/LightInbox.json
  • packages/contracts-core/deployments/sepolia/LightManager.json
  • packages/contracts-core/deployments/sepolia/Origin.json
  • packages/contracts-core/deployments/sepolia/PingPongClient.json
  • packages/contracts-core/deployments/sepolia/TestClient.json
  • packages/contracts-core/deployments/synapse_sepolia/BondingManager.json
  • packages/contracts-core/deployments/synapse_sepolia/Destination.json
  • packages/contracts-core/deployments/synapse_sepolia/GasOracle.json
  • packages/contracts-core/deployments/synapse_sepolia/Inbox.json
  • packages/contracts-core/deployments/synapse_sepolia/Origin.json
  • packages/contracts-core/deployments/synapse_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/synapse_sepolia/Summit.json
  • packages/contracts-core/deployments/synapse_sepolia/TestClient.json
Files selected for processing (2)
  • packages/contracts-core/script/DeployClients003.s.sol (5 hunks)
  • packages/contracts-core/script/DeployMessaging003Base.s.sol (9 hunks)
Files skipped from review due to trivial changes (2)
  • packages/contracts-core/script/DeployClients003.s.sol
  • packages/contracts-core/script/DeployMessaging003Base.s.sol

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 8

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 11a799c and 921210b.
Files ignored due to filter (31)
  • packages/contracts-core/deployments/arb_sepolia/Destination.json
  • packages/contracts-core/deployments/arb_sepolia/GasOracle.json
  • packages/contracts-core/deployments/arb_sepolia/LightInbox.json
  • packages/contracts-core/deployments/arb_sepolia/LightManager.json
  • packages/contracts-core/deployments/arb_sepolia/Origin.json
  • packages/contracts-core/deployments/arb_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/arb_sepolia/TestClient.json
  • packages/contracts-core/deployments/optimism_sepolia/Destination.json
  • packages/contracts-core/deployments/optimism_sepolia/GasOracle.json
  • packages/contracts-core/deployments/optimism_sepolia/LightInbox.json
  • packages/contracts-core/deployments/optimism_sepolia/LightManager.json
  • packages/contracts-core/deployments/optimism_sepolia/Origin.json
  • packages/contracts-core/deployments/optimism_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/optimism_sepolia/TestClient.json
  • packages/contracts-core/deployments/sepolia/Destination.json
  • packages/contracts-core/deployments/sepolia/GasOracle.json
  • packages/contracts-core/deployments/sepolia/LightInbox.json
  • packages/contracts-core/deployments/sepolia/LightManager.json
  • packages/contracts-core/deployments/sepolia/Origin.json
  • packages/contracts-core/deployments/sepolia/PingPongClient.json
  • packages/contracts-core/deployments/sepolia/TestClient.json
  • packages/contracts-core/deployments/synapse_sepolia/BondingManager.json
  • packages/contracts-core/deployments/synapse_sepolia/Destination.json
  • packages/contracts-core/deployments/synapse_sepolia/GasOracle.json
  • packages/contracts-core/deployments/synapse_sepolia/Inbox.json
  • packages/contracts-core/deployments/synapse_sepolia/Origin.json
  • packages/contracts-core/deployments/synapse_sepolia/PingPongClient.json
  • packages/contracts-core/deployments/synapse_sepolia/Summit.json
  • packages/contracts-core/deployments/synapse_sepolia/TestClient.json
  • packages/contracts-core/script/configs/Messaging003.dc.json
  • packages/contracts-core/script/configs/Messaging003AgentRoot.dc.json
Files selected for processing (2)
  • packages/contracts-core/script/DeployClients003.s.sol (5 hunks)
  • packages/contracts-core/script/DeployMessaging003Base.s.sol (9 hunks)
Files skipped from review due to trivial changes (1)
  • packages/contracts-core/script/DeployClients003.s.sol
Additional comments: 2
packages/contracts-core/script/DeployMessaging003Base.s.sol (2)
  • 343-352: The _checkMessagingBase function correctly checks the localDomain and owner against the expected values. This is a good practice for post-deployment validation.

  • 355-406: The getter check functions (_checkGetterAgentManager, _checkGetterInbox, etc.) are thorough and ensure that the deployed contracts have the correct references. This is crucial for the integrity of the system.

Comment on lines 2 to 19
pragma solidity 0.8.17;

// ═════════════════════════════ CONTRACT IMPORTS ══════════════════════════════
import {AgentSecured, MessagingBase} from "../contracts/base/AgentSecured.sol";
import {BondingManager} from "../contracts/manager/BondingManager.sol";
import {Destination} from "../contracts/Destination.sol";
import {GasOracle} from "../contracts/GasOracle.sol";
import {Origin} from "../contracts/Origin.sol";
import {Summit} from "../contracts/Summit.sol";
import { AgentSecured, MessagingBase } from "../contracts/base/AgentSecured.sol";
import { BondingManager } from "../contracts/manager/BondingManager.sol";
import { Destination } from "../contracts/Destination.sol";
import { GasOracle } from "../contracts/GasOracle.sol";
import { Origin } from "../contracts/Origin.sol";
import { Summit } from "../contracts/Summit.sol";
// ═════════════════════════════ INTERNAL IMPORTS ══════════════════════════════
import {DeployerUtils} from "./utils/DeployerUtils.sol";
import { DeployerUtils } from "./utils/DeployerUtils.sol";
// ═════════════════════════════ EXTERNAL IMPORTS ══════════════════════════════
import {console, stdJson} from "forge-std/Script.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import { console, stdJson } from "forge-std/Script.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";

// solhint-disable no-console
// solhint-disable ordering
Copy link
Contributor

Choose a reason for hiding this comment

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

The pragma directive should be locked to a specific compiler version to prevent unexpected behavior in different compiler versions. If the code is intended to be flexible with the compiler version, this is fine, but it should be a conscious decision.

Comment on lines 45 to 49
constructor() {
setupPK("MESSAGING_DEPLOYER_PRIVATE_KEY");
localDomain = uint32(block.chainid);
deploymentSalt = keccak256("Messaging003");
deploymentSalt = keccak256("Messaging003-07");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The deploymentSalt is hardcoded in the constructor, which could lead to predictability in contract deployment addresses. Consider parameterizing the salt or deriving it from less predictable data to enhance security.

Comment on lines 94 to 117
summit = predictFactoryDeployment(SUMMIT);
}
// Deploy and initialize contracts
_deployAndCheckAddress(agentManagerName(), _deployAgentManager, _initializeAgentManager, agentManager);
_deployAndCheckAddress(statementInboxName(), _deployStatementInbox, _initializeStatementInbox, statementInbox);
_deployAndCheckAddress(DESTINATION, _deployDestination, _initializeDestination, destination);
_deployAndCheckAddress(
agentManagerName(),
_deployAgentManager,
_initializeAgentManager,
agentManager
);
_deployAndCheckAddress(
statementInboxName(),
_deployStatementInbox,
_initializeStatementInbox,
statementInbox
);
_deployAndCheckAddress(
DESTINATION,
_deployDestination,
_initializeDestination,
destination
);
_deployAndCheckAddress(GAS_ORACLE, _deployGasOracle, _initializeGasOracle, gasOracle);
_deployAndCheckAddress(ORIGIN, _deployOrigin, _initializeOrigin, origin);
if (isSynapseChain()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The isSynapseChain() function is called multiple times within the _deploy function. This could be optimized by storing the result in a local variable if the chain type does not change during the execution of the function.

Comment on lines 133 to 137
function(address) internal initFunc,
address predictedDeployment
) internal {
(address deployment,) = deployContract(contractName, deployFunc, initFunc);
(address deployment, ) = deployContract(contractName, deployFunc, initFunc);
require(deployment == predictedDeployment, string.concat(contractName, ": wrong address"));
Copy link
Contributor

Choose a reason for hiding this comment

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

The _deployAndCheckAddress function uses a require statement to ensure that the deployed contract address matches the predicted address. This is a good practice for ensuring deployment consistency. However, the error message could include the expected and actual addresses to aid debugging.

Comment on lines 165 to 174
/// @dev Deploys Destination.
/// Note: requires AgentManager and StatementInbox addresses to have been set.
/// Note: requires AgentManager to have been deployed.
function _deployDestination() internal returns (address deployment, bytes memory constructorArgs) {
function _deployDestination()
internal
returns (address deployment, bytes memory constructorArgs)
{
// new Destination(domain, agentManager, statementInbox)
require(agentManager != address(0), "Agent Manager not set");
require(statementInbox != address(0), "Statement Inbox not set");
Copy link
Contributor

Choose a reason for hiding this comment

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

The _deployDestination function checks if the agentManager and statementInbox addresses are set but does not check if the contracts at those addresses have been deployed. This could lead to a situation where the deployment proceeds with uninitialized addresses. Consider adding checks for the code at those addresses.

Comment on lines 190 to 198
/// @dev Deploys GasOracle.
/// Note: requires Destination address to have been set.
function _deployGasOracle() internal returns (address deployment, bytes memory constructorArgs) {
function _deployGasOracle()
internal
returns (address deployment, bytes memory constructorArgs)
{
// new GasOracle(domain, destination)
require(destination != address(0), "Destination not set");
constructorArgs = abi.encode(localDomain, destination);
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the previous comment, the _deployGasOracle function checks if the destination address is set but does not check if the contract at that address has been deployed.

Comment on lines 265 to 275
}

/// @dev Transfers ownership of a given contract to a new owner.
function _transferOwnership(string memory name, address deployment, address newOwner) internal {
function _transferOwnership(
string memory name,
address deployment,
address newOwner
) internal {
if (deployment == address(0)) {
console.log(" %s: skipped (not deployed)", name);
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

The _transferOwnership function checks if the deployment address is zero before attempting to transfer ownership. This is a good safeguard against transferring ownership of a non-existent contract. However, it logs a message and returns without throwing an error, which could silently fail in a script execution context. Consider whether failing loudly (with a require or revert) would be more appropriate.

Comment on lines +410 to 429
function _logCheckedGetter(
string memory name,
string memory getter,
address deployment,
address expectedValue
) internal view {
console.log(" [%s][%s]: checking .%s()", name, deployment, getter);
console.log(" expecting value: %s", expectedValue);
}

/// @dev Shortcut for logging
function _logCheckedGetter(string memory name, string memory getter, address deployment, uint32 expectedValue)
internal
view
{
function _logCheckedGetter(
string memory name,
string memory getter,
address deployment,
uint32 expectedValue
) internal view {
console.log(" [%s][%s]: checking .%s()", name, deployment, getter);
console.log(" expecting value: %s", expectedValue);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The logging functions _logCheckedGetter are duplicated for different expected value types. This could be refactored to a single function that handles multiple types or uses Solidity's abi.encode to log the expected value in a generic way.

Copy link

github-actions bot commented Dec 5, 2023

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 5, 2023
@github-actions github-actions bot closed this Dec 10, 2023
@github-actions github-actions bot deleted the contracts/deploy-testnets branch February 23, 2024 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants