-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
kupermind
commented
Aug 26, 2024
- 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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in MechActivityChecker?