🏆 2023年/Eth Global Tokyo 2023 Taiko Best Dapps Prize 受賞
Look Here
This project is a product developed by Eth Global Tokyo 2023. Please check the product page below for details.
- SvelteKit app
- Auto-generated and fully-typed ABIs using wagmi-generate
- Web3modal connect button using wagmi-core
- Foundry contracts
- Configured for easy multi-chain deployments
- Clone and cd the repo that was created by Vercel using
git clone <REPO_NAME> && cd <REPO_NAME>
- Install Foundry dependency because Vercel doesn't clone the submodules:
forge install foundry-rs/forge-std
(must have foundry installed, see here: https://book.getfoundry.sh/getting-started/installation) - Install packages and copy .env.example files:
sh setup.sh
- Set mnemonic phrase in root
.env
for test accounts (generate a bip39 mnemonic) - Set web3modal project id in
.env
(obtain a project id for web3modal) - (optional) if using vscode check the vscode config section
- Clone/fork the repo:
git clone https://github.com/d1onys1us/dapp-slaps.git
- Install packages and copy .env.example files:
cd dapp-slaps && sh setup.sh
- Set mnemonic phrase in root
.env
for test accounts (generate a bip39 mnemonic) - Set web3modal project id in
.env
(obtain a project id for web3modal) - Source environment vars:
source .env
- (optional) if using vscode check the vscode config section
You will have three development windows, start them all and source all .env files with
source .env && source packages/app/.env
.
- Start local chain:
anvil -m $MNEMONIC
- Deploy the Foo contract:
forge script Deploy --broadcast --rpc-url $FOUNDRY && pnpm -F app wagmi
- Start app:
pnpm -F app dev
pnpm -F app dev
pnpm -F app wagmi
- Start by installing the package (example: openzeppelin-contracts):
forge install OpenZeppelin/openzeppelin-contracts
- Regenerate the remappings for the contract imports (run this from the project root):
forge remappings > remappings.txt
anvil -m $MNEMONIC
Note: some L2s require a
--legacy
flag if EIP-1559 is not yet supported.
forge script Deploy --broadcast --rpc-url $FOUNDRY && pnpm -F app wagmi
deploy contract on sepolia.
forge script Deploy --broadcast --rpc-url $SEPOLIA_RPC_URL && pnpm -F app wagmi
follow this: https://book.getfoundry.sh/config/vscode, but use this for the path (because of the monorepo setup):
"solidity.packageDefaultDependenciesContractsDirectory": "packages/contracts/src",
"solidity.packageDefaultDependenciesDirectory": "packages/contracts/lib",
"solidity.compileUsingRemoteVersion": "v0.8.19",
"editor.formatOnSave": true,
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"solidity.formatter": "forge",
- Try resetting account in MetaMask
- Try clearing all browser storage
- Try disconnecting account and reconnecting
- Ensure all env vars are set
- PaulRBerg in general: https://github.com/PaulRBerg
- Taiko monorepo: https://github.com/taikoxyz/taiko-mono
- Optimism Starter: https://github.com/ethereum-optimism/optimism-starter
- ScaffoldEth2: https://github.com/scaffold-eth/se-2