Questions tagged [error]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
3answers
2k views

Unable to execute web3.eth.accounts[0]

I'm following along with this short tutorial and ran into a few problems. I'm running testrpc in my console. However, every time I run my index.html I get an error. My index.html file is the following:...
1
vote
1answer
21 views

truffle unbox pet-shop gives DownloadingError: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:201:27)

Ubuntu 18.04. Truffle v5.1.2 (core: 5.1.2) Solidity v0.5.12 (solc-js) Node v13.2.0 Web3.js v1.2.2 When I execute truffle unbox pet-shop on terminal, I get error ✔ Preparing to download ⠼ ...
1
vote
1answer
387 views

web3 is not defined problem

This is my simple html source code for my website. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewpoint" content="width=device-width, ...
0
votes
1answer
251 views

MetaMask - RPC Error: Error: WalletMiddleware - Invalid “from” address

I'm trying to create a simple Dapp (via tutorial) which would allow me to send Ether from sender to receiver (via a contract with an address that automatically approves the transaction). The truffle ...
-1
votes
0answers
9 views

Warning! Error encountered during contract execution [Reverted] in Vesting Contract [closed]

I created a vesting contract it is same with maticvestingcontract https://etherscan.io/address/0xcbfe11b78c2e6cb25c6eda2c6ff46cd4755c8fca#code when what should ı do for withdraw from vesting contract. ...
2
votes
1answer
22 views

Solidity. Find whether a key exists in a mapping. Then get its value

I have a simple mapping: mapping(address => string) professorsExam; How can I check if msg.sender is a key in this mapping, and if it is, get its value? If it isn't I should return something. ...
1
vote
1answer
68 views

Issue with selfdestruct() getting an error

main contract function which calls my secondary contract function gameOver(uint _matchId)public payable onlyOwner returns(bool) { Match my_match = Match(matchTracker[_matchId]); bool success ...
0
votes
1answer
15 views

invalid implicit conversion from contract to address requested contract

I am using this function to create a new contract instance of Match contract which takes 4 parameters. However i am getting this error message "invalid implicit conversion from contract to address ...
0
votes
0answers
13 views

Assertion error running truffle test

I cant seem to understand where this error comes from. Maybe someone can help My token solidity file : pragma solidity >=0.4.2 <0.6.0; contract LairToken { //Name string public name = "Lair ...
0
votes
0answers
29 views

Error: Returned values aren't valid, did it run Out of Gas based on YT Tutorial

I red the other Threads about this case, but couldn't fixed the problem. I got this tutorial for Scmart contracts: https://www.youtube.com/watch?v=coQ5dg8wM2o&feature=youtu.be However the ...
1
vote
0answers
19 views

What is Parser Error? [closed]

What is Parser Error? How to solve this problem?
0
votes
0answers
19 views

How can MetaMask alert about transaction errors before they are caused?

The MetaMask extension has this feature to warn about transaction errors before a transaction is being made: ALERT: Transaction Error. Exception thrown in contract code. How is this done? A dry ...
0
votes
1answer
54 views

Out of Gas, Bad Jump, Other errors trying to send

I have always used the metamask default settings, however it is not working when I am simply trying to send ether from my etherdelta smart contract back to my ether wallet, so I checked www....
4
votes
2answers
6k views

Solidity initialize memory array of fixed size

Using solidity 0.4.15, there is a function that takes a number and returns array of fixed length called traits: function splitN(uint256 n) constant returns (uint8[12]) { uint8[12] memory traits = ...
1
vote
1answer
177 views

Handling require/assert failure errors correctly from a Node.JS app?

I have a getter function in my smart contract that returns one of the string values in statically defined string array. Upon entry to the function, it does a bounds check on the incoming index using ...
1
vote
1answer
150 views

Ropsten rejects my sendSignedTransaction function

This is my code: contractNoEvents.methods.myMethod().call(function(err,foo){ if (foo.length > n) { contractNoEvents.methods.myOtherMethod().call(async function(er, bar)...
0
votes
0answers
189 views

Etherscan says “we were unable to locate a matching bytecode (err_code_2)”

Please help me with this error... I dont know what is it?
0
votes
0answers
11 views

Geth error: Genesis not found in chain - error on the worker node!

Good afternoon. After restarting the server when trying to run get I get an error. Start command: geth --rpc --rpcport 8545 --rpccorsdomain "*" --rpcapi "db,eth,net,web3,personal" --cache 8192 --...
0
votes
1answer
114 views

Problem in Mist :“It seems this transaction will fail. If you submit it, it may consume all the gas you provide”

I have tried creating contracts in Mist. I already made one contract six months ago and everything was fine. Now this error pops up : "It seems this transaction will fail. If you submit it, it may ...
1
vote
1answer
110 views

Solidity IDE Parser Error on Token Name

Getting this in Solidity: browser/ballot.sol:121:16: Parser Error: Expected Primary Expression. Here is my code, says that it is the name line with the parser error function ERC20Token( ) { ...
0
votes
1answer
28 views

rpc error with payload and exception thrown in contract code

This is the problem I get when trying to run my contract! And then when I go ahead and run it, this pops up This is my js code: import React, { Component } from 'react'; import Web3 from 'web3'; ...
1
vote
1answer
229 views

Puppeth running on Mac with localhost always return err=“docker configured incorrectly: bash: docker: command not found\n”

Anybody tried running puppeth on Mac (Sierra or higher) with localhost as the servers with any success? Please share it here, because I always get err="docker configured incorrectly: bash: docker: ...
0
votes
1answer
195 views

transfer/send error cases

I have a (noob) question on the usage of transfer and send. I have seen that transfer is equivalent to require(x.send(k)); When I use send() I know that I have to check whether there was an error ...
0
votes
2answers
319 views

Why am I Getting: Transaction Error. Exception thrown in contract code in Real?

WE Had Create A Dapp Like POWHD, we Already Deployed It And Some Of Transactions Are Already Done well. But After Some Time The issue I'm encountering with my real contract (Dapp) is that trying to ...
0
votes
1answer
424 views

address.transfer(value) is throwing error in solidity contract.

I am building an approval contract in Remix and have been stuck on this issue. When I try to transfer wei using address.transfer(value), it throws an error. I have marked it in the code below. ...
1
vote
1answer
495 views

DeclarationError: Identifier already declared. Two imports import the same ERC721 contract

Im building a contract that uses two contracts that both use the ERC721 zeppelin contract, when I import the two as such: import nonFungableWidthAddedFunctionality1.sol; import ...
2
votes
1answer
66 views

How does one retrieve revert/require error messages from RPC

In both of these questions, the user is asking if it's possible to get the error string from a revert or require. The answers say, basically, "Yes" and point to Truffle or other methods. VM Exception ...
0
votes
1answer
672 views

Can not verify contract on etherscan.io “Error! Unable to generate Contract ByteCode and ABI”

I am getting the error "Error! Unable to generate Contract ByteCode and ABI" When I try to verify this code. I have split it into two pieces as I import it but not sure how to include it all in ...
2
votes
1answer
133 views

Metamask Error messages shows only revert

I have a little problem with the error messages I receive from MetaMask. In my dApp I have a modifiers which should throw an error with an error message. However, in MetaMask I only receive the RPC ...
2
votes
1answer
75 views

How to handle require/revert/assert errors properly

I'm trying to find an easy pattern to revert/rollback a write transaction. The first idea was to log a GenericErrorEvent but then I noticed that it will never be emited if any require/revert/assert ...
7
votes
2answers
2k views

Conversion of address to string in Solidity

The Solution given in Convert address to string did not help. Motive: To convert an address to string type so that I can use it as a parameter to a function for which string type is necessary. Code ...
1
vote
2answers
34 views

Why is solidity throwing “Note: The constructor should be payable if you send value. ”, when clearly the issue is elsewhere?

I'm writing a contract on Remix that is able to deploy and track child contracts. Here are the 2 contracts: pragma solidity ^0.5.0; Contract Factory contract ContractFactory{ ChildContract[] ...
0
votes
1answer
64 views

Getting error on sending ether/wei in payable function

error: transact to CampaignFactory.createCampaign errored: VM error: revert. revert The transaction has been reverted to the initial state. Note: The constructor should be payable if you send value. ...
1
vote
2answers
1k views

vm exception while processing transaction : out of gas

I already read the other topics with the same error, but that didn't solve my problem ... When I try to communicate with test rpc between my web interface with my smart contract I have always error "...
0
votes
2answers
125 views

Remix Deploy Error encoding arguments

I'm building a simple fund raising smart contract and having problems deploying this through Remix. I'm wanting to set the "goal" and "minimum contribution" values (in wei) during the contract ...
7
votes
4answers
3k views

Truffle Box at URL https://github.com/truffle-box/bare-box.git doesn't exist

I'm trying to initialize a directory with truffle init, but I'm getting the following error: Error: Truffle Box at URL https://github.com/truffle-box/bare-box.git doesn't exist. If you believe this ...
3
votes
2answers
779 views

Error! Unable to generate Contract ByteCode and ABI

Having issues verifying my token contract on etherscan.io. Receiving the following errors: Note: Contract was created during Txn# Result: Does not match the input creation bytecode found at this ...
1
vote
1answer
5k views

GPU'S Failed cannot create DAG

Last night everything is fine and then this morning I check my mining its's closed I think it was restarted or close accidentally then when I open my pool I have this error. ETH: 5 pools are ...
0
votes
1answer
203 views

Transaction Error. Exception thrown in contract code. (MetaMask)

When I use Ganache it runs with no problem and MetaMask too. When I run my contract in my private Ethereum network (Geth). When I use a function from my contract the MetaMask gives me this error (...
0
votes
1answer
22 views

Augur: getShareToken returns error: invalid argument 0: json: cannot unmarshal hex string

I use the following code: augur.api.Market.getShareToken({ _outcome: "0x1", tx: { to: _market }, }, function (error, shareToken) { console.log(...
-3
votes
2answers
56 views

Trying to create an instance of an abstract contract

pragma solidity ^0.5.0; import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol'; contract SubToken{ mapping(address => uint) balances; ...
0
votes
1answer
60 views

create ERC-20 token from a contract function

I would like to do a function create contract with ERC-20 interface. But I have a few problems. If anyone help me I’ll be appreciated. Here’s the code : pragma solidity ^0.5.0; import 'https://...
0
votes
1answer
37 views

create contract from function / contract

**Hey guys ! I just try to make a contract for create a contract. It supposed to be ERC-20 interface so my first contract for this. But I don’t know how can I do _mint and createContract functions ...
0
votes
1answer
26 views

Expected identifier but got reserved keyword 'reference' Product public reference; ^-------^ [closed]

hello guys I am a beginner. I would like to make a function for create a contract. I found a example on the internet but gives me an error so I dont know what should I do. Anyone can help me ? ...
1
vote
2answers
54 views

Error: gas required exceeds allowance or always failing transaction in Remix using Ropsten network

I am facing this error , My Contract is quite simple pragma solidity ^0.5.0; contract sendEther { address payable sender; function showReceiver() public view returns (address payable) { ...
0
votes
2answers
16 views

it'll give me a parser error

pragma solidity ^0.5.0; contract fisrtCoin { address deployer; mapping(address=>uint) balances; public function fisrtcoin() { deployer = msg.sender; } public ...
0
votes
1answer
104 views

'types/values length mismatch',

Hey guys I had a problem with my return function here's my smart contract : pragma solidity >=0.4.0 <0.7.0; contract NewHello{ address owner; address newOwner; constructor()public{ ...
0
votes
0answers
27 views

Get the address of a contract without using Remix-ide

I'm studying Ethereum, I need to get the contract address for interact with web3, I can not use Remix-IDE for this since that I installed Kali as an operating system. How I get the contract address ...
1
vote
1answer
147 views

Function declared as view, but this expression (potentially) modifies the state requires payable

I'm trying to change the an address data variable to a one, which is selected via a function. Keep getting the below error. Function declared as view, but this expression (potentially) modifies the ...
0
votes
3answers
223 views

ParserError: Expected ',' but got identifier

pragma solidity >=0.4.0 <0.7.0; contract NewHello{ struct kullanicilar{ string name; string surname; uint age; } event infoChanged( string name, ...