Questions tagged [error]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

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

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
18 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
48 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{ ...
1
vote
1answer
41 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
72 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, ...
0
votes
0answers
44 views
0
votes
1answer
56 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
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 ...
2
votes
2answers
88 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 ...
1
vote
1answer
16 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)...
2
votes
1answer
20 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 ...
0
votes
2answers
30 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 ...
0
votes
1answer
35 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
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
145 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: ...
1
vote
0answers
33 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
0answers
19 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
0answers
27 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
3answers
40 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
22 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
17 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 ...
0
votes
0answers
20 views

Error while deploying smart contract ,BadFunctionCallOutput

The log i am having while deploying a smart contract: -------- load log data -------- user.address = 0x2154f8B602c470ae7F10f242DCC88Ae6221bb263 contract.address = ...
0
votes
0answers
39 views

Cannot read property length of undefined in Remix / tried to increase gas not working

My contract was working just fine, but I don't know what happened, now when I try to interact with a new instance of my contract from Remix I get this error 'cannot read property "length" of undefined'...
0
votes
1answer
203 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
33 views

Why does updating an external variable results in an error?

I'm trying to update a variable within an external contract. My 2 contracts are as follow: pragma solidity ^0.4.25; contract MainContract { string public variable1; function setVariable1(string ...
0
votes
0answers
55 views

- does not trigger a Solidity `revert` statement

My Smart contact was running smoothly .I was smoothly executing the function successfully . MinterFunction(address account, uint256 value) public { value = value.mul(1 finney); require(...
1
vote
2answers
24 views

Simple contract throws for no apparent reason

the thing is that i have a very simple contract code that I wrote as a kind of "Hello World!", but it doesn't seem to work properly, and I can't see any reason why it wouldn't work. The code I'm ...
0
votes
3answers
55 views

REMIX:This contract does not implement all functions and thus cannot be created

What should I do? pragma solidity ^0.4.21; contract ScoreInterface { function hit() public; function score() public view returns (uint); } This contract does not implement all ...
1
vote
1answer
50 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 ...
3
votes
2answers
300 views

Solidity! Invalid implicit conversion from string memory to bytes memory requested

pragma solidity ^0.5 contract ProofOfExistence { // ... some code here function proofFor(string memory document) public view returns(bytes32) { return sha256(document); } //...
2
votes
1answer
54 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 ...
1
vote
2answers
108 views

Calling an address array in web3 returns an error that the method needs arguments

I'm declaring a public address array in my contract, but when I call it, I get an error saying it's expecting an argument. Can someone shine a light on what is happening here? Contract.sol uint ...
1
vote
1answer
24 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
135 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'); /...
0
votes
0answers
20 views

Not storing Item in variable

I am working on making a game where users can collect items. I have chosen to store the ERC721 tokens that represent the items in this way: Item struct: User struct and map that maps account-...
0
votes
1answer
49 views

Cannot read property 'hexToAscii' of undefined

deployedContract.deploy({ data: bytecode, arguments: [listOfCandidates.map(name => web3.utils.hexToAscii(Rama))] }).send({ from: '0xfb9286cde20bbd5ed60ee3bb156f9d9938c5b151', gas: 1500000, ...
0
votes
0answers
10 views

My ethereum based dapp throwing error :Unable to get UserError: ERROR: The returned value is not a convertible string:

I have setup a private ethereum network on an AWS ubuntu instance. The application has been deployed using truffle and uses metamask to approve transactions. There are two different pages one for ...
0
votes
1answer
98 views

NOOB Error : Transaction mined but execution failed

i´m learning Solidity now, and i saw this code on web but when i try to use the method "Deposito" i receive a error. Someone knows what's that ? (PS.: I try to put the value but every time i chose ...
0
votes
0answers
141 views

installing Truffle node-gyp rebuild Error

im trying to install Truffle and have run into numerous problems - made some headway after getting an earlier version of python but camt seem to figure out this error - could someone point me in the ...
1
vote
1answer
233 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, ...
1
vote
1answer
216 views

“before all” hook: prepare suite

This is the error code: Adoption.sol code: TestAdoption.sol code: I dont know how to solve this, it fails when i try to use this comand: "truffle test". Thanks.
1
vote
1answer
516 views

Invalid bytes32 value [duplicate]

I am trying to learn about solidity so I just watch a tutorial about it, I already copy the same code as the tutorial but there is an error with bytes32. Here it is: That is the deploy code: And ...
0
votes
1answer
19 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(...
1
vote
1answer
32 views

Augur: Getting this error: “Error: eth_call returned no data (0x)” when I try to run any transaction APIs. Does anyone know what is going on here?

The address owns ETH as well as REP according to dev. I'm connected to Rinkeby . This happens when I run the folling code: const owner = require('./.pvt.js').ADDRESS; const daiAddress = require('./....
0
votes
1answer
35 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
137 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
426 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
71 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 ...
4
votes
3answers
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 ...