# Resource Posting This pallet commenting on any external resource or entites. This should be something like Disqus, or facebook comments on web pages/ This can be used in many ways: - NFT market place where you can see what people think of an NFT collection - To lookup comments on a specifc person e.g. elon musk - A blockchain exploroere where you can comment on a transaction, smart contract, block, account, or anything. ## Entities An entity in the context of this pallet is something that you can comment on. Examples of entities: - Http url - Movie - NFT - Token - Book - Person - A specific Tweet - Transaction - Block ### Entity Locator Each entity have a locator sting used to identify it, for example a specific NFT on moonriver should have the following locator format `ntf::movr::0x255::01` where `0x255` is collection id, and `01` is the NFT ID/index. If you want to comment on the entire collection you can locate it using `ntf::movr::0x255`. :construction: **TODO: Try to search for a format, or make-up a standard** We should focuse on NFT markts and gov proposals sites. ``` chain://evm:<chain_id>/block:<block_num> chain://evm:<chain_id>/tx:<tx_hash> chain://evm:<chain_id>/token:<token_addr> chain://evm:<chain_id>/account:<account_addr> chain://evm:<chain_id>/nft:<collection_id> chain://evm:<chain_id>/nft:<collection_id>/<nft_id> chain://substrate:<chain_id>/block:<block_num> chain://substrate:<chain_id>/tx:<tx_hash> chain://substrate:<chain_id>/token:<token_addr> chain://substrate:<chain_id>/account:<account_addr> chain://substrate:<chain_id>/proposal:<account_addr> chain://substrate:zeitgeist/market:<account_addr> ipfs://cid twitter://user:<username> twitter://tweet:<tweet_id> http://... https://... ``` ### Structure `<res_location_type>://<res>/<sub-res>/<sub-res>` - `res_location_type` represents the type of location this resource is found at. for example if this resource is on-chain its value will be `chain`, if the resource will be on ipfs the value will be `ipfs`. - `res` represents the resource it self. this field can be nested unders another resource, for example, polygon network itself is a resource, and an nft collection on it it also a resource, and nft item in that collection is also a resource. - `chain://evm:0` eth network - `chain://evm:0/nft:12` nft collection with id 12 - `chain://evm:0/nft:12/3` nft with id 3 in the collection ## How this pallet should work? * Each resource will be represented by a post * If a user wants to comment on a resource, he comments on the resource's post. * All of resource posts is located in one space. * The pallet will provide a way to lookup the post id of any resource, and allow users to create a post for this resource if there's none found already. ## How it will be implemnted on frontend? We would have two ways of showing comments on any resource: 1. The webapp owners uses our library to show commnets on any specific part of the webapp 2. We devlop a browser extention to inject our comments, for example we inject comments beside a twitter profile. ## First iter - backend service - parse http link and extract uri format - create post for this resource if not found prio