-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add channel openWithDeposit
wrapper
#1486
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1486 +/- ##
=======================================
Coverage 80.66% 80.66%
=======================================
Files 22 22
Lines 1562 1562
Branches 190 190
=======================================
Hits 1260 1260
Misses 255 255
Partials 47 47 Continue to review full report at Codecov.
|
"TokenNetwork DEPLOYMENT": 3735537, | ||
"TokenNetwork.closeChannel": 122819, | ||
"TokenNetwork.openChannel": 115056, | ||
"TokenNetwork.openChannelWithDeposit": 153255, |
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.
153255 < (115056 + 58468 = 173524)
That's 12% less. A nice gas reduction in addition to being twice as fast as doing two transactions.
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.
That's 20.269, so nearly the cost of a transaction.
7413bc4
to
3101b4e
Compare
This simplifies and accelerates channel opening when deposits are desired.
3101b4e
to
67c992f
Compare
What this PR does
Fixes #1436
Add a wrapper that opens a channel and deposits.
Why I'm making this PR
What's tricky about this PR (if any)
Any reviewer can check these:
make compile_contracts
and add the resultingraiden_contracts/data/contracts.json
in the PR.[skip ci]
in the commit message so Travis does not waste time.[skip ci]
and let Travis check the hash of the source.solidityFunction
_solidity_argument
solidity_variable
python_variable
PYTHON_CONSTANT
etherscan_verify.py
runs on the new contract.gas.json
.require()
orassert()
require()
doesn't require these steps.pytest.raises(TransactionFailed, match="error message"):
And before "merge" all checkboxes have to be checked. If you find redundant points, remove them.