Skip to content

Commit 17ddf52

Browse files
authored
Merge pull request #1 from callstack-internal/thiagobrez/transfer-repo
chore: transfer repo
2 parents 358ec30 + 6578d33 commit 17ddf52

19 files changed

Lines changed: 18701 additions & 1 deletion

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "@callstack",
3+
"rules": {
4+
"promise/always-return": "off"
5+
}
6+
}

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
11+
# Native
12+
*.orig.*
13+
*.jks
14+
*.p8
15+
*.p12
16+
*.key
17+
*.mobileprovision
18+
19+
# Metro
20+
.metro-health-check*
21+
22+
# debug
23+
npm-debug.*
24+
yarn-debug.*
25+
yarn-error.*
26+
27+
# macOS
28+
.DS_Store
29+
*.pem
30+
31+
# local env files
32+
.env*.local
33+
34+
# typescript
35+
*.tsbuildinfo
36+
37+
# JetBrains
38+
.idea
39+
40+
# ENV
41+
.env

.prettierignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
11+
# Native
12+
*.orig.*
13+
*.jks
14+
*.p8
15+
*.p12
16+
*.key
17+
*.mobileprovision
18+
19+
# Metro
20+
.metro-health-check*
21+
22+
# debug
23+
npm-debug.*
24+
yarn-debug.*
25+
yarn-error.*
26+
27+
# macOS
28+
.DS_Store
29+
*.pem
30+
31+
# local env files
32+
.env*.local
33+
34+
# typescript
35+
*.tsbuildinfo
36+
37+
# JetBrains
38+
.idea

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"arrowParens": "avoid",
3+
"bracketSameLine": true,
4+
"bracketSpacing": true,
5+
"singleQuote": true,
6+
"trailingComma": "all"
7+
}

App.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import './polyfills';
2+
import React from 'react';
3+
import { StatusBar } from 'expo-status-bar';
4+
import { StyleSheet, View } from 'react-native';
5+
import { WalletConnectModal } from '@walletconnect/modal-react-native';
6+
import HomePage from './src/pages/HomePage';
7+
import { providerMetadata } from './src/clients/walletConnect';
8+
9+
export default function App() {
10+
return (
11+
<View style={styles.container}>
12+
<StatusBar style="auto" />
13+
14+
<WalletConnectModal
15+
projectId="YOUR WALLET CONNECT CLOUD PROJECT ID"
16+
providerMetadata={providerMetadata}
17+
/>
18+
19+
<HomePage />
20+
</View>
21+
);
22+
}
23+
24+
const styles = StyleSheet.create({
25+
container: {
26+
flex: 1,
27+
marginHorizontal: 20,
28+
},
29+
});

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
# web3-react-native-dapp-viem
2-
A modern Web3 dApp with React Native, viem and WalletConnectModal
2+
3+
This repository showcases how to build a modern web3 dApp with React Native, [viem](https://viem.sh) and [WalletConnectModal](https://docs.walletconnect.com/advanced/walletconnectmodal/about)
4+
5+
## Requirements
6+
7+
- [Expo environment setup](https://docs.expo.dev/get-started/installation/#requirements) (Node.js, Git, Watchman)
8+
- A [Wallet Connect Cloud](https://cloud.walletconnect.com/sign-in) project ID
9+
- Expo Go app installed in your smartphone
10+
- One or more web3 wallets installed in your smartphone (e.g. MetaMask, Rainbow Wallet, Trust Wallet, etc)
11+
12+
## How to run
13+
14+
- In `App.tsx` fill in `projectId="..."` with your Wallet Connect Cloud project ID
15+
- `npm start`
16+
- Open Expo Go app in your smartphone
17+
- If your smartphone is in the same network as your computer, the local dev server should appear as the first option. If it doesn't, use the app to scan the QR Code presented in the terminal

app.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"expo": {
3+
"name": "react-native-viem",
4+
"slug": "react-native-viem",
5+
"scheme": "rnviem",
6+
"version": "1.0.0",
7+
"orientation": "portrait",
8+
"icon": "./assets/icon.png",
9+
"userInterfaceStyle": "light",
10+
"splash": {
11+
"image": "./assets/splash.png",
12+
"resizeMode": "contain",
13+
"backgroundColor": "#ffffff"
14+
},
15+
"assetBundlePatterns": ["**/*"],
16+
"ios": {
17+
"supportsTablet": true,
18+
"infoPlist": {
19+
"LSApplicationQueriesSchemes": [
20+
"metamask",
21+
"trust",
22+
"safe",
23+
"rainbow",
24+
"uniswap"
25+
]
26+
}
27+
},
28+
"android": {
29+
"adaptiveIcon": {
30+
"foregroundImage": "./assets/adaptive-icon.png",
31+
"backgroundColor": "#ffffff"
32+
}
33+
},
34+
"web": {
35+
"favicon": "./assets/favicon.png"
36+
}
37+
}
38+
}

assets/adaptive-icon.png

17.1 KB
Loading

assets/favicon.png

1.43 KB
Loading

assets/icon.png

21.9 KB
Loading

0 commit comments

Comments
 (0)