Questions tagged [error]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
583 views

How do I resolve “gas required exceeds allowance or always failing transaction” when trying to send ether?

This is the sample smart contract I am trying to run. All methods work, except, "payVendor" - it fails with gas required exceeds allowance or always failing transaction . I have tried increasing the ...
0
votes
2answers
149 views

Crowdfunding Contract like Kickstarter

I was following a tutorial for a Crowdfunding Smart Contract that acts like Kickstarter from Programtheblockchain, however I'm always getting a MetaMask Error which says "Exception thrown in Contract ...
0
votes
1answer
109 views

solidity dynamic struct array

when I develop my smart contract with solidity, I encounter a problem. And Below is my solidity code. pragma solidity ^0.4.0; contract RegisterContract{ event setNewUser(bytes32 name,address ...
0
votes
1answer
104 views

Catching errors with gas issues

I am working on the frontend where I use try / catch to find errors and give appropriate messages to users. My smart contract has a payable function and I was at the point of catching errors regarding ...
-1
votes
1answer
107 views

Expected primary expression error

I have this error: Expected primary expression. This is the code : pragma solidity ^0.4.17; contract Adoption { address[16] public adopters; // Adopter un animal function adopt(uint petId) ...
1
vote
1answer
1k views

Error from web3.eth.getPastLogs() hex string without 0x prefix

I want to retrieve all token transfers to a given address by scanning the logs but receive an error. Am I doing something wrong? Could it be a web3 beta issue? Code: const Web3 = require('web3'); ...
1
vote
1answer
151 views

Ether transfer from Account to Account with smart contract doesn't work

I've been struggling for a whole day trying to figure out what's wrong with my smart contract but I couldn't sort it out. Any help is appreciated, I'm sure I'm missing something :( Here is my ...
3
votes
1answer
114 views

v0.4.22 solc compile failing - not predictable behavior

Error: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead. function CappedCrowdsale(uint256 _cap) public { ^ (...
2
votes
0answers
396 views

Error when verifying signed message on Etherscan

Why is it that my message on etherscan can not be verified correctly? I always get this message: I'm sorry! Signature message verification failed
1
vote
1answer
336 views

Smart Contract to send ether

I have Solidity contract that is meant to send ether to someone. Unfortunately it's giving me a cryptic error message after I confirm the transaction in MetaMask. I'm testing on a local ethereum ...
0
votes
1answer
64 views

Smart Contract Testing

I am writing test driven smart contracts. There is one smart contract with parameterized constructor. And I am using the require statement in the constructor. I want to catch the error in my test ...
1
vote
3answers
355 views

Test array values if key/value exists - Does not work

I have a problem with the following contract. When I deploy it, normally on calling the function addBalance() it should go into the false. But instead, it completely does not work and I get the ...
2
votes
1answer
136 views

Gas Estimation Error when I try to burn token

pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. ...
0
votes
1answer
152 views

Expect Error: transaction in Truffle [duplicate]

Im testing wheter a require function does its job by reverting and want to test in within a truffle test. it("The URI should be unique", async () =>{ const dupURI = await token....
1
vote
2answers
3k views

Scrypt npm install fails with error C compiler cannot create executable

Can you please help me with this error? dhcp-rhodes-571:harberger-token kishorpatil$ sudo npm install scrypt > scrypt@6.0.3 preinstall /Users/kishorpatil/blockchain/radical-markets/harberger-...
3
votes
1answer
277 views

DelcarationError: Undeclared identifier on token creation

getting this error, any assistance is greatly appreciated. browser/ballot.sol:166:17: DeclarationError: Undeclared identifier. require(_to != address(0)); ^-^ function mintToken(...
1
vote
0answers
278 views

Error encountered during contract execution [Reverted]

i have created this contract https://etherscan.io/address/0xfecf0e91a193e8511ac83d8effda34ae4278f491#code but the problem is when i try to contribute to crowdsale it showing an error, (Error ...
0
votes
1answer
123 views

Warning! Error encountered during contract execution [Reverted please someone help me with this

i attached link code on etherscan. and error code also error: https://etherscan.io/tx/0x90d0d39a127e0693066cbc9a8a42fab20250753ead52724ab1760d7b4b458009 code: https://etherscan.io/address/...
1
vote
1answer
192 views

Another 'Stack too deep, try removing local variables' issue

Quite a few questions in SE regarding this, but my contract doesn't seem to be quite the same as those. I understand that variables defined inside the function (I have none), input parameters (I have ...
4
votes
2answers
2k views

errored: Error: gas required exceeds allowance or always failing transaction

Hi I have this error : transact to Roulette.betSingle errored: Error: gas required exceeds allowance or always failing transaction My programm : contract Roulette { uint public ...
1
vote
3answers
2k views

I can't get rid of the error “Uncaught ReferenceError: web3js is not defined”

I've been trying to get rid of this error, but no matter how much I try, I just can't figure this out. I've finished the tutorials of cryptoZombies, and all I know about web3 I got from there. I ...
0
votes
2answers
265 views

Car Rental System Compile Error

I am writing code for a car rental system but i'm getting a few compile error messages that don't understand. The first error is TypeError: Expression has to be an lvalue. The second is ...
0
votes
3answers
254 views

Stack too deep compiler error, but function only has 5 parameters?

I have a function, shown in its entirety below, that is getting the dreaded "stack too deep" compiler error. I have read several of the other posts on this forum about this error, but all of them ...
0
votes
1answer
34 views

Unpredictable states error when refactoring smart contracts

Ethereum smart contract functions are limited to around 16 local variables. When they exceed that number, stack is too deep error is generated. The solution is to refactor the large functions into ...
1
vote
0answers
103 views

Error deploying contract to my private network

I keep getting this "Error: The contract code couldn't be stored, please check your gas amount." message when I try to deploy my contract to the blockchain. I read that is a generic error so I'd like ...
1
vote
3answers
1k views

authentication needed: password or unlock

We're using Microsoft Azure, and NodeJS on the server. When we address Microsoft Azure via NodeJS, sometimes we get the 'Password or Unlock' error. But when we use Truffle and address the same setter, ...
0
votes
1answer
83 views

Why doesn't remix allow inputs of letters in this code?

Okay, so this code is actually designed to revert when anything but 0, 1, ...9, is entered, but let me explain. I created this code for general practice. It may not have practical use, but it's ...
1
vote
0answers
49 views

Error: VM Exception while processing transaction: out of gas - How to save gas?

I have a contract that has about ~1.000 lines. But when I try to deploy it, it does not work because of an "out of gas error". I already tried with a limit of the maximum, of 6 million and even 8 ...
9
votes
2answers
3k views

Truffle + Infura on Mainnet: Nonce too low error

I have the following code: const Contract = artifacts.require('./Market.sol'); module.exports = async function(callback) { let instance = await Contract.deployed(); for(var i = 0; i <=200; i+...
1
vote
0answers
134 views

How to catch errors in web3.py

How can I catch revert or out of gas errors in web3.py? I'd like to call a function through web3.py and in case it gets reverted I'd like to try it again after a couple of seconds.
1
vote
1answer
4k views

Encountered during contract execution [Reverted]

When trying to sent some ETH from myetherwallet getting followinf error: Warning! Error encountered during contract execution [Reverted] transaction links: https://etherscan.io/tx/...
0
votes
1answer
25 views

Why assert expends gas while require does not? (My intuition says te opposite is true)

Since assert corresponds to conditions that must never happen if the smart-contract code is correct my intuition tells me that someone calling an smart-contract that raises an assert must never be "...
0
votes
1answer
820 views

Smartcontract: Warning! Error encountered during contract execution [Reverted]

I have sent ETH to a contract address, and it "failed" the transaction saying it is: Warning! Error encountered during contract execution [Reverted] contract address and transaction failure here: ...
1
vote
2answers
923 views

Solidity Compiler - Error: Identifier already declared

Full source code of the file 'Test.sol' : pragma solidity ^0.4.23; contract Mortal{ address owner; string ownerInfo = "Contract Owner name XYZ"; constructor () public { owner =...
1
vote
0answers
188 views

Truffle TypeError: Member “error” not found or not visible after argument-dependent lookup in type(library Assert)

Trying to test my Solidity contract for errors using Truffle test. TestSafeMath.sol function test_add_10_and_max_should_return_err() { uint256 max = 2**256 - 1; Assert.error(SafeMathExt....
0
votes
3answers
1k views

Infura .watch Error: Invalid JSON RPC response: “” [duplicate]

I’m trying to use the .watch() command on an event in my contract. Whenever I run the .js file, I’m presented with the following: Error: Invalid JSON RPC response: “” I’m not at my computer and can’...
1
vote
2answers
43 views

transfer back msg.value to caller on error

I have a function with modifier 'payable' in the contract. My understading is, msg.value gets added to the contract's balance and then further code is executed. First question, is this a correct ...
1
vote
1answer
712 views

Parse Error Expected Pragma on remix

I am a beginner trying to run the following code on remix.ethereum.org pragma solidity ^0.4.19; function processData(uint num) returns (bool) { uint _number = num; if(num == _number) { ...
0
votes
0answers
334 views

Can not sync to ropsten

I have trouble syncing to Ropsten. I have just upgraded geth version to 1.8.7, then i run the command to remove the old chain: geth --testnet removedb. Then the command: geth --testnet --syncmode "...
3
votes
2answers
1k views

Consuming require() errors in web3.js client

Using require helps in validating user inputs before an action can be taken. However, it seems not many options exist to handle the scenario when require indeed returns false. The example mentioned in ...
2
votes
2answers
2k views

Invalid JSON RPC response when creating contract

I am getting this error while trying to deploy contract on Mainnet via remix.ethereum.org creation of XXXTokenCrowdsale errored: Invalid JSON RPC response: {"id":22,"jsonrpc":"2.0","error":{"code":-...
0
votes
1answer
404 views

Where are my ethers? Error encountered during contract execution [Reverted] [closed]

https://etherscan.io/tx/0x7eec9ecbba2ff45016d09e27bbb22ca206e6ec51386436c90ae937b563131066 Hello. That transaction was fail. It was send by an Exchange to another wallet. The error messagge is: ...
3
votes
2answers
825 views

What are the ways in which a transaction can fail and what happens when it fails?

What are the reasons transactions can fail and by this I mean all different types of transactions, i.e. payments EOA to EOA, contract function calls (from EOA or from other contracts) or other types ...
0
votes
1answer
365 views

Calling another contract's function fails for no apparent reason

I have this piece of code in Remix-IDE + Metamask, both at the most recent versions (but I also tried without Remix-IDE): pragma solidity ^0.4.10; contract Foo { bool public lastVal = false; ...
2
votes
0answers
213 views

“queue limit” error

I try to deploy a smart contract and every time i receive "queue limit" error. Here is what i do: Web3 = require("web3") web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); ...
2
votes
2answers
771 views

Pragma solidity not working

Dear all, I am very new to Ethereum, noob-new. This might anger many but, i have to ask, why is pragma solidity not functioning correctly. I have seem countless examples where pragma solidity ^0.4.0; ...
2
votes
0answers
154 views

How to get meaningful error msg from truffle unit test?

I am writing unit tests in truffle. No matter it's solidity unit tests or js unit tests, all of the error msg I can get is: Error: VM Exception while processing transaction: revert at Object....
0
votes
1answer
163 views

Received “ VM error : revert ” while calling payable function in remix

Function prototype is function pay1(uint xyz) payable{ require(xyz==msg.value); } I set (in remix) value to 30 ether and called function with the argument 30.
0
votes
1answer
42 views

A transaction is stuck?

This transaction will reach the recipient? Or not? https://etherscan.io/tx/0x99fb756ea14c57989827e7c9a49c6aa68d5ff2a7b8fd3faecd3021c2dece3115
0
votes
2answers
75 views

Trying to compile a smart contract Error: Type literal_string

I'm learning smart contract, and I have a problem compiling one it gives me this error message: Error: Type literal_string "0x5c15741c7abb1b0e8fb0bd41b5ed8c17219926a1" is not implicitly convertible ...