We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

1

Answer is to update genesis.json to include eip150Block: { "config": { "chainId": 4777, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, "eip158Block": 0 }, "alloc" : {}, "difficulty" : "0x400", "extraData" : "", "gasLimit" : "0x7A1200", "parentHash" : "...


0

I did it like this: Initialise geth in dev mode with the -- flag geth --dev --allow-insecure-unlock Never do this in mainnet mode. Attach a web3 js console Run this to create 10 unlocked accounts and fund them from the default account: for (i=0;i<10;i++){ a = personal.newAccount('pwd') personal.unlockAccount(a,'pwd') web3.eth.sendTransaction({...


0

If you face any issue while connecting with the network(let say ganache) you can try the following steps: make sure ganache is up and running(ideally on port 8545) from remix change the environment to Web3 Provider and confirm the address from the popup window. in case you want to connect through the metamask, change remix environment to Injected web3. Make ...


0

If you are using Web3@0.2x.x, you can look at API Documentation how to create a contract object and initiate it on an address.


0

For web v0.20 creating a reference to an existing instance should be done in two steps // Create contract object var MyContract = web3.eth.contract(abiArray); // Reference instance var contractInstance = MyContract.at(address);


0

I believe that you're actually on web3 v1.x, in which case, you should indeed be using new web3.eth.Contract, but with a capital C. In order to verify which version of web3 you're on, run npm ls web3 from a command line or console.log(web3.version) from your JS code.


0

The term "confirmation time" is a rather vague. If by that you mean the time it takes to form a block (to find a solution to the mining puzzle) then it can be calculated based on the current network difficulty (how hard it is to find the solution) and current total hashrate (how many solutions per second the network is able to try). If you want to have ...


1

rinkeby is a public test network. If you type geth help, you'll see a number of public networks you can connect to, such as rinkeby, ropsten, goerli public test networks. If you don't specify a network, geth will connect to the public main net. You can check the Private Network Tutorial to see how to set up and connect to a private network.


1

3 things to try: Avoid using unstable versions, switch to the last stable Elasa (v1.9.6) You may have to increase the gas a bit when deploying contracts, because of new versions of solidity where gas calculation changes Using a gas price oracle is sometimes needed


3

As @fixanoid stated in his answer you can change the gas limit in the genesis.json. But this isn't an optimal solution in my opinion. You are better off using a specific flag for your miner. Geth has the --targetgaslimit flag that will cause your miner(s) to move step by step towards a given gas limit. Only a certain increase is allowed per block. ...


0

When estimating the gas it internally runs the whole function (but obviously doesn't modify the blockchain). Looking at your function I can see it uses msg.sender, but who's message.sender when you call estimateGas in your Javascript code? It's not defined, so on the very first line it doesn't pass the require statement. You can fix it this way: cont....


0

One way to do this is to set very high limit for gas in the genesis config file like so: "gasLimit": "0xE0000000". Alternatively, run a client optimized for private nets: https://github.com/jpmorganchase/quorum. Default gas limit is in billions.


0

I doubt any exchange accepts private blockchain's coins and/or tokens. In the end it's of course up to the exhchange, but there are at least the following problems: 1) As you control the blockchain you can just take it down when you want to. What should happen to people who have bought your coin/token outside the blockchain? 2) You are able to manipulate ...


Top 50 recent answers are included