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

Solidity error message on compilation (DeclarationError: Identifier not found or not unique. using Address for address;)

I'm trying to compile a code for a crowdsale contract (Timed and with allowance) from openzeppelin library that is based on a deployed token. However during compilation on remix i get a syntax error ...
0
votes
0answers
10 views

Contract is not deploying properly on Geth private network using web3j SDK

I am new to Ethereum. I have created private blockchain using Geth on my local and trying to deploy my smart contract using java web3j SDK. I am able to deploy my contract using java and getting ...
0
votes
0answers
23 views

Unable to change/read local variable in a smart contract on a local private geth blockchain

I trying to create and test an ERC-20 Token on a local geth blockchain. I tried compiling and testing my contract on Remix's Javascript VM environment and it works fine. Then, I wanted to try ...
0
votes
1answer
21 views

Always raising “Gas required exceeds allowance or always failing transaction” when the condition of require() is not met

I tried to run the following code to check the error message when the condition of require() is not met. pragma solidity ^0.5.16; ... function addUser(string memory name) public returns (int) { ...
2
votes
1answer
18 views

How to check if a mapping has not been written yet?

I have this mapping: mapping (uint256 => string ) private storedData; I am trying to do this: modifier dataNotStored(uint256 _index) { require( keccak256(abi.encodePacked(storedData[...
0
votes
1answer
20 views

How to resolve this error in solidity “The constructor should be payable if you send value.”?

In this solidity code the finalizeRequest() is giving a run-time error. Here is the error : Campaign.finalizeRequest(uint256) 0x692...77b3a transact to Campaign.finalizeRequest errored: VM error: ...
0
votes
1answer
22 views

Calculate most frequent value in a array in solidity

I have an array something like [0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2]. I want to find the most frequent value. If two are more are having highest frequency, the first occurance should be the result. ...
0
votes
1answer
18 views

Problem with understanding Buyer address

My account address on Remix IDE is 0xCA3…a733c and wallet address is 0x147…C160C. Following is my code obtained from Solidity Tutorial. In this code, buyer address is passed as an argument. I have got ...
0
votes
1answer
12 views

Problem with understanding Ether log

Is transaction log also called trnsaction receipt? My account address on Remix IDE is 0xCA3…a733c and wallet address is 0x147…C160C. Following is my code obtained from Solidity Tutorial pragma ...
0
votes
1answer
9 views

Difference between account, wallet and deployed addresses: Remix IDE & Code

When I am executing the program on the remix IDE (got from internet), it asks me the address, _wallet, which I am passing in the constructor. Remix IDE shows me 3 addresses: Account, Deploy _wallet ...
0
votes
1answer
23 views

Cant Retrieve the values of Structure fields (i.e. text boxes) through Remix IDE

I am giving the values to structure field through Remix IDE, then I am putting ‘0’ as the index of people array, then I click transact and then I click call, but Remix does not show me the value I ...
3
votes
1answer
68 views

Contract does not exist at address

I have setup a private Quorum network and successfully deployed contracts and executed contract functions using Visual Studio Code and remix. When i try to deploy the exact same contract manually ...
0
votes
1answer
22 views

What is the differenc between Person and Account variables

What is the difference between Person and Account? struct Account { address addr ; uint balance ; } Account[ ] public accounts; function applyInterest () public returns ( uint ) { for ( ...
0
votes
1answer
19 views

Problem with understanding contract containing array of structure

I got the following code for a contract from a Solidity tutorial website: pragma solidity 0.5.1; contract MyContractPersonStruct { Person[] public people; uint256 public peopleCount; ...
0
votes
0answers
14 views

How to disbale metamask privacy mode so i can deploy contract from remix?

I am trying to deploy a contract in remix but I'm not getting any popup from metamask i believe this is due to privacy mode, however i can see no way to turn it off in the settings. I am using brave ...
0
votes
0answers
13 views

Import error when publishing source on Etherscan

I am attempting to publish my source code on Etherscan. When I compile, I get the following error. I assume that this callback is not reaching the destination. myc:3:1: ParserError: Source "...
0
votes
1answer
28 views

How can i use Token from an ERC20 Contract in my own contract?

I have following contract here on ropsten https://ropsten.etherscan.io/address/0x813870feba76f27ec1afcf79432e065a4839f7ab#code I want to use tokens from a different erc20 contract(...
2
votes
1answer
55 views

Public variable getter shows as transaction in Remix

As of Solidity 0.6.0+ compiler, my remix shows getter functions, built by public variables, as transactions and, therefore, do not return the value. I searched the solidity 0.6.0 breaking changes but ...
1
vote
1answer
32 views

Storing multiple values in one key mapping (Solidity)

Can I store multiple values in one key mapping in solidity? like I can retrieve all of the values if I use that one mapping key? Is this possible?
1
vote
1answer
20 views

How to deploy more than one contract with Remix

I'm trying to deploy my contracts with Remix to Ropsten, but I don't know how to do it. Can you help me? (I have a ERC20 token contract, and a CrowdSale contract)
0
votes
0answers
26 views

Gas estimation failed on remix

Cannot deploy the code, it compiles normally on version 0.4.22 with the same compiler version. I have looked at the answer on a similar thread and changed version to 0.5.11, when I try to compile it ...
1
vote
1answer
23 views

Remix Browser and Quorum Local Node

When i try to deploy any contract using quorum local node in remix browser with solidity version higher than 0.5.0, the contract gets deployed but any transaction to interact (fetch / update) the ...
1
vote
1answer
30 views

What's the relative advantage of using remix.ethereum.org over studio.ethereum.org?

Studio and remix are two web-based IDE that are hosted at ethereum.org. What are the advantages of each? In which situation should they be used each?
0
votes
1answer
14 views

ParserError: Expected identifier, got 'LParen' in Remix simple auction using Solidity

The line highlighted in the error is require(bid2 > highestBid2); The code: pragma solidity ^0.4.22; contract SimpleAuction { address public beneficiary; uint public auctionEnd; ...
0
votes
1answer
34 views

Remix IDE: How to debug a contract having a function with a argument & for Loop

I am trying to debug a contract on Remix IDE: pragma solidity ^0.5.1; contract DebuggerSampleContract{ int counter = 10; function LoopCounter(int _input) public view returns (int) { int ...
0
votes
1answer
9 views

Can't connect remix IDE using remixd

I am following remix connection manual. Running remixd like this: remixd -s ~/myProjects/cleanKyber/smart-contracts/contractsV5/ --remix-ide https://remix.ethereum.org/ trying to connect and ...
0
votes
1answer
21 views

Learning resources for solidity [closed]

I find docs of solidity very confusing can anyone suggest me some books or online resources for learning solidity?
0
votes
1answer
17 views

Storing Tokens In The Most Secure Way

What is the most secure way to store tokens, if you are to roll out an ICO or similar? I know there are many ways, i.e. sharding the private key but what is the best practice right now? If I assign ...
1
vote
1answer
70 views

Exceptions when compiling a contract using Solidity version 0.6.0 on Remix

I've been trying to compile contracts using the current newest version of Solidity on Remix which is 0.6.0. However when I compile the following code //pragma solidity ^0.6.0; pragma solidity ^0.5.15;...
0
votes
1answer
17 views

Return a value from send function [duplicate]

Hi guys i have one really big problem. I have this pice of code function showInfo(uint _pesel) public onlyMainPerson(msg.sender) returns (string memory, string memory) { string memory x = ...
0
votes
1answer
31 views

Contract Data Retrival

Whenever I do modification in a contract and deploy the contract again, the data in the existing contract is completely lost as the new contract is deployed in a new address. For instance, I have a ...
2
votes
0answers
28 views

Solidity Contract Length [duplicate]

What is the max length of solidity contract? I have been trying to deploy a contract of 328 lines of code on Remix Browser with a locally created Quorum Private Permissioned Node. I get the ...
1
vote
0answers
27 views

Is there a way to deploy a contract using bytecode only (to Ropsten …)?

One solution on medium.com describes how to do that via myetherwallet but it's the old verion of myetherwallet where you can switch between ropsten/mainnet - right now I can't find how to switch to ...
1
vote
0answers
35 views

Gas estimation failed in geth private network with remix

My environment is Web3 Provider (127.0.0.1:8080) which is a private network in my Mac. I have tried to deploy and run transaction in Remix with a simple solidity as follows. pragma solidity >=0.4....
1
vote
1answer
38 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 ...
1
vote
1answer
14 views

Difference between “decoded input” and “input” in Remix?

What is the difference between "decoded input" and "input" in the remix output? If these functions were to be called in an actual blockchain, would the "decoded input" be saved in a block, and thus ...
0
votes
1answer
29 views

How to store data on ethereum blockchain WITHOUT IPFS

Hi guys ^^ i want to store PDF file on ethereum blockchain without use of IPFS. I want to do it because i have my own private network where this data will be only stored. That's why i want to store it ...
0
votes
0answers
10 views

nested calls fail on geth --dev but pass ganache-cli

I have the following solidity contracts defined. I want to test nested calls using the lowlevel api where C->D->E. However, running this code passes on ganache-cli but fails on geth --dev node. Im ...
1
vote
1answer
52 views

Vyper fundraising smart contract: 'Attribute' object has no attribute 'func'

[SOLVED]: See below. I am taking a blockchain and security class and we are working with vyper. We have been tasked with rewriting a fundraising smart contract. However, the compilers do not seem to ...
1
vote
0answers
20 views

Is there a way to view the private key of test account in Remix (javascript VM)

Seeing how the keys are random and those "100 ethers" aren't real I can't think of why this is not obvious functionality, I'll need this for many reasons.
0
votes
1answer
12 views

browser/demo01.sol:8:33: ParserError: Expected '{' but got 'return' function age() private view return (unit) ^----^

pragma solidity ^0.4.24; //properties functions request contract AttrFnDemo{ uint private _age; string internal _name; int public _num; function age() private view return (unit) {...
0
votes
0answers
15 views

Solidity's address.transfer() function throwing exceeds gas limit error

I am learning Solidity in order to make a simple user interface in which users can purchase items and have ether sent from the purchaser to the Store. First, I have created one contract, one for the ...
1
vote
0answers
42 views

Gas estimation errored with the following message (see below). The transaction execution will likely fail

When I try to excute the deposit function it shows Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? execution ...
0
votes
1answer
16 views

what is declaration error in remix ide and how to solve it

What is declaration error here! I can't figure it out and the error is shown as an unidentified declaration error. Please help me out
1
vote
1answer
35 views

mapping Struct to bytes32 can't read from map

I am saving under byte32 key some struct, it is saved, but I really trust it is saved at all. When try to read, I get 0x0 in all fields. mapping (bytes32 => Document) documents; bytes32[] public ...
0
votes
1answer
16 views

Get contract data if all I have is a contract address

I have the address of a smart contract and I need to get the data residing in that address. I seem to have been struck at this for a while now and I want all this inside a smart contract. pragma ...
0
votes
1answer
18 views

REMIX debugger invalid opcode before JUMP

I am testing simple ERC20 token creation with the following in remix: pragma solidity ^0.5.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.4.0/contracts/token/ERC20/ERC20....
0
votes
0answers
26 views

Error with the function

pragma solidity ^0.4.24; contract XXXX{ address owner; constructor()public { owner=msg.sender;//To store address of contract deployer } struct Project//struct to ...
0
votes
0answers
17 views

TypeError: “send” and “transfer” are only available for objects of type “address payable”, not “address”. owner.transfer(msg.value); ^------------^ [duplicate]

pragma solidity ^0.5.0; /** * The Hotel contract does this and that... */ contract Hotel { struct Room { uint id; string name; string hotel_name; uint price; ...
2
votes
2answers
51 views

Calling function on ERC20 contract through staticcall gives wrong result

I've made two functions to interact with a local ERC20 token. Here they are: pragma solidity ^0.5.0; contract GardenTestContract { function getBalanceOf(address _address) public view returns (...