Questions tagged [remix]

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

419 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
2answers
698 views

TestRPC and Metamask: hanging on pending transactions

I'm using Remix and connecting to Testrpc via Metamask. I can successfully launch contracts to testrpc, but then it hangs on the subsequent calls that Remix makes to the public methods (Remix says "9 ...
6
votes
0answers
55 views

String Input of three numbers (comma seperated) doesn't work in Remix

So when I try to put in three numbers as a String in a usual setter-method, it doesn't work. Does anybody know why? function test(string memory x) public view returns(string memory){ return x; }...
6
votes
4answers
3k views

“Mock compiler : Source not found” Error in Remix online IDE

I haven't been able to compile any solidity code because of this error. How do I solve this problem?
4
votes
1answer
285 views

Remix + Ganache - Cannot call one contract from another

I have an innocent looking contracts that work painlessly in Remix. Test contract can easily call Another if I use JavaScript VM in Remix. I also have ganache-cli running on port 7454. If I connect ...
4
votes
0answers
417 views

Event and/or watch does not work

I have a contract for a simple bidding scenario as below: pragma solidity ^0.4.9; /* Contract accepting biddings during 30 minutes */ contract SimpleBidding { address contractOwnersAccount; ...
4
votes
0answers
290 views

Gas cost for bigInt library

I am working on a big integer library in the online compiler. Currently having gas/computational time issues with the modulus function. I first implemented it using repeated subtraction: function ...
3
votes
0answers
18 views

Remix debugger ignores breakpoint

Description of issue I'm trying to debug a simple contract using remix on chrome v. 65 on Ubuntu. I must be doing something wrong, because I have the following issue: When I place a breakpoint in ...
3
votes
1answer
55 views

How to use enums for conditions on constructor?

I am learning to code with solidity. need help to solve this I have a membership system where users can have basic, gold, diamond membership types. Users can use coupons every 5 minutes and for basic ...
3
votes
2answers
72 views

Format of Event logs structure in Remix

I am running a simple contract in remix. I have an event in my contract which will be emitted just to check values of stateVariables. contract stateVariable{ uint stateVariable1=10; uint ...
3
votes
0answers
144 views

Difference between execution costs on remix an Ganache?

I created a contract on remix and then deployed it. when I call any function there is an execution cost in gas. I also deployed the same contract on Ganache for testing. I find the execution cost in ...
3
votes
2answers
1k views

Error: gas required exceeds allowance or always failing transaction upon function execution

Problem The transaction fails because the transaction ran out of gas instead of it failing because the require condition was not met. It works fine before the solidity update to version 0.4.24. It ...
3
votes
1answer
188 views

Deploying contract via Remix

I was just recently going through programtheblockchain.com posts which are really helpful in terms of learning. I am currently struggling to deploy Token Market Contract (https://...
3
votes
0answers
127 views

Solidity : About function calls between deployed contracts

I want to make a function call between a token (MyToken.sol) that inherits MintableToken.sol of OpenZeppelin and manipulate that token (Buy. Sol). (MyToken.sol) pragma solidity ^0.4.21; import "...
3
votes
0answers
481 views

Why the transaction reverted?

Try to run my contract in remix JavaScriptVM and faced with error. Contract code: ... /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract ...
3
votes
0answers
198 views

Contract creation from another contract succeeds, then fails?

I have a first contract with some very basic functionality : contract ContractA { uint public supplyA; function ContractA (uint _supply) { supplyA = _supply; } function ...
3
votes
1answer
572 views

How to connect to testrpc from another machine local network?

I have a testrpc running on a machine but I want to connect the Remix IDE to it which is on another machine. I can connect to the testrpc with Remix IDE if both are on the same machine. Tried with ...
3
votes
0answers
117 views

Contract works fine in Solidity-browser but not against private node

I have been testing a contract using the Solidity Browser, but when I deploy the same contract on my private node, it doesn't seem to work the same as in the Solidity Browser. I have tried manually ...
3
votes
0answers
87 views

Solidty Browser doesn't load properly

Solidity Browser doesn't load anymore. Here is a screenshot with the Chrome Developer open. on Chrome Version 52.0.2743.116 m It's stuck on loading and I see in developer some error messages. It ...
3
votes
0answers
156 views

In Browser-Solidity, I want to see the messages sent by a contract

There is good information on this site about writing and ad-hoc testing a contract in Browser-Solidity. When I use the transaction tab to create my contract and invoke its public functions, I want to ...
3
votes
1answer
536 views

How do I connect to the Remix JavaScript VM from my front end

I have been developing using Remix and Metamask but it's a slow progress when pushing to the test networks. I have switched to the JS VM in Remix but I am not sure about how to connect my frontend to ...
2
votes
0answers
35 views

deploying Solidity contract in Remix

I am trying to deploy Solidity contract in Remix for my study purpose. However, I failed to deploy SmartMesh contract in Remix (below, I attach the link for the code): https://etherscan.io/address/...
2
votes
0answers
22 views

Name Styling Best Practices Internal/External variables/functions etc

The solidity docs clearly specify how to style function order, types etc. However, are there an appropriate way to also separate between internal/external variables, functions etc. I see some people ...
2
votes
1answer
95 views

Remix + Metamask: The method personal_sendTransaction does not exist

I'm trying to deploy a contract to the Rinkeby Test Network through Remix and Metamask. Metamask seems to be properly configured: However, at Remix Run tab, the address dropdown shows no accounts: ...
2
votes
0answers
42 views

Why I can't use two functions with same name, but different parameters

I have a function which returns address but it gives me error if I try to read it. I'll explain by a quick example: Solidity: contract TestOneReturn { mapping(uint => uint) m_Data; ...
2
votes
0answers
48 views

How to get v,r,s parameters from transaction receipt in remix ide?

I am trying to get v,r,s parameters of a transaction so that I can use them to verify the signature. I am not sure but I think previously remix used to give these parameters in transaction receipt. I ...
2
votes
1answer
31 views

How to implemet condition for constructor?

Looking to learn solidity so need your support for this I have made a constructor in my contract where maxAvailableNumber = 1; What I want to do is if the balance of user is more than certail limit ...
2
votes
1answer
165 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 ...
2
votes
1answer
39 views

How to get the return type of a function of an already deployed contract?

I am currently working on a real estate blockchain project. Now I have 2 contracts user.sol and property.sol. The person who is registered on the website through user.sol can only buy or sell property ...
2
votes
1answer
121 views

Web3JS incorrect return value

When I return a string array with web3 I don't get the original array as expected, but rather I get an array of the same size, with the index off by one. So instead of ["One","Two","Three"] I get ["",...
2
votes
1answer
49 views

Ethereum Smart Contract deployed token not showing

pragma solidity ^0.4.24; contract owned { address public owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); ...
2
votes
1answer
267 views

Remix: Gas required exceeds allowance or always failing transaction

I have a contract which has transferFrom function mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping (address => bool) public ...
2
votes
1answer
177 views

Remix + Metamask not fetching any values

I have a simple test contract that stores a hash and I deployed it via Remix and Metamask pragma solidity 0.4.25; contract Hash { bytes32 hash; constructor(bytes32 _hash) public { ...
2
votes
0answers
433 views

Contract too large

I am sure this has already been answered but I could not find a clear answer. I get the following error: Contract creation initialization returns data with length of more than 24576 bytes. The ...
2
votes
1answer
25 views

Contract - Demo - Identifier - Only 3 Lines for my contract to work - ¿does somebody know how to fix this?

pragma solidity ^0.4.23; contract Owned { address owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); ...
2
votes
2answers
240 views

Error when running Truffle Test in Terminal

I am trying to use truffle to test my smart contracts and have written some test files. I am getting an error on the terminal trying to run the test and am unsure what the reason is. I access my ...
2
votes
1answer
170 views

Contract working on Javascript VM and not Web3 Provider, why?

Here is the code: Calling contract: pragma solidity ^0.4.24; contract Caller { address public called_address; constructor() public payable { } function set_address(address _addy)...
2
votes
0answers
59 views

Estimated gas is always low

web3.eth.estimateGas is always calculating low gas for the transaction. Here is a reference to a trasaction in ropsten. https://ropsten.etherscan.io/tx/...
2
votes
0answers
214 views

Getting Json file from remix

I have been deploying contracts on rinkeby but we are almost done to go to mainnet. I have been comparing deployments with truffle and remix and there is a huge difference in gas uses, so I would ...
2
votes
2answers
826 views

Gas estimation failed in Remix

Can't really use the transfer function as it is written. It assumes the owner uses it. So made a new function for the "minting" function for the faucet to use. Not sure why the compiler message is so ...
2
votes
0answers
60 views

Gas Estimation Failed for Airdrop for sending Tokens to Multiple Addresses using Remix

I have deployed a Crowdsale contract and now I need to send my Tokens to a list of addresses using remix and injected web3. I am using below code for Airdrop but when I send tokens to multiple ...
2
votes
1answer
105 views

remix: The method debug_traceTransaction does not exist/is not available

I have followed this answer. So, you just need to add the --rpcapi "eth,net,web3,debug" command line option. The way I run my geth: geth --datadir /home/user/POA/private --rpcaddr 127.0.0.1 --...
2
votes
0answers
78 views

Input data into remix through javascript

I am trying to update and call data to remix using node js. I have the temperature captured in my js code and I am trying to call it using the updateWeather function. Node.js code let request = ...
2
votes
0answers
276 views

Can you deploy a contract from a Ledger Nano S using Remix?

I have deployed a contract from a Ledger Nano S before by connecting to MEW and deploying using Bytecode and ABI of the contract. However I do not know what compiler version MEW used and so cannot ...
2
votes
1answer
133 views

Ether balance on Metamask doesn't change after selling tokens

I create a smart contract successfully using Remix IDE , Metamask and Ropsten for testing. I want to sell some tokens using Sell function, so I specified the value "20" for Sell function ,my initial ...
2
votes
1answer
808 views

Remix error “gas required exceeds allowance or always failing transaction” on private blockchain

I'm trying to test contract interaction using Remix with two basic contract: contract Callee contract Caller Callee function/variable: uint[] public values; function storeValue(uint value) { ...
2
votes
1answer
468 views

debug transaction in remix-ide not working

i want to debug a transaction in remix-ide, connected to my cpp-ethereum node on ropsten. When i input tx-hash and press play button nothing happens. What went wrong?
2
votes
0answers
960 views

Invalid asm.js: Invalid member of stdlib when loading Remix IDE

When I try to load the remix ide on browser I'm getting the following on the console of the browser Loading https://solc-bin.ethereum.org/bin/soljson-v0.4.21+commit.dfe3193c.js without worker ...
2
votes
1answer
181 views

call graphs for solidity smart contracts

Do we have some open source tools where we can get call graphs for solidity smart contracts execution ? For ex: Suppose Function A in contract C calls some other function B so the graph should contain ...
2
votes
0answers
113 views

Solidity libraries with public visibility

Suppose I have the following Contracts and a Library: pragma solidity ^0.4.21; library UserLib { function insertUser(address dbAddr, bytes32 user) public { DB(dbAddr).setUser(user); } } ...
2
votes
0answers
240 views

Create a child contract from parent contract via remix

I was trying to create a new contract from another one like this: pragma solidity ^0.4.8; contract Child { address public owner; function Child() public { owner = msg.sender; } }...