{"id":20310216,"url":"https://github.com/bloq/sol-address-list","last_synced_at":"2025-04-11T15:42:01.556Z","repository":{"id":45885894,"uuid":"288016739","full_name":"bloq/sol-address-list","owner":"bloq","description":"An address list ADT in Solidity","archived":false,"fork":false,"pushed_at":"2021-11-29T20:46:55.000Z","size":757,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-25T11:52:14.942Z","etag":null,"topics":["ethereum","ethereum-contract","ethereum-dapp","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bloq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-16T20:09:45.000Z","updated_at":"2021-11-29T20:45:36.000Z","dependencies_parsed_at":"2022-09-10T17:01:39.848Z","dependency_job_id":null,"html_url":"https://github.com/bloq/sol-address-list","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fsol-address-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fsol-address-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fsol-address-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fsol-address-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloq","download_url":"https://codeload.github.com/bloq/sol-address-list/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154987,"owners_count":21056544,"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","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":["ethereum","ethereum-contract","ethereum-dapp","solidity"],"created_at":"2024-11-14T17:30:30.334Z","updated_at":"2025-04-11T15:42:01.528Z","avatar_url":"https://github.com/bloq.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Action Status](https://github.com/bloq/sol-address-list/workflows/Address%20List/badge.svg)](https://github.com/bloq/sol-address-list/actions)\n\n# address-list\n\n## Summary\n\nThis is a simple list of admin-controlled addresses, forming an\n```\n        (address -\u003e uint256 metadata)\n```\non-chain mapping data type.\n\n## Install\n```\nnpm i address-list --save\n\n```\n\n## How to use\n```\n// MyContract.sol\ncontract MyContract {\n    IAddressList public immutable list;\n    constructor() public {\n        // Use latest factory contract address from ./deploy/*/contracts.json \n        IAddressListFactory addressFactory =\n            IAddressListFactory(0xD57b41649f822C51a73C44Ba0B3da4A880aF0029);\n        list = IAddressList(addressFactory.createList());\n    }\n  \n}\n```\n\n## Overview\n\nThe primary uses include governance, on-chain security, creating on-chain filtering lists, or creating\ncontract\u003c-\u003econtract proxy routes.  A key motivation was mirroring\nthe off-chain [Token Lists](https://uniswap.org/blog/token-lists/)\nwith similar on-chain infrastructure.\n\nAnybody may create and administer their own token list (\"AddressList\"),\nusing a provided factory contract.\n\nBeyond the usual whitelist filtering, on-chain token lists can be used\nto publish personal token lists, a list of all tokens in the Compound,\nSynthetix or Yearn universe, and more.\n\n## Features\n\n* Fast\n* O(1) queries, addition and removal\n* Admin-specified **metadata** value associated with each address.  uint256.  Cannot be zero.\n* Role-based access control (RBAC), to separate list admin duties\n  from list owner.\n\n## Metadata\n\nAs described in the summary, an AddressList is an on-chain\n(address,uint256) mapping utility.\n\nIn the simple case, the metadata value is set to one (1), to indicate\npresence in the set of addresses.\n\nIn more complex examples, this can be used in forwarding and proxy\nscenarios as an on-chain (address,address) mapping, or even an on-chain\n(uint256,address) mapping if you don't mind a few ugly casts.\n\nThe only requirements are that both key (address) and value (uint256)\nmust be non-zero.\n\n## Role in governance\n\nOne use case for AddressList is as a administered list, for an otherwise\ndecentralized system.   For example, a permissionless asset management\nsystem, with no owner, that relies on a administered token whitelist\nprovided by AddressList.  The gateway into this example system is\nprovided by an administrative multi-sig or DAO managing a list of\ntoken addresses.\n\n## Administration\n\nToken lists are administered by a list administrator, so delegated \nto the `LIST_ADMIN` role.  This is initially the contract owner - the\nEthereum account that called the factory contract.\n\nSee the [OpenZeppelin RBAC documentation](https://docs.openzeppelin.com/contracts/3.x/access-control#role-based-access-control) for further information\nabout administering roles.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloq%2Fsol-address-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloq%2Fsol-address-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloq%2Fsol-address-list/lists"}