how to setup basic environment for react and smart contract deployment - solidity

how to setup basic environment for react and smart contract deployment
I am not able to setup environment for below tech stack
basic environment for truffle , solidity ,react app on vs code

Truffle is old now.
The stack for setting up a basic environment for react and smart contract deployment would be:
Node.js
React
Hardhat
Web3.js - for interacting with the Ethereum blockchain from within a React application
MetaMask
Test ethers on goreli
Node prodiver - Alchemy
Web3 modal for connect wallet

Related

Expo Push Notification

I am using Expo Push Notification. I proceeded according to the instructions on the Expo site expo-push-notifications, but I realized that in order to receive the Expo Push Token, we must have an Expo account, and before running the project, we must log in to our account using the Expo Login command and then run the project.My question is, when the build project is taken out and put into production mode, do these services still work properly or do we have to apply certain settings and the Expo site tips are only for the development phase? I am a beginner in developing React Native programs and I have no special experience in this field. Please share your experiences with Expo Push Notification with me. Thanks.
When you build your app on Expo servers for example by expo build:ios command, it is handled by Expo services, but if you decided to build your app through, for example, Github Actions, you have to deliver APN keys to Expo by your own through expo credentials:manager. On your Expo account are stored credential files to use by Expo PUSH Broadcaster, so this connection between the app and your account is required.
Here you can find more details about signing your applications:
https://docs.expo.io/distribution/app-signing/#push-notification-keys

How to setup node and cli in tron?

I need to develop a tron node and tron cli in local server. I have followed java tron documentation but in java tron there is no cli. Then I moved to tron cli GitHub and I install all packages. I ran tron cli. Then how to run node and deploy contract in tron cli?
Have a look at https://github.com/andelf/rust-tron, it is a powerful cli tool for tron.
Contract dev Doc.

Can we use Realm in React Native project with Expo?

I am making a Mobile app in React Native with Expo.
Now I am thinking that I will use Realm to manage state in my project.
However, I am not sure that I can use Realm on Expo or not.
Expo is quite useful to create React Native Mobile Apps easily and quickly, but sometimes there are some conflict with some modules and libraries.
So, could you teach me that Realm can work on Expo or not?
Thank you,
Update 24 Jan 2022
The feature request was marked as Complete today.
I can confirm that Realm works with custom dev clients.
Here is an expo/example you can use to get started today --courtesy of the Realm team.
We won't be adding Realm to the Expo Go app (that you download from the App Store or Google Play Store) since we are limiting the amount of native third-party services that we include by default.
Update 2 July 2021
The feature request has been marked it as In Progress by the Expo team.
https://expo.canny.io/feature-requests/p/realm
It should be included as part of a custom development client, you can read more about custom development clients here https://blog.expo.dev/introducing-custom-development-clients-5a2c79a9ddf8
Previous answer
From the realm docs
Expo does not support Realm
Unfortunately, Expo does not support Realm. If you use the Expo CLI or create-react-native-app to create your React Native project, you will need to "eject" your Expo project to use Realm. The installation steps on this page do not use the Expo CLI.
https://docs.mongodb.com/realm/sdk/react-native/install/
It has been a feature request for expo since 2017 https://expo.canny.io/feature-requests/p/support-for-realm
Finally, Expo now works with realm.
Expo Announcement
Guide
not yet
you can check for support state from here:
https://expo.canny.io/feature-requests/p/support-for-realm
Yes, Expo now has a way of doing this using Custom Dev clients. Here is an example app from the Realm team.
https://github.com/expo/examples/tree/master/with-realm
You can also see this request is marked as complete on the Expo feature request site.
https://expo.canny.io/feature-requests/p/realm

Appsflyer integration - out of store apk with React Native

I am trying with Appsflyer out of store apk integration with React Native, I have followed below mentioned steps -
Added app on Appsflyer account with com.reactnativetest package and 9apps_int as channel name.
Integrated react-native-appsflyer SDK in my React Native App, following the react-native-appsflyer documentation.
Have added initSDK with debug mode true and trackEvent Method in the code.
Have debug the app on phone, and I got the success response from initSDK and trackEvent.
Now when I look at the Appsflyer dashboard, it gives me "0" Organic & Non-Organic Install and there is no event also tracked in the dashboard.
I have also done the testing with AppsFlyer Integration Testing App, by whitelisting my device and testing the app again, but same result.
Please help me where I am wrong in this?
Do I need to upload the app on any store except play store/App store before testing, can't I test the app installs in debug mode?
Please help.
Thanks.
Did you also test with URL with media and campaign?
http://app.appsflyer.com/com.greatapp?pid=test&c=campaign_test_1&
I suppose at this stage it's easier to upload the app to the stores, you can always pull it back.

"Application ... not registered" with React Native app on AWS Mobile Hub

I'm trying to learn and understand how AWS Mobile Hub works.
Based on I'm trying to create a React Native app from scratch and connect to a AWS Mobile Hub.
I followed the steps in the AWS Mobile React Native Starter # Use features in your app to create a React Native app from scratch.
Setup a new project in AWS Mobile Hub.
Used awsmobile init <ID> to setup the react project for AWS Mobile Hub.
Enabled User Sign-in on AWS Mobile Hub project.
Setup Authentication in the React Native project.
(ps. there is an error in the guidelines because 'Amplify' import is missing)
Run the app with npm run ios
No matter what I do, I alway get a 'Application ... has not been registered' error.
The example backend from 'AWS Mobile React Native Starter' does work.
I have tried to compare both AWS Mobile Projects, but cannot find what causes the 'Application ... has not been registered' error.
I want to understand this AWS Mobile Hub thing and want to be able to setup projects myself and know how to integrate it into apps.
Any help to solve this error is greatly appreciated.
Finally found the problem.
First I thought it was because index.ios.js and index.android.js were missing, but then saw those are not needed anymore.
Aparently, when doing an application from scratch, the created 'index.js' does not have the correct component name. Changing the wrong name in AppRegistry.registerComponent('wrongname', () => App); to the correct application name, matching aws_project_name in aws-exports.js, fixed the issue.
The app now loads. Hurray!
Next problem: when signing in I get a 'No Userpool' message. Checked all config and Mobile Hub project, but the user pool seems correctly configured...
Update: also found the issue with 'No userpool'. When debugging the application, I noticed that the configuration received by Amplify.configure function was undefined. But I copied this code:
import { withAuthenticator } from 'aws-amplify-react-native';
import {awsmobile} from './aws-exports';
from this AWS React Native Starter App tutorial. But apparently it is not working.
Replacing that bit by this:
import Amplify from 'aws-amplify-react-native';
import aws_exports from './aws-exports';
from
AWS Documentation » AWS Mobile » Developer Guide » AWS Amplify Library for React Native » Get Started
. Now it suddenly works.
Thanks AWS! Took me couple of nights to find :-/
I saw that problem before when there is a version of aws-amplify installed under aws-amplify-react-native. That happens when the version of aws-amplify installed on the project is not the one that requires aws-amplify-react-native. I hope everything goes well with your app.