{"id":16036496,"url":"https://github.com/nibbstack/erc721-validator","last_synced_at":"2025-03-16T07:32:28.682Z","repository":{"id":41139451,"uuid":"141095548","full_name":"nibbstack/erc721-validator","owner":"nibbstack","description":"ERC721 smart contract validator","archived":false,"fork":false,"pushed_at":"2022-02-27T10:30:46.000Z","size":467,"stargazers_count":74,"open_issues_count":2,"forks_count":21,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-20T08:44:04.011Z","etag":null,"topics":["erc721","ethereum","hacktoberfest","smart-contracts","validator"],"latest_commit_sha":null,"homepage":"https://erc721validator.org/","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nibbstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-16T06:25:32.000Z","updated_at":"2025-02-13T01:21:01.000Z","dependencies_parsed_at":"2022-08-22T20:40:50.472Z","dependency_job_id":null,"html_url":"https://github.com/nibbstack/erc721-validator","commit_stats":null,"previous_names":["0xcert/erc721-validator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nibbstack%2Ferc721-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nibbstack%2Ferc721-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nibbstack%2Ferc721-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nibbstack%2Ferc721-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nibbstack","download_url":"https://codeload.github.com/nibbstack/erc721-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806049,"owners_count":20350775,"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":["erc721","ethereum","hacktoberfest","smart-contracts","validator"],"created_at":"2024-10-08T22:05:03.939Z","updated_at":"2025-03-16T07:32:28.287Z","avatar_url":"https://github.com/nibbstack.png","language":"Solidity","readme":"[![npm version](https://badge.fury.io/js/%40nibbstack%2Ferc721-validator.svg)](https://badge.fury.io/js/%40nibbstack%2Ferc721-validator)\n\n\u003e Ethereum ERC-721 Contract Validator.\n\nThis is an open source package for NodeJS written with [TypeScript](https://www.typescriptlang.org). It allows for validating a contract against a series of tests to check its compliancy with the ERC-721 standard.\n\nThis package is actively maintained, well tested and already used in production environments. The source code is available on [GitHub](https://github.com/nibbstack/erc721-validator) where you can also find our [issue tracker](https://github.com/nibbstack/erc721-validator/issues).\n\n## How it works\n\nFor more information on how the validator works please check the [article explaining the technique](https://medium.com/hackernoon/https-medium-com-momannn-live-testing-smart-contracts-with-estimategas-f45429086c3a). \n\n## Installation\n\nRun the command below to install the package.\n\n```\nnpm install --save web3 @nibbstack/erc721-validator\n```\n\nThis package uses promises thus you need to use [Promise polyfill](https://github.com/taylorhakes/promise-polyfill) when promises are not supported.\n\n## Getting started\n\nInitialize the Web3 provider.\n\n```js\nimport * as Web3 from 'web3';\n\nconst web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));\n```\n\nLoad and parse data of a particular block.\n\n```js\nimport { Validator } from 'erc721-validator';\n\nconst validator = new ERC721Validator(web3);\nconst contract  = '0x...';\nconst token     = '123';\nconst giver     = '0x...';\n\nawait validator.basic(test, contract);                  // =\u003e [{...},{...},{...},{...}]\nawait validator.token(test, contract, token);           // =\u003e [{...},{...},{...},{...}]\nawait validator.transfer(test, contract, token, giver); // =\u003e [{...},{...},{...},{...}]\n```\n\n## API\n\n### ERC721Validator Class\n\n**ERC721Validator(web3)**\n\n\u003e Main class which allows for testing your contract validity.\n\n| Option | Type | Required | Default | Description\n|--------|------|----------|---------|------------\n| web3 | Web3 | Yes | - | Instance of a Web3 provider.\n\n**NOTICE:** The ERC721Validator class extends is a [RawModel class](https://github.com/xpepermint/rawmodeljs) and thus exposes all related helper methods.\n\n**ERC721Validator.prototype.basic(contract)**: Promise(JSON)\n\n\u003e Performes a series of basic contract tests.\n\n| Option | Type | Required | Default | Description\n|--------|------|----------|---------|------------\n| contract | String | Yes | - | Contract Address\n\n**ERC721Validator.prototype.token(contract, tokenId)**: Promise(JSON)\n\n\u003e Performes a series of tests to validate contract token compliancy.\n\n| Option | Type | Required | Default | Description\n|--------|------|----------|---------|------------\n| contract | String | Yes | - | Contract Address\n| tokenId | String | Yes | - | Token ID\n\n**ERC721Validator.prototype.transfer(contract, tokenId, giver)**: Promise(JSON)\n\n\u003e Performes a series of tests to validate contract token transfer compliancy.\n\n| Option | Type | Required | Default | Description\n|--------|------|----------|---------|------------\n| contract | String | Yes | - | Contract Address\n| tokenId | String | Yes | - | Token ID\n| giver | String | Yes | - | Address of giver\n\n## License (MIT)\n\nCopyright (c) 2018 nibbstack \u003cinfo@nibbstakc.com\u003e.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnibbstack%2Ferc721-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnibbstack%2Ferc721-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnibbstack%2Ferc721-validator/lists"}