de3b87bc0b | ||
---|---|---|
.github/workflows | ||
lib | ||
script | ||
src | ||
test | ||
.gitignore | ||
.gitmodules | ||
README.md | ||
deploy.sh | ||
env.example | ||
foundry.toml |
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
Option1: Deployment script (recommended)
$ ./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