This repository has been archived by the owner on Dec 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
[monorepo] replace Transfer.sol mechanism with Interpreters #1263
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldct
force-pushed
the
ldct/transfer
branch
3 times, most recently
from
April 13, 2019 00:55
13e793d
to
7129182
Compare
snario
reviewed
Apr 13, 2019
snario
reviewed
Apr 13, 2019
snario
reviewed
Apr 13, 2019
snario
reviewed
Apr 13, 2019
snario
reviewed
Apr 13, 2019
packages/contracts/contracts/test-fixtures/ResolveToPay5WeiApp.sol
Outdated
Show resolved
Hide resolved
snario
reviewed
Apr 13, 2019
alxiong
reviewed
Apr 13, 2019
alxiong
reviewed
Apr 13, 2019
@IIIIllllIIIIllllIIIIllllIIIIllllIIIIll two extra comments:
in general, I do think current change is great and will support coinshuffle app requirement. Great work! |
ldct
force-pushed
the
ldct/transfer
branch
7 times, most recently
from
April 22, 2019 03:55
894e000
to
59245be
Compare
might be blocked on duaraghav8/Ethlint#261 |
ldct
force-pushed
the
ldct/transfer
branch
5 times, most recently
from
April 25, 2019 03:58
23cb32c
to
f6cef5e
Compare
snario
reviewed
Apr 25, 2019
ldct
force-pushed
the
ldct/transfer
branch
2 times, most recently
from
April 29, 2019 06:02
5c10815
to
6b7ddb9
Compare
ldct
force-pushed
the
ldct/transfer
branch
3 times, most recently
from
May 10, 2019 13:37
e72f164
to
3b1f744
Compare
snario
reviewed
May 10, 2019
ldct
force-pushed
the
ldct/transfer
branch
2 times, most recently
from
May 10, 2019 21:58
f8fcb35
to
b8bc4d2
Compare
snario
approved these changes
May 13, 2019
ldct
changed the title
[contract] Interpreters
[monorepo] replace Transfer.sol mechanism with Interpreters
May 13, 2019
This was referenced Jun 5, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the contracts and node and fixes: #1222, #1157, #1442
The design is as follows. App Definition resolve functions now return unstructured data which is to be consumed by an "interpreter" contract which runs in the multisig context and handles state deposit payouts in dispute scenarios. App Definitions are classified by "resolve type", e.g.,
TwoPartyOutcome
: the app is some kind of 2-party game, and the resolve function returns auint256
in the set{0, 1, 2}
which means "player 1 won, player 2 won, draw" respectivelyETHTransfer
: the resolve functions returns a list of(to, value)
tuplesState deposits constrain what apps they can be used with: for instance, a deposit of ETH can be used for apps of resolve type
ETHTransfer
orTwoPartyOutcome
, but a deposit of two ERC721 NFTs can only be used forTwoPartyOutcome
.hard-coded assumptions
temporary hacks to be removed in the future
resolveType
function is introduced in all app definitions. This is used by the uninstall protocol to determine how to update the free balance during uninstall.limitOrTotal
field is added to the AppInstance class. For app instances interpreted byETHInterpreter
, this represents a limit on the total ETH; for those interpreted byTwoPartyEthAsLump
, this represents the total funds committed to the app.interpreterHash
is computed but not checked inStateChannelTransaction