{"id":18263328,"url":"https://github.com/safe-global/claiming-app-data","last_synced_at":"2025-04-04T20:31:11.402Z","repository":{"id":57764512,"uuid":"527299893","full_name":"safe-global/claiming-app-data","owner":"safe-global","description":"Vesting data converter and proofs generator.","archived":false,"fork":false,"pushed_at":"2024-10-25T12:38:07.000Z","size":175774,"stargazers_count":6,"open_issues_count":3,"forks_count":9,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-10-25T15:52:48.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/safe-global.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-21T18:58:05.000Z","updated_at":"2024-10-25T15:32:42.000Z","dependencies_parsed_at":"2024-11-05T11:14:27.799Z","dependency_job_id":"1949dce5-31b2-4448-999c-67e38903e4d5","html_url":"https://github.com/safe-global/claiming-app-data","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fclaiming-app-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fclaiming-app-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fclaiming-app-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fclaiming-app-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/safe-global","download_url":"https://codeload.github.com/safe-global/claiming-app-data/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247246287,"owners_count":20907768,"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":[],"created_at":"2024-11-05T11:10:50.197Z","updated_at":"2025-04-04T20:31:06.392Z","avatar_url":"https://github.com/safe-global.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claiming-app-data\nVesting data converter and proofs generator.\n\nGuardian data converter, address resolver, and image loader. All images are scaled and converted to PNG.\n\n\n# Endpoints\n\n## Staging endpoints\n\nList of guardians\n```\nhttps://safe-claiming-app-data.staging.5afe.dev/guardians/guardians.json\n```\nGuardian images\n```\nhttps://safe-claiming-app-data.staging.5afe.dev/guardians/images/\\(address_checksummed)_\\(scale=1|2|3)x.png\n```\nAllocation\n```\nhttps://safe-claiming-app-data.staging.5afe.dev/allocations/{chain_id}/{address}.json\n```\nSnapshot allocations\n```\nhttps://safe-claiming-app-data.staging.5afe.dev/allocations/{chain_id}/snapshot-allocations-data.json\n```\n\n## Production endpoints\n```\nhttps://safe-claiming-app-data.gnosis-safe.io/guardians/guardians.json\n```\nGuardian images\n```\nhttps://safe-claiming-app-data.gnosis-safe.io/guardians/images/\\(address_checksummed)_\\(scale=1|2|3)x.png\n```\nAllocation\n```\nhttps://safe-claiming-app-data.gnosis-safe.io/allocations/{chain_id}/{address}.json\n```\nSnapshot allocations\n```\nhttps://safe-claiming-app-data.gnosis-safe.io/allocations/{chain_id}/snapshot-allocations-data.json\n```\n\n\n# Deployments\n\n\n## Guardians\n\n### Staging\n\nDeployment on staging can be started using `Deploy Guardians` action. Action runs only on `main` branch and can be started manually.\n\n### Production\nDeployment to production is done with `Deploy All (Release)` action. Action is triggered by publishing new release:\n1. Draft a release and tag it with vx.y.z version tag.\n2. Deployment action will be triggered for release.\n3. Ask devops to deploy data to production.\n\n### Prerequisites\n\n- Place csv with guardian data under `guardians/assets/guardians.csv`.\n\n- Not all guardian images could be scaled to square dimensions without distorting the image.\nSeparate versions of images were created and placed under `guardians/assets/images` for such guardians.\nThis image collection should be extended if another guardian is added, that has long or wide image.\nImages from `guardians/assets/images` will be taken for a guardian during conversion instead of an image specified by a link.\n\n- Naming convention for image files under `guardians/assets/images`:\n```\n\u003cguardian name\u003e.png\n```\n\n### Guardians CSV\nGuardians csv file contains following fields\n\n - Guardian name\n - Description of reasons for becoming a delegate\n - Description of former contributions\n - Guardian address or ENS name\n - Image url\n - Start Date (UTC)\n - Submit Date (UTC)\n - Network ID\n - Tags\n\n### Guardians file structure\n```\n[\n    {\n        \"name\": \"guardian name\",\n        \"address\": \"checksummed address\",\n        \"ens\": \"ens name if available\",\n        \"image\" \"(address_checksummed)_3x.png\"\n        \"reason\": \"reason for becoming a delegate\",\n        \"contribution\": \"former contributions\"\n    },\n    ...\n]\n```\n\n## Vesting Data\n\n### Staging\n\nDeployment on staging can be started using `Deploy Vestings` action. Action runs only on `main` branch and can be started manually.\nWorkflow input parameter `chain_id` must be selected before action can be started.\n\n### Production\n\nDeployment to production is done with `Deploy All (Release)` action. Action is triggered by publishing new release.\n1. Draft a release and tag it with vx.y.z version tag.\n2. Deployment action will be triggered for release.\n3. Ask devops to deploy data to production.\n\n### Prerequisites\n\n- Place csv files with vesting data under `vestings/assets/{chain_id}/{type}_airdrop.csv`.\nNaming should be `user_airdrop.csv` for user airdrop and `ecosystem_airdrop.csv` for ecosystem airdrop (`type` is `user` or `ecosystem`).\n\n### Vesting csv\nVesting csv file contains following fields\n\n - Owner address\n - Vesting duration in weeks\n - Vesting start date (ISO 8601 Format)\n - Vesting amount in wei\n\n### Allocation file structure\n\n#### Vesting file (`--export allocations`)\nContains all defined allocations for a specific address with proofs.\n```\n[\n    {\n        \"tag\": \"[user | user_v2 | ecosystem]\",\n        \"account\": \"checksummed address\",\n        \"chainId\": chain id,\n        \"contract\": \"checksummed airdrop contract addres\",\n        \"vestingId\": \"vesting hash\",\n        \"durationWeeks\": integer,\n        \"startDate\": timestamp,\n        \"amount\": \"amount in wei\",\n        \"curve\": integer,\n        \"proof\": [\n        ]\n    },\n    ...\n ]\n```\n\n##### Snapshot file (`--export snapshot`)\nContains all defined allocation. Proofs are not included.\n```\n[\n    [\n        {\n            \"tag\": \"[user | user_v2 | ecosystem]\",\n            \"account\": \"checksummed address\",\n            \"chainId\": chain id,\n            \"contract\": \"checksummed airdrop contract addres\",\n            \"vestingId\": \"vesting hash\",\n            \"durationWeeks\": integer,\n            \"startDate\": timestamp,\n            \"amount\": \"amount in wei\",\n            \"curve\": integer\n        },\n        ...\n    ],\n    ...\n]\n```\n\n\n# Setting up locally\nCreate python virtual environment\n```\nmkdir env\npython -m venv env\n```\nActivate a virtual environment\n```\nsource env/bin/activate\n```\nInstall dependencies\n```\npip install -r requirements.txt\npip install pre-commit\npre-commit install -f\n```\n\n## Guardians\n\nPlace guardians.csv under `guardians/assets`\n\nCustom guardian images should be placed under `guardians/assets/images`\n\nMake your infura project id available for guardian processing script\n```\nexport INFURA_PROJECT_ID=\u003cyour infura project id\u003e\n```\n\n### Generating\n\nStart guardian data processing by running\n```\npython import_guardians.py\n```\n\nGenerated data will be placed under `../data/guardians`\n\nGuardians list: `../data/guardians/guardians.json`\n\nGuardian images: `../data/guardians/images/`\n\n## Vestings\n\nPlace vesting csv files for a network under `vestings/assets/{chain_id}`.\nNaming should be `user_airdrop.csv` for user airdrop and `ecosystem_airdrop.csv` for ecosystem airdrop.\n\n### Generating\n\nNow exporter script can be used to parse vesting csv files, generate proofs, and export data to different formats: either one file for snapshot allocation data or multiple files that contain vesting data for an address. The aforementioned steps can be performed at once or separately.\n\nExample:\n```\ncd vestings\npython exporter.py --chain-id 1 --output-directory ../data/allocations --process-vestings --generate-proofs --export allocations\n```\n\nIf you want to see all possible parameters\n```\npython vestings/exporter.py -h\n```\n\nExporter will place generated files under `{output_directory}/{chain_id}`\n\n\n# Contribute\nYou can contribute to this repo by creating a Pull Request or an issue. Please follow the default template set for the Pull Requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fclaiming-app-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafe-global%2Fclaiming-app-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fclaiming-app-data/lists"}