-
Notifications
You must be signed in to change notification settings - Fork 62
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(composed-arbitrable): implement #129
Merged
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
epiqueras
changed the title
(WIP) feat(composed-arbitrable): implement
feat(composed-arbitrable): implement
Sep 26, 2018
epiqueras
force-pushed
the
feat/composed-arbitrable-contracts
branch
from
September 27, 2018 16:39
333c0d6
to
6df2f6d
Compare
0xferit
reviewed
Oct 5, 2018
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.
Couldn't spot a serious flaw.
contracts/standard/arbitration/composed-arbitrable/fee/MultiPartyInsurableFees.sol
Show resolved
Hide resolved
contracts/standard/arbitration/composed-arbitrable/fee/MultiPartyInsurableFees.sol
Show resolved
Hide resolved
contracts/standard/arbitration/composed-arbitrable/example/TwoPartyArbitrableEscrowPayment.sol
Show resolved
Hide resolved
contracts/standard/arbitration/composed-arbitrable/example/TwoPartyArbitrableEscrowPayment.sol
Show resolved
Hide resolved
0xferit
reviewed
Oct 7, 2018
contracts/standard/arbitration/composed-arbitrable/fee/MultiPartyInsurableFees.sol
Show resolved
Hide resolved
Build is failing because of #121 , I would rebase onto master branch and force push but in case you don't want it I'm leaving as is. |
I doubt the compiler optimizes like that.
If it does, `a = true` would be the same as `a = a || true`, because it
would see `a === true` and it wouldn't write.
…On Sun, Oct 7, 2018 at 11:18 AM Ferit Tunçer ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
contracts/standard/arbitration/composed-arbitrable/fee/MultiPartyInsurableFees.sol
<#129 (comment)>
:
> + fundDisputeCache.refundedValue = msg.value - fundDisputeCache.keptValue;
+ if (fundDisputeCache.keptValue > 0) {
+ _paidFees.totalValue[_paidFees.totalValue.length - 1] += fundDisputeCache.keptValue;
+ _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][_side] += fundDisputeCache.keptValue;
+ _paidFees.contributions[_paidFees.contributions.length - 1][msg.sender][_side] += fundDisputeCache.keptValue;
+ }
+ if (fundDisputeCache.refundedValue > 0) msg.sender.transfer(fundDisputeCache.refundedValue);
+ emit Contribution(_agreementID, _paidFees.stake.length - 1, msg.sender, fundDisputeCache.keptValue);
+
+ // Check if enough funds have been gathered and act accordingly.
+ if (
+ _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][_side] >= fundDisputeCache.requiredValueForSide ||
+ (fundDisputeCache.appealing && !fundDisputeCache.appealPeriodSupported)
+ ) {
+ if (_side == 0 && !(fundDisputeCache.appealing && !fundDisputeCache.appealPeriodSupported)) { // Losing side and not direct appeal.
+ if (!_paidFees.loserFullyFunded[_paidFees.loserFullyFunded.length - 1])
Hmm.
Do you think that the following is equivalent gas-wise?
_paidFees.loserFullyFunded[_paidFees.loserFullyFunded.length - 1] = _paidFees.loserFullyFunded[_paidFees.loserFullyFunded.length - 1] || true;
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASRQaKT2s8hx4yGxf8bMMhPltD-lHLsFks5uiilVgaJpZM4W5Nc5>
.
|
epiqueras
force-pushed
the
feat/composed-arbitrable-contracts
branch
from
October 8, 2018 16:50
a78b94f
to
e93332c
Compare
…bitrator to an agreement
epiqueras
force-pushed
the
feat/composed-arbitrable-contracts
branch
from
October 8, 2018 16:51
e93332c
to
2b951c1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #126