# dApp frontends A basic how-to for ethereum based frontends --- ## David Lange frontend developer @finiam :wave: --- ### Really broad overview ![](https://i.imgur.com/pW6A8BC.png) --- ### (slightly less) really broad overview ![](https://i.imgur.com/FEb95PU.png) --- ### Signer Requires user interaction Wallet Ability to sign (messages or transactions) --- ### Provider Connection to the blockchain (read) Infura, Alchemy, default providers --- ![alchemy](https://i.imgur.com/ir3wxOz.png) ![infura](https://i.imgur.com/y8o1ouY.png) --- ### Contract Instance of a deployed contract Allows interaction Requires a provider/signer --- ABI ```ts { readonly type: "event"; readonly name: "Transfer"; readonly inputs: readonly [{ readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: false; readonly name: "value"; readonly type: "uint256"; }]; } ``` --- ethers.js https://docs.ethers.org/v5 web3js https://web3js.readthedocs.io --- ### code --- ### rainbow kit ![rainbowkit](https://i.imgur.com/u139DVJ.png) --- ### web3modal ![web3modal](https://i.imgur.com/qQaDUOQ.png) --- ### dappkit ![dappkit](https://i.imgur.com/DNLLVUz.png) --- ### wagmi ![wagmi](https://i.imgur.com/EGNafLs.png) --- ### wagmi.sh example --- ### Indexing How to read data? --- ``` javascript // NFT contract contract.getAllTheAssets() // that's not how it works ``` --- ![thegraph](https://i.imgur.com/HRZSfhd.png) --- ### Storage ![ipfs](https://i.imgur.com/NM2Nmfb.png) ![arweave](https://i.imgur.com/HsuLyG5.png) --- ### IPFS distributed system (p2p) for storing and accessing files, websites, applications, and data. --- ![](https://i.imgur.com/F9XQjRs.png) --- ![nft storage](https://i.imgur.com/8KBD2ap.png) --- ```typescript= const nft = { image, // use image Blob as `image` field name: "Coimbra blockchain", description: "Something meaningful", } const client = new NFTStorage({ token: API_KEY }) const metadata = await client.store(nft) console.log('Metadata URI: ', metadata.url) ``` --- ### It's not only overpriced JPGs [opensea.io/collection/detris](https://opensea.io/collection/detris) --- ### Sign-in with Ethereum EIP-4361 --- ![siwe](https://i.imgur.com/WmXaRE8.png) --- ### Wrapping up Check out finiam.com / @wearefiniam
{"metaMigratedAt":"2023-06-17T11:12:02.464Z","metaMigratedFrom":"YAML","title":"dApp frontends","breaks":true,"description":"A basic how-to for ethereum based frontends","contributors":"[{\"id\":\"a0bd280d-03b1-4fd4-a906-6afb6498e2c5\",\"add\":6151,\"del\":3506}]"}
    188 views