-
Notifications
You must be signed in to change notification settings - Fork 41
Escrow Cancellation #3357
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
base: develop
Are you sure you want to change the base?
Escrow Cancellation #3357
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
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.
For bulkPayout we should have the changes from https://github.com/humanprotocol/human-protocol/pull/3261/files. Merge it first
For bulkPayout we should have the changes from https://github.com/humanprotocol/human-protocol/pull/3261/files. Merge it first |
* Fix possible no assignments error when there are * Update readme * Update cvat sdk versions * Address api changes * Improve performance of some cvat calls * Improve description
* Draw roi point along with bbox in skeleton tasks * Relax filtering for overlapping gt skeletons (#3358)
3ac3fbb
to
3f4dce8
Compare
3f4dce8
to
941d544
Compare
…otocol/human-protocol into feat/escrow-cancellation
* fix payouts when fee calculation is truncated * fix tests and use faker in the root of the repository * document escrow contract and improve tests * Delete unnecessary check for BULK_MAX_VALUE * remove unused modifier * Undo faker package changes for updating yarn --------- Co-authored-by: Francisco López <francislopez977@gmail.com>
…avoid remaining funds and update tests for dynamic amounts
- Updated subgraph package.json to include network-specific test command. - Enhanced GraphQL schema with CancellationRefundEvent and CancellationRequested types. - Implemented event handlers for CancellationRequested and CancellationRefund in EscrowTemplate. - Modified EscrowStatistics to track toCancelStatusEventCount. - Updated dayUpdates utility to initialize dailyToCancelStatusEventCount. - Adjusted template.yaml to listen for CancellationRequested and CancellationRefund events. - Expanded tests to cover new cancellation events and their effects on statistics. - Created fixture functions for generating mock CancellationRequested and CancellationRefund events.
…otocol/human-protocol into feat/escrow-cancellation
@@ -486,13 +489,17 @@ def get_w3_with_priv_key(priv_key: str): | |||
raise EscrowClientError("Invalid empty hash") | |||
if not validate_url(url): | |||
raise EscrowClientError(f"Invalid URL: {url}") | |||
if amount <= 0: |
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.
the contract actually allows amount 0
@@ -1,6 +1,8 @@ | |||
export enum EventType { | |||
ESCROW_COMPLETED = 'escrow_completed', | |||
ESCROW_CANCELED = 'escrow_canceled', |
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.
why escrow and job?
eventEntity.txHash = event.transaction.hash; | ||
eventEntity.escrowAddress = event.address; | ||
eventEntity.sender = event.transaction.from; | ||
eventEntity.status = 'Cancelled'; |
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.
Check internal transaction
|
||
emit IntermediateStorage(_url, _hash); | ||
|
||
if (status == EscrowStatuses.ToCancel) { |
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.
Cancel the escrow if fundsToReserve=0, unreservedFunds=0 and status is ToCancel
Issue tracking
#3287
Context behind the change
How has this been tested?
Deployed locally and completed the fortune flow with some escrows. Tested normal and cancellation flow
Run unit tests
Release plan
Important: Check that there are no active escrows before deployment to avoid errors due to StoreResult contract change. Also we need to make sure CVAT and Audino are updated to use new contract version
Potential risks; What to monitor; Reverse plan
Since the core has been updated, we have to check each step to make sure it works correctly.