The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

How to Integrate Smart Contracts to the Frontend

hackernoon.com
submitted
8 mos ago
byboredgamertoprogramming

Summary

The last article taught you how to write, compile, test, and deploy smart contracts using Solidity, Javascript, dRPC endpoint, and API key. Here, you'll learn how to build the user interface(UI) for the Coffee Payment using, React.js, Typescript, and Web3.js.

Import the ABI, web3(js framework for interacting with smart contract), useState, and useEffect. Learn more on Thirdweb.com.

This is because RPC Provider can only be used to make calls while “Window.ethereum” can be used for both calls and make transaction. The HTML syntax will look like this: “Buy Coffee’s BuyCoffee’ is a function that allows the user to pay for the number of coffees bought.

 digital clock scoreboard digital watch analog clock-0
8

3 Comments

2
theonesource
8 mos ago
I wonder how this is different from just using regular payment gateways?
2
boredgamerOP
8 mos ago
Not much really, just shifts to using blockchain
2
theonesource
8 mos ago
I thought so. So like most "solutions," all it is a moving to new tech just cause.