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

fix[OA-audit-N12]: Typographical errors #4339

Merged
merged 3 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,17 @@ contract OptimisticAsserter is OptimisticAsserterInterface, Lockable, Ownable, M
* recipient _must_ implement these callbacks and not revert or the assertion resolution will be blocked.
* @param escalationManager if configured, this address will control escalation properties of the assertion. This
* means a) choosing to arbitrate via the UMA DVM, b) choosing to discard assertions on dispute, or choosing to
* validate disputes. Combining these, the asserter can define their own security properties the assertion.
* validate disputes. Combining these, the asserter can define their own security properties for the assertion.
* escalationManager also _must_ implement the same callbacks as callbackRecipient.
* @param liveness time to wait before the assertion can be resolved. Assertion can be disputed in this time.
* @param currency bond currency pulled from the caller and held in escrow until the assertion is resolved.
* @param bond amount of currency to pull from the caller and hold in escrow until the assertion is resolved. This
* must be >= getMinimumBond(address(currency)).
* @param identifier UMA DVM identifier to use for price requests in the event of a dispute. Must be a pre-approved.
* @param identifier UMA DVM identifier to use for price requests in the event of a dispute. Must be pre-approved.
* @param domainId optional domain that can be used to relate this assertion to others in the escalationManager and
* can be used by the configured escalationManager to define custom behavior for groups of assertions. This is
* typically used for "escalation games" by changing bonds or other assertion properties based on the other
* assertions that have come before. If not needed this value should be bytes32 to save gas.
* assertions that have come before. If not needed this value should be 0 to save gas.
*/
function assertTruth(
bytes memory claim,
Expand Down Expand Up @@ -177,7 +177,7 @@ contract OptimisticAsserter is OptimisticAsserterInterface, Lockable, Ownable, M
require(!assertionPolicy.blockAssertion, "Assertion not allowed"); // Check if the assertion is permitted.
EscalationManagerSettings storage emSettings = assertions[assertionId].escalationManagerSettings;
(emSettings.arbitrateViaEscalationManager, emSettings.discardOracle, emSettings.validateDisputers) = (
// Choose which oracle to arbitrate disputes via. If Set to true then the escalation manager will
// Choose which oracle to arbitrate disputes via. If set to true then the escalation manager will
// arbitrate disputes. Else, the DVM arbitrates disputes. This lets integrations "unplug" the DVM.
assertionPolicy.arbitrateViaEscalationManager,
// Choose whether to discard the Oracle result. If true then "throw away" the assertion. To get an
Expand Down Expand Up @@ -213,7 +213,7 @@ contract OptimisticAsserter is OptimisticAsserterInterface, Lockable, Ownable, M
* @param disputer receives bonds back at settlement.
*/
function disputeAssertion(bytes32 assertionId, address disputer) external nonReentrant {
require(disputer != address(0), "Disputer cant be 0");
require(disputer != address(0), "Disputer can't be 0");
Assertion storage assertion = assertions[assertionId];
require(assertion.asserter != address(0), "Assertion does not exist");
require(assertion.disputer == address(0), "Assertion already disputed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contract BaseEscalationManager is EscalationManagerInterface {
* if the dispute should be allowed based on the escalation policy.
* @param assertionId the assertionId to validate the dispute for.
* @param disputeCaller the caller of the dispute function.
* @return bool if the dispute is allowed, false otherwise.
* @return bool true if the dispute is allowed, false otherwise.
*/
function isDisputeAllowed(bytes32 assertionId, address disputeCaller) public view virtual returns (bool) {
return true;
Expand All @@ -54,7 +54,7 @@ contract BaseEscalationManager is EscalationManagerInterface {

/**
* @notice Implements price requesting logic for the escalation manager. This function is called by the Optimistic
* on dispute and is constructed to mimic that of the UMA DVM interface.
* Asserter on dispute and is constructed to mimic that of the UMA DVM interface.
* @param identifier the identifier to fetch the price for.
* @param time the time to fetch the price for.
* @param ancillaryData ancillary data of the price being requested.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import "../../interfaces/OptimisticAsserterInterface.sol";
* resolutions for the Escalation Manager. Optionally, assertion blocking can be enabled using a whitelist of
* assertingCallers or assertingCallers and asserters. On the other hand, it enables the determination of whether to
* arbitrate via the escalation manager as opposed to the DVM, whether to disregard the resolution of a potential
* dispute arbitrated by the Oracle, and whether to restrict who can register disputes via a whitelistedDisputeCallers.
* dispute arbitrated by the Oracle, and whether to restrict who can register disputes via whitelistedDisputeCallers.
* @dev If nothing is configured using the setters and configureEscalationManager method upon deployment, the
* FullPolicyEscalationManager will return a default policy with all values set to false.
*/
Expand Down Expand Up @@ -99,7 +99,7 @@ contract FullPolicyEscalationManager is BaseEscalationManager, Ownable {
* @param assertionId the ID of the assertion to check the disputerCaller for.
* @param disputeCaller the address of the disputeCaller to check.
* @return true if the disputerCaller is authorised to dispute the assertion.
* @dev In order for this function to be used by the Optimistic Assertor, validateDisputers must be set to true.
* @dev In order for this function to be used by the Optimistic Asserter, validateDisputers must be set to true.
*/
function isDisputeAllowed(bytes32 assertionId, address disputeCaller) public view override returns (bool) {
return whitelistedDisputeCallers[disputeCaller];
Expand Down Expand Up @@ -159,7 +159,7 @@ contract FullPolicyEscalationManager is BaseEscalationManager, Ownable {
}

/**
* @notice Adds/removes a disputerCaller to the whitelist of disputers that can file disputes.
* @notice Adds/removes a disputeCaller to the whitelist of disputers that can file disputes.
* @param disputeCaller the address of the disputeCaller to add.
* @dev This function is only used if validateDisputers is set to true.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface OptimisticAsserterInterface {
struct EscalationManagerSettings {
bool arbitrateViaEscalationManager; // False if the DVM is used as an oracle (EscalationManager on True).
bool discardOracle; // False if Oracle result is used for resolving assertion after dispute.
bool validateDisputers; // True if the SS isDisputeAllowed should be checked on disputes.
bool validateDisputers; // True if the EM isDisputeAllowed should be checked on disputes.
address assertingCaller;
address escalationManager;
}
Expand Down