{"id":20057709,"url":"https://github.com/raiden-network/raiden-token","last_synced_at":"2025-10-06T16:35:15.077Z","repository":{"id":145047878,"uuid":"93410874","full_name":"raiden-network/raiden-token","owner":"raiden-network","description":"Raiden Token and Issuance Contracts","archived":false,"fork":false,"pushed_at":"2018-04-12T20:06:50.000Z","size":467,"stargazers_count":44,"open_issues_count":7,"forks_count":28,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-06-09T04:40:21.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raiden-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-06-05T14:11:03.000Z","updated_at":"2025-03-21T14:34:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"081ff2cb-d802-470c-9630-466d567c197d","html_url":"https://github.com/raiden-network/raiden-token","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/raiden-network/raiden-token","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiden-network%2Fraiden-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiden-network%2Fraiden-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiden-network%2Fraiden-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiden-network%2Fraiden-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raiden-network","download_url":"https://codeload.github.com/raiden-network/raiden-token/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiden-network%2Fraiden-token/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266592198,"owners_count":23953109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T13:00:00.631Z","updated_at":"2025-10-06T16:35:10.028Z","avatar_url":"https://github.com/raiden-network.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raiden Token\n\n## Smart Contracts, Unittests and Infrastructure.\n\n### Installation\n\n#### Prerequisites\n\n * Python 3.6\n * [pip](https://pip.pypa.io/en/stable/)\n\n#### Setup\n\n * pip install -r requirements.txt\n\n#### Usage\n\n```sh\n\n# compilation\npopulus compile\n\n# tests\npytest -p no:warnings -s\npytest tests/test_auction.py -p no:warnings -s\n\n# Recommended:\npip install pytest-xdist\npytest -p no:warnings -s -n NUM_OF_CPUs\n\n```\n\n#### Deployment\n\n\n##### Chain setup\n\n * `privtest`\n   - start:\n   ```\n   geth --ipcpath=\"~/Library/Ethereum/privtest/geth.ipc\" --datadir=\"~/Library/Ethereum/privtest\"  --dev  --rpccorsdomain '*'  --rpc  --rpcport 8545 --rpcapi eth,net,web3,personal --unlock 0xf590ee24CbFB67d1ca212e21294f967130909A5a --password ~/password.txt\n\n   # geth console\n   # you have to mine yourself: miner.start()\n   geth attach ipc:/Users/user/Library/Ethereum/privtest/geth.ipc\n   ```\n\n * `kovan`\n   - change default account: [/populus.json#L189](/contracts/populus.json#L189)\n   - start https://github.com/paritytech/parity\n   ```\n   parity --geth --chain kovan --force-ui --reseal-min-period 0 --jsonrpc-cors http://localhost --jsonrpc-apis web3,eth,net,parity,traces,rpc,personal --unlock 0x5601Ea8445A5d96EEeBF89A67C4199FbB7a43Fbb --password ~/password.txt --author 0x5601Ea8445A5d96EEeBF89A67C4199FbB7a43Fbb\n   ```\n * `ropsten`\n   - change default account: [/contracts/populus.json#L52](/contracts/populus.json#L52)\n   - start:\n   ```\n   geth --testnet --rpc  --rpcport 8545 --unlock 0xbB5AEb01acF5b75bc36eC01f5137Dd2728FbE983 --password ~/password.txt\n\n   ```\n\n * `rinkeby`\n   - https://www.rinkeby.io/ (has a Faucet)\n   - change default account: [/contracts/populus.json#L224](/contracts/populus.json#L224)\n   - start:\n   ```\n   # First time\n   geth --datadir=\"~/Library/Ethereum/rinkeby\" --rpc --rpcport 8545 init ~/Library/Ethereum/rinkeby.json\n   geth --networkid=4 --ipcpath=\"~/Library/Ethereum/rinkeby/geth.ipc\" --datadir=\"~/Library/Ethereum/rinkeby\" --cache=512 --ethstats='yournode:Respect my authoritah!@stats.rinkeby.io' --bootnodes=enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303 --rpc --rpcport 8545 --unlock 0xd96b724286c592758de7cbd72c086a8a8605417f --password ~/password.txt\n\n   # use geth console\n   geth attach ipc:/Users/user/Library/Ethereum/rinkeby/geth.ipc\n   ```\n\n* `private chain`\n\t- private tester chain has a default account at `0x00a329c0648769a73afac7f9381e08fb43dbea72`, loaded with lots of ether\n\t- you will need to create an empty password file in order to unlock the account\n\n\t```sh\n\tparity --dapps-hosts=\"all\" --dapps-apis-all --jsonrpc-hosts=\"all\" --gas-floor-target 0 --gasprice 0 --geth --chain dev --force-ui --reseal-min-period 0 --rpc  --jsonrpc-apis all --password /tmp/empty_password --unlock 0x00a329c0648769a73afac7f9381e08fb43dbea72\n\t```\n\n\n#### Auction deployment \u0026 simulation\n\nDeployment script can do both deployment of the auction and can also run the simulation.\n\nDeployment:\n- owner must own enough ether to deploy the contracts\n- wallet is the address at which all the ETH is sent after each bid\n- whitelister is the address that has permission to add/remove address to/from the auction's whitelist\n- if you want to run the simulation, note the contract addresses\n```sh\npython -m deploy.deploy_testnet --chain privtest --owner 0x00a329c0648769a73afac7f9381e08fb43dbea72  deploy --wallet 0x00a329c0648769a73afac7f9381e08fb43dbea72 --whitelister 0x00a329c0648769a73afac7f9381e08fb43dbea72 --price-start 2000000 --price-constant 1574640000 --price-exponent 4\n```\n\nSimulation:\nThe bidders are given some ether at the beggining. You can use `--distribution-limit` option to cap the amount distributed.\nSimulation will create n bidders that will send a random amount of ether in random intervals. If bidder runs out of funds, it will stop.\nIf you set `--claim-tokens` option, bidders will also try to claim the tokens at the end of the simulation.\n```sh\npython -m deploy.deploy_testnet --chain privtest --owner 0x00a329c0648769a73afac7f9381e08fb43dbea72 simulation --bid-interval 3 --max-bid-ceiling 0.9 --max-bid-amount 10000000000 --min-bid-amount 100000000 --bidders 100 --claim-tokens\n```\n\nBoth:\nTo simplify things, you can just deploy \u0026 simulate:\n```sh\npython -m deploy.deploy_testnet --chain privtest --owner 0x00a329c0648769a73afac7f9381e08fb43dbea72  \\\n\tdeploy --price-start 2000000 --price-constant 1574640000 --price-exponent 4\n\tsimulation --bid-interval 3 --max-bid-ceiling 0.9 --max-bid-amount 10000000000 --min-bid-amount 100000000 --bidders 100 --claim-tokens\n```\n\n\n\n#### Automatic token distribution\n\nDeploys the Distributor contract used for claiming tokens for the bidders. Runs the script for retrieving bidder addresses from the DutchAuction contract events and batching them.\n\n```sh\npython -m distributor.main --chain privtest --auction ${AUCTION_ADDRESS} --auction-tx ${AUCTION_DEPLOY_TX_HASH}\n```\n\nOptional:\n\n`--distributor ${DISTRIBUTOR_ADDRESS}` can be used to run the script with an already deployed Distributor contract.\n`--batch-number` can be used to set how many address we send to `Distributor.distribute()`, otherwise the number is calculated with estimateGas.\n`--gas-price` sets a custom gas price.\n\n### Solidity coding style\n\nFor solidity we generally follow the style guide as shown in the [solidity documentation](http://solidity.readthedocs.io/en/develop/style-guide.html)\nwith a few notable exceptions:\n\n**Variable Names**\n\nAll variable name should be in snake case, just like in python. Function names on the other hand should be mixedCase.\nMixedCase is essentially like CamelCase but with the initial letter being a small letter.\nThis helps us to easily determine which function calls are smart contract calls in the python code side.\n\n```js\nfunction iDoSomething(uint awesome_argument) {\n    doSomethingElse();\n}\n```\n\n**Modifiers in long function declarations**\n\n\nThis is how the solidity documentation suggests it:\n\n```js\nfunction thisFunctionNameIsReallyLong(\n    address x,\n    address y,\n    address z,\n)\n    public\n    onlyowner\n    priced\n    returns (address)\n{\n    doSomething();\n}\n```\n\nThis is the minor modification we make in order to make the code more readable when quickly skimming through it.\nThe thinking here is to easily spot the start of the function's block when skimming and not have the modifiers\nappearing as if they are a block on their own due to the hanging parentheses.\n\n```js\nfunction thisFunctionNameIsReallyLong(\n    address x,\n    address y,\n    address z)\n\n    public\n    onlyowner\n    priced\n    returns (address)\n{\n    doSomething();\n}\n```\n\n\n## Web App\n\nWeb prototype for testing auction models.\n\n\n### Installation\n\n#### Prerequisites\n\n * Meteor 1.5\n\n#### Setup\n\n```\ncd app\nmeteor npm install\n```\n\n#### Usage\n\n```\ncd app\nmeteor\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraiden-network%2Fraiden-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraiden-network%2Fraiden-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraiden-network%2Fraiden-token/lists"}