-
Notifications
You must be signed in to change notification settings - Fork 44
[contracts] add FreeBalanceApp, extending ETHBucket to n-party #1205
Conversation
I would name is |
Which brings up anther interesting question: can a channel supports a mix of different tokens (e.g. Alice deposit 5 ETH, 4 ZRX, Bob deposits 8 ETH, 2 DAI etc.) I don't think current contract allows for that. At least we would modify function resolve(bytes memory encodedState, Transfer.Terms memory terms)
public
pure
returns (Transfer.Transaction memory) into function resolve(bytes memory encodedState, Transfer.Terms[] memory terms)
public
pure
returns (Transfer.Transaction[] memory) @IIIIllllIIIIllllIIIIllllIIIIllllIIIIll |
Yeah, I have been asking @IIIIllllIIIIllllIIIIllllIIIIllllIIIIll and @emansipater to explore these structs to see if there are better and more versatile alternatives we could implement. |
The current |
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 doesn't this PR modify ETHBucketAppState
instead of creating a new contract?
@IIIIllllIIIIllllIIIIllllIIIIllllIIIIll
This is not true precisely. |
Because I don't want to break the other code that relies on this, it would be too major of a change (not sure the dependency level?) since all playground and node is using this ETHBucket's 2 player mode. I thought adding support for n-party could be pipelined, parallel work that doesn't break current MVP/demo, and slowly adding respective support in the Node, then by the time both are ready, we can merge to make n-party the default. |
why would this be a problem?
agree, |
Because the
I don't think there is a relationship between the owners of the multisig and the perceived owners of the assets. For example, if you want to deposit DAI into the multisig then you would assign the multisig as the owner of the DAI in the DAI token contract. There would be a |
yes indeed, but in our case, it has to be an address payable, and in case of ERC20 or others, it would be contract function call instead of a eth transfer which forwards more than just 2300 gas, Sorry, I still don't see a problem
Ah.. you are right, which means we also need to extend RefundApp to other token and multi-party right?
|
Currently the way the code works, we use the The point I am making is that in the unsafe world, we could ignore Does it make sense? |
There is an important task I am implying here with @IIIIllllIIIIllllIIIIllllIIIIllllIIIIll and @emansipater that is we need a better more abstract data structure to get the benefits of both safe function calls and clean Solidity executors (e.g., We don't want to have to hard code new asset types into |
Also for now probably an ERC20RefundApp is simplest. |
Closing as work in #1263 will supercede this. |
extending the ETHBucket contract to n-party, so that right now all contracts are n-party compatible. (for channelized coinshuffle and others)
To avoid breaking existing code base especially dependencies in machine and node, I name it
FreeBalanceApp
,minor update on the
types
as well.