{"id":16116272,"url":"https://github.com/frol/near-devgov-badges","last_synced_at":"2025-04-06T08:44:42.083Z","repository":{"id":139346702,"uuid":"589966734","full_name":"frol/near-devgov-badges","owner":"frol","description":"NEAR DevGov Badges","archived":false,"fork":false,"pushed_at":"2023-01-17T14:36:40.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T14:19:17.113Z","etag":null,"topics":["blockchain","nearprotocol","nearsocial","rust","smart-contracts"],"latest_commit_sha":null,"homepage":"https://neardevgov.org","language":"Rust","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/frol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-01-17T11:08:09.000Z","updated_at":"2023-12-20T10:56:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e105174c-f8f9-4173-92e3-c88d197cad12","html_url":"https://github.com/frol/near-devgov-badges","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/frol%2Fnear-devgov-badges","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fnear-devgov-badges/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fnear-devgov-badges/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fnear-devgov-badges/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frol","download_url":"https://codeload.github.com/frol/near-devgov-badges/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457740,"owners_count":20941906,"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","nearprotocol","nearsocial","rust","smart-contracts"],"created_at":"2024-10-09T20:21:53.657Z","updated_at":"2025-04-06T08:44:42.057Z","avatar_url":"https://github.com/frol.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"NEAR DevGov Badges\n==================\n\n[NEAR DevGov](https://neardevgov.org) Badges are designed to provide recognition incentives to the community contributors.\n\nCurrently, this repo hold the smart-contract implementation of [NEAR DevGov] Badges that is mainly going to be used on [GigsBoard on near.social](http://devgovgigs.near.social/).\n\nThis contract implementation strictly complies with NFT standard (NEP-171, NEP-177, NEP-181, and NEP-256), though `nft_transfer` and `nft_transfer_call` function calls always return an error if one would call them since Badges are non-transferrable by their nature.\n\n\n## How to Deploy?\n\nHere are the shell commands using [`near-cli-rs`](https://near.cli.rs) to deploy it on mainnet:\n\n```sh\nOWNER_ACCOUNT_ID=frol.near\nCONTRACT_ACCOUNT_ID=devgov-badges.frol.near\nCONTRACT_FILE_PATH=./target/near/near_devgov_badges.wasm\n\ncargo near build --release\n\nnear-cli-rs account create-account fund-myself \"$CONTRACT_ACCOUNT_ID\" '5 NEAR' autogenerate-new-keypair save-to-keychain sign-as \"$OWNER_ACCOUNT_ID\"\n\nnear-cli-rs contract deploy \"$CONTRACT_ACCOUNT_ID\" \\\n  use-file \"$CONTRACT_FILE_PATH\" \\\n  with-init-call new_default_meta '{\"moderators\": [\"frol.near\"]}' --prepaid-gas '100 TeraGas' --attached-deposit '0 NEAR'\n```\n\nIn order to re-deploy with a clean state, remove the account and deploy again:\n\n```sh\nnear-cli-rs account delete-account \"$CONTRACT_ACCOUNT_ID\" beneficiary \"$OWNER_ACCOUNT_ID\"\n```\n\n\n## How to Mint a New Badge?\n\nGiven that the same badge can be rewarded to several users, it makes sense to deduplicate them and only create once and reward later (see next section to learn how to reward the badge to someone).\n\n```sh\nnear-cli-rs contract call-function as-transaction \"$CONTRACT_ACCOUNT_ID\" \\\n  mint_badge json-args '{ \"badge_id\": \"first_badge\", \"badge_metadata\": { \"title\": \"First Badge\", \"media\": \"bafybeibxixo6ntc7v7nwvatqbvbi3iug5wmlfillwq4lyjae2vg6rb7iim/1.gif\", \"description\": \"This is a test DevGov badge\" } }' \\\n  prepaid-gas '100 TeraGas' \\\n  attached-deposit '1 yoctoNEAR'\n```\n\n## How to Reward (mint NFT)?\n\nThe Badges that are rewarded to accounts are fully-compliant with NFT standard (NEP-171, NEP-177, NEP-181, and NEP-256), so rewarded users will see their rewards across the ecosystem (including Wallets, NEAR Social, GigsBoard).\n\n```sh\nnear-cli-rs contract call-function as-transaction \"$CONTRACT_ACCOUNT_ID\" \\\n  reward json-args '{\"badge_id\": \"first_badge\", \"receiver_account_id\": \"frol.near\"}' \\\n  prepaid-gas '100 TeraGas' \\\n  attached-deposit '1 yoctoNEAR'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrol%2Fnear-devgov-badges","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrol%2Fnear-devgov-badges","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrol%2Fnear-devgov-badges/lists"}