diff --git a/crates/chain-connector/src/connector.rs b/crates/chain-connector/src/connector.rs index 45307f9ff7..fc0beb2944 100644 --- a/crates/chain-connector/src/connector.rs +++ b/crates/chain-connector/src/connector.rs @@ -490,9 +490,10 @@ impl ChainConnector { } fn difficulty_params(&self) -> ArrayParams { - let data: String = Capacity::difficultyCall {}.abi_encode().encode_hex(); + let data: String = Core::difficultyCall {}.abi_encode().encode_hex(); + rpc_params![ - json!({"data": data, "to": self.config.cc_contract_address}), + json!({"data": data, "to": self.config.core_contract_address}), "latest" ] } diff --git a/crates/chain-connector/src/function/capacity.rs b/crates/chain-connector/src/function/capacity.rs index a52761ec46..fa5aba8895 100644 --- a/crates/chain-connector/src/function/capacity.rs +++ b/crates/chain-connector/src/function/capacity.rs @@ -24,8 +24,6 @@ sol! { /// @dev Capacity commitment is not active error CapacityCommitmentIsNotActive(CCStatus status); - /// @dev Returns the difficulty for randomX - function difficulty() external view returns (bytes32); function getGlobalNonce() external view returns (bytes32); /// @dev Returns the min required randomX proofs per epoch for the 1 CU. diff --git a/crates/chain-connector/src/function/core.rs b/crates/chain-connector/src/function/core.rs index d3eb79e148..29085b3dab 100644 --- a/crates/chain-connector/src/function/core.rs +++ b/crates/chain-connector/src/function/core.rs @@ -16,5 +16,8 @@ sol! { /// @dev Returns epoch init timestamp /// @return initTimestamp in seconds function initTimestamp() external view returns (uint256); + + /// @dev Returns the difficulty for CCP + function difficulty() external view returns (bytes32); } }