Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
2k views

How can I know how much a contract deployment will cost?

I'm trying to deploy a contract into ethereum, but I keep getting "out of gas" error. How can I know in advance how much ethers I need to deploy a contract?
6
votes
1answer
493 views

Compiler Issue or Improper State Variable declaration?

After seeing some unexpected compiler results, I've reduced the issue to this tiny example: The following compiles under 0.4.10 in Remix: contract StorageMapping { struct S { mapping(...
1
vote
1answer
374 views

Returning output of a constant function using web3

Consider the following contract: contract Test { struct person { uint id; string name; } person[] p; function addPerson (string _name) returns (bool added) { person ...
0
votes
1answer
2k views

Contract Not sending ether to other account

I have created a contract which store the address of the users and i want to send 1 ether all the users stored in array. Here is my code contract project{ address public user; bytes32[10] ...
4
votes
2answers
5k views

RPC connection to private net using MetaMask works, but using geth, mist or solidity browser doesn´t

I am trying to create a private network consotium in Azure by following this tutorial: https://github.com/Azure/azure-quickstart-templates/tree/master/ethereum-consortium-blockchain-network Problem ...
3
votes
2answers
3k views

Injected Web3 is not working in Browser-Solidity

I am using Metamask for ethereum testnet. And when i deploy my contract it run in my memory. And when I select the Injected Web3. It is not selected. Now what to do?? Please help me.
20
votes
2answers
12k views

How to pass arbitrary bytes to a function in Remix

According to this question I could write a simple contract like: contract SimpleStorage { bytes input; function setInput(bytes enterBytes){ input = enterBytes; } } Using "0x1234" as a ...
0
votes
1answer
669 views

Waiting for transaction to be mined

When calling any method on a contract https://testnet.etherscan.io/address/0xabc7a3a72af1f94ff6029ef01bc0f7c49e2ed637 using Browser Solidity https://ethereum.github.io/browser-solidity/ on Ropsten ...
4
votes
2answers
3k views

Mapping member isn't initialized when creating a struct

pragma solidity ^0.4.0; contract TestcaseResetObject { MyObject ob; struct MyObject { mapping(uint8 => uint) map; } event Output(uint number); function makeNew() { ...
4
votes
0answers
408 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; ...
3
votes
2answers
798 views

How do I upload a folder of smart contracts to Remix?

I'm pretty sure this used to be a feature. What am I missing?
4
votes
2answers
2k views

callback contain no result Gas required exceeds limit

I am trying to run a function with Remix web compiler on a contract in my private chain. Here is my contract and I am trying to run the function changeVaccinHistory: contract PatientObjects { ...
2
votes
1answer
242 views

Solidity Noob: Where can i see the return of a function?

I am very new to Solidty, and I am very confused ! I have the sample following code: contract HelloSystem { address owner; // Constructor function HelloSystem(){ owner = msg....
7
votes
2answers
1k views

Why does solidity compiled bytecode not match data for creating transaction?

I'm trying to independently verify the source code of solidity contracts, and stumbled across a case where the compiled bytecode for the source code of the contract does not match the data of the ...
2
votes
1answer
534 views

How to use Library with 1 File on browser solidity?

I use browser solidity. Now, I wanna create this C Contract. But, I have a message "Deploying and liking required libraries" on the right side of the picture. I have already create Math Library, and ...
3
votes
2answers
4k views

“Hello, World” smart contract using browser solidity

Can any one provide end to end example "Hello, World" smart contract using browser solidity
0
votes
2answers
812 views

How does solidity online compiler link libraries?

Suppose I have this code: import "github.com/Arachnid/solidity-stringutils/strings.sol"; contract Contract { using strings for *; // ... } For this solidity online compiler generates this ...
1
vote
1answer
109 views

revoke or invalidate token when after 30min

Dapp/SmartContract Goal I send x amount of ether to Address "AAA" from Address "000" If after 10 min if the newly received address "AAA" still has all x amount of ether. It should return all the ...
3
votes
3answers
720 views

now / block.timestamp not working on testrpc?

I'm having problems with testrpc, or at least I think that's the cause. This particular portion of code if (now > info.deadline) { ended = true; refundEnabled = true; return false; } ...
0
votes
1answer
597 views

Remix Solidity compiler is giving error (Expected token Semicolon got 'Returns')

When I debug a similar contract in Remix: function ConstructorFunction(uint _inputOne, uint _inputTwo){ callsAnotherFunction('string') returns (bool success); } I am returned this error: ...
5
votes
1answer
3k views

Solidity/Web3.js Cannot send value to non-payable constructor

I have a simple contract that I built a small webapplication with. The contract is as follows: contract MyContract { address public creator; function MyContract() { creator = msg....
3
votes
1answer
1k views

Problem verifying source code on Etherscan

This is really annoying I have tried putting in the ABI. Keep getting a constructor error. I have tried many combinations, nothing seems to work. Following is the source code I deployed to Testnet ...
1
vote
1answer
155 views

In a rental agreement payRent function is not working or not updating on MIST!

I want to implement a Car rental agreement. In Customer contract there in stract with 4 field. And a registerToProvider function. In Provider contract there are two function to set rent and ...
2
votes
1answer
227 views

Solidity function limited variables?

again, I hope this is not a double posting. I ran into some issue with some smart contracts. Basically I only wanted to store multiple variables using a smart contract, examples below: For ...
5
votes
3answers
3k views

Out of gas when calling contract method - Browser Solidity & Metamask

Trying to call sendFundsToFriend() method on the testnet contract https://testnet.etherscan.io/address/0xce8efd03766a309af57ddeb9c79f3e7cd23da0df (contract code at https://gist.github.com/anonymous/...
2
votes
1answer
496 views

“Callback contain no result” and “Bad jump destination” errors

When calling testnet contract ( https://testnet.etherscan.io/address/0xc03db39c18b6056f8c3a3a5495a1e11f3ff8885a ) method sendFundsToFriend: /* Faucet: Send funds, 1 Ether, to a new contact/friend */ ...
6
votes
1answer
2k views

Sending value with transaction using Metamask and Browser-Solidity

Using browser-solidity in combination with metamask I am testing a new contract on testnet https://testnet.etherscan.io/address/0xc03db39c18b6056f8c3a3a5495a1e11f3ff8885a but when trying to call ...
4
votes
1answer
438 views

Solidity browser compiler function gas cost vs actual transaction cost

When executing a function through the browser compiler, the compiler shows the gas costs, for example: Transaction cost: 30754 gas. Execution cost: 9290 gas. Are these costs actually identical to ...
2
votes
0answers
290 views

Optimizing 512-bit bigInt library

I mentioned last time that I was working on a big integer library. After some work, I have managed get 512-bit arithmetic kinda working!!!! Credits to /u/benjaminion for the modSmall function. Here ...
2
votes
1answer
235 views

Solidity browser compiler crashes

It seems like every time I try to execute a contract function through the browser compiler that requires more than around 50k gas (give or take) to execute, the browser tab's memory gets to around 1GB ...
2
votes
2answers
383 views

How do I add Ether to Browser Solidity for Testing?

I am unable to perform any transaction in Browser Solidity as there is no ether in the account. The contract is being created, but now ether is needed to test the functions. I have tried using the "...
1
vote
1answer
167 views

Ethereum Contract Issue

I have written a contract Transfer and the functions defined in the contract Transfer is used in another contract SecondTransfer.I have defined a constructor in the contract Transfer and initialized ...
5
votes
1answer
370 views

Can a contract fetch the global block gas limit?

The OPCODE GASLIMIT gets the block's gas limit. Could in-line assembly, uint gasLimit; assembly { gasLimit := gaslimit } fetch the gas limit ? contract B { function ...
2
votes
1answer
247 views

Empty address in Struct

Why does getProduct(..) always return an empty address 0x00 on browser-solidity? pragma solidity ^0.4.7; contract Products { struct Product { bytes32 name; uint votes; ...
18
votes
2answers
15k views

How to estimate gas at contract creation/deployment to private ethereum blockchain

What I have done a) When I use web3.eth.estimateGas to estimate the cost of a contract creation constructor with no parameters, the estimate is correct. b) If the contract is already deployed then ...
6
votes
1answer
2k views

How can I deploy a contract with reference to a library contract without using a graphical user interface like Browser Solidity?

I am using Solidity Browser to deploy a contract due to from Library contract method failing #2831 issue. On this following answer https://ethereum.stackexchange.com/a/9181/4575 I have guided to use ...
5
votes
1answer
645 views

Compile contracts that call each other

I have two contracts, one is a Admin, other is subject. To keep things simple I am just including the functions that are invoked in the contracts relating to each other. contract Subject { uint ...
5
votes
1answer
432 views

Why do Solidity Browser non-constant functions return values?

When calling a state mutating function on the chain, the TX receipt object is returned. In Solidity Browser, under the Javascript VM, a return value is returned if one is set. Why does the ...
2
votes
2answers
2k views

Solidity IDEs with background compilation for OSX

Are there yet any Solidity IDEs or editors that Run OSX Allow editing a folder of local Solidity source code files with includes or library support Highlight compiler error as you type them Please ...
11
votes
1answer
6k views

Is an Account in MetaMask the same as an Ethereum Account (EOA)?

First, my setup: I use the Azure Ethereum Consortium Template, which creates one transaction node and two mining nodes in my configuration. I use MetaMask Chrome plugin to accept transactions, which I ...
4
votes
1answer
513 views

How to provide gas value when we can't calculate it, when using arrays?

Recently, I am trying arrays(search) in browser-solidity and I found that the number of items in it causes changes in the gas consumption. For making a call we need to specify the gas amount but it ...
2
votes
2answers
142 views

Updating browser-solidity from git

I like to have a local offline version of browser-solidity on localhost. From now an then I want to update it to a newer version. Then disaster strikes $ git status On branch gh-pages Your branch and ...
1
vote
0answers
228 views

How to create an account from a Spring MVC project

I am working on Ethereum blockchian. I have create a login page using Spring MVC 4 and it is connected to MySQL DB. Now I want to assign coinbase to the successful registration of the user. My Idea ::...
1
vote
1answer
268 views

How does browser solidity differentiate calls from transactions with the abi?

It's all in the question. I've noticed that there is a color difference for Transact/Transact(Payable)/Call I would like to know if there is a javascript script to do that ? or i'd need calculate ...
3
votes
1answer
389 views

How to use browser solidity as replacement for the mix-ide?

As mix will not be developed further and browser-solidity should be a replacement for it, I have tried to use browser-solidity as chrome extension. Now I have some questions about it. How do I point ...
4
votes
0answers
277 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
1answer
728 views

Bad jump destination in escrow Smart Contract

This is an escrow smart contract deployed on testnet Ropsten: https://testnet.etherscan.io/address/0xd8be8771520addd926a3b454b4ea89a31d753359#code When calling function start(address seller, address ...
3
votes
1answer
429 views

Why contract's function that is deploy inside Solidity browser does not deployed inside geth?

I have my private Ethereum Network. Inside Solidity Browser: From Web3 Provider I have connected to my local ethereum node. I have pressed create button and successfully deployed my contract. Now I ...
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 ...
10
votes
2answers
2k views

Solidity Browser - Issue with every example => Error: Type “address” not supported for state variable

I am very new to blockchain and Ethereum. I want to get started with a BaaS cloud service and develop / execute some smart contracts. I successfully set up the Azure Ethereum template (https://github....