An experimental fallbackHandler to add the did:dis
DID prototype to Safe Smart Wallets.
Why?
The did:pkh
DID standard isn't scalable, because you can't update the underlying DID document. It's static. And that's bad because you're stuck with one signing/verifying key. Very (very) bad UX in the land of Web3.
The proposed did:dis
DID standard overcomes these limits, while minimizing the cost of generation. Using EIP-3886 the smart contract can communicate with an offchain service, which hosts the DID document and thus not requiring any onchain transactions to update.
This is a list of the most frequently needed commands.
Build the contracts:
$ forge build
Delete the build artifacts and cache directories:
$ forge clean
Compile the contracts:
$ forge build
Get a test coverage report:
$ forge coverage
Deploy to Anvil:
$ forge script script/Deploy.s.sol --broadcast --fork-url http://localhost:8545
For this script to work, you need to have a MNEMONIC
environment variable set to a valid
BIP39 mnemonic.
For instructions on how to deploy to a testnet or mainnet, check out the Solidity Scripting tutorial.
Format the contracts:
$ forge fmt
Get a gas report:
$ forge test --gas-report
Lint the contracts:
$ pnpm lint
Run the tests:
$ forge test
Generate test coverage and output result to the terminal:
$ pnpm test:coverage
Generate test coverage with lcov report (you'll have to open the ./coverage/index.html
file in your browser, to do so
simply copy paste the path):
$ pnpm test:coverage:report
- Foundry uses git submodules to manage dependencies. For detailed instructions on working with dependencies, please refer to the guide in the book
- You don't have to create a
.env
file, but filling in the environment variables may be useful when debugging and testing against a fork.
- abigger87/femplate
- cleanunicorn/ethereum-smartcontract-template
- foundry-rs/forge-template
- FrankieIsLost/forge-template
This project is licensed under MIT.