Questions tagged [error]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

Uncaught TypeError: Cannot read property 'currentProvider' of undefined

import Web3 from 'web3'; const web3=new Web3(window.web3.currentProvider); const address='0x23BD82c94d40daeF4B013316690732C050D36028'; this is my code please help me guys
1
vote
1answer
58 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....
1
vote
0answers
13 views

How do I do get the text from a failed `require` in Javascript?

I have a function in my smart contract that has several require clauses. I'm using etheres.js to call the it from React. When it fails, all I get in the JS Error object is the message "the ...
0
votes
2answers
89 views

Assertion error running truffle test

I can't 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 ...
0
votes
0answers
19 views

error while trying to deploy a SC on ropsten testnet

I want to test a staking Smart Contract on the ropsten testnet. The code compile successfully on Remix. However, when I try to deploy it, I get the following error: This contract may be abstract, not ...
1
vote
1answer
36 views

Member “push” not found or not visible after argument-dependent lookup in address[] storage ref

I am failing to use the push method against a dynamic array declared as a state variable. How can I do this? I declare a dynamic array of addresses as a state variable like below: contract Sample { ...
0
votes
1answer
3k views

Getting error -> unexpected token. You may need an appropriate loader to handle this file type

root@kali:~/Documents/oraclize-test# npm run dev truffle-oraclize-api@0.0.2 dev /root/Documents/oraclize-test webpack-dev-server ERROR in ./app/javascripts/app.js Module parse failed: /root/...
0
votes
0answers
33 views

Error message shown as [object Object] when use require, how to get actual error message string in Remix IDE Console?

I have used require function as: require(owner == msg.sender, "Sender must be owner"); But in the remix console I got, transact to Contract.setAdmin errored: [object Object] What should I ...
1
vote
1answer
263 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
51 views

“Consider using `transfer` in place of 'call.value()`” is a false error message by ethlint

I am getting following message when I use solium or ethlint, which is actually not correct and confusing developers. I have opened a issue related to that: Solium returns error for using call.value(). ...
1
vote
1answer
167 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)...
2
votes
2answers
50 views

Ethereum Wallet - Hangs at startup + 403 ws error

I have installed the Ethereum Wallet, Ethereum-Wallet-win64-0-11-1 (zip file), as described in the book. When I start up Ethereum Wallet (testnet Ropsten, syncmode “light”) the wallet seems to load ...
0
votes
1answer
130 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 ...
0
votes
1answer
14 views

not implement an abstract parent's methods completely or not invoke an inherited contract's constructor correctly

Having This error while deploying. pragma solidity 0.4.25; // ---------------------------------------------------------------------------- // Sample token contract // // Symbol : {{Token ...
2
votes
1answer
140 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
929 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 ...
0
votes
1answer
29 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(...
0
votes
1answer
213 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 ...
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 ...
0
votes
1answer
592 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
0answers
82 views

Contract call: data out of bounds

I'm working on a nextjs/react project in which i want to fetch the health factor of an address on AAVE. This can be done by calling getUserAcountData(address) on the lending pool contract. I can ...
0
votes
1answer
280 views

Do all transactions show in metamask wallet?

Bare with me I'm new here :) I've been selling art on Rarible but I can't tell if the Eth is going into my account. Because I'm minting nft's I can't keep track of my Eth total. My wallet activity ...
0
votes
1answer
861 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
2answers
49 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
90 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. ...
4
votes
2answers
2k 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
0answers
141 views

What to do if Metamask doesn't show a deposit because it's an “internal transaction”?

This is a follow-up on the question "Do all transactions show in Metamask wallet?" from Sky Hayward, in which Sky asked about transactions that show up as successful on etherscan, yet the ...
1
vote
1answer
6k 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
41 views

Getting this error `ValueError: {'code': -32000, 'message': 'insufficient funds for gas * price + value'}` on raw transaction send

I know for sure I have enough eth on account. Some prelims: I am signing a raw transaction with web3.py, like so: transaction = { 'to': '0xSENDHEREFINALLYPLEASE', 'value': 1000, 'gas': ...
1
vote
1answer
716 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
928 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 (...
1
vote
1answer
781 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
21 views

Can not Open Ethereum Wallet on Window 10

I did trying install soft Ethereum wallet on windows 10, But I can't open the program. It looks like the picture below. Help me pls, Thank everyone.
0
votes
0answers
11 views

Raise & return error with message if no key found in mapping

I am writing a test that should fail because it looks for a key that doesn't exist on a mapping. How can I raise the error with and error message in solidity? this is the test: it('Should NOT update ...
1
vote
4answers
1k 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.
0
votes
1answer
20 views

Error in code Expected pragma, import directive or contract/interface/library definitio

I am getting the below error when i compile the below code. Using remix compiler version 0.5.11 ****browser/TodoList.sol:7:2: ParserError: Expected pragma, import directive or contract/interface/...
0
votes
0answers
29 views

Error: The send transactions “from” field must be defined!

I get this error, even though I do specify the transaction sender.Here is my code: for(let a=1; a<TEST_ORACLES_COUNT; a++) { await config.flightSuretyApp.registerOracle({from: accounts[a], ...
0
votes
0answers
30 views

Type error, unit256 is not implicitly convertible to expected type struct

Using sol compiler 0.5.1 I am trying to fetch data from old smart contract's function called people, the smart contract is already deployed on the blockchain mapping(address => Person ) public ...
2
votes
1answer
1k views

Uniswap V2 smart contract integration reverts attempt at swapping ETH for tokens

I'm trying to integrate Uniswap V2 into my contract but my attempts at making a trade (ETH to Token) always gets reverted. Here is my solidity code: pragma solidity ^0.6.0; // Included the ...
0
votes
0answers
21 views

Trying to deploy a simple contract using node and getting the error: Unhandled Promise Rejection / Contract code couldn't be stored

I am doing an online course and trying to deploy using node. Can anyone help ID what I might be doing wrong. Thank you for any help! The error is below, followed by the js code. iii@iii:~/Digital ...
5
votes
2answers
2k 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
0answers
26 views

Are there well-solved patterns and practices for handling errors in Solidity?

In the spirit of Are there well-solved and simple storage patterns for Solidity?... Are there known, battle-tested practices for how to deal with errors in large Solidity codebases? It's common in ...
0
votes
3answers
729 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
1answer
196 views

While testing wrap & unwrap of ETH to WETH on Kovan ,however the wrap function is fine but unwrap func fails,is anything wrong in my approach?

trx fails at & debug at tenderly pragma solidity 0.5.12; contract WETH9_ { mapping (address => uint) public balanceOf; mapping (address => mapping (address => ...
0
votes
0answers
22 views

How to deploy huge contracts using web3?

I have a huge contract (which exceeds the default contract code size set in Quorum). I have increased the Code size and Transaction size in the Genesis file to 128Mb. The contract works well when ...
0
votes
1answer
52 views

Error when sending multiple transactions

I'm having a weird issue with the code below in that sometimes it works and sometimes it doesn't. It seems more apparent when TRANSACTIONS is set to a larger number. I have had it fail AND pass with ...
0
votes
1answer
967 views

TRUFFLE 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: ...
2
votes
2answers
2k 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
0answers
32 views

deployment error

everyone! Doing Dapp on Etheryum. When the contract was deployed, the Error: The data field must be HEX encoded data began to fly out. I do it on a site under Web3 \ JS. Thought the old js resource. ...
0
votes
0answers
110 views

Why error 'Fail with error 'Storage: Unpermissioned operator <0xc3d5d60630bc63eb1a07228cc5028cada1cc4c7b>' arises?

I wants to deposit & withdrawal DAI (https://kovan.etherscan.io/address/0xc4375b7de8af5a38a93548eb8453a498222c4ff2) to SOLO Margin(dydx) smart Contract at Kovan testnet (https://kovan.etherscan....