Add welcome + setup screen to Expo demo
Related to #347 Requires #348
Goal
Implement the welcome and setup screen for the mobile app demo.
- Check if the user already initialized the arcade account on start, in that case redirect them to the main app screen (empty for now).
- Create a new private key and store it safely (how?) in the application persistent storage. I like to use jotai to manage state and persisting data (atoms) to storage.
- Link to the companion app. Maybe implement a share button to send the link over to telegram/whatever
- Have a "done" button that checks that the arcade account has been initialized. If the account is initialized, store some data to the persistent storage so that at startup the app knows to redirect to the main app screen.
While we wait for the companion app, here's how to deploy an arcade account.
Generate private/public key
import { ec, stark } from "starknet";
const privateKey = stark.randomAddress();
const publicKey = ec.starkCurve.getStarkKey(privateKey);
console.log(publicKey);
Deploy account
Go to the deployer account in the block explorer, click "deploy" in the "write contract" section. Remeber to connect your wallet.
- salt, use any number.
- public key: the one generated above
- master account: your wallet's address
Click transact and wait for the transaction to be confirmed.
Getting the arcade wallet address
Go to the "read contract" section, click compute_address and insert the same values used to deploy the contract. Click query and you will get back the contract address. You can confirm in the explorer that the contract was deployed.
This issue has been automatically marked as stale because it has not had activity in the six months. It will be closed in 2 weeks if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant.
This issue has been automatically closed because it has not had any further activity in the last 14 days.