Questions tagged [error]

The tag has no usage guidance.

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

Token not returned: Warning! Error encountered during contract execution [execution reverted]

Polygon Weth token not returned after failed transaction. I press "buy" again the Hero in Idle Mystic game after refreshing it since it says failed in metamask. The token payment for the ...
0
votes
0answers
7 views

Pancakeswap Error when removing liquidity

(I'm willing to pay the one that is able to resolve the issue.) When I try to remove the liquidty for my custom token (KING), I get the following error message in the console: failed ...
0
votes
0answers
13 views

The called function should be payable but I don't want it to be payable

I already checked the internet for possible solution but none could help me. I'm using Solidity ^0.8.7 Below is a function to update a ranking of addresses and is triggered by function transfer(). ...
0
votes
0answers
9 views

Metamask transaction failed with "Error 'Supply Depleted'", funds not returned

My metamask transaction for an NFT mint failed and I did not receive my value back. The status error reads "Fail with error 'supply depleted'" and I received a [Reverted] on the Contract . ...
0
votes
0answers
5 views

Truffle: Error: Returned values aren't valid, did it run Out of Gas? for trying to return uint

I have a very simple contract which i fully expected to work. event FlagChanged(uint newFlag); uint private flag; function storeFlag(uint newFlag) public payable{ flag = newFlag; emit ...
0
votes
1answer
15 views

Why Remix is telling me to use "pure"?

// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; contract enumTesting{ enum frenchFriesSize {large, medium, small} frenchFriesSize choice; frenchFriesSize constant defaultChoice = ...
0
votes
0answers
20 views

ERROR "execution reverted: AssetContractShared#creatorOnly: ONLY_CREATOR_ALLOWED"

I am doing a two step minting process. user will setApprovalForAll for a new contract to transfer old tokens user will burn old tokens and mint new ones from the new contract Burn and mint function ...
0
votes
0answers
13 views

Insert the array into the constructor

I cloned the code from here. when I want to import the owners array into the constructor, it gives this error: ‍‍‍‍‍‍‍‍‍‍‍‍creation of MultiSigWallet errored: Error encoding arguments: Error: expected ...
0
votes
1answer
36 views

Error: processing respone error, Transaction reverted without a reason

I have a simple counter and it charges a fee everytime: But it throws an error: Error: processing response error (body="{"jsonrpc":"2.0","id":48,"error":{&...
1
vote
0answers
16 views

Web3: Does contract.methods.transfer().send({}).on('error') ever get fired, but the transaction was still successful?

I have some web3 code that calls the method transfer on an ERC20 contract let result = await contract.methods.transfer(r.fromaddress, truncatedAmount).send({ from: ...
0
votes
0answers
14 views

Web3js (NodeJS)Error: Hardfork with name function (), please help me

I'm trying to transfer for BSC network (testnet) using web3 with NodeJS. However, I am getting an error that I can't find any source on the internet. Would you help me with this topic? Thanks for help....
0
votes
1answer
122 views

How to fix Error: invalid address

I am trying to run the smart contract listed in the documentation here https://docs.soliditylang.org/en/v0.8.7/introduction-to-smart-contracts.html#subcurrency-example // Sends an amount of newly ...
0
votes
1answer
27 views

when i try to upload a contract with remix i get error on gas estimate Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }

When uploading a project from remix (bsc testnet) i get this msg, Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force ...
0
votes
0answers
28 views

Stack Too Deep error with only 5 items on stack

So, there are a lot of these questions and I've read through a bunch of them and several blog posts, but I'm still stumped on why I'm getting the error here. My function (to reproduce, copy it to here)...
0
votes
0answers
35 views

creation of NewToken errored: Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }

I am trying to deploy a new token contract to BSC testnet and hitting this error message. creation of NewToken errored: Internal JSON-RPC error. { "code": -32000, "message": "...
0
votes
0answers
13 views

How can a contract receive Ether via a public getter function?

While reading the Solidity docs on Panic via assert and Error via require, the following statement caught my attention: An Error(string) exception (or an exception without data) is generated by the ...
0
votes
0answers
24 views

Can anyone help me to verify my coin?

Error! Unable to generate Contract ByteCode and ABI (Compiler Exception) I get the whole time this error. I don't understand what I did wrong. Can anyone help me? This is the contract address: ...
0
votes
1answer
105 views

swapExactETHForTokens function execution

Please, help me. I try to do swapExactETHForTokens function from PancakeSwap Router contract. It's my code: def swap_exact_eth(router_contract_sample, token_contract, ...
0
votes
1answer
8 views

member not found or not visible after argument-dependent

pragma solidity >= 0.7.0 < 0.9.0; contract Learningloop { uint [] public numberslist = [1,2,3,4,5,6,7,8,9,10]; function getCount(uint _number) public view returns(uint){ ...
0
votes
1answer
70 views

Error occurred when trying to execute this swap in Uniswap V2

I’m trying to buy AHOUSE/weth and I get the “error occurred when trying to execute this swap” message. I try buying it with usdc, and eth. I try increasing the gas but nothing worked. I looked on ...
1
vote
1answer
153 views

Pancake Swap Factory smart contract error

I am using web3js to call PancakeFactory v2 contract (bscscan): contract address: 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73 Anytime I want to call any function present in the contract I end up with ...
0
votes
0answers
37 views

Overflow Error Solidity

Made a mint function from a finished traded contract and now it throws an overflow error on pancake I think we minted too much token
0
votes
1answer
32 views

Payable Function Solidity - What is the error: The transaction has been reverted to the initial state

'm trying to make a simple transaction between two parts (Supplier and Producer). First I make the contract deploy, then I defined the amount (that will be 1) and I make the transaction ->Amount ...
0
votes
0answers
35 views

etherscan contract verification unable to match bytecodes due to $-signs

I have a contract called Test , which uses a library called LCG. They are respectively defined in the .sol files with the same name as the contract: // SPDX-License-Identifier: GPL-3.0 pragma solidity ...
0
votes
0answers
10 views

How can i implement farm Token functions in javascript dapp?

This is the ethereum.org smart contract farm Token example code: function withdraw(uint256 _amount) public { // Burn FarmTokens from msg sender _burn(msg.sender, _amount); // Transfer ...
0
votes
0answers
12 views

TypeError: Different number of arguments in return statement than in returns declaration

I am a pretty much beginner. I am trying to see if I can send a delegate call to modify stamina but I dont know how to send these calls from a delegate. Anyone have a guide or tips? contract ...
0
votes
1answer
6 views

If statements givng parser errors no matter what

Below ive attached a very simple picture of some code that is reciving the same error as my actual code. Ive just made a super simple example for ease. And here is the error im getting. Any ideas on ...
0
votes
0answers
19 views

code error - I need your help please

I am new in coding and try to make my code works but I ammeeting an issue if you could help me it would be so nice :) One part of my code is the following : // SPDX-License-Identifier: MIT pragma ...
0
votes
0answers
45 views

IPFS is not a constructor

I am using IPFS to upload images however it's not working In the console window it's giving me the following error in Jquery.PersistPlugin.js I am not sure where is this file and how to solve this ...
0
votes
1answer
361 views

NotFoundError: Key not found in database [hn]

I'm playing Ethernaut (https://ethernaut.openzeppelin.com/). I'm currently on level 3 (Coin Flip). This is the Coin Flip contract: // SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import '@...
0
votes
0answers
125 views

Error in ERC20 Token transfer from Crowdsale contract

These are the steps I followed: approve admin for 2 B spending. transfer 2 B out of 10 B to MyCrowdsale contract using transferFrom() function approve 2 B spending for MyCrowdsale contract set the ...
0
votes
1answer
18 views

TypeError: Operator == not compatible with types address and int_const 0 if (from==0x0) mintToken(to,value); ^-------^

function transfer(address , uint256 ) public returns (bool) { assert(false); } function transferFrom(address from, address to, uint256 value) public returns (bool) { if (from==0x0) mintToken(...
1
vote
1answer
22 views

ParseError after a previously successful compile

I received a successful compile message: Compiling your contracts... =========================== > Compiling .\contracts\coffeeAccessControl\ConsumerRole.sol > Compiling .\contracts\...
0
votes
1answer
19 views

Error on RemixIDE: "ParserError: Expected pragma. import directive, or contract/library/interface definition" at the last line

I am running my code at RemixIDE and facing the error Remix: ParserError: Expected pragma. import directive, or contract/library/interface definition in the last line of the code (line 157). Does ...
0
votes
0answers
78 views

The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }

The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" } on BSC Testnet. ...
0
votes
1answer
102 views

TypeError: Member "isContract" not found or not visible after argument-dependent lookup in address

pragma solidity ^0.8.4; This modifier: modifier onlyNotContract() { require(!msg.sender.isContract(), "Contracts are prohibited"); _; } Is generating this error: ...
0
votes
0answers
57 views

DeclarationError: Identifier already declared even with inline function call

I got error in my smart contract, Pool.sol:10:1: DeclarationError: Identifier already declared. import './ERC20.sol'; ^------------------^ Token.sol:10:1: The previous declaration is here: contract ...
2
votes
0answers
365 views

Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack [duplicate]

I tried to add another parameter to my constructor and I get the following error when compiling with hardtest to test. If I remove one parameter it compiles again, so clearly it's related to the ...
0
votes
1answer
36 views

How to set payment amount to be passed in msg.value

I am working on truffle (solc 0.5) and trying to fetch amount in wei from user and send it to another account. Following is my code: contract pay { uint amount; function payment(uint _amount, ...
0
votes
0answers
32 views

Error-handling Mechanisms for Different System Call Invocation Errors?

I am a Ph.D. student in computer science and my research topic is software dependability. Currently I am doing some experiments to study an application's resilience with respect to system call ...
0
votes
1answer
83 views

How to retrieve contents of mapped struct by passing in an address

I want to retrieve a patients detail by passing in an address to the function. I managed to do this when writing tests using Mocha and I can retrieve the values with no problem. But when I tried it on ...
0
votes
0answers
22 views

error on ropsten testnet

im getting this error on ropsten testnet when i am trying to buy my token after adding liquidity. "The output token cannot be transferred. There may be an issue with the output token." does ...
0
votes
0answers
36 views

Getting error: 'approve caller is not owner nor approved for all' when calling approve() from ERC721 owner wallet

I am getting this error message when trying to call approve() on an ERC721 token: "code": 3, "message": "execution reverted: ERC721: approve caller is not owner nor approved ...
0
votes
0answers
12 views

how to insert data correctly into tupla solidity

i have made a contract that need to insert some data into a struct (tupla) to be deployed, but everytime i trying to do it, remix says: Error encoding arguments: Error: types/values length mismatch (...
0
votes
1answer
94 views

Error! Unable to generate Contract ByteCode and ABI - cant seem to be able to figure out

I looked thru the past threads for this error but still couldnt figure out how i can resolve this. One method i saw was to generate an ABI and manually insert it but i cant seem to figure out how this ...
0
votes
0answers
361 views

Uncaught TypeError: Cannot read property 'contract' of undefined

I'm getting this error. Can someone please help me Uncaught TypeError: Cannot read property 'contract' of undefined at add_details ((index):140) line:140--> var myContract = new Web3.eth.Contract(...
1
vote
0answers
49 views

What Standard RPC Errors Should I Handle?

Is there documentation that lists ALL the types of web3 exceptions that can be thrown by an RPC endpoint? eg. gas price too low, tx already known, etc.? Taking it a step further than that, is there ...
0
votes
1answer
24 views

splitting contract in data and application contract

I made 2 contracts in 2 different solidity files. Lets for simplicity assume the contracts are called A and B. A contains data and some simple function calls, B contains more complex function calls. ...
0
votes
0answers
15 views

Error changing smart contract [duplicate]

When I try to compile my smart contract ill get an error. I hope someone can help me changes the contract. CompilerError: Stack too deep, try removing local variables. --> HeroRat.sol:1046:80: | ...
1
vote
0answers
12 views

Errors in computation of blockchain algorithms, are detectable?

There is a class of fault-tolerant methods named Algorithm Based Fault Tolerance (ABFT), which augments input data with redundancy. Then if any errors occurs when those data are processed, just be ...

1
2 3 4 5 6