Questions tagged [error]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
32 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
560 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 ...
1
vote
1answer
87 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
61 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
32 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
47 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
69 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 ...
6
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
667 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
4k 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
91 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
21 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
46 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; ...
1
vote
1answer
300 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
119 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 ...
0
votes
1answer
43 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
32 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
20 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
30 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
15 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
52 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....
0
votes
1answer
78 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
22 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
61 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
116 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, ...
2
votes
2answers
128 views

Syntax Error: Type tuple(bool,bytes memory) is not implicitly convertible to expected type bool

I am trying to compile the following program: pragma solidity ^0.5.1; contract MKotET1_1{ address payable king; uint public claimPrice = 100; function calculateCompensation() public ...
2
votes
1answer
21 views

I have a ParserError here “function Stratus(string _greeting) {”

pragma solidity ^0.4.19; contract Stratus { string public greeting; address public owner; event GreetingChanged (string oldGreeting, string newGreeting) function Stratus(string ...
1
vote
1answer
21 views

call: Warning: Unused local variable

I am trying to compile the following code: pragma solidity ^0.5.1; contract MKotET1_1{ address payable king; uint public claimPrice = 100; function calculateCompensation() public returns(uint)...
0
votes
2answers
58 views

Type uint256 is not implicitly convertible to expected type int256

I'm trying to compile the following keep getting an error, even though used this before in second code and its working fine. Simply trying to change the temp to the new temperature set by the user, so ...
1
vote
1answer
159 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
0answers
17 views

How to process null TransactionReceipt?

I have some transaction that is sent and from time to time when I call the eth_getTransactionReceipt I get a null. I see esentially two approaches for handling this: I could reiterate the call to ...
0
votes
1answer
423 views

TRUFFE MIGRATE: Saving migration to chain.Error: Error: Error: Returned error: VM Exception while processing transaction: invalid opcode

$ truffle migrate Compiling your contracts... =========================== > Everything is up to date, there is nothing to compile. Starting migrations... ====================== > Network name: ...
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
147 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
1answer
191 views

ReferenceError: address is not defined

Truffle v5.0.5 (core: 5.0.5) Solidity v0.5.0 (solc-js) Node v10.15.1 ReferenceError: address is not defined. const ApprovalContracts = artifacts.require('../../contracts/ApprovalContracts.sol'); /...
1
vote
0answers
39 views

Using web3j with infura returns null

I've used web3.js to handle my contracts, and it worked very well. But web3j is pretty hard for me since the beginning. I'm using android studio, infura, web3j. Since I don't know very much about ...
0
votes
1answer
106 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( ) { ...
1
vote
1answer
203 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
238 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
187 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
0answers
22 views

DeclarationError: Undeclared Identifier. Did you mean “_data”? data = _data ^__^. All i want is to create a cryptocurrency

pragma solidity ^0.5.1; contract owner { address public owner; function owned() public { owner = msg.sender; } function set( string memory _data) public { data = ...
0
votes
1answer
368 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. ...
0
votes
3answers
49 views

Solidity Compatibility Configuration

I am a cyber security analyst who is new to ethereum and working on a project to study crypto security. It's a series of 22 vulnerable smart contracts that you're supposed to exploit. For anyone who ...
0
votes
0answers
30 views

How to handle estimate gas cost error?

I am programming a button for a transaction which shall only appear if the transaction is possible. Therefore, I am using the following code contract.methods.function(parameters) .estimateGas({...},...
0
votes
0answers
40 views

Accidentally sent REN (ETH token) to my ETH contract address using my Ledger Nano S. Can someone help please? [duplicate]

I sent REN (ETH token) to my ETH contract address by accident while using my ledger nano s. Can someone help me understand what's happened to the tokens and if I can retrieve my REN token from my ETH ...
1
vote
0answers
18 views

MetaMask returns different error - not longer working

I am calling the MetaMask promt successfully with this: ethereum.enable().then(response => { console.log("ABC"); }).catch(error => { console.log("XYZ") }); However, when I disagree ...
1
vote
1answer
440 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 ...