{"_id":"@aragon/oracle-token-balance","_rev":"22-0ed2a9f294b15beebaf0245d12ed8c90","name":"@aragon/oracle-token-balance","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@aragon/oracle-token-balance","version":"1.1.0","keywords":[],"_id":"@aragon/oracle-token-balance@1.1.0","maintainers":[{"name":"arabot-1","email":"devops@aragon.org"},{"name":"hack0","email":"scherer.mat@gmail.com"},{"name":"yuetlooo","email":"contact@yuetloo.com"},{"name":"izqui","email":"jorge@aragon.one"},{"name":"luisivan","email":"me@luisivan.net"},{"name":"aragon-ci","email":"jorge+npmci@aragon.one"},{"name":"nivida","email":"sam@aragon.one"},{"name":"npmdoramon","email":"emaildoramon@gmail.com"},{"name":"vracine","email":"valentinracine@hotmail.com"},{"name":"novaknole","email":"giorgi.lagidze@toptal.com"}],"dist":{"shasum":"0648be6fbaa60b75457fdfc19254da5ab17038fc","tarball":"https://registry.npmjs.org/@aragon/oracle-token-balance/-/oracle-token-balance-1.1.0.tgz","fileCount":11,"integrity":"sha512-zQeyLi8e6j1DigKhITY9hy/4IFw8wMk79EppWy2buxOEboocWLcFKOBuO49B+viI6UzVP0XyDR9T8id2bTOQ3Q==","signatures":[{"sig":"MEYCIQDGLS8OYXhJvDSAHG4IE00a9RAoNMvtv+sNAHBSmET0gQIhAIwn2bj7jd0TCaCD8IRjYC2j7c2GPPMFpgxinEkMvkmh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":57439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwy7OCRA9TVsSAnZWagAA79UP/3U8NR1WXtSZ50nj1Y2T\n2tr4bqKd9hQgdeI3mRrbnktqBUmrojzxPca70omYyXlmxdUQmCViKK1YaeqP\n2RuQ7NKlQdyDrno1cCV3mFH3tATy8ZP3hJEKBLTx06tsqrUzkzISi+irmVu1\nTz5UlXvS+3pN+gOp1h00bB8IZyMZBaWQ2HxoH1hLP4HqxML9qLM1Sku5/sso\nSf22G88NEuIgDpVtgDBRHa/U3SssYRfceeCwb1ttPCM9CQCaIfYbE9rk/xOj\n3yfif+mTUG5QiQMws4bAFzs0Dr3RfnHuLFvBMrvF87M7CWBF3nWr2Y/KbEER\n1MR2zMrqvCZYS+wR7zUqTLf+JBWx445Hq6pSDbtClm5D3KaL7K03vVNn1n5h\n9r0TUWfKLUZdJ/3xLKAJ+0kwNAEdzkuIkRqBOKFDAZ6T/tFlyrk9X2F+pNAo\nRe/c/CUfkkEWoVkNd0vYYnevuxTvwWw/MmBXOOyUQF1wdcCKlkIaL1tce4Yb\nUyzmEMztuFSR97+7VdAYXewh0Adt8pIUzQcURLKlLhyIy1Gg1FNXyJfOY9EC\nK19cG/CgddTgZRuxDnAlkgyLApBxosj//5rc3oZl/brThxicnue7AepYELOe\nlonQqjNr3qmxUpp3BuTafZifIL/fWNmwY8q3rkSmToYf3BTgEqH/C7cHOK4d\ncT07\r\n=Olsb\r\n-----END PGP SIGNATURE-----\r\n"},"scripts":{"lint":"eslint . & solium --dir ./contracts","test":"cross-env TRUFFLE_TEST=true npm run ganache-cli:test","build":"hardhat compile --force","coverage":"cross-env SOLIDITY_COVERAGE=true npm run ganache-cli:test","lint:fix":"eslint . --fix & solium --dir ./contracts --fix","coveralls":"cat ./coverage/lcov.info | npx coveralls","ganache-cli:test":"sh ./node_modules/@aragon/test-helpers/ganache-cli.sh"},"_npmUser":{"name":"yuetlooo","email":"contact@yuetloo.com"},"_npmVersion":"6.14.15","description":"ACL Oracle enforcing token ownership","directories":{},"_nodeVersion":"14.17.6","dependencies":{"@aragon/os":"^4.0.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^5.13.0","ethers":"^5.4.7","ethlint":"^1.2.3","hardhat":"^2.6.5","prettier":"^1.17.1","@aragon/cli":"^6.0.0","ganache-cli":"^6.7.0","babel-eslint":"^10.0.3","eth-ens-namehash":"^2.0.8","eslint-plugin-node":"^10.0.0","@aragon/test-helpers":"^2.1.0","eslint-plugin-import":"^2.18.2","eslint-plugin-promise":"^4.2.1","@aragon/hardhat-aragon":"^0.3.0","@aragon/hardhat-config":"^0.2.0","eslint-config-prettier":"^6.5.0","eslint-config-standard":"^14.1.0","eslint-plugin-prettier":"^3.0.1","eslint-plugin-standard":"^4.0.1","@nomiclabs/hardhat-ethers":"^2.0.2","@nomiclabs/hardhat-etherscan":"^2.1.6"},"_npmOperationalInternal":{"tmp":"tmp/oracle-token-balance_1.1.0_1634851316199_0.743708384476587","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-10-21T21:21:56.147Z","modified":"2025-05-09T12:19:18.718Z","1.1.0":"2021-10-21T21:21:56.348Z"},"keywords":[],"description":"ACL Oracle enforcing token ownership","maintainers":[{"email":"devops-master@aragon.org","name":"devops-master"},{"email":"jjavieralvarezrodriguez@gmail.com","name":"jjavieralv"},{"email":"devops@aragon.org","name":"arabot-1"}],"readme":"# Token Oracle <img align=\"right\" src=\"https://github.com/1Hive/website/blob/master/website/static/img/bee.png\" height=\"80px\" />\n\nThe Token Oracle app is an [ACL Oracle](https://hack.aragon.org/docs/acl_IACLOracle). ACL Oracles are small helper functions that plug in to Aragon's access control list (ACL) to do more sophisticated permission evaluation. In the context of Dandelion Orgs, the Token Oracle is used to check if an address holds Dandelion Org tokens and is thus a member of the organization. This is done by setting a minimum required balance in the Token Oracle. Then when an account submits the intent to perform an action on an Aragon app function whose ROLE is protected behind this Oracle, the ACL will check with the Oracle if the account has the minimum balance of tokens required. The Token Oracle will return a boolean which can be used to either approve or reject the intent.\n\n#### 🚨 Security review status: Contracts frozen for audit as of commit [a9ae2edf9d7654b5a5b8135f49d081dc229c4d30](https://github.com/1Hive/token-oracle/tree/a9ae2edf9d7654b5a5b8135f49d081dc229c4d30/contracts)\n\nThe code in this repo has not been audited.\n\n## How does it work?\n\nThe Token Oracle app is initialized with the address of an ERC-20 token and a minimum balance. It has setters for both of these parameters. Other applications can then \"query\" through the ACL, the Token Oracle to determine if an account has at least the minimum balance of the token that the Token Oracle is tracking.\n\n## Initialization\n\nThe Token Oracle is initialized with `address _token` and `uint256 _minBalance` parameters.\n- The `address _token` parameter is the address of the token that Token Oracle is to track.\n- The `uint256 _minBalance` is the minimum balance of `address _token` that an account needs to hold.\n\n## Roles\n\nThe Token Oracle app should implement the following roles:\n- **SET_TOKEN_ROLE**: This allows for changing the token address that the Token Oracle tracks.\n- **SET_MIN_BALANCE_ROLE**: This allows for changing the threshold at which the Token Oracle returns a true or false boolean.\n\n## Interface\n\nThe Token Oracle does not have an interface. It is meant as a back-end helper function for Aragon applications to perform more sophisticated permissions evaluation.\n\n## How to run Token Oracle locally\n\nThe Token Oracle works in tandem with other Aragon applications. While we do not explore this functionality as a stand alone demo, the [Dandelion Org template](https://github.com/1Hive/dandelion-org) uses the Token Oracle and it can be run locally.\n\n## Deploying to an Aragon DAO\n\nTBD\n\n## Contributing\n\nWe welcome community contributions!\n\nPlease check out our [open Issues](https://github.com/1Hive/token-oracle/issues) to get started.\n\nIf you discover something that could potentially impact security, please notify us immediately. The quickest way to reach us is via the #dev channel in our [team Keybase chat](https://1hive.org/contribute/keybase). Just say hi and that you discovered a potential security vulnerability and we'll DM you to discuss details.\n","readmeFilename":"README.md"}