{"id":26172185,"url":"https://github.com/viaprotocol/contract-serializer","last_synced_at":"2025-04-14T20:21:33.869Z","repository":{"id":45526903,"uuid":"446776731","full_name":"viaprotocol/contract-serializer","owner":"viaprotocol","description":"Microservice to extract structured information on EVM smart contracts.","archived":false,"fork":false,"pushed_at":"2022-02-10T18:52:23.000Z","size":24,"stargazers_count":13,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T08:35:41.349Z","etag":null,"topics":["blockchain","ethereum","etherscan","nft","smart-contracts","solidity"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viaprotocol.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":"2022-01-11T10:34:16.000Z","updated_at":"2024-09-07T08:35:24.000Z","dependencies_parsed_at":"2022-07-18T23:02:34.214Z","dependency_job_id":null,"html_url":"https://github.com/viaprotocol/contract-serializer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viaprotocol%2Fcontract-serializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viaprotocol%2Fcontract-serializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viaprotocol%2Fcontract-serializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viaprotocol%2Fcontract-serializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viaprotocol","download_url":"https://codeload.github.com/viaprotocol/contract-serializer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248952349,"owners_count":21188429,"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":["blockchain","ethereum","etherscan","nft","smart-contracts","solidity"],"created_at":"2025-03-11T19:53:39.253Z","updated_at":"2025-04-14T20:21:33.849Z","avatar_url":"https://github.com/viaprotocol.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Contract Serializer\nMicroservice to extract structured information on EVM smart contract.\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n## Why? \n\nModern NFT contracts may have different names for `getPrice`, `mint` and `totalSupply` methods (or even be a property instead). So it is hard to extract the information and call methods - they just have different names!\n\nThe purpose of this tool is to extract NFT contract information in structured way with common names for same properties. \n\n## How does it work?\nIt basically utilises Etherscan API and parse Etherscan 'Read Contract' page using BS4.\n\n# Example\nCheck deployed demo: https://contractserializer.herokuapp.com/. Open link to read the swagger docs.\n\n## Get contract's static variables\nGET https://cs.webill.io/137/0xbc1fe0f3b02ce5ff516f14ac7b79dd6397a54b9c/readcontract\nParams: chain_id, contract_address\n\u003cdetails\u003e\n  \u003csummary\u003eExample response\u003c/summary\u003e\n  \n```json\n{\n  \"data\": {\n    \"raw_data\": {\n      \"DEVELOPER\": \"https://buildship.dev\",\n      \"DEVELOPER_ADDRESS\": \"0x704c043ceb93bd6cbe570c6a2708c3e1c0310587\",\n      \"MAX_SUPPLY\": \"10000\",\n      \"MAX_TOKENS_PER_MINT\": \"20\",\n      \"PROVENANCE_HASH\": \" \",\n      \"REFERRAL_PERCENT\": \"3000\",\n      \"baseURI\": \"https://metadata.buildship.dev/api/token/moon/\",\n      \"contractURI\": \"https://metadata.buildship.dev/api/token/moon/\",\n      \"getPrice\": \"200000000000000000000\",\n      \"getReservedLeft\": \"0\",\n      \"name\": \"NFT Moon Metaverse\",\n      \"owner\": \"0x197727ad2ec7326952843fbd83a0d57b907afbdf\",\n      \"saleStarted\": \"True\",\n      \"startingIndex\": \"0\",\n      \"symbol\": \"MOON\",\n      \"totalSupply\": \"178\"\n    },\n    \"serialized\": {\n      \"nft_contract\": {\n        \"price\": 200000000000000000000,\n        \"total_supply\": 178,\n        \"max_supply\": 10000,\n        \"paused\": false,\n        \"max_tokens_per_mint\": 20,\n        \"base_uri\": \"https://metadata.buildship.dev/api/token/moon/\"\n      }\n    }\n  },\n  \"contract_address\": \"0xbc1fe0f3b02ce5ff516f14ac7b79dd6397a54b9c\",\n  \"chain_id\": 137\n} \n```\n\u003c/details\u003e\n\n## Get ABI of a contract in network\nGET https://cs.webill.io/137/0xbc1fe0f3b02ce5ff516f14ac7b79dd6397a54b9c/abi\nParams: chain_id, contract_address\nExample response:\n\n\n# Local development\n1. Copy .env_template file to .env and fill it with your Etherscan creadentials.\n\n\n2. Run fastapi server:\n``` bash\nuvicorn main:app --reload\n```\n\n\n---\n\u003ci\u003eMade by [via.exchange](https://via.exchange) team\u003c/i\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviaprotocol%2Fcontract-serializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviaprotocol%2Fcontract-serializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviaprotocol%2Fcontract-serializer/lists"}