Javascript – Solana swap has a very low success rate
I am trying to do a simple swap on Solana block chain and I have tried both Alchemy and Quicknode but the success rate of my swap is very low.. 2 out of three times it fails and I cant…
I am trying to do a simple swap on Solana block chain and I have tried both Alchemy and Quicknode but the success rate of my swap is very low.. 2 out of three times it fails and I cant…
At the execution stage of function createInitializeInstruction I receive an error: Error creating token for Token2022Form: TypeError: Cannot read properties of undefined (reading 'call') at Hash.CipherBase (index.js:7:1) at new Hash (browser.js:9:1) at createHash (browser.js:29:1) at splDiscriminate (splDiscriminate.ts:4:1) at createInitializeInstruction (instruction.ts:51:1)…
Here is my code example: const userAccount = '0x...'; // Call the contract method helloWorld() const transaction = this.contract.methods .helloWrold('some parameter 1', 'some parameter 2') .send({ from: userAccount }); // Handle errors from the transaction transaction.on('error', (error: any) => {…
I can interact with a smart contract when using a local node(ganache). But when I try to interact with a public node with the following method, I get sender account not recognized const web3 = new Web3(new HttpProvider('http://localhost:8545')); const wallet…
I have created a chain node on aws ec2 instance using geth. Do I need to enable something or what ip should I use to connect to it? I am using web3.js using new Web3.providers.WebsocketProvider('wss_address', abiOptions) I enabled ws for…
I'm developing a React.js project with TypeScript managed with Vite, and I'm facing an issue when trying to integrate Web3.js for communication with Ethereum Smart Contracts. The project is set up to connect to a local Ethereum blockchain running on…
using the web3.eth.account.create() method returns: { address: "0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01", privateKey: "0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709", signTransaction: function(tx){...}, sign: function(data){...}, encrypt: function(password){...} } How to make safety saving private keys to mongodb? I was researching bcrypt, hashcode, but hascode is not safety and bcrypt encoding requires…
I am building a crowdfunding blockchain application and I am getting the above error. Uncaught (in promise) Error: Function "getDonators" requires 1 arguments, but undefined were provided. Expected function signature: contract.call("getDonators", _id: BigNumberish): Promise<string[], BigNumber[]> This the code for the…
I'm trying to redirect the user to onboard page when he successfully connects to his wallet. Web3Button is not returning anything. How to do that? I'm stuck here. import React, { useEffect } from "react"; import { Web3Button } from…
I write a simple app in react and in this app i use the createBrowserRouter component: import React from "react"; import { createRoot } from "react-dom/client"; import App from "./App"; import reportWebVitals from "./reportWebVitals"; import { ThirdwebProvider } from "@thirdweb-dev/react";…