We have already done interactions with Dimension Life earlier using aos. Let’s see how can we build a frontend (web page) to interact.
First clone the repo
$ git clone <https://github.com/rootMUD/ao-dimension-life.git>
The project structure is
.
├── README.md
├── dapp
├── dapp-eth
├── deno-edge-functions
├── jumper
├── lua
└── node-server
dapp is the Arconnect version frontend, dapp-eth is Metamask version. jumper is the jump page.
Then we can install it
$ cd dapp
$ yarn
$ yarn start
The we can see the page in http://localhost:3000
import {
getWalletAddress,
getDataFromAO,
connectWallet,
messageToAO,
shortAddr,
} from "../util/util";
connectWallet
:connect to wallet
getWalletAddress
:get wallet address