Author

Topic: ICO Transfer without MetaMask plugin Web3js (Read 201 times)

brand new
Activity: 0
Merit: 0
July 23, 2019, 04:33:13 AM
#8
Thank you for sharing! I hope to hear more updates about it.
192.168.l.l
newbie
Activity: 1
Merit: 0
Metamask software is the access with the extension of the website visiting to the plug-in device in the metabolism of the visits. I have bridging for the assignmentmasters.co.uk website in the enabling of the accesses to distribute.
newbie
Activity: 19
Merit: 0
Using web3js you would need to create a custom provider to set the default account.

Using etherJS you can do something like the following:

Code:
const ethers = require('ethers');
const Wallet = ethers.Wallet;
const Contract = ethers.Contract;
const utils = ethers.utils;
const providers = ethers.providers;

let network = "ropsten";
let privateKey = "0x3a1076bf45ab87712ad64ccb3b1021.......";
let infuraAPIKey = "XXXXXX";

let provider = new providers.InfuraProvider(network, infuraAPIKey);

let serverWallet = new Wallet(privateKey, provider);
newbie
Activity: 7
Merit: 0
You dont have to use Metamask but you will need to sign all your requests or set a defaultAccount.

What is the exact error you are receiving?


I am getting the following error  Invalid JSON RPC response: ""

Here is my code.

Code:
newbie
Activity: 19
Merit: 0
You dont have to use Metamask but you will need to sign all your requests or set a defaultAccount.

What is the exact error you are receiving?
newbie
Activity: 7
Merit: 0
Are you using Infura?

If not you can run your local node and specify your chain using --chain ropsten

I am using infura ropsten and want to use this not local node at the moment. But I do not want to use MetaMask plugin. Is this possible? I am getting provider not found error.
newbie
Activity: 19
Merit: 0
Are you using Infura?

If not you can run your local node and specify your chain using --chain ropsten
newbie
Activity: 7
Merit: 0
I want to transfer ICO tokens in test environment from one ETH account to another using Web3js. But it gives service provider not found issue.

It works when I use a local node but not when I use ropsten network.
Jump to: