- Go to the Web3 provider's website and create a new project to get your Client ID.
- Add the Client ID to your
.env
file as follows:REACT_APP_WEB3_CLIENT_ID="your_web3_client_id"
- Go to the Firebase Console.
- Create a new project or select an existing project.
- Navigate to the Authentication section and enable the Twitter provider.
- Add the Firebase configuration to your .env file:
REACT_APP_FIREBASE_API_KEY="your_firebase_api_key" REACT_APP_FIREBASE_AUTH_DOMAIN="your_project_id.firebaseapp.com" REACT_APP_FIREBASE_PROJECT_ID="your_project_id" REACT_APP_FIREBASE_STORAGE_BUCKET="your_project_id.appspot.com" REACT_APP_FIREBASE_MESSAGING_SENDER_ID="your_messaging_sender_id" REACT_APP_FIREBASE_APP_ID="your_app_id" REACT_APP_FIREBASE_MEASUREMENT_ID="your_measurement_id"
- Go to the contract folder.
- Deploy the contract using the following command:
cargo near deploy
- Add the contract deployment values to your .env file:
REACT_APP_CONTRACT_ID="your_contract_id"
REACT_APP_MPC_PUBLIC_KEY="secp256k1:4NfTiv3UsGahebgTaHyD9vF8KYKMBnfd6kh94mK6xv8fGBiJB8TBtFMP5WWXz6B89Ac1fbpzPwAvoyQebemHFwx3"
REACT_APP_MPC_PATH="bitcoin-drop,1"
- Run the following command to install the necessary npm packages:
npm install
- Run the following command to start the project:
npm start
- Go to the
bot
folder:cd bot
- Install the necessary npm packages:
npm install
- Get Twitter cookies and set the
.env
in the bot folder:- Run the
bot-puppeter.ts
script to log in to Twitter and save cookies. - Copy the cookies from the generated
twitter_cookies.txt
file. - Paste the cookies into the
TWITTER_COOKIES
field in the.env
file. - Set the following environment variables in the
.env
file:TWITTER_USERNAME=your_twitter_username TWITTER_PASSWORD=your_twitter_password TWITTER_EMAIL=your_twitter_email TWITTER_COOKIES=your_twitter_cookies API_URL=your_api_url
- Run the
- Start the bot:
npm start