ChainAwareReader
Inherits: ChainAwareness, DataReader
Functions
readDeploymentArtifact
Returns the saved deployment artifact JSON for a contract on the active chain.
Returns an empty string or reverts if the artifact is not found based on the flag.
function readDeploymentArtifact(
string memory contractName,
bool revertIfNotFound
)
internal
view
returns (string memory artifact);
readDeployConfig
Returns the deployment configuration JSON for a contract on the active chain.
Returns an empty string or reverts if the artifact is not found based on the flag.
function readDeployConfig(
string memory contractName,
bool revertIfNotFound
)
internal
view
returns (string memory deployConfig);
getDeploymentAddress
Returns the deployment address for a contract on the active chain.
Returns address(0) or reverts if the address is not found based on the flag.
function getDeploymentAddress(
string memory contractName,
bool revertIfNotFound
)
internal
view
returns (address deploymentAddress);
isDeployed
Checks if a contract is deployed on the active chain without reverting.
function isDeployed(string memory contractName) internal view returns (bool);
assertContractCodeEmpty
Asserts that a contract is NOT deployed on the active chain by checking its code size.
function assertContractCodeEmpty(address contractAddr, string memory errMsg) internal view;
assertContractCodeExists
Asserts that a contract is deployed on the active chain by checking its code size.
function assertContractCodeExists(address contractAddr, string memory errMsg) internal view;
getCodeSize
Returns the code size for a given address on the active chain.
function getCodeSize(address contractAddr) internal view returns (uint256 codeSize);