{"id":24667980,"url":"https://github.com/vvizardev/web3connect-smart-contract","last_synced_at":"2026-05-16T13:36:27.227Z","repository":{"id":257804442,"uuid":"824064002","full_name":"vvizardev/web3connect-smart-contract","owner":"vvizardev","description":"This is the 💲 Payment 💰 System Smart Contract for Freelancer Website.","archived":false,"fork":false,"pushed_at":"2024-09-17T20:58:52.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T13:37:14.225Z","etag":null,"topics":["payment","smart","smart-contract","solana"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/vvizardev.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":"2024-07-04T09:39:21.000Z","updated_at":"2024-09-18T16:05:44.000Z","dependencies_parsed_at":"2024-09-29T07:06:19.066Z","dependency_job_id":"32e0a37c-b64a-44bb-98cf-2164ed8201d6","html_url":"https://github.com/vvizardev/web3connect-smart-contract","commit_stats":null,"previous_names":["wizasol/web3connect-smart-contract","vvizardev/web3connect-smart-contract"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vvizardev/web3connect-smart-contract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fweb3connect-smart-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fweb3connect-smart-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fweb3connect-smart-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fweb3connect-smart-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvizardev","download_url":"https://codeload.github.com/vvizardev/web3connect-smart-contract/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fweb3connect-smart-contract/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33104698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["payment","smart","smart-contract","solana"],"created_at":"2025-01-26T08:25:07.064Z","updated_at":"2026-05-16T13:36:27.212Z","avatar_url":"https://github.com/vvizardev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web3Connect-SmartContract\nThis is the 💲 Payment 💰 System Smart Contract for Freelancer Website.\n\n## Install Dependencies\n- Install `node` and `yarn`\n- Install `ts-node` as global command\n- Confirm the solana wallet preparation: `/home/---/.config/solana/id.json` in test case\n\n## Usage\n- Main script source for all functionality is here: `/cli/script.ts`\n- Program account types are declared here: `/cli/types.ts`\n- Idl to make the JS binding easy is here: `/cli/freelancer.ts`\n\nAble to test the script functions working in this way.\n- Change commands properly in the main functions of the `script.ts` file to call the other functions\n- Confirm the `ANCHOR_WALLET` environment variable of the `ts-node` script in `package.json`\n- Run `yarn ts-node`\n\n# Features\n\n##  How to deploy this program?\nFirst of all, you have to git clone in your PC.\nIn the folder `freelancer`, in the terminal \n1. `yarn`\n\n2. `anchor build`\n   In the last sentence you can see:  \n```\n To deploy this program:\n  $ solana program deploy /home/.../freelancer/target/deploy/freelancer.so\nThe program address will default to this keypair (override with --program-id):\n  /home/.../freelancer/target/deploy/freelancer-keypair.json\n```  \n3. `solana-keygen pubkey /home/.../freelancer/target/deploy/freelancer-keypair.json`\n4. You can get the pubkey of the `program ID : ex.\"5N...x6k\"`\n5. Please add this pubkey to the lib.rs\n  `line 14: declare_id!(\"5N...x6k\");`\n6. Please add this pubkey to the Anchor.toml\n  `line 4: freelancer = \"5N...x6k\"`\n7. Please add this pubkey to the types.ts\n  `line 6: export const PAYMENT_PROGRAM_ID = new PublicKey(\"5N...x6k\");`\n  \n8. `anchor build` again\n9. `solana program deploy /home/.../freelancer/target/deploy/freelancer.so`\n\n\u003cp align = \"center\"\u003e\nThen, you can enjoy this program 🎭\n\u003c/p\u003e\n\u003c/br\u003e\n\n## How to use?\n\n### - As a Project Rep\n#### + Create\nThe Project Rep can create the project with several milestones, the function `createProject`\n```js\n/**\n * @dev Create the project by rep\n * @param milestones Show how many milestones in the project\n * @param milestoneAmount Milestone amounts as array\n * @param milestoneDate Milestone date as array\n * @param createTime The project's create time which is stored in BE\n */\nexport const createProject = async (\n    milestones: number,\n    milestoneAmount: number[],\n    milestoneDate: number[],\n    createTime: number\n)\n```\n#### + Escrow\nThe Project Rep can escrow the funds for the specific milestone, the function `createEscrow`\n```js\n/**\n * @dev Escrow funds for `milestone`\n * @param milestone The milestone to escrow funds\n * @param createTime This project's create time which is stored in BE\n */\nexport const createEscrow = async (\n    milestone: number,\n    createTime: number\n) \n```\n#### + Edit\nThe Project Rep can edit the milestone schedule, the function `createEdit`\n```js\n/**\n * @dev Edit the milestones of the project\n * @param startMilestone The start milestone to edit\n * @param newMilestones The whole milestones to newly set\n * @param createTime This project's create time which is stored in BE\n * @param milestoneAmount New milestone amounts to be changed\n * @param milestoneDate New milestone date to be changed\n */\nexport const createEdit = async (\n    startMilestone: number,\n    newMilestones: number,\n    createTime: number,\n    milestoneAmount: number[],\n    milestoneDate: number[],\n) \n```\n#### + Release\nThe Project Rep / Admin / Freelancer (2 weeks after finished the task) can release the funds to the freelancer, the function `createRelease`\n```js\n\n/**\n * @dev Release funds to the completed milestone\n * @param milestone The completed milestone to be released\n * @param creator The creator's address of this project which is stored in BE\n * @param createTime This project's create time which is stored in BE\n */\nexport const createRelease = async (\n    milestone: number,\n    creator: PublicKey,\n    createTime: number,\n)\n```\n\n### - As a Freelancer\n#### + Accept\nThe freelancer can accept the project which is created by a proejct Rep, the function `createAccept`\n\n```js\n/**\n * @dev Accept the project\n * @param creator The creator's address of this project which is stored in BE\n * @param createTime This project's create time which is stored in BE\n */\nexport const createAccept = async (\n    creator: PublicKey,\n    createTime: number,\n)\n```\n#### + Mark as Complete\nThe freelancer mark as complete after he has done the project, call the function `createMark`\n```js\n/**\n * Mark as complete\n * @param milestone The milestone to mark as complete\n * @param creator The creator's address of this project which is stored in BE\n * @param createTime This project's create time which is stored in BE\n */\nexport const createMark = async (\n    milestone: number,\n    creator: PublicKey,\n    createTime: number,\n)\n```\n## For Unit Test\nFlow(create -\u003e accept -\u003e escrow -\u003e mark as complete -\u003e release)\n1. Decommand the line 46: and `yarn ts-node`\n2. Command the line 46, decommand the line 53: and `yarn free`\n3. Command the line 53, decommand the line 47: and `yarn ts-node`\n4. Command the line 47, decommand the line 54: and `yarn free`\n5. Command the line 54, decommand the line 49: and `yarn ts-node`\n\nHere `ts-node` is for Project Rep's wallet integration and perform the project Rep's functions, \nand `free` is for freelancer's wallet integration and perform the freelancer's functions.\n\n```js\nyarn ts-node:  \"export ANCHOR_WALLET=/home/ubuntu.../keypair.json \u0026\u0026 ts-node ./cli/script.ts\"\n```\n\n```js\nyarn free:  \"export ANCHOR_WALLET=/home/ubuntu.../keypair.json \u0026\u0026 ts-node ./cli/script.ts\"\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvizardev%2Fweb3connect-smart-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvizardev%2Fweb3connect-smart-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvizardev%2Fweb3connect-smart-contract/lists"}