Questions tagged [error]
https://en.m.wikipedia.org/wiki/Error
358
questions
0
votes
0
answers
13
views
ProviderError: execution reverted using hardhat deploy plugin
I am working on a mini-version of a DEX and I am using the hardhat-deploy plugin. I was trying to test my createNewPairing method and ran into this error: AssertionError: Expected transaction to be ...
0
votes
0
answers
24
views
`oversized data {"name":"ProviderError","code":-32000,"_isProviderError":true} ProviderError: oversized data`
I am trying to deploy a NFT smart contract which takes 1 parameter that is an array of length 8912. The problem is the array length. I have tested with an array of length 100 and it works perfectly ...
0
votes
0
answers
10
views
Uniswap v2 remove liquidity ds-math-sub-underflow
I am testing an ERC20 token on hardhat and running into this error when trying to removeLiquidity. 'ds-math-sub-underflow'.
Currently testing this process:
Adding liquidity
swapping a few times
...
0
votes
1
answer
30
views
Reentrancy Ethernaut Challenge
I have been trying to pass the Reentrancy attack challenge of Ethernaut. Hence, I am creating this issue to ask help from anybody who knows where is the problem coming from.
First of all, here is the ...
0
votes
2
answers
27
views
The Ethernaut King Challenge
I am trying to pass level 9 of Ethernaut challenges known as the King contract.
My designed contract for hacking the King contract is as follows:
pragma solidity 0.8.0;
contract MaliciousKing {
...
0
votes
1
answer
33
views
Lost my Private key but ı have keystore
I have mew v2 json file. I want to convert this file to v3 utc via geth but I am getting an error, what should I do? i get the same error on windows 10 and linux (kali and ubuntu)
Geth Error:
Fatal: ...
0
votes
1
answer
27
views
Metamask: Error encountered during contract execution [Reverted]
I am trying to work with the smart contract I found on: https://github.com/pappas999/Parametric-Crop-Insurance/blob/main/contracts/Crop-Insurance.sol
I can deploy the contract but when I try to ...
0
votes
0
answers
14
views
todayToken .sol not compiling on remix ethereum - getting error with import “./EIP20Interface.sol”; ?? ANY SOLUTION IDEAS?
pragma solidity ^0.4.21;
import “./EIP20Interface.sol”;
contract TodayTOKEN is EIP20Interface {
uint256 constant private MAX_UINT256 = 2**256 - 1;
mapping (address => uint256) public ...
0
votes
2
answers
55
views
Error: Transaction reverted: function call to a non-contract account when adding liquidity through UniswapV2Router
I've been testing around UniswapV2 using hardhat and I always get this error when I try to add liquidity through the addLiquidity function on UniswapV2Router.
For the test, I deployed mock tokens, ...
0
votes
0
answers
7
views
New to coding. Trouble writing out truffle migrate —reset
So I am coding along with my teacher in Visual Studio Code and things are going pretty good, it’s only when I go to the terminal to compile the smart contracts we wrote out is where the problem comes ...
1
vote
0
answers
35
views
Why does solidity's try/catch not catch "call to non-contract address" revertion?
Recently I encountered the issue that the try/catch command of solidity does not catch the revertion when I'm trying to call a non-contract address in the try line.
While I'm aware of multiple ...
1
vote
1
answer
49
views
Is there a way to add all revert error strings to an ethers js interface?
According to this tool if a contract call has a revert message that starts with the signature 0x08c379a0 then the error message is in the format Error(string) i.e. a standard revert error string(e.g. ...
0
votes
1
answer
82
views
Encountered an error while attempting to update latest block (error code 1020 on Polygon mainnet)
I'm trying to migrate a smart contract on Polygon (Matic) mainnet through truffle, but I get the following error:
node_modules\@trufflesuite\web3-provider-engine\subproviders\rpc.js:57
const ...
0
votes
0
answers
90
views
Can't import OpenZeppelin Ownable contract
I'm following freecodecamp's solidity course but am unable to import Ownable from OpenZeppelin into my contract.
Using brownie, this is what I have so far:
and in the config.yaml file:
And when I ...
0
votes
0
answers
39
views
Gas estimation failed when trying to add liquidity to uniswapRouterV2 on ropsten
This is the function trying to add liquidity in my ERC20 token, I call it from remix
function addLiquidity(uint256 LPAmount, uint256 ethAmount) public onlyRole(MINTER_ROLE) {//owner is granted minter ...
0
votes
2
answers
260
views
How to use Proxies in Ethers?
I'm trying to use Proxies in Ethers.
My Solidity file:
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy....
0
votes
1
answer
44
views
transaction ran out of gas
No matter how much gas i provide this one function it failsas it runs out of gas, i have used a tool to check how much gas it is using and it is not overly high compared to other functions. I cant see ...
0
votes
1
answer
29
views
contractLogicError on Web3 but working on Remix
I have this contract code, which works fine on remix, but I cannot run with web3 in python, getting a contractLogicError.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface IERC20 {
...
0
votes
1
answer
63
views
Gas estimation error in really simple code
When I try to deploy this code without any Value in Remix it works just fine, but as soon as I add any value to this I get the error message:
Gas estimation errored with the following message (see ...
0
votes
0
answers
17
views
revert InvalidCalldata error VRFCoordinator
I am using a clone of the pancakeSwap lottery and attempting to use a write function. I keep getting an error in the BSC testnet VRFCoordinatorV2 contract saying revert InvalidCalldata();. The ...
0
votes
0
answers
41
views
CompileError: DeclarationError: Identifier already declared
Wondering if anyone has a fix/idea for this. The error seems to be with the import below.
I have tested it with remix and the smartcontracts all work fine with me importing directly from github. I ...
0
votes
1
answer
25
views
Forking Contract, Can't find where I am missing address argument
As it states in the title. Trying to learn by doing some immersion in modifying contracts. I am stumped here, when I go to deploy through REMIX I get a Error: Invalid address. I can't figure out where ...
0
votes
0
answers
24
views
I'm trying to migrate the second file but it can not find the artifacts file
Migrations file:
const wallet = artifacts.require("wallet");
module.exports = async function (deployer, _network, accounts) {
await deployer.deploy(Wallet, [accounts[0], accounts[1], ...
0
votes
0
answers
57
views
Error while running a python script in Brownie
I ran the following python script in brownie
def main():
print("Hello World!")
via
$ brownie run scripts/deploy.py
and got the following TypeError
PS D:\.Works\.CS\Web3\...
0
votes
1
answer
52
views
Brownie - TypeError: int() argument must be a string, a bytes-like object or a real number, not 'TransactionReceipt'
I made a simple voting smart contract and got a TypeError when I was testing the function "test_can_endorse_candidate".
Solidity Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.6;...
0
votes
0
answers
64
views
How to proper error handling web3 lib without require or event?
I am digging for a while here on stack, I've found few question on the matter, but I honestly didn't find quite good answers. here and here, for instance. If I get this right we can get error through ...
0
votes
1
answer
200
views
I am getting a Source error when importing @Chainlink. My project will compile. How can I avoid this error, or should I just ignore it?
I do not know what the issue is as I am on version 0.6.6 Solidity both in my compiler and in my code, and I am using all of the same versions of the packages that Patrick used. I find it even more ...
0
votes
0
answers
320
views
TypeError: Operator * not compatible with types int256 and uint256 --> contracts
Fairly new at this so there's probably an obvious answer. I was just playing around with an interest bearing contract. this below works out fine:
uint interestPerSecond = _interest * (_amount / 1e16); ...
0
votes
1
answer
9
views
Installed eth-cli on command line ubuntu 20.4, but command not found?
Sorry but a bit new to this. I used the command to install eth-cli:
npm install -g eth-cli
But I get all these deprecated errors and the command "eth-cli" shows command not found. How do I ...
0
votes
1
answer
24
views
How can I properly define a value and call it with .retrieve in Brownie?
transaction = simple_storage.store(15, {"from": account})
transaction.wait(1)
updated_store_value = simple_storage.retrieve()
print(updated_stored_value)
This is the code that I am using in ...
0
votes
0
answers
18
views
Creating a dynamic Array- Solidity- Error
Declaration Error: Identifier not found or not unique
contract MexicoCity {
uint256 public favoriteNumber;
function store(uint256 _10time) public {
favoriteNumber = _10time;
...
0
votes
2
answers
25
views
Newby learning Solidity - Parser Error
I am getting this error when I try to compile
Airlines.sol:49:5: ParserError: Expected '{' but got 'illegal' ➥
public{
Here is the code:
pragma solidity ^0.6.0;
//SPDX-License-Identifier: ...
0
votes
1
answer
61
views
Error from Remix IDE : "ParserError: Expected primary expression"
This Is My Code
pragma solidity ^0.4.4;
contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the ...
0
votes
1
answer
17
views
A function made in my contract while trying to compile the contract showed this; TypeError: Referenced declaration is neither modifier nor base class
//SPDX-Licence-Identifier: MIT
pragma solidity ^0.8.11;
contract PurchaseAgreement {
// VARIABLES
uint public value;
address payable public seller;
address payable public buyer;
...
0
votes
0
answers
98
views
my nft not showing?
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import ...
1
vote
1
answer
1k
views
Unable to install Truffle - cli.bundled.js error
I'm unable to install Truffle. After installing I try the commands
Truffle unbox pet-shop & Truffle --version and I always get the same error which is the inability to find cli.bundled.js.
I've ...
0
votes
1
answer
70
views
I'm getting: TypeError: Member "balanceOf" not found or not visible after argument-dependent lookup in contract
On the line where it says require(tokenContract.balanceOf(this) >= _numberOfTokens); is where I'm receiving the TypeError. Any suggestions on how to fix this?
pragma solidity ^0.8.12;
...
0
votes
0
answers
30
views
Proper JS error handling of contract function
I am making JS calls to my contract function like this:
contract.methods.userMint(q).send({
from: walletaddr,
value: cost
}).once('receipt', (receipt) =&...
0
votes
1
answer
33
views
ERC721 Mint Stack Too Deep Error
So i'm getting this stack to deep error
function mint() public payable{
require(commonImages.length > 0);
require(uncommonImages.length > 0);
require(rareImages.length &...
0
votes
1
answer
136
views
Error: Non-hexadecimal digit found - brownie
When i run brownie run scripts/deploy.py the terminal gives me this error :
Brownie v1.16.4 - Python development framework for Ethereum
BrownieSimpleStorageProject is the active project.
Launching '...
0
votes
1
answer
26
views
Why do I have a declaration error showing Identifier not found or not unique
I am writing the smart contract for NFT. it is my first one. it is showing the DeclarationError as below and I do not know how to solve it. Could you please kindly help me? Thank you
from solidity:
...
1
vote
1
answer
509
views
NONCE_EXPIRED error with ethers.js on local hardhat node
I'm trying to call multiple (3) times this Solidity function
function mint(address to, uint256 id) public onlyOwner {
ERC1155._mint(to, id, 1, "");
}
from this TS code
contract = ...
0
votes
1
answer
1k
views
Expected value of type string and private key too short errors
I got stuck with hardhat config. My .env looks like this:
API_URL="https://eth-ropsten.alchemyapi.io/v2/T4w-Ys... my API URL..."
PRIVATE_KEY="b285d...my private key..."
and hardhat....
1
vote
0
answers
36
views
Expected in: flat namespace after install brownie
i installed brownie with pipx but when i type any command i get this:
Traceback (most recent call last):
File "/Users/lorisfacchinetti/.local/bin/brownie", line 5, in <module>
...
0
votes
1
answer
72
views
Accessing and storing a Struct from external contract
I was trying to access and store a Struct from an external contract. Is there a way with which this is possible. This would be a simple PoC where I am trying to access a Struct from Student contract ...
0
votes
0
answers
196
views
Internal JSON-RPC error. ethers
quoteRes is the response from api getQuote of Ox
code:
const gasPrice = await providerEthers.getGasPrice();
const wallet = ethers.Wallet.createRandom();
const singer = wallet.connect(...
1
vote
0
answers
12
views
How to get error code of failed transaction [duplicate]
I tried to use web3.eth.getTransaction, web3.eth.getTransactionReciept and try to get by block number.
Maximum, that I got - it's:
status: false
But I need to get "T3".
0
votes
3
answers
217
views
Abi.encode + Stack too deep
I need to encode a bunch of variables that are part of an EIP712 message. Unfortunately I hit the stack too deep exception when I added hashParent(swap.parent) :(
bytes32 swapHash = keccak256(
...
0
votes
1
answer
220
views
How do I fix ERR_UNKNOWN_URL_SCHEME when trying to GET an ipfs url?
For example, I want to render some NFTs that have urls like this:
ipfs://QmZ5fD3UTRh8ALZCpMdypHkhMQSXyi4yyCz3Ea19kPmtXg/0.jpg
but when I try to fetch this uri in my react app, I get this error:
GET ...
0
votes
0
answers
9
views
Handling errors from external contracts
Can you share your experience of how to handle the errors with external contrat calls.
Example:
interface contractX {
function balanceOf(address owner) external view returns (uint256);
}
contract ...