mattdf / payment-channel Goto Github PK
View Code? Open in Web Editor NEWEthereum Payment Channel in 50 lines of code
License: GNU General Public License v3.0
Ethereum Payment Channel in 50 lines of code
License: GNU General Public License v3.0
How can the recipient know the contract is valid and not just a decoy contract that also expose the same methods but never pays out?
What is the rationale behind requiring CloseChannel() to be called twice (once with Bob's signature and once with Alice's signature)? Alice should be responsible for closing the channel so she would be the one to call CloseChannel() twice and pay the transaction fees. Why not have CloseChannel() take both signatures so it can be closed with one transaction? This would be clearer, cheaper and faster. I can't think of any advantage to having two transactions be required.
I dont understand how that code:
proof = sha3(this, value); if (proof != h) throw;
which seems to be equivalent to:
sha3(ContractAddress, value) == sha3(RadomAddress, value)
may works.
Could you add a unit test that call contract's CloseChannel
function ?
Line 27 in 515c1b9
Hi!
I think your example is one of the clearest... Yet, it would be helpful if you used more descriptive variable names in the method signature ;)
Hi! I've been doing my research and I found this article Signing and Verifying Messages in Ethereum as well as this Ethereum Payment Channel in 50 Lines of Code and so far I haven't seen any implementation or tutorial about this.
My primary use of this smart contract is to pay transaction fees for the user in my Dapp. Is there an example of how to use the smart contract for a dapp?
Example: A simple ethereum dapp that writes a text on the blockchain but the creator of the contract pays for the transaction fees for a user that owns 0 ETH.
I really hope this is possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.