{"_id":"@aragon/apps-payroll","_rev":"55-326af23dffdd7178dded77bc8c16f895","name":"@aragon/apps-payroll","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"@aragon/apps-payroll","version":"0.0.1","keywords":[],"author":{"name":"Aragon Institution MTU","email":"contact@aragon.one"},"license":"GPL-3.0","_id":"@aragon/apps-payroll@0.0.1","maintainers":[{"name":"bingen","email":"bingen@aragon.one"},{"name":"bpierre","email":"bonjour@pierrebertet.net"},{"name":"izqui","email":"jorge@aragon.one"},{"name":"licuende","email":"luis@aragon.one"},{"name":"luisivan","email":"me@luisivan.net"},{"name":"onbjerg","email":"nordbjerg.oliver@gmail.com"},{"name":"sohkai","email":"qisheng.brett.sun@gmail.com"}],"contributors":[{"name":"ßingen","email":"bingen@aragon.one"}],"dist":{"shasum":"6519f9ff3d6ef762c89e8a72749dbd47eb789c8b","tarball":"https://registry.npmjs.org/@aragon/apps-payroll/-/apps-payroll-0.0.1.tgz","fileCount":24,"integrity":"sha512-nHLhZxe4bm1WATaWMJObbheTe+0InFfi4z6XCnnU6UoIKXS52P5Qi5eQqo8QFbO3Sujcku7DpfJNWggFac0Htw==","signatures":[{"sig":"MEQCICjKPwreXKf4f13ZQlNBGv0CPpn3d9XkSBXrvvgfi8qcAiAyC5Gww2Ltwg7+0UP/IKL0FUfxNNe33itGPs4lSI/9FQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":95657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBLNoCRA9TVsSAnZWagAACu4P/AxSjPcqx3RMWG0aDsK6\nKf3fIlm/xLIzzkAfsKxXaIouEzFB/3pRxKtQpT6/IGQhAapTNCFV8mdq5Pjd\n72BSo6aa7TfeKygX/jy3SMu/gxvoUK7A9qdW91MZ3QScuvqT9czO4hkTVKlK\n60auAt/W4u21BUtmG5hvr4gZI9mZdGJuM9onsfOKgp5qpcNP0kO5+nCl1W/8\n4lRdJ7qFFaxt/fW6Aa6h02QTNVVFeCZ3T/wT2DWpPavmiyipaSs57qFS7K9u\nAKvVVExOgxDtg7RurL5qKEhmRGYWOXpqevau66B46GijxHoG9w1m94AeJ4PJ\ngbNtPumP4amHY8W5Un0WM1PbS3hcVq59+mg7JyOZaYoet5F3F2Xc61T+Itcz\nDkuk0P5JtlVXSYRhj3/MZV6aOOU0Ekvt7m9p2LvVAXB8MAeJjjjz8G9eAmVw\nx4RfqXilwAZukAss2l/curn0BY8xMexbnXbljAUO1qSrqFFDozZXoShIYoCz\naaJmfPE5bE2vDQDSzm1+3qWNdqb2hfBxwRgLcGom4UWPZfg9H8C8rW+gpF0e\n7MUHFiofSDxLZGLj8uzQsgCnbDAgXV6TNfGBiv35J9SI/XPgVneaU/CMvCQr\nJV2TQ1Fl9R+PC1h5BuTYbYes4BodbmChPM4pgkk9BQXe+HTMYfArkYtDYPhv\nI3Fs\r\n=pI+F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"lint":"solium --dir ./contracts","test":"TRUFFLE_TEST=true npm run ganache-cli:test","compile":"truffle compile","coverage":"SOLIDITY_COVERAGE=true npm run ganache-cli:test","test:gas":"GAS_REPORTER=true npm test","truffle:dev":"truffle dev","ganache-cli:test":"./node_modules/@aragon/test-helpers/ganache-cli.sh"},"_npmUser":{"name":"sohkai","email":"qisheng.brett.sun@gmail.com"},"_npmVersion":"5.5.1","description":"_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/apps/payroll)","directories":{},"_nodeVersion":"9.2.0","dependencies":{"@aragon/os":"^3.1.4","@aragon/apps-finance":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"solium":"^1.1.3","truffle":"4.0.5","webpack":"^3.7.1","ganache-cli":"^6.1.0","babel-helpers":"^6.24.1","babel-polyfill":"^6.26.0","babel-register":"^6.26.0","solidity-coverage":"0.3.5","@aragon/apps-vault":"^2.0.1","babel-preset-es2015":"^6.18.0","@aragon/test-helpers":"^1.0.0","babel-preset-stage-2":"^6.24.1","babel-preset-stage-3":"^6.17.0","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/apps-payroll_0.0.1_1527034726755_0.6818805149345932","host":"s3://npm-registry-packages"}},"1.0.0-rc.1":{"name":"@aragon/apps-payroll","version":"1.0.0-rc.1","keywords":["app","aragon","dao","payroll"],"author":{"name":"Aragon Association","email":"legal@aragon.org"},"license":"(GPL-3.0-or-later OR AGPL-3.0-or-later)","_id":"@aragon/apps-payroll@1.0.0-rc.1","maintainers":[{"name":"2color","email":"daniel@2color.me"},{"name":"aragon-ci","email":"jorge+npmci@aragon.one"},{"name":"bingen","email":"bingen@aragon.one"},{"name":"bpierre","email":"hello@pierre.world"},{"name":"facuspagnuolo","email":"facundo_spagnuolo@icloud.com"},{"name":"izqui","email":"jorge@aragon.one"},{"name":"luisivan","email":"me@luisivan.net"},{"name":"sohkai","email":"qisheng.brett.sun@gmail.com"}],"contributors":[{"name":"ßingen","email":"bingen@aragon.one"},{"name":"Lisandro Corbalán","email":"lisandro.corbalan@altoros.com"},{"name":"Sebastián Galiano","email":"sebastian.galiano@altoros.com"}],"dist":{"shasum":"c20942d69d9c08a6ae25598a9358762643f0644d","tarball":"https://registry.npmjs.org/@aragon/apps-payroll/-/apps-payroll-1.0.0-rc.1.tgz","fileCount":180,"integrity":"sha512-fYcHqN5yTVHJynlDzVDvIHtjzbt1ajC56twJaKYql6BO73WHjOSTVT/MQG4eGnZAXyLWxlPsTNg8x255+HStag==","signatures":[{"sig":"MEUCIDdwR4D007B2y26fUDBYErN3/zpXY2aCkxTt4L9WtMA+AiEAhxlzTA+n1c1ZRHEdJNUMHZmKOblPVDoiBOhofs+qpvQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25623882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPugJCRA9TVsSAnZWagAARwoP/RaaZkbO6QWi3VtrF4PG\n6Mt0fnbm5U5mcCU61nzBDdbtcVpOTpsKMSnj5OtedAz8zq3nlpZOm+tI5Kwg\nIrx1XAOul8hkHbQC4fCxGMpndGwLlaTOgEv+E9ZR1dWU6UKbLblhqnUidNNF\nkXRFj31FRLTXu3Bgyqf8fO6BNy3QkDJSFDJr3iL4BpULB0YxzHRELYIe86nO\nAa+0K5tr/8VG6koHgQECxLxEAavGlVo29LEQDsR2pEjCnJRzR0cDO1vviOq4\nnFF14nOsg4Sp5r9dBEqs5z11p3ApsHc/JMB9PLtrHhB0i+TzDHXZbE6tJdBb\nl8vEpxM70D8z3TOjwZNYNVfdsQ3R205owH0KTsgJB6aqc0P+RtgVBwj1aME3\nDI+TsJS8WMCMwhzcz1f9Qat8bQx2fFIWkPsWZzll14dF4//ooJwL3lo5Iwl6\nRnEiZYloamcvvaiPyByNRS+TXNH70/vW9aGEh/7zYr8C373TZx4EHFQkI1eU\n2B/1D9C9LjSTRLQRFJ6U1V2v/2XCQiYiVBGz4NZy70FJQI1hLnHZgxfDGcwq\nj3v0Hvig3DaziPFMeryBI7qOnjv2toY95eMjhkm2blDax5sqXxHQSGR1EoU5\noCG0xxn2+5bB+f/rBbhLl03dgjFBjjiUqWBN2VU6wEzuJ8b5Ym5sjaKHtTfA\nxIPM\r\n=ALef\r\n-----END PGP SIGNATURE-----\r\n"},"scripts":{"dev":"npm start -- --http localhost:8001 --http-served-from ./app/build","lint":"solium --dir ./contracts","test":"TRUFFLE_TEST=true npm run ganache-cli:test","build":"cd app && npm run build","start":"aragon run --accounts 9 --environment default --files app/build/ --template PayrollKit --template-init @ARAGON_ENS","compile":"truffle compile","prepare":"npx apps-shared-scripts-prepare","coverage":"SOLIDITY_COVERAGE=true npm run ganache-cli:test","test:all":"npm run test:only:payday && npm run test:except:payday","test:gas":"GAS_REPORTER=true npm run test","dev:reset":"npm run dev -- --reset","abi:extract":"truffle-extract --output abi/ --keys abi","truffle:dev":"truffle dev","apm:prepublish":"npm run compile","prepublishOnly":"truffle compile --all && npm run abi:extract -- --no-compile","ganache-cli:test":"./node_modules/@aragon/test-helpers/ganache-cli.sh","install:frontend":"cd app && npm install","test:only:payday":"npm run test test/contracts/Payroll_payday.test.js","apm:publish:major":"aragon apm publish major --files app/build/ --prepublish-script apm:prepublish","apm:publish:minor":"aragon apm publish minor --files app/build/ --prepublish-script apm:prepublish","apm:publish:patch":"aragon apm publish patch --files app/build/ --prepublish-script apm:prepublish","test:except:payday":"npm run test $(find test -name '*.test.js' ! -name 'Payroll_payday.test.js')"},"_npmUser":{"name":"sohkai","email":"qisheng.brett.sun@gmail.com"},"_npmVersion":"6.10.2","description":"_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@aragon/os":"4.2.0","@aragon/apps-finance":"3.0.0","@aragon/ppf-contracts":"1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"solium":"^1.2.3","truffle":"4.1.14","@aragon/cli":"^6.0.0","ganache-cli":"^6.4.3","truffle-extract":"^1.2.1","eth-gas-reporter":"^0.2.0","solidity-coverage":"^0.6.2","@aragon/apps-vault":"4.0.0","@aragon/test-helpers":"^2.0.0","ethereumjs-testrpc-sc":"^6.4.5-sc.3","@aragon/apps-shared-minime":"1.0.0","@aragon/apps-token-manager":"2.0.0","@aragon/apps-shared-scripts":"^1.0.0","@aragon/apps-shared-migrations":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apps-payroll_1.0.0-rc.1_1564403720393_0.4123479494794382","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@aragon/apps-payroll","version":"1.0.0","keywords":["app","aragon","dao","payroll"],"author":{"name":"Aragon Association","email":"legal@aragon.org"},"license":"(GPL-3.0-or-later OR AGPL-3.0-or-later)","_id":"@aragon/apps-payroll@1.0.0","maintainers":[{"name":"2color","email":"daniel@2color.me"},{"name":"aquigorka","email":"gorka@aquigorka.com"},{"name":"aragon-ci","email":"jorge+npmci@aragon.one"},{"name":"bingen","email":"bingen@aragon.one"},{"name":"bpierre","email":"hello@pierre.world"},{"name":"facuspagnuolo","email":"facundo_spagnuolo@icloud.com"},{"name":"izqui","email":"jorge@aragon.one"},{"name":"luisivan","email":"me@luisivan.net"},{"name":"sohkai","email":"qisheng.brett.sun@gmail.com"}],"contributors":[{"name":"ßingen","email":"bingen@aragon.one"},{"name":"Lisandro Corbalán","email":"lisandro.corbalan@altoros.com"},{"name":"Sebastián Galiano","email":"sebastian.galiano@altoros.com"}],"dist":{"shasum":"4f44faa1701a9eb2821df6e39e8e00d940412e30","tarball":"https://registry.npmjs.org/@aragon/apps-payroll/-/apps-payroll-1.0.0.tgz","fileCount":180,"integrity":"sha512-GaWIpOk+xBKLFeco8GZ+9sZlrUSTIxxEV/mjMj2Gfqq0SyULc9+42M6gu/y53Yx3axeI/ZJzz2yvn6B0P3TMGQ==","signatures":[{"sig":"MEUCIQCU499McVtz4AcWV8pJ7+yd6OgWcZcJEV/krOShqQoUIgIgKXQ4flKavWk4oA8dVThMMwF5ImZpAI9peEnZqdIAM/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25626519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh110ECRA9TVsSAnZWagAAEWsP+we+j2hxL+EwyjmBfPmS\nb1CCwwJTukWImh09vzYxaHvxP8arBlq5faIXrfw8aNsWZ7B8QmLV/Z8i7h54\nkn2O6vCx7okA68Jp5985BtbRVmPAQ773fxxt5ZAIcT0pKK4q82UmtoZl/sAr\nC/F4n4G9uyAcVbLl2l17+CBI2n4ug1FFc6J6cVWWRJuEjxQZXKN4qXOk3vXV\nen9KfWIxULgrsPdhga/EUwmYr3xQv/nTqf+sLYt/0pWcW1Fh9ybgyS/yIv8N\n3Hu+0tT/D49Fc15QyqTGrN2ijS+J99kfTREr0+DuMCSY5TQqJALYiLr9zm20\n+mtbmH1L6XLXa1tqyg+aVAoq4eBEWFJwrkolf2dRXlTNPr2sBD1a5pa5QWkj\n7qESc6X53P5o+JQbsiPTJ2aM1DhyMJQGXYOh+TJy69ojtM2oC8RfCpk1lzxi\nW/TrJ86L9JCQ0XGyCRZ7KhrrDEnrpqvn5Hm7baenxSd+I9G7ftC++Cg+PlRQ\nUsoUyDnFD8D5tAQmKZ9MzfehGFWQ9+TlRoYq+q7B0KzBSL/lqvDnTwVf0H3+\n3C54bO9TxADzuuRjZKKdPrn/YodFqXO8Blc+CEYtNSeMfAg0PkBioiJuxEpv\n1SbXsLdhAYncGFcGE6gstcwB25CMCxXMabIxLR8lwgMXqjGM9PRN+o5RcnHs\ninTw\r\n=kG27\r\n-----END PGP SIGNATURE-----\r\n"},"scripts":{"dev":"npm start -- --http localhost:8001 --http-served-from ./app/build","lint":"solium --dir ./contracts","test":"TRUFFLE_TEST=true npm run ganache-cli:test","build":"cd app && npm run build","start":"aragon run --accounts 9 --environment default --files app/build/ --template PayrollKit --template-init @ARAGON_ENS","compile":"truffle compile","prepare":"npx apps-shared-scripts-prepare","coverage":"SOLIDITY_COVERAGE=true npm run ganache-cli:test","test:all":"npm run test:only:payday && npm run test:except:payday","test:gas":"GAS_REPORTER=true npm run test","dev:reset":"npm run dev -- --reset","abi:extract":"truffle-extract --output abi/ --keys abi","truffle:dev":"truffle dev","apm:prepublish":"npm run compile","prepublishOnly":"truffle compile --all && npm run abi:extract -- --no-compile","ganache-cli:test":"./node_modules/@aragon/test-helpers/ganache-cli.sh","install:frontend":"cd app && npm install","test:only:payday":"npm run test test/contracts/Payroll_payday.test.js","apm:publish:major":"aragon apm publish major --files app/build/ --prepublish-script apm:prepublish","apm:publish:minor":"aragon apm publish minor --files app/build/ --prepublish-script apm:prepublish","apm:publish:patch":"aragon apm publish patch --files app/build/ --prepublish-script apm:prepublish","test:except:payday":"npm run test $(find test -name '*.test.js' ! -name 'Payroll_payday.test.js')"},"_npmUser":{"name":"facuspagnuolo","email":"facundo_spagnuolo@icloud.com"},"_npmVersion":"6.7.0","description":"_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)","directories":{},"_nodeVersion":"9.11.1","dependencies":{"@aragon/os":"4.2.0","@aragon/apps-finance":"3.0.0","@aragon/ppf-contracts":"1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"solium":"^1.2.3","truffle":"4.1.14","@aragon/cli":"^6.0.0","ganache-cli":"^6.4.3","truffle-extract":"^1.2.1","eth-gas-reporter":"^0.2.0","solidity-coverage":"0.6.2","@aragon/apps-vault":"4.0.0","@aragon/test-helpers":"^2.1.0","ethereumjs-testrpc-sc":"^6.5.1-sc.0","@aragon/apps-shared-minime":"1.0.0","@aragon/apps-token-manager":"2.0.0","@aragon/apps-shared-scripts":"^1.0.0","@aragon/apps-shared-migrations":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apps-payroll_1.0.0_1567594979651_0.2889977289576091","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-05-23T00:18:46.534Z","modified":"2025-05-09T12:18:50.185Z","0.0.1":"2018-05-23T00:18:46.809Z","1.0.0-rc.1":"2019-07-29T12:35:20.570Z","1.0.0":"2019-09-04T11:03:00.017Z"},"author":{"name":"Aragon Association","email":"legal@aragon.org"},"license":"(GPL-3.0-or-later OR AGPL-3.0-or-later)","keywords":["app","aragon","dao","payroll"],"description":"_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)","contributors":[{"name":"ßingen","email":"bingen@aragon.one"},{"name":"Lisandro Corbalán","email":"lisandro.corbalan@altoros.com"},{"name":"Sebastián Galiano","email":"sebastian.galiano@altoros.com"}],"maintainers":[{"email":"devops-master@aragon.org","name":"devops-master"},{"email":"jjavieralvarezrodriguez@gmail.com","name":"jjavieralv"},{"email":"devops@aragon.org","name":"arabot-1"}],"readme":"# [Payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)\n\n_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)\n\nThe purpose of the Payroll app is to implement a Payroll system in multiple currencies.\n\n### Initialization\n\nInitializing a Payroll app requires the following parameters:\n\n- **Finance**: a reference to [Finance](https://github.com/aragon/aragon-apps/tree/master/apps/finance) instance that Payroll app will use to pay salaries. Finance in turn will use [Vault](https://github.com/aragon/aragon-apps/tree/master/apps/vault) to access funds, but going through Finance will have everything properly accounted for.\n- **Ether Token**: EtherToken instance used as ether.\n- **Denomination Token**: token used to denominate salaries. All exchange rates for other tokens will be paired with it.\n\n### Lifecycle\n\n#### Add allowed token\n```\npayroll.setAllowedToken(address _allowedToken, true)\n```\nAdd token to the list of accepted ones for salary payment. It needs `MANAGE_ALLOWED_TOKENS_ROLE`.\n\n#### Set exchange rate\n```\npayroll.setExchangeRate(address token, uint256 denominationExchangeRate)\n```\nSet the exchange rate for an allowed token against the Payroll denomination token. It needs `ORACLE_ROLE`.\n\n#### Add employee\nThree options can be used:\n```\npayroll.addEmployee(address accountAddress, uint256 initialYearlyDenominationSalary, string role, uint256 startDate)\n```\nAdd employee to the organization. Start date is used as the initial payment day. If it's not provided, the date of the transaction will be used. It needs `ADD_EMPLOYEE_ROLE`.\n\n#### Modify employee salary\n```\npayroll.setEmployeeSalary(uint128 employeeId, uint256 yearlyDenominationSalary)\n```\nIt needs `ADD_EMPLOYEE_ROLE`.\n\n#### Remove employee\n```\npayroll.removeEmployee(uint128 employeeId)\n```\nRemove employee from organization. The owed up to current date salary will be transferred to the employee. It needs `REMOVE_EMPLOYEE_ROLE`.\n\n#### Determine allocation\n```\npayroll.determineAllocation(address[] tokens, uint8[] distribution)\n```\nEmployees can set the proportion of every allowed token that want to be used for their salary payment. Distribution values are expressed as a ratio to 100.\n\n#### Request payroll\n```\npayroll.payday()\n```\nEmployees can request payroll whenever they want and the proportional amount of their anual salary since the last request (or since the start date if it's the first one) will be transferred.\n\n#### Change account address\n```\npayroll.changeAddressByEmployee(address newAddress)\n```\nEmployees can change their own address.\n\n### Limitations\n\n- Allowed tokens can not be removed right now. It wouldn't be trivial, as employees should be notified and they should modifiy their allocation.\n- If an employee requests payroll having allocated an allowed token which doesn't have an exchange rate, the transaction will fail. In other words, exchange rates must be set before employees try to use those tokens for their payrolls.\n- Exchange rate is not updated automatically. So it could happen that rates are outated when payrolls are requested. An external mechanism for updating rates often should be implemented.\n- If there are not enough funds for a given token, `payday` will fail. There's no automatic token conversion yet.\n","readmeFilename":"README.md"}