{"id":23193462,"url":"https://github.com/william-versatile/imbue-net-node","last_synced_at":"2025-10-30T16:11:15.094Z","repository":{"id":230306662,"uuid":"771434031","full_name":"William-versatile/imbue-net-node","owner":"William-versatile","description":"network-node","archived":false,"fork":false,"pushed_at":"2024-03-13T09:46:57.000Z","size":3926,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T15:17:08.041Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/William-versatile.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}},"created_at":"2024-03-13T09:43:21.000Z","updated_at":"2024-03-13T09:47:54.000Z","dependencies_parsed_at":"2024-03-29T02:35:42.385Z","dependency_job_id":null,"html_url":"https://github.com/William-versatile/imbue-net-node","commit_stats":null,"previous_names":["william-versatile/imbue-net-node"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/William-versatile%2Fimbue-net-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/William-versatile%2Fimbue-net-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/William-versatile%2Fimbue-net-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/William-versatile%2Fimbue-net-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/William-versatile","download_url":"https://codeload.github.com/William-versatile/imbue-net-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247302171,"owners_count":20916646,"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":["rust"],"created_at":"2024-12-18T13:11:35.694Z","updated_at":"2025-10-30T16:11:10.049Z","avatar_url":"https://github.com/William-versatile.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/w3f/Grants-Program/pull/703\"\u003e\u003cimg src=\"https://github.com/ImbueNetwork/website-assets/blob/main/Web3%20Foundation%20Grants%20Badge/PNG/web3%20foundation_grants_badge_black.png?raw=true\" alt=\"imbue-web3-open-grant\" /\u003e\u003c/a\u003e\nImbue Network is a decentralised crowdfunding DAO built on top of the Polkadot blockchain platform. It is an idea incubator open to the entire world that allows anyone, from any walk of life and for any kind of endeavour, to submit and vote on Ideas worth funding from the communities that believe in them the most.\n\n[![xcm-docs](https://img.shields.io/badge/xcm-docs-green)](https://github.com/ImbueNetwork/imbue/blob/main/assets/docs/README_XCM.md)\n\n# Imbue Collator\n\nThis documentation will cover the below explanation\n1) Launching the network: Will explain how you can launch the network locally using the docker configuration with as simple as one step\n2) Going through our proposal pallet (our core pallet), explaining the usage step by step\n\n## 1) Launching the network locally - Using Docker (Automated)\n\nThe default compose file automatically launches a local network containing multiple relaychain validators (polkadot nodes) and collators (Imbue collators) which you can interact with using the [browser-based polkadotjs wallet](https://polkadot.js.org/apps/#/explorer). Additionally, docker can be used to launch a collator to supported testnets.\nFollow these steps to prepare a local development environment :hammer_and_wrench:\n\n### Setup\n\n1) You will need to [install docker](https://www.docker.com/products/docker-desktop) to launch our pre-built containers\n2) Checkout the repository\n```bash\ngit clone --recursive https://github.com/ImbueNetwork/imbue.git\n\ncd imbue\n```\n\n#### Run the tests\n\n```bash\ncargo test\n```\n\n### Run\n\nLaunch a local network using docker compose:\n\n```bash\ndocker-compose -f scripts/docker-compose.yml up -d\n```\n\nThe `scripts` directory contains the docker-compose file which is used to launch the network using a single command. Launching with docker ensures parachains are registered to the relaychain automatically and will begin authoring blocks shortly after launch.  \n\nTo ensure your network is functioning properly:  \n1) Confirm docker containers are running\n```bash\ndocker ps\n``````\n- These container names should have a status of 'up':\n    - frontend \n    - launch\n \n2) Check the container logs\n```bash \ndocker logs launch\n```\n- If the network was launched successfully, you will see something similar to this:\n![POLKADOT LAUNCH COMPLETE](./assets/imgs/polkadot_launch.png)\n```bash \ndocker logs frontend\n```\n- If successful, ```Accepting connections at http://localhost:3001``` will be displayed in the terminal.\n\n\n## 2) Launching the network locally from source - Manually\nYou can manually launch a relaychain and parachain then register the parachain directly from the source code\n\n### Prerequisite for both approaches\n\n- First, setup your [Rust development environment](https://substrate.dev/docs/en/knowledgebase/getting-started). Then,\n\n- Checkout the imbue and polkadot repositories and build the respective binaries:\n\n  - imbue\n\n    ```bash\n    git clone --recursive https://github.com/ImbueNetwork/imbue.git\n    cd imbue\n    git submodule update --recursive --remote\n\n    cargo build --release\n    ```\n\n  - polkadot\n\n    ```bash\n    git clone https://github.com/paritytech/polkadot.git\n\n    cd polkadot\n    cargo build --release\n    \n    \n    If the prerequisites have been completed and we have our binaries as shown [above](#prerequisite-for-both-approaches), follow the steps below to launch the network.\n\n\n#### Create local chain spec\n\n```bash\n# Generate westend-local spec file\n./target/release/polkadot build-spec --chain westend-local --raw --disable-default-bootnode \u003e westend-local.json\n```\n\n#### Start relay chain validators\n\n```bash\n# Start Alice\n./target/release/polkadot --alice --validator --base-path cumulus_relay/alice --chain rococo-local.json --port 30444 --ws-port 9944\n\n# Start Bob\n./target/release/polkadot --bob --validator --base-path cumulus_relay/bob --chain rococo-local.json --port 30555 --ws-port 9955\n\n# Start Charlie\n./target/release/polkadot --charlie --validator --base-path cumulus_relay/bob --chain rococo-local.json --port 30666 --ws-port 9966\n\n# Start Dave\n./target/release/polkadot --dave --validator --base-path cumulus_relay/bob --chain rococo-local.json --port 30777 --ws-port 9977\n```\n#### Create genesis \u0026 WASM files\n\n```bash\ncd imbue\n\n# Genesis\n./target/release/imbue export-genesis-state --parachain-id 2000 \u003e para-2000-genesis-local\n\n# WASM\n./target/release/imbue export-genesis-wasm \u003e para-wasm-local\n```\n\n#### Start a collator\n\n```bash\n# Customize the --chain flag for the path to your 'rococo-local.json' file\n./target/release/imbue --alice --collator --force-authoring --parachain-id 2000 --base-path cumulus_relay/imbue --port 40333 --ws-port 8844 -- --execution wasm --chain \u003cpath to 'rococo-local.json' file\u003e --port 30343 --ws-port 9942\n\n./target/release/imbue --alice --collator --force-authoring --parachain-id 2013 --base-path cumulus_relay/imbue --port 40334 --ws-port 8845 -- --execution wasm --chain \u003cpath to 'rococo-local.json' file\u003e --port 30344 --ws-port 9943\n\n```\n\n- You should see your collator running and peering with the already running relay chain validators.  \n- Your parachain will not begin authoring blocks until you have registered it on the relay chain.\n\n\n### Interacting with your network\n\nTo connect to your local network's user interface, visit [polkadot.js](http://localhost:3001/#/explorer) on port 3001. Interacting with your network is detailed [below](#proposal-pallet-interaction)\n\n\n**NOTE:** If you launched your network using docker or polkadot-launch, your parachains should be automatically registered to the relaychain and you can skip the below two steps and can continue [here](#proposal-pallet-interaction).\n   \n#### Validate the parachain is registered\n\n1. Verify parathread is registered\n   - On custom endpoint 9944, select `Network` -\u003e `Parachains`\n   - On the parathreads tab you should see your paraid with a lifecycle status of `Onboarding`\n   - After onboarding is complete you will see your parachain registered on the Overview tab\n2. Verify parachain is producing blocks\n   - Navigate to the collator's custom endpoint 9942\n   - Select `Network` -\u003e `Explorer`\n   - New blocks are being created if the value of `best` and `finalized` are incrementing higher\n\n## Proposal Pallet interaction\n\nOur proposal pallet consists of our core logic and facilitates the implementation through extrinsics (extrinsics can be thought of functions that can be called from outside, in this case from the frontend). \n\nThe crowdfunding of a project basically comprises of 6 steps from the submission of the proposal to withdrawing of the fund. Alternatively, the individual or team can decide to withdraw their projects proposal as well. \nThe flow of creating a proposal and getting funded is shown below step by step using screenshots. You can follow along the same either using polkadotjs apps or the frontend (localhost:3001) that comes with our docker compose\n\n1) Creating a project: The first step is to create the project, i.e. submitting the proposal, the given signature of the extrinsic is shown below. From the UI select the pallet which is our imbueProposals pallet and then select the function below.\n\n  ```javascript\n  create_project(origin: OriginFor\u003cT\u003e, name: Vec\u003cu8\u003e, logo: Vec\u003cu8\u003e, description: Vec\u003cu8\u003e, website: Vec\u003cu8\u003e, proposed_milestones: Vec\u003cProposedMilestone\u003e, required_funds: BalanceOf\u003cT\u003e)\n  ```\n\n  To create a project we need to pass the following parameters\n  \n    - Origin: This is the account trying to call the extrinsic\n    - name: Name of the project you want to submit the proposal for\n    - logo: logo for the project\n    - description: description of the project \n    - website: provide the website of your project\n    - proposed_milestones: its list of milestones you want to add with each milestone having name and percentage allocated to it\n    - requiredFunds: amount requested for funding\n\nplease find the screenshot attached for the extrinsic call\n   ![create project ](./assets/imgs/create_project.png)\n  \n2) (SUDO) Scheduling the round: Once the proposal for the project is submitted, the next step is to schedule the round for milestones.\n\nFrom the UI select the our imbueProposals pallet and then select the function below.\n\nPlease note this is a Sudo call so you need to use an account with Sudo access. In the testnet this is the `Alice` account\n\n    ```javascript\n    schedule_round(origin: OriginFor\u003cT\u003e, start: T::BlockNumber, end: T::BlockNumber, project_key: ProjectIndex, milestone_indexes: Vec\u003cMilestoneIndex\u003e)\n    ```\n   \n  To schedule a round for milestone/s we need to pass the following parameters to the extrinsics\n\n    - Origin: This is the account trying to call the extrinsic\n    - start : We need to pass the block number from when the round is valid and make sure it should be greater than the current block \n    - end: We need to pass the blocknumber till when the round should be valid for the given milestone/s. This number should be greater than both start number and the current block.\n    - project_key: This is basically a unique key that act as your project index\n    - milestone_indexes: The milestones need to be included in the round\n\n  please find the screenshot attached for the extrinsic call\n   ![schedule round ](./assets/imgs/schedule_round.png)\n\n3) Contributing to the project: Using this extrinsic, the community can contribute to the proposals they think have good potential.From the UI select the our imbueProposals pallet and then select the function below.  \n   \n  ```javascript\n  contribute(origin: OriginFor\u003cT\u003e, project_key: ProjectIndex, value: BalanceOf\u003cT\u003e)\n  ```\n\n  To contribute to the proposal we need to pass the following parameters to the extrinsics\n\n    - Origin: This is the account trying to call the extrinsic\n    - project_key: unique key that act as your project index\n    - value: the value they want to contribute to the proposal\n\n  please find the screenshot attached for the extrinsic call\n   ![contribute ](./assets/imgs/contribute.png)\n \n\n4) Vote on a specific milestone: This extrinsic allows community members to vote for specific milestone for a given proposal. They can either approve or disapprove by passing yes or no. From the UI select the our imbueProposals pallet and then select the function below. \n\n ```javascript\n  vote_on_milestone(origin: OriginFor\u003cT\u003e, project_key: ProjectIndex, milestone_index: MilestoneIndex, approve_milestone: bool)\n  ```\n\n  To vote on a milestone we need to pass the following parameters to the extrinsic\n\n    - Origin: This is the account trying to call the extrinsic\n    - project_key: unique key that act as your project index\n    - milestone_indexe: The milestone which you want to vote for\n    - approve_milestone: either yes or no\n\n  please find the screenshot attached for the extrinsic call\n   ![vote on milestone ](./assets/imgs/vote_milestone.png)\n\n 5) Approve the project proposal: This extrinsic is called to approve a project proposal with the milestones that is being approved. From the UI select the our imbueProposals pallet and then select the function below. \n\n  ```javascript\n   approve(origin: OriginFor\u003cT\u003e, round_index: RoundIndex, project_key: ProjectIndex, milestone_indexes:  Vec\u003cMilestoneIndex\u003e)\n  ```\n    \n  To approve a project we need to pass the following parameters\n\n    - Origin: This is the account trying to call the extrinsic\n    - RoundIndex: the scheduled round's index\n    - project_key: unique key that act as your project index\n    - milestone_indexes: The list of milestones which you want to approve\n  \n  please find the screenshot attached for the extrinsic call\n   ![approve a project ](./assets/imgs/approve_project.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliam-versatile%2Fimbue-net-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliam-versatile%2Fimbue-net-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliam-versatile%2Fimbue-net-node/lists"}