Questions tagged [remix]

Questions about Remix, an online browser compiler for Solidity, formerly called Browser Solidity.

Filter by
Sorted by
Tagged with
0
votes
1answer
18 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
9 views

Supply chain contract cannot pay

I have a supply chain contract and the basic idea is: in itemManger contract: create an item where input string and uint. For example, "Iphone", 123. input 0 into item function 0: address: ...
0
votes
1answer
171 views

error deploying token to ropsten using remix

I am trying to deploy my token on Ropsten Network using REMIX IDE, but keep getting this error "contract may be abstract, not implement an abstract parent's methods completely or not invoke an ...
0
votes
0answers
9 views

how do i change the price feed token from eth /usd to busd/usd with the chainlink oracle?

I am trying to get the price feed for BUSD/USD using the chainlink pricefeed oracle but it tells me that the code was reverted. this is also happening when i switch to any other token, i am using the ...
0
votes
1answer
176 views

Failed to verify contract source code due to timeout/memory limit

Failed to verify contract deployed through remix on Ropsten network both using optimization and without it. Error is: Exception #1 Occured: ERROR|The Contract solidity compilation has exceeded the ...
2
votes
1answer
951 views

Recover Deployed Contract on Remix

I am working on the text, Mastering Ethereum and I deployed a contract and sent it test ether. However, for unrelated reasons I had to restart my browser, upon returning the only way I could continue ...
2
votes
2answers
278 views

Compile standalone assembly

The solidity wiki explains that standalone assembly is also possible. However, I cannot compile it. For example: { mstore(0x40, 0x60) // store the "free memory pointer" // function dispatcher ...
0
votes
0answers
16 views

Simple eth sending tx won't work

Why doesn't this work on remix? It compiles the contract but when you execute 'f' it reverts back the tx and sends the error message. pragma solidity 0.8.7; contract Testing44{ uint256 amount = ...
1
vote
1answer
74 views

Solidity - String Template Literal

Is it possible to write a multi line string in the solidity language on the same fashion as JavaScript allows us to do so by levering back-ticks? I'd like to now an optimal way to save a long string ...
0
votes
1answer
312 views

Swaping ETH to DAI on Uniswap

I don't get why when trying to deploy my contract it says that gas estimation errored. Forked Mainnet with ganache-cli -f <INFURA_ID> Trying to deploy and execute following code: pragma solidity ...
0
votes
1answer
625 views

Time Specified calls in Solidity using Oraclize

I have started learning coding in Solidity and I have written the below contract using the official Oraclize guidelines. My aim is to: Make the update() function be called on its own on the ...
0
votes
0answers
13 views

Issue with assigning arbitrary values to .call{value: msg.value}

Just learning Solidity here. I am trying to pass an receiving address, and an arbitrary amount (other than msg.value) to my transfer function, but it is just not working for me. This is the code: ...
0
votes
0answers
13 views

Remix - Create new file not working

I'm literally just trying to create a new file in remix and it is not working. Same goes for new folder. When I try to create a new file/folder the empty bar appears for me to type in and yet I cannot ...
1
vote
4answers
119 views

Address as name of an array in solidity?

How to make an array with its name as address of user? For example string[] public 0x7v77wfr349C9864De0119E94c3f8d.
0
votes
0answers
4 views

How to take input in remix for 2D array in solidity?

My Contract code contract SomeTokenVesting { mapping(address => uint256[6]) public vestingAmounts; constructor() { // some code } function addSomeBeneficiaries(address[] ...
0
votes
1answer
24 views

Getting Error : ERC20: transfer amount exceeds allowance

contract Token is ERC20 { constructor() public ERC20('DonkeyCoin', 'DKC'){ _mint(msg.sender, uint(100 * 10 ** uint(decimals()))); } // now we can make the approve for the msg.sender the amount it ...
1
vote
1answer
767 views

Where is the compiler in Remix?

I installed remix-ide. It is able to compile contracts. So it somehow calls Solidity compiler. Where is this compiler located in the filesystem and how to use it without remix-ide?
0
votes
1answer
116 views

Solidity Events

I'm using Solidity events to interact with my html page, once a change is done in the contract or page the watch function from html reflects back to the contract. My question here is, while checking ...
0
votes
1answer
10 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
13 views

Get a value of a nested mapping with only one key?

I have a mapping of a mapping that stores 3 things 1 Address of buyer 2 Address of seller 3 Amount spent. The goal is to store the amount spent by both parties, so that if buyer B something from ...
0
votes
0answers
5 views

Is there a solidity library with Java StringBuffer like utility?

I am going to be dynamically constructing some JSON. It is a pure view function so dont care about gas cost. Still, it seems lots of string concatenation is very slow, at least in Remix. Maybe some ...
0
votes
1answer
102 views

Remix crash (Error code: Out of Memory)

We're having issues with remix. It crashes on third iteration in for loop. When we try to run verify method, it successfully runs 2 iterations of for loop. However, in third iteration remix crashes. ...
3
votes
3answers
10k views

This contract may be abstract, not implement an abstract parent's methods completely or not invoke an inherited contract's constructor correctly

I'm trying to test out Ampleforth on Rinkbey using Remix. Here are all the files that I copy into remix. https://github.com/cryptoghoulz/based-contracts/tree/master/contracts/v4 They compile fine, but ...
2
votes
1answer
618 views

Token Swap From Ethereum Host Network To Different Blockchain

What is a good way to swap tokens from the Ethereum host network to a different network (i.e. the Tron blockchain)? Would the best way to do this be to have a smart contract where ERC20 token holders ...
0
votes
0answers
5 views

ParserError: Expected identifier but got reserved keyword 'immutable'

I am trying to compile a contract with distribition rewards via Remix, but get this error. contracts/contract.sol ParserError: Expected identifier but got reserved keyword 'immutable' address public ...
0
votes
0answers
20 views

Error in installing Remix-ide: Missing script "build"?

I want to install remix-ide on ubuntu server v18.04. I use these commands: git clone https://github.com/ethereum/remix-ide.git cd remix-ide sudo apt install build-essential npm install npm rebuild npm ...
0
votes
0answers
7 views

Parser Error in Solidity 0.5.1 while running in RemixIDE [closed]

I'm getting a parser error in Solidity 0.5.1. It says Parser error: Expected ';' but got '(' in Function there() What is needed to correct a parser error?
1
vote
1answer
351 views

Can't call function from contract using web3.js due to gas issue

I'm building a smart contract and dapp using ganache and web3.js. In my smart contract I have a function (named "add_pilot") which gets 4 parameters and add them to a mapping. It looks like this: ...
0
votes
1answer
25 views

Can I connect to Rinkeby using remix and metamask?

I've finished my dapp by deploying the contract to Remix, and it works well in Ganache. Now I wanna connect my dapp to Rinkeby by web3.js. I deployed my contract in Remix, and when I wanna interact ...
0
votes
0answers
39 views

Unable to call or transact with Rinkeby contract using Remix

I am very new to Solidity and I just managed to deploy a very simple contract to Rinkeby. However, for some reason I am unable to call or interact with it using Remix. Does anyone know whats wrong? I ...
0
votes
1answer
9 views

How to a write a subsidies contract?

I am new to solidity and Trying to wrapper my brain around it; I have being Writing this contact but, I am getting an error , cannot able to Store variable in contract. Function of contracts:- _dbs2....
1
vote
1answer
177 views

Remix IDE Desktop + Geth node as test network

I'm trying to connect the Remix Desktop client to my local Geth node. as usual i added: geth --rpc --rpccorsdomain https://remix.ethereum.org while starting up the node. This obviously only works ...
0
votes
0answers
15 views

How to send ether to call fallback function

Im currently working on a project which can create a uniswap liquidity pool on the fallback function however the transaction is not even broadcasted to the blockchain when trying to send some ETH via ...
0
votes
1answer
235 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 '@...
1
vote
1answer
467 views

How to decode InputValue of ethereum using java web3j

**I'm trying to decode the inputValue of an transaction using web3j without using any contract abi and wrapper class,Im loading the contract using its contract address ,is there any way/inbuilt ...
0
votes
0answers
14 views

Swap ETH to DAI using ISwapRouter from Uniswap

I am trying to get started with Uniswap V3. As an example, I took the most basic use case: Given X amount of ETH do a swap to DAI. Unfortunately, I am not being able to make it work. There is already ...
0
votes
1answer
717 views

Store data on ethereum blockchain from a text file

I have a simple smart contract running over a local Ethereum node. It has two functions: one for sending data and another for retrieving it back. I have a text file and want to send data from it to ...
0
votes
1answer
68 views

Help ! Error -13 trying to connect my local files to remix Ide

Hi i am trying to setup work environment by connecting local files to remix ide i keep getting this error when i run code remixd -s "absolute url path" --remix-ide https://remix.ethereum.org ...
1
vote
2answers
3k views

Truffle contract deployment either exceeds block gas limit or out of gas

I've been having the same issue when I was trying to deploy a contract using truffle develop console. The contract is not extremely big but does initiate two other contracts when called a certain ...
0
votes
2answers
89 views

Smart Contract Withdrawal Function Not Working Properly

For some reason my function keeps throwing at 2nd line, where I'm declaring an uint256 named depositedContribution, I have no idea why and I've tried to debug it for hours with no results, what could ...
0
votes
2answers
371 views

Remix IDE: Infinite gas problem with withdraw(...) method

I am trying to compile the following contract. I am using Remix IDE. It is giving me infinite error in the Withdraw method. pragma solidity ^0.4.24; contract financialContracts4{ ...
0
votes
1answer
74 views

How to integrate EIP-2981 with this basic ERC-721 contract

I'm looking to integrate these two things together into one contract for a basic 1/1 NFT. How exactly is this written together? Note they are two different compilers and they both need to be the same ...
1
vote
1answer
648 views

Parameters for Multisig Smart Contract

I was referring to multisig smart contract posted at below URL: https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol However, I am getting confused with some of the parameters to be ...
1
vote
1answer
39 views

Fail with error 'STF'

I am trying to create my first smart contract based on https://docs.uniswap.org/protocol/guides/swaps/single-swaps I've deployed it on kovan test net using remix successfully but when trying to send ...
0
votes
0answers
8 views

remix parse error: function, variable, struct or modifier declaration expected

I am getting a parse-error from the remix compiler: function, variable, struct or modifier declaration expected. I need help in figuring out how to fix this error. pragma solidity 0.6.0; pragma ...
0
votes
0answers
28 views

gas fee the deployment cost of 10,000 nft tokens in the remix IDE is very high

gas fee the deployment cost of 10,000 nft tokens in the remix IDE is very high, is it possible to bypass this or to use your computer's power ? is this possible or are there other ways to deploy ...
0
votes
0answers
16 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": "...
1
vote
1answer
298 views

why does it not work if I don't handle the return value of call/callcode/delegatecall?

This is my Contract code : pragma solidity ^0.4.15; contract D { uint public n; address public sender; event CallStatus(bool); function callSetN(address _e, uint _n) { if (!_e.call.gas(...
1
vote
1answer
18 views

How can I create a smart contract using another smart contract?

I want to create a smart contract which I can link to my website using web3.js and create input fields for creating a contract using the main contract and I can set the fees also which should go ...
1
vote
1answer
6k views

gas required exceeds allowance or always failing transaction

I really need help with this error. I'm testing the contract by sending ETH to Crowdsale contract .(Ropsten, My ether wallet, Remix). Full code is here: https://ropsten.etherscan.io/address/...

1
2 3 4 5
45