Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
8
votes
2answers
2k 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
561 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
6k 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
1k 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
161 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
1k 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
616 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: ...
6
votes
1answer
4k 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
177 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
297 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 ...
6
votes
3answers
4k 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
512 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
467 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
326 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
464 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
489 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
180 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
428 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
312 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; ...
20
votes
5answers
22k 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 ...
7
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
968 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
457 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
3k 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 ...
12
votes
1answer
7k 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
630 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
152 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
246 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
304 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
517 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
326 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
747 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
449 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
122 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....
9
votes
1answer
4k views

How to link libraries in browser-solidity? [duplicate]

How to link library in browser-solidity? While creating a contract using library, solidity compiler requires to link the contract with the library. But there is no options in the browser to provide it....
0
votes
1answer
851 views

Function with returns compiles without return statement

I was surprised to find out that the returns clause in function declaration seems not to be enforced. That is, the following code compiles in browser-solidity (foo returns 0 when invoked): pragma ...
0
votes
1answer
222 views

Solidity's Keccak256 function requires mining? [closed]

I have used keccak256 and passed 3 parameters. Does keccak256 require mining?
3
votes
2answers
268 views

Recursive struct triggers Uncaught JavaScript exception in browser-solidity

I am trying to implement a recursive data structure. The following code does not compile in browser-solidity: pragma solidity ^0.4.4; contract TestContract { struct Item { uint someUint; ...
2
votes
2answers
525 views

Where can I see the output of Solidity's sha3 function?

I have written the below code and it runs perfectly. After mining and passing the values along with certain gas value, i get transaction hash as output on the geth console. Now i want to know the ...
2
votes
1answer
5k views

How to retrieve current date and time in solidity? [duplicate]

I need to store date in one variable and time in variable. Are there any methods to get date and time in solidity?
31
votes
3answers
29k views

How does Mapping in solidity work?

I went through the Crowdfunding example in solidity where i encountered the following: contract Crowdfunding { struct CampaignData { address recipient; uint contributed; uint goal; ...
5
votes
1answer
649 views

After loading the solidity script, i get null [object Object]. What should i do?

I wrote a contract greeter and mortal, they are as follows: contract mortal { address owner; function mortal() { owner = msg.sender; } function kill() { if (msg.sender == owner) ...
5
votes
3answers
4k views

How to execute Smart contracts on a private Blockchain network

I have created a private Blockchain network on my Windows system with one node. I have created accounts and was able to transfer ethers across them. Now I want to deploy smart contracts on this ...
2
votes
2answers
1k views

Recursive call ends with `VM Exception: invalid opcode`

I am running f: contract Test { function f() { f(); } } which produces VM Exception: invalid opcode in browser-solidity. Is that a bug or expected behavior?
1
vote
2answers
2k views

How do I connect to Remix in Mist or MetaMask?

If I use either Mist or MetaMask, I get the error message: Unable to connect to http://localhost:8545. Invalid JSON RPC response: "" How can I connect to the Remix localhost?
2
votes
1answer
91 views

What do I deploy?

This is related to Are Monolithic Smart Contracts Better than Those That Are Decoupled?, where I basically have the following setup: contract A { int private x; function save(int _x)...
10
votes
3answers
8k views

Solidity error when encoding arguments to query public mapping

While developing a Smart Contract with Solidity on Remix , after creating the contract I'm trying to query a public mapping: mapping (address => uint256) public balanceOf; but when I call ...