New answers tagged

0

Your high-level thinking about this deserves a little reorientation. You should not use Ethereum to store large objects. It's just not efficient even if you can raise the gas limit high enough to accomodate it in a private network scenario. Let's take a step back. Ethereum is not a suitable replacement for a database, object store or compute server - it's ...


1

You can try something like this: exclude: { test: /(node_modules|bower_components)/, not: [ // Do not exclude this dependency /libp2p/ ] }


0

Try to regenerate the JSON file by deleting the old JSON file and re-compiling .sol file. It worked for me.


0

How does the ETH money/coin/value is generated? ETH is generated by the process of mining. Who generates that? The computers often referred to as the nodes in the blockchain network. Are the miners who process a transaction get ETH from the other user (fee) or the system will generate new fresh ETH (which is not available in circulation before)? The ...


0

To begin with, change this: deploy(Ticket, 0) To this: deploy(Ticket, "0x0000000000000000000000000000000000000000") Since 0 is not a valid address value when sent from web3.js.


1

Blockchains won't most likely ever replace stuff like regular servers. Blockchains are deterministic and they are not suited for stuff like hosting websites. The decentralization of blockchain is about the data they contain. So if you upload a smart contract which for example calculates numbers together everyone can access the same contract and it's not ...


0

The comment from @Briomkez is a correct start - when running the geth command, it is showing that you've connected to ChainID: 1 which is not correct - it's not your private network. To start a private network, create your genesis file (I like to use puppeth). Once you've created your genesis file, run geth init, importantly here - define a datadir geth --...


0

While you can try a web automation tool, this will be slow and often brittle. A better approach would be use npm and a small script which loads web3js and the text file. Then you can parse the text file and submit the transactions via methods of web3js The code under "Usage" should get you started: https://github.com/ethereum/web3.js/


0

No. All networks have different IDs, thats the discriminating them when running on a client. Also, all clients need to speak and sync with the same ID. Here is a summary of IDs to get an idea. https://ethereum.stackexchange.com/a/17101/5375


0

It is possible using meta-transactions. The general idea is as follows: A user signs a transaction. This, itself, does not require gas and, strictly speaking, does not require metamask or any other "wallet". Your app can attend to it, and also issue public/private keypairs and ETH addresses for your users so that, from a user perspective, "it just works." ...


3

Just adding a bit of nuance to Rob's answer. All Ethereum testnets started with a blank slate and have never and will never sync the balances with mainnet. Don't mistake them for hard spoons, which are blockchains that cloned the balances of another blockchain, but remain independent in all other regards.


2

No. That would be like money you printed at home rising to the level of actual cash. There is no path where that happens. Hope it helps.


1

Change line 4 to: address payable admin; Hope it helps.


1

A block discovery takes some time to propagate across the network due to network latency. That means a portion of the total hash power is always mining on the wrong block because they haven't heard the news. That portion increases with short block time targets. For example, if blocks take five seconds to propagate and block time is also five seconds, then ...


0

I don't think that I'd say uncle blocks directly improve throughput. In Ethereum, the block time and gas limit combine are what defines the number of transactions that can be submitted to the network. The idea of uncle blocks in ethereum also exist in bitcoin - generally called orphan blocks. Uncles / orphans are part of the reason you do not accept your ...


0

Scenario 1: This is not possible. An EOA does not have code, by definition, so there is no fallback function to run. When coding, we generally do not know, in advance, who the caller will be so we assume the worst - "hostile contract." Scenario2: Bob calls Attacker which is a contract that needs to have a balance, in this instance, to get past the require ...


0

I've had the same problem. This issue has nothing to do with your genesis file, but rather with the geth version installed by snap. Simply download the most recent geth version from the official website add it should work.


1

As of version 0.5.12, Solidity includes an assembly function chainid() that provides access to the new CHAINID opcode: function getChainID() external view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } To use it, ensure you set the compiler's EVM version to Istanbul with the --evm-version istanbul flag. ...


0

The approval is likely working, but you're checking for a Transfer event after you call approve. Change that section to check for an Approval event and it should work.


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 short answer is you would make your own access control. RBAC is a specific approach. A suggestion would be to use the even simpler Ownable.sol (OpenZeppelin) example as a template, for ideas. The basic idea is to define your guards. modifier afterMidnight { // require(something, "patience. party hasn't started"); _; } function living() public ...


Top 50 recent answers are included