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: separating between mech and requester activity checker #26

Merged
merged 9 commits into from
Aug 28, 2024

Conversation

kupermind
Copy link
Collaborator

  • Separating between mech and requester activity checker.

// AI agent mech contract address.
address public immutable agentMech;
// AI agent mech marketplace contract address.
address public immutable mechMarketplace;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mech marketplace is used here as well.

function getMultisigNonces(address multisig) external view virtual override returns (uint256[] memory nonces) {
nonces = new uint256[](2);
nonces[0] = IMultisig(multisig).nonce();
nonces[1] = IAgentMech(agentMech).getRequestsCount(multisig);
nonces[1] = IMechMarketplace(mechMarketplace).getOperatorDeliveriesCount(multisig);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We care about the mech operator deliveries, not about the mech itself (that could be more than one or swapped).

@@ -45,7 +45,7 @@ contract MechActivityChecker is StakingActivityChecker{
function getMultisigNonces(address multisig) external view virtual override returns (uint256[] memory nonces) {
nonces = new uint256[](2);
nonces[0] = IMultisig(multisig).nonce();
nonces[1] = IAgentMech(agentMech).getRequestsCount(multisig);
nonces[1] = IAgentMech(agentMech).getDeliveriesCount(multisig);
Copy link
Contributor

Choose a reason for hiding this comment

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

hm, why are delivers tracked on the mech and not the marketplace?

/// @dev Gets deliveries count for a specific operator.
/// @param operator Operator address.
/// @return Deliveries count.
function getOperatorDeliveriesCount(address operator) external view returns (uint256);
Copy link
Contributor

Choose a reason for hiding this comment

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

Operator is annoying here. I'd say "Service" because Operator has another use in Olas.

nonces[1] = IMechMarketplace(mechMarketplace).getRequestsCount(multisig);
}

/// @dev Checks if the service multisig liveness ratio passes the defined liveness threshold.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as in MechActivityChecker?

@DavidMinarsch DavidMinarsch merged commit 7a9f2ab into main Aug 28, 2024
1 check passed
@DavidMinarsch DavidMinarsch deleted the requester_activity_checker branch August 28, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants