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
13 views

How do I correctly declare an address variable in Solidity?

I am a novice to Solidity so you will have to bear with me regarding the following question: I am trying to compile my first smart contract and keep on running into this Declaration issue. How do I ...
0
votes
2answers
497 views

Linking to Compound Smart Contract

I'm still new with the solidity and it seems to be a very basics question. What i'm trying to do is to call the link the compound smart contract with mine. And when i try to compile is complaining : "...
0
votes
0answers
20 views

Same function gives different gas cost

I'm trying to run a function repeatedly and it sometimes fails and sometimes passes, it's almost 50-50. I have already read this but it doesn't help in my case. Putting the code for reference. struct ...
8
votes
2answers
7k views

Remix Warning: This looks like an address but has an invalid checksum

I have the following contract: pragma solidity ^0.4.13; contract Test { function test() public payable { address(0xCF5609B003B2776699EEA1233F7C82D5695CC9AA).call(1); } } The Remix ...
0
votes
1answer
107 views

Using remix and cannot get this to compile. please help

pragma solidity ^0.8.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract y is ERC20 { ...
0
votes
1answer
11 views

How can I change the sender address of a script in https://remix.ethereum.org

In the "Deploy & run Transactions" section of remix.ethereum.org I can change the account before I deploy a contract - and the selected account is the owneer of the deployed contract. ...
1
vote
1answer
162 views

Simple Open Auction example - how to run it?

I'm trying to run Simple Open Auction, compiled successfully in Remix. I receive "Exception while processing transaction: revert" when I try to enter recipient account addresses from Ganache, or "...
0
votes
1answer
37 views

How to put msg.sender into a string?

In my smart contract I need to put the sender's eth address (msg.sender) into a string. I have this request code (I'm using Chainlink): request.add("get", "https://APIURL/functions/...
0
votes
3answers
3k views

how to use import "@openzeppelin" in remix or import "https://github..." in truffle?

I can do import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; in truffle and import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20....
0
votes
0answers
6 views

How do i use Node.JS / C# Backend REST api to communicate with smart contracts built on https://remix.ethereum.org/

Been able to create contracts transfers , see balances etc. Now I want to use Node.JS to access it , display account balances initiate transfers etc. I have been able to create a token (a coin) but i ...
1
vote
1answer
219 views

Remixd Windows 10 - Absolute Path

Cannot find the right Absolute Path For Remixd on Windows 10. I have tried both remixd -s C:/MyProjects/SmartContracts --remix-ide https://remix.ethereum.org remixd -s C:\MyProjects\SmartContracts --...
0
votes
2answers
240 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 ...
0
votes
2answers
55 views

Can't create pair with IUniswapV2Factory

I am writing a BEP20 contract with a fixed transaction fee which gets swapped and sent to the team wallet. To make the whole thing working I could successfully initialize a IUniswapV2Router02 and ...
2
votes
1answer
319 views

Call a payable contract's function from another contract via an interface

I have two contracts, they are connected via an interface. When user calls contract1 function, it uses an interface to call contract2 function which updates it's storage. My problem is that I can ...
0
votes
1answer
164 views

i want to get data from the transaction hash i tried many codes at last i am getting boxes in the output

1) First, I got the input console.log(web3.eth.getTransaction('0x725fc75264726f409793164e336e7d5ed35df8d2be469a0cc1a3a8cc4756b9b9').then((i) => console.log(i) )); 2) I manually pasted the input ...
1
vote
1answer
2k views

false Transaction mined but execution failed

I was trying to deploy my smart contract to Kovan test network using Remix IDE,although it compiles successfully but when I try to deploy it I get this error message "false Transaction mined but ...
0
votes
1answer
113 views

Please help me fix this. VM error: revert

//SPDX-License-Identifier: MIT pragma solidity ^0.7.4; /** * Standard SafeMath, stripped down to just add/sub/mul/div */ library SafeMath { function add(uint256 a, uint256 b) internal pure ...
0
votes
0answers
24 views

How to call internal function on deployed smart contract

I'm deliving into NFTs and smart contracts I've deployed a simple NFT contract as a test usiing OpenZeppelin and Remix and the token Burn function is internal - if I, as the owner and creator of the ...
0
votes
1answer
339 views

error message ParserError: Expected ',' but got 'memory'

I have this error but I do not know what is wrong? browser/arry.sol:6:58: ParserError: Expected ',' but got 'memory' function addScore(unit24 s) public returens(unit24 []memory){ ...
2
votes
1answer
2k views

How to generate solidity encode function signature from Javascript?

What I am trying to achieve is like , i should be able to call a set of solidity functions dynamically based on some criteria. i'm using call() method to achieve the same. (bool success, bytes memory ...
1
vote
1answer
23 views

Deploy and run plug in is missing in solidity

I tried to search in inactive plugins , still not able to locate. Can anyone help. Earlier it was available but after some days, i logged into remix and was not able to find it. Can anyone help and ...
0
votes
0answers
70 views

Why do I keep getting invalid argument?

transact to SimpleStorage.addPerson errored: Error encoding arguments: Error: invalid BigNumber string (argument="value" value="" code=INVALID_ARGUMENT version=bignumber/5.5.0) ...
1
vote
1answer
233 views

Failing Token to Token Swap Contract Using Uniswap

So I've been struggling to get a working swap contract that swaps an exact token for a token via uniswap. I have multiple versions at this point, as I've tried several different approaches. After ...
0
votes
1answer
326 views

Compiler debug log: Error! Unable to generate Contract ByteCode and ABI Found the following

0 I deployed a contract of a token that has up to nine other files imported to the binance blockchain. I have done everything I can read and try in order to verify it. But it keeps giving me error. ...
0
votes
1answer
14 views

finding the sequence of functions executed when interacting with a contract

I have interacted with a contract on BSC Blockchain and know I want to know the sequence of functions executed with my transaction. I got my hands on transaction GETH traces using BSCscan but that ...
0
votes
1answer
129 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
3answers
3k views

Unable to return address array in solidity

I have the following code for a simple gambling game. The code works fine except for getPlayers function pragma solidity >=0.4.22 <0.6.0; contract Lottery { address payable public manager; ...
0
votes
1answer
21 views

Remix! Withdraw function not compiling - Type Error [duplicate]

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; // import eth/usd price feed contract contract FundMe {...
1
vote
1answer
517 views

SafeMath .add() imposes infinite gas

When I use add() function from Solidity SafeMath library, I get infinite gas requirement in remix (and this reflects in transactions that wont go through). Simplified example: function someFunction()...
0
votes
0answers
11 views

DeclarationError:identifier already declared Masterchef.sol

I'm getting the error, what's wrong? // SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "./SafeMath.sol"; import "./IBEP20.sol"; import "./SafeBEP20.sol"; ...
0
votes
1answer
167 views

Deploy contract to Parity dev chain using Remix

I'm trying to deploy a contract via remix to my local development chain. However, the transaction never gets mined and is pending forever. When I use a node script it works (at least I receive the ...
0
votes
1answer
589 views

Solidity compiler and Deploy & run transactions buttons are missing in Remix

Solidity compiler and Deploy & run transactions buttons are missing in Remix. I tried many times to refresh with no result.
0
votes
2answers
335 views

Solidity Undeclared identifier. s not (or not yet) visible at this point. but it is

I'm making if else function and if price == stopOrder it should do executeOrder but it's giving me error function sellLogic() public { require(StopOrder != 0 || LimitOrder != 0, "stop ...
0
votes
1answer
26 views

Remix simple storage invalid argument error

pragma solidity ^0.6.0; contract SimpleStorage { uint256 favoriteNumber; struct People { uint256 favoriteNumber; string name; } People[] public people; ...
0
votes
2answers
162 views

Declaration Error: Identifier already declared

I'm having a problem declaring the enum Stage. The previous declaration is here: enum stage {Init, Reg, Vote, Done} Changing the Stage name doesn't help: enum stage {Init, Reg, Vote, Done} Stage ...
0
votes
1answer
22 views

update state mapping from a different contract

I am pretty new to Solidity so here goes. I was wondering if it is possible to update a state mapping present in a contract from another contract. Like so contract A { mapping(uint => uint) ...
0
votes
0answers
25 views

I am not able found ABI ,Write and read contracts in Bscscan

I am getting ABI for my contract,instead i am getting [].After deploying the contract in remix IDE ,after verification process.I am not getting write and read contract
0
votes
1answer
8 views

How to resolve this DeclratationError in the following Solidity Code?

Why is the line '''SecretVault _secretVault = SecretVault(secretVault);''' in the following code throwing compilation error "DeclarationError: Undeclared identifier....." // SPDX-License-...
0
votes
0answers
3 views

interacting with an enum as an interface in other contract

having this issue of using enum as interface in other contract: will appreciate your help... // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.9; interface interEnum { enum SIDE { ...
0
votes
1answer
18 views

Remix IDE: Parse error : expected '{' but got 'return'

pragma solidity ^0.8.7; contract Token { mapping(address => uint) public balances; mapping(address => mapping(address => uint)) public allowance; uint public totalSupply = 10000 ...
0
votes
1answer
161 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
4 views

Problem with homemade buying liquidity contract

I'm working on a smart contract that aim to sell tokens for a fixed price and convert the benefits into public liquidity (which will be automatically locked by the contract in a second time). To do ...
0
votes
0answers
10 views

My Stable Coin returns 0 balance

I have compiled the contract in remix ide and everything is fine. But then when I test it at https://mumbai.polygonscan.com/address/0x908cC927e491eB378cED58FA148eFd22a974C27D Balance "0" ...
0
votes
1answer
13 views

I deployed a contract on remix, but none of the constructor variables are viewable

I inherited the ERC-20 standard contract, but when I compile and deploy, none of the constructor variables are viewable. This problem persists even when I change "private" to "public&...
0
votes
1answer
9 views

Appending new objects to a fixed size array over the limit

I'm learning Solidity and following one of the tutorials online. I'm basically making simple crowdsourcing application which can accept donation from the users. The withdraw function is defined as ...
0
votes
1answer
25 views

How do Interfaces in Solidity know which contract they are interfacing?

To my understanding, an address at some point needs to be provided so that the name of the interface that you write in your code is linked to the existing external contract you want to interface with. ...
0
votes
0answers
7 views

my pausable erc-20 token always on its balance always returns 0

Alright, I'm trying to get my initial_supply to be 100000, with 6 decimal places. But when I do the test the balance always returns 0. I don't understand what could be happening, could someone please ...
0
votes
0answers
26 views

How do i install: $ npm install @openzeppelin/contracts - is it on remix? Easy solution

This may sound stupid but would the team or anyone give advice on how to install it in the first place: Is it on the remix.etherum? If not which and what should I do to be able to install it? Is it ...
0
votes
1answer
113 views

Funding contract with LINK tokens revert error

When I try creating a Chainlink contract from "master contract" and fund it with LINK, I keep getting the error: "VM error: revert. revert The transaction has been reverted to the ...
0
votes
0answers
7 views

Transaction working in Remix but being reverted on test network

modifier upForSale (uint256 _itemId) { require(idToBid[_itemId].forSale); _; } function auction(uint256 itemId, uint256 amount, uint8 active) external onlyOwner(itemId) { ...

1
2 3 4 5
48