Questions tagged [error]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
46 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. ...
0
votes
0answers
149 views

Problems with sending ERC20 token

I have ETHSTEEM tokens in my MetaMask wallet (5.3.1) and when I tried to transfer them, 'fast' fee is over 1.3€, while for ETH transfer or AVINOC token it's around 0.01€. Even when I used this high ...
0
votes
0answers
498 views

FATAL ERROR: Rebalance Allocation failed - process out of memory

So while running truffle compile for my contracts on AWS Ubuntu server I got the following error: <--- Last few GCs ---> [17055:0x3985730] 11958 ms: Scavenge 511.7 (553.4) -> 506.9 (553.4) ...
1
vote
0answers
73 views

My code compiles on remix.ethereum.org but not on etherscan.io please help! [closed]

I get this error " ParserError: Function, variable, struct or modifier declaration expected. function transferFrom(address _from, address _to, uint _value) public returns (bool) ^ " everytime ...
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 ...
1
vote
1answer
407 views

Error while installing web3

I'm getting these errors while executing npm install web3 How could i fix this?
2
votes
1answer
527 views

Running out of gas during a deploy due to a large number of require() statements?

I have a smart contract that has a fair number of functions, but a large number of require() statements because I carefully check every incoming parameter and some intermediate calculation results too....
0
votes
1answer
14 views

Struct param not found

I´m trying to call a function insertOrigin inside a struct and then call other function getOrigin to return that values. But VS Code get a error pragma solidity ^ "0.4.24"; contract Origin { struct ...
8
votes
2answers
220 views

Possible error in white paper validation algorithm?

If we take the block validation algorithm described in the white paper (Section Blockchain and Mining), it states at point 6: Let TX be the block's transaction list, with n transactions. For all i ...
1
vote
2answers
1k views

address payable type - store address and send later using Solidity 0.5.0

Solidity 0.5.0 has separated the "address" type into two types: address payable and address. Only address payable have the address.transfer method. I don't want to use the withdrawal mechanism. When ...
0
votes
2answers
87 views

Solidity can't modify block.timestamp due to lvalue xpression

I have a problem regarding modifying block.timestamp. I would like to modify timestamp in my network and change block.timestamp to unix timestamp, but I got an error at modification: TypeError: ...
0
votes
2answers
140 views

Why it's showing errors in this contract?

Actually, I wrote the code in multiple files, but since I need to Verify and Publish the code so, I tried to flatten the code. But now it is showing way too many errors. I put the code below with ...
1
vote
1answer
263 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 ...
1
vote
1answer
450 views

Fatal: Error starting protocol stack: listen tcp: lookup ”localhost”: no such host

I'm trying to run a Node on a private blockchain using the following command: geth --datadir data/privateBlockchain/ -networkid 1234567 -port 30306 -nodiscover -rpc -rpcapi “db,personal,eth,net,web3,...
0
votes
1answer
106 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
83 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
99 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
116 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 ...
0
votes
2answers
135 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 ...
2
votes
0answers
314 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
230 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
61 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 ...
2
votes
1answer
118 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. ...
1
vote
3answers
256 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 ...
0
votes
1answer
117 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
1answer
436 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
2answers
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
0answers
267 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
114 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
188 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 ...
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 ...
1
vote
2answers
2k 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
547 views

Truffle - Transfer leads to “Error: VM Exception while processing transaction: revert”

For reference, I am using Solidity to develop a smart contract for my company. I created a smart contract and attempted to use Truffle and Ganache to unit test it. However, I'm having a bit of an ...
4
votes
1answer
2k views

Error: Operator == not compatible with types address and bytes32

How can I change the last line in the following code to make it work? contract University { address public owner; address public student; bytes32 fName; bytes32 lName; ...
3
votes
2answers
935 views

Uncaught ReferenceError: Web3 is not defined Solidity

I've been working with this project and I downloaded all dependencies and Web3 already but when I test my code it shows me this: Uncaught ReferenceError: Web3 is not defined in line 120. This is ...
0
votes
1answer
33 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 ...
0
votes
3answers
244 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 ...
1
vote
0answers
101 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 ...
0
votes
1answer
74 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
45 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 ...
1
vote
0answers
120 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.
0
votes
1answer
24 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
770 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
1answer
3k 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/...
3
votes
1answer
110 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 { ^ (...
1
vote
2answers
742 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 =...
0
votes
1answer
365 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
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 ...
1
vote
1answer
146 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
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 ...