{"id":23223398,"url":"https://github.com/recheck-io/recheck-contract-near-rust","last_synced_at":"2025-06-29T00:33:58.991Z","repository":{"id":109064135,"uuid":"540328942","full_name":"ReCheck-io/recheck-contract-near-rust","owner":"ReCheck-io","description":"ReCheck Smart Contract for NEAR using Rust","archived":false,"fork":false,"pushed_at":"2022-11-08T11:10:59.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T16:36:31.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReCheck-io.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-09-23T07:32:08.000Z","updated_at":"2022-09-23T07:44:22.000Z","dependencies_parsed_at":"2023-03-25T12:49:11.465Z","dependency_job_id":null,"html_url":"https://github.com/ReCheck-io/recheck-contract-near-rust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ReCheck-io/recheck-contract-near-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReCheck-io%2Frecheck-contract-near-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReCheck-io%2Frecheck-contract-near-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReCheck-io%2Frecheck-contract-near-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReCheck-io%2Frecheck-contract-near-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReCheck-io","download_url":"https://codeload.github.com/ReCheck-io/recheck-contract-near-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReCheck-io%2Frecheck-contract-near-rust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262518102,"owners_count":23323301,"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-12-18T23:17:24.453Z","updated_at":"2025-06-29T00:33:58.982Z","avatar_url":"https://github.com/ReCheck-io.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# recheck-contract-near-rust\n\nReCheck's Smart Contract for NEAR using Rust\n\n# What This Contract Does\n\nStores unique records for usage in all of ReCheck's blockchain [**solutions**](https://recheck.io).\n\u003cbr /\u003e\n\n# Quickstart\n\nClone this repository locally or [**open it in GitHub**](https://github.com/ReCheck-io/recheck-contract-near-rust).\n\n```bash\ngit clone git@github.com:ReCheck-io/recheck-contract-near-rust.git\n```\n\nThen follow these steps inside the repo directory:\n\n### 1. Install Dependencies\n\nInstall Rust from the [**installer script**](https://rustup.rs).\n\n```bash\ncurl https://sh.rustup.rs/ -sSf | sh\n```\n\nSet the required target.\n\n```bash\nrustup target add wasm32-unknown-unknown\n```\n\n### 2. Build the Contract\n\nBuild the contract.\n\n```bash\nRUSTFLAGS='-C link-arg=-s' cargo build --target wasm32-unknown-unknown --release\n```\n\nRun contract tests and verify they pass.\n\n```bash\ncargo test\n```\n\n### 3. Deploy the Contract using NEAR CLI\n\nInstall [**NEAR CLI**](https://github.com/near/near-cli)\n\n```bash\nnpm install -g near-cli\n```\n\nBy default, it is set for \"testnet\". For \"mainnet\" set it like this.\n\n```bash\nexport NEAR_ENV=mainnet\n```\n\nYou can verify it to be sure.\n\n```bash\necho $NEAR_ENV\n```\n\nLogin with your NEAR wallet.\n\n```bash\nnear login\n```\n\nDeploy the contract using a new testnet account.\n\n```bash\nnear dev-deploy ./target/wasm32-unknown-unknown/release/recheck_near.wasm\n```\n\nFor mainnet you can create a sub account first.\n\n```bash\nnear create-account SUB-ACCOUNT.YOUR-WALLET-ID.near --masterAccount YOUR-WALLET-ID.near --initialBalance DESIRED-AMMOUNT\n```\n\nAnd then deploy with the sub account.\n\n```bash\nnear deploy YOUR-NEW-ACCOUNT.near ./target/wasm32-unknown-unknown/release/recheck_near.wasm\n```\n\nAny sub account can be added to your wallet with its private key.\n\n```bash\nhttps://wallet.near.org/auto-import-secret-key#YOUR_ACCOUNT_ID/YOUR_PRIVATE_KEY\n```\n\nAll account keys are located here.\n\n```bash\ncd ~/.near-credentials\n```\n\nIf any of the steps fails due to low balance use this formula to convert yocto to near.\n\n```bash\nX yocto / 10^24 = Y NEAR\n```\n\n### 4. Interact with the Contract using NEAR CLI\n\nExecute change method (*you have to be logged in with the **same** NEAR wallet used for deployment*)\n\n```bash\nnear call --accountId YOUR-WALLET-ID.TESTNET ACCOUNT-USED-FOR-DEPLOYMENT createSubRecordWithExtras2 '{\"record_id_str\":\"SET_HASH_VALUE\",\"parent_record_id_str\":\"SET_HASH_VALUE\",\"trail_str\":\"SET_HASH_VALUE\",\"trail_signature_str\":\"SET_HASH_VALUE\",\"extra_0_str\":\"SET_HASH_VALUE\",\"extra_1_str\":\"SET_HASH_VALUE\"}'\n```\n\nExecute view method (*with **any** logged in wallet*)\n\n```bash\nnear view --accountId ANY-WALLET-ID.TESTNET ACCOUNT-USED-FOR-DEPLOYMENT records '{\"record_id_str\":\"SET_HASH_VALUE\"}'\n```\n\n### 5. Function Call Keys\n\nIf you don't want to use the Full Access Keys you can create Function Call Keys for the smart contract account.\n\nFirst generate the new key.\n\n```bash\nnear generate-key\n```\n\nThen add the newly created key to the smart contract account.\n\n```bash\nnear add-key ACCOUNT-USED-FOR-DEPLOYMENT NEWLY_CREATED_PUB_KEY --contract-id ACCOUNT-USED-FOR-DEPLOYMENT\n```\n\n---\n\n# Learn More\n\n1. Learn more about the contract through its [**README**](./README.md).\n2. Test [**our solution**](https://beta.recheck.io/) which uses this contract.\n3. Check our [**GitHub**](https://github.com/ReCheck-io/) for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecheck-io%2Frecheck-contract-near-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecheck-io%2Frecheck-contract-near-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecheck-io%2Frecheck-contract-near-rust/lists"}