## Dapp Indexer ** The Dapp Indexer is a simple smart contract which stores an IPFS CID from a dapp based on a key name** The goal is to use this as an alternative for ssl to web3 to verify its the correct content/version/asset. ## The Dapp Indexer has the following features: - [x] Roll management so that it can be integrated into a Dapp or Roles. - [x] Low Gas Consumption - [x] Keep it as simple as posible. ## ToDo and wanted features: - [ ] Integrate CIDStorage library to the Dapp Indexer smart contract - [ ] Create an event for metadata information about the CID. - [ ] Support of the [CID Specification](https://github.com/multiformats/cid?tab=readme-ov-file) ## Usage ### Build ```shell $ forge build ``` ### Test ```shell $ forge test ``` ### Gas Snapshots ```shell $ forge snapshot ``` ### Anvil ```shell $ anvil ``` ### Enviorment Variables ### Deploy #### Option1: Deployment script (recommended) ```shell $ ./deploy.sh ``` > IMPORTANT: verify .env information before executing the deployment script **verify by attaching the deployed contract test:** Once you deployed the contract with the previous script execution you can test the correct smartcontract operations by running the `DeployedDappIndexer.s.sol` script should set after deploying the smart contract in the .env named after DAPPINDEXERADDRS, once you update the address you can run the following script to verify it was deployed correctly. ```shell $source .env $forge script script/DeployedDappIndexer.s.sol:DappIndexerScript --fork-url $PROVIDER_URL --private-key $PK0 --broadcast ``` #### Option2: Script deployment and test using the script follows diferent verifications first before deploying the contract, more about it here. ```shell $source .env $forge script script/DappIndexer.s.sol:DappIndexerScript --fork-url $PROVIDER_URL --private-key $PK0 --broadcast ``` > where: > PROVIDER_URL can be either the anvil fork or a blockchain RPC > $PK0 ### Cast ```shell $ cast ``` ### Help ```shell $ forge --help $ anvil --help $ cast --help ```