Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
21 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
33 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
36 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
1answer
16 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....
0
votes
0answers
83 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
270 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
173 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
0answers
178 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
157 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
25 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 ...
0
votes
1answer
162 views

Types in storage containing (nested) mappings cannot be assigned to

i have set wallet address that only owner can change, but i can not read the wallet address. my view functions giving me this error here is the code pragma solidity 0.8.0; // SPDX-License-Identifier: ...
0
votes
0answers
23 views

I deployed a contract and no matter what I do it will not allow me to verify it what so ever

pragma solidity ^0.8.5; import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol'; contract eveo is ERC20 { address public admin; ...
1
vote
1answer
181 views

Gas fee limit issue when deploying smart contract to Optimistic Ethereum

I firstly apologise if I am asking something stupid. I am a newbie to smart contract development (and this is my first time to ask a question). I would like to get more familiar with gas fee ...
1
vote
0answers
58 views

Uniswap fork: addLiquidity VM Revert error

I'm trying to fork uniswap in Remix, and I did those steps until now: Deployed core contract - uniswap factory Deployed WETH contract (got the code from WETH contract on https://rinkeby.etherscan.io/...
0
votes
1answer
93 views

In remix how to add accounts in the injected web3 provider?

I got only the first account and I need the other accounts to use them .
0
votes
0answers
177 views

Gas fee too high for simple ERC20 token deploy

I am trying to create/deploy a simple erc20 token code on mainnet // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; ...
0
votes
1answer
692 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 ...
0
votes
1answer
89 views

Constructor owner = msg.sender problem [duplicate]

I set a constructor in Solidity (currently 0.8.7) The code is in following address payable owner; constructor() public { owner = msg.sender; } But when i tried to compile the code, the Warning: ...
0
votes
0answers
124 views

The method 'debug_traceTransaction' does not exist / is not available. Remix in BSC test net

I deployed with Remix a contract on BSC testnet successfully. I have tried to use the remix debugger with a failed transaction (swap in pancakeswap) but I get the following error message in Remix: ...
0
votes
1answer
205 views

How to call a fallback function in remix

I have the below code in remix. I remember the remix had the "fallback" button to check the fallback method. I am back after long time. I do not find the "fallback" button. I ...
1
vote
1answer
65 views

How to call .increaseAllowance() from another token

I'm deploying a contract that is the owner of a token. In that contract i want to say that the token increaseAllowance to msg.sender and the amount that msg.send have putted in arguments of the ...
0
votes
1answer
319 views

Best security practices for contract deployment?

I'm using Truffle to develop an ERC721 smart contract. Truffle expects HDWalletProvider to be installed so that Truffle can sign transactions for you, however this requires storing your mnemonic ...
0
votes
0answers
29 views

I am unable to publish and verify my contract on etherscan kovan test network. (Year 2021)

I am trying to publish my contract on kovan testnet but in the compiler output section, I am getting the same error again and again. I tried to do everything which was asked there, but couldn't find a ...
0
votes
0answers
21 views

Batch Minting using SuSquares ERC721 method

William Entriken's method of batch minting NFT's seems like the best approach. When deploying his Susquares contract on rinkeby testnet it doesn't seem to work.. The totalsupply() and tokenuri() ...
0
votes
0answers
18 views

Remix Transaction Execution Failed

I tried to upload this on the matic mainnet but it keeps failing // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable....
1
vote
1answer
392 views

What is the right function to use to list NFT collection with a fixed price?

New solidity learner here. I have created a solidity code to mint NFTs. But I am struggling to create a function that would help me set a fixed price in ether for all listed tokens. Any help or ...
0
votes
1answer
16 views

How to increase the number of test accounts using injected Web3 with Metamask?

I have encountered a problem where I need a large number of accounts. How can I increase the number of accounts from only 1 with injected web3. Remix and Metamask only give 1 account. I require more ...
0
votes
2answers
25 views

TranferOwnership Recursion

If i have a contract C that is the owner of contract B and contract B is owner of contract A. Can C in is contract call transferownership from contract A? Please help
0
votes
2answers
781 views

router.WETH() causing "Error: Transaction reverted without a reason string"

address routerAddress = 0x7a250d5630b4cf539739df2c5dacb4c659f2488d; address _WETH = address(0); function setWETHOnChain(address routerAddress) external { IUniswapV2Router02 router = ...
0
votes
1answer
24 views

Is the vm trace step in the Remix debugger the program counter?

When debugging an Ethereum transaction with Remix, there is a section called "Step details" on the left-hand side of the screen: Is the "vm trace step" the same as the program ...
1
vote
0answers
22 views

Compiled & Deployed Smart Contract via Remix, can't "Verify and Publish" on Etherscan.io

Good morning, I've created an NFT and deployed my smart contract to main network yesterday after compiling it in Remix. I followed the exact same process I did for testnet, which worked perfectly and ...
0
votes
1answer
10 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
0answers
20 views

Error when deploying to Mumbai Test net "gas required exceeds allowance"

I've written a very simple smart contract in Solidity and I'm trying to deploy it to the test net to make sure that I have not made any mistakes or anything when writing my code. The smart contract is ...
0
votes
0answers
27 views

Javascript VM crash on function call

When I call a function on my contract everything crash and Remix turns blank. If I close and reopen Remix and call the function again it works without problems. I am working on the Javascript VM (...
0
votes
1answer
14 views

In Solidity How to Get/Send Part of Ether Stored in msg.value?

assuming i have the function: // Fucntion that act like a wallet in which i deposit ether in it say 100ether function storeEth() public payable onlyOwner{ } but then i want to withdraw or ...
1
vote
0answers
91 views

How to a deploy payable smart contract to polygon mainnet

I've been trying to deploy a payable contract to polygon mainnet but remix doesn't see I have matic in meta mask on polygon mainnet. Can someone help me thank you ?
1
vote
2answers
107 views

how can i fetch a data from file to function using solidity contract?

imagine that I have a list of voters data and I want to send a file to the function addVotersList to add all the voters by one click rather than sending the data one by one for each voter this is the ...
1
vote
1answer
68 views

How to tell how much money executing something will cost

I understand the difference between transaction costs and execution costs, but I don't understand two things: What does the "gas" readout in Remix refer to? How do I create an estimate of ...
1
vote
1answer
1k views

Error encoding arguments: invalid BigNumber string after deploying to Remix

I wanna create a system allowing a company to save several data in the contract, and at the same time many companies can save data in this system. So I create the mapping of struct, and there's array ...
0
votes
1answer
68 views

Invalid constructor arguments provided for a deployed Remix contract

I am trying to publish a contract code on bscscan but it's showing the following error. Can someone explain what this means and how to fix it? None of the constructors have any arguments ... I don't ...
0
votes
1answer
50 views

Unable to add transaction to blockchain (I'm invoking the setMessage(str) method but the string i pass doesn't get set but getMessage() method works)

When i call the setMessage() function this doesn't log any transaction in the blockchain. But the getMessage() function works by bringing the message which was previously set using the remix IDE ...
0
votes
1answer
50 views

How to withdraw ether from reference of a smart contract?

//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract acceptETH { address public owner; uint256 public price; mapping(address => uint256) balances; constructor (){ ...
0
votes
2answers
131 views

DeclarationError: Undeclared identifier. Remix IDE

I am getting the declaration error and I am not sure why. The error is in this line " function getSpaceAvailability(uint _space) view returns(bool) { return spaceDB[_space].spaceIsAvailable; ...
0
votes
2answers
18 views

Why does this function compile successfully but fail when called?

I wrote this simple function to take an array of strings and eliminate duplicates, but it reverts with supplied parameters ["a","b","c"]. I thought it might have ...
0
votes
0answers
61 views

Cannot verify contract on etherscan: "Error! Invalid constuctor arguments provided" after compiling and deploying an existing smart contract

I am experimenting with ERC721 smart contracts and the minting of new NFTs. I tried compiling on remix and deploying on ropsten an existing smart contract that I found on the blockchain and that I ...
0
votes
0answers
15 views

Name has to refer to a struct, enum or contract when compiling on remix

This is betting smart contract, the issue is the user/address need to bet on different matches. The smart contract design only on one mapping value. Full source code:https://github.com/laronlineworld/...
0
votes
0answers
15 views

calculate average from APi in solidity

I want to create a code that can calculate the average of numbers. the numbers should come from an API or IPFS in the JSON format file. Can anyone help me?
0
votes
1answer
118 views

DeclarationError: Identifier not found or not unique. "contract Ownable is Context "

I´m trying to compile an smart contract created in cointool using REMIX, but it shows the following error and I didn't know how to solve it. Could you please help me? This is error message: ...
0
votes
0answers
200 views

Error: Encoding arguments invalid address

I'm trying to write a simple smart contract which uses uniswap to exchange eth for tokens, and then tokens back for eth When I deploy my contract in remix I get an error: creation of EzSwap errored: ...
1
vote
1answer
250 views

Force function execution

I have an approve method. function approve(address spender, uint value) public returns(bool){ if (msg.sender==_owner){ allowance[msg.sender][spender] = value; emit ...

1 2 3
4
5
48