https://github.com/golemfactory/ethereum-contracts
Ethereum contracts for nanopayments schemes used in Golem Worldwide Supercomputer.
https://github.com/golemfactory/ethereum-contracts
Last synced: 3 months ago
JSON representation
Ethereum contracts for nanopayments schemes used in Golem Worldwide Supercomputer.
- Host: GitHub
- URL: https://github.com/golemfactory/ethereum-contracts
- Owner: golemfactory
- License: gpl-3.0
- Archived: true
- Created: 2016-02-19T16:46:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-12T22:46:34.000Z (about 9 years ago)
- Last Synced: 2024-10-01T01:56:52.446Z (over 1 year ago)
- Language: Python
- Homepage: http://golemproject.net
- Size: 41 KB
- Stars: 21
- Watchers: 12
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ethereum Contracts for Golem
Ethereum contracts for nanopayment schemes used in [Golem Worldwide Supercomputer](http://golemproject.net).
The contracts have been created thanks to the [BlockGrantX #1:Genesis](http://blockchainlabs.org/blockgrant-x-en).
Copyright © 2016
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the [GNU General Public License](LICENSE)
along with this program. If not, see .
## [Bank Of Deposit](BankOfDeposit.sol)
The Bank Of Deposit contract keeps users' ethers in contract's internal storage.
This approach allows performing one-to-many payment scheme that is linearly cheaper than
a series of individual Ethereum transactions.
## [Lottery](Lottery.sol)
The Lottery contract implements probabilistic one-to-many payments described in
[A Probabilistic Nanopayment Scheme for Golem](http://golemproject.net/doc/GolemNanopayments.pdf).
The contract allows organizing a lottery for multiple participants.
Only one of the participants becomes a winner and gets the right to collect the lottery's reward.
## Testing
The repository contains Python unit tests for the contracts. The [pyethereum](https://github.com/ethereum/pyethereum) is used to implement the tests.
```
pip install -r requirements.txt
python -m unittest discover tests
```