DAPP Indexer, index IPFS/IPNS CID with DAO consensus and verification. This is for the DAPPs consumption which already published/updated its CIDs.
Go to file
David E. Perez Negron R. c39a3cd90b Addding updated version with library for data conversion used in the tests and scripts 2024-05-08 19:18:09 -06:00
.github/workflows chore: forge init 2024-01-16 20:58:50 -06:00
lib Addding updated version with library for data conversion used in the tests and scripts 2024-05-08 19:18:09 -06:00
script Addding updated version with library for data conversion used in the tests and scripts 2024-05-08 19:18:09 -06:00
src Addding updated version with library for data conversion used in the tests and scripts 2024-05-08 19:18:09 -06:00
test Addding updated version with library for data conversion used in the tests and scripts 2024-05-08 19:18:09 -06:00
.gitignore chore: forge init 2024-01-16 20:58:50 -06:00
.gitmodules forge install: openzeppelin-contracts 2024-01-16 21:10:03 -06:00
README.md Adding deployment scripts and README Update usage. 2024-05-08 19:15:25 -06:00
deploy.sh Adding deployment scripts and README Update usage. 2024-05-08 19:15:25 -06:00
env.example Adding first proof of concept dapp indexer 2024-02-24 14:49:07 -06:00
foundry.toml Some Updates 2024-05-08 19:16:34 -06:00

README.md

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:

  • Roll management so that it can be integrated into a Dapp or Roles.
  • Low Gas Consumption
  • 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

Usage

Build

$ forge build

Test

$ forge test

Gas Snapshots

$ forge snapshot

Anvil

$ anvil

Enviorment Variables

Deploy

$ ./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.

$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.

$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

$ cast <subcommand>

Help

$ forge --help
$ anvil --help
$ cast --help