Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
52 views

How do I deal with an “invalid sender” error message when deploying a contract? [duplicate]

When deploying a smart contract, I get this message: "Error: invalid sender undefined." See details below. Why is this happening? What do I need to do differently? I wrote the smart contract below ...
2
votes
0answers
721 views

What can I do about an “Invalid sender” contract deployment error?

When deploying a smart contract, I get this message: "Error: invalid sender undefined." See details below. Why is this happening? What do I need to do differently? I wrote the smart contract below ...
1
vote
1answer
145 views

Constantly “Waiting to be mined” after certain call in contract

I have a crowdsale contract, that seems to be working fine. It receives funds, and returns a token in exchange. However, once its past the deadline, and I run the checkGoal() function, the contract ...
5
votes
1answer
3k views

How use payable function with browser solidity?

How use payable function using interface of browser solidity IDE Remix ? http://ethereum.github.io/browser-solidity/#version=soljson-v0.4.11+commit.68ef5810.js
2
votes
1answer
280 views

Can I transfer ether from a wallet to smart contract directly without invoking a payable function?

hey I was trying to pass some ether from my account to smart contract through metamask. Ive already given some ether from my contract to metamask account so it should be possible to do the same even ...
1
vote
0answers
84 views

When calling my Get function, Remix is giving me the current value and geth+parity is giving null

I have a contract that holds hashes of files and different versions of those files inside a struct. // // Structure which holds information about an entry and the versions that entry contains. // ...
15
votes
2answers
2k views

Etherscan: How can I verify a contract with multiple imports deployed with Truffle?

When I deploy a contract with Truffle that has an import statement, and try to verify it on etherscan, my understanding is that I need to paste in the contents of the imported file. I get an error on ...
3
votes
1answer
234 views

Exception of Unknown kind of function call

I am using remix IDE and I am getting this error: Internal exception in StandardCompiler::compileInternal: /src/libsolidity/ast/ASTJsonConverter.cpp(791): Throw in function string dev::solidity::...
1
vote
2answers
197 views

My Ethereum Solidity automatically connects to parity, how do I switch it to Metamask?

I want to run on a test network using metamask but Solidity IDE auto connects to my real parity wallet. How can I switch that?
1
vote
1answer
801 views

Calculating Percent Change in Soliidity

So I'm using Remix and have the following code: pragma solidity ^0.4.11; contract Negs { event Print(string _name, uint _value); function Test() { var startValue = 1000; var endValue = ...
3
votes
1answer
589 views

How can you tell which version of Solidity to use when deploying contracts?

I've noticed in various smart contract tutorials that different versions of Solidity are declared at the top. I would assume that you would just use the latest but I've noticed that certain contracts ...
1
vote
1answer
2k views

How to pass public variable in Remix online compiler

Lets say I have this contract pragma solidity ^0.4.11; contract TestArray { uint[] public original; uint[] public newOriginal; function TestArray(){ original.push(2); ...
2
votes
1answer
324 views

Gas limit errors when deploying Greeter example contract on Remix

First time newbie eth contract question. I'm using remix to compile the ethereum.com greeter example. I'm having problems with the gas when I deploy the contract. if I specify : gas: eth....
2
votes
1answer
522 views

Cannot deploy contract in remix with my Metamask

I'm following a token contract tutorial on Youtube and everytime I try to deploy the contract on the Kovan testnet (in the remix solidity editor), it sends it off but then fails later. I have ...
1
vote
1answer
509 views

return msg.sender.balance not acting as expected

I'm using MetaMask to connect to Rinkeby and I'm deploying the contracts via Remix. When I call the function returnsenderbalance it returns ...
8
votes
1answer
1k views

Any reason not to use Browser Solidity's “Enable Optimization”?

I found that when I had "Enable optimization" activated while writing a very simple contract with browser Solidity, it reduced a total of two SSTORE opcodes to one. That resulted in 5000 gas saved. ...
2
votes
1answer
491 views

Return uint value from storage contract

When I store data in the oracle and then try and refer to it on the testrpc through the pay function it just doesn't work. Any ideas? pragma solidity ^0.4.6; contract Oracle{ struct ...
1
vote
1answer
183 views

error while deploying contract to ropsten

i keep getting this error when i try deploying my contract to ropsten and the mainnet "callback contain no result Error: SyntaxError: Unexpected token < in JSON at position 0" can someone please ...
2
votes
1answer
638 views

Remix (browser solidity) won't deploy my contract (through metamask)

I'm trying to deploy a new contract for testing on the ropsten network. I'm using remix and metamask, but for some reason I can't select injected Web3 (what used to be the standard setting) and thus ...
3
votes
2answers
2k views

invalid opcode for this.balance when contract balance > 0

I get an exception when I call getBalance in Remix and the contract balance is greater than 0 (ie. I sent some ether using the fallback function): Exception during execution. (invalid opcode). ...
4
votes
1answer
1k views

Remix warning: Gas requirement of function <function_name>() unknown or not constant

I have this warning in Remix Analysis tab for a basic send funds function: function sendFunds(address receiver, uint amount) onlyOwner { if (this.balance < amount) throw; receiver.send(...
1
vote
1answer
3k views

JSON error in remix

I'm very new in the smart contract field and just starting to explore this. I'm using the remix.ethereum.org Solidity IDE and copied the following contract: pragma solidity ^0.4.9; contract ...
2
votes
1answer
3k views

Contract not Compiling: Undeclared identifier

I am just playing around on testnet w/ code snippets ... What am I doing wrong?
3
votes
1answer
264 views

Verifying my initial constructor on Remix

I discovered Solidity two days ago but I couldn't imagine how difficult it would be to even get started. Most tutorials and documentation are outdated and google results are very sparse. I followed a ...
6
votes
1answer
147 views

Contract Greeter - Windows - Browser solidity

I am currently trying my first contract on Ethereum but I never imagined that it would be so difficult... I followed the guide here : https://medium.com/ziggify/blockchain-stack-1-installing-...
1
vote
1answer
675 views

How to connect from Remix to Kovan testnet?

In Remix, there is a Contracts tab, where I can choose the "Execution environment". When I choose "Web3 Provider", I am asked to provide the "Web3 provider endpoint". What should I write there in ...
6
votes
1answer
291 views

difference between button [publish] and [create] ? (Remix tool)

sorry,just ask a simple question... what is difference between button [publish] and [create] ? (on Remix Tool UI) thanks a lot~ hippo
5
votes
3answers
2k views

A problem with filters and events (web3j/TestRPC). SOS! ;)

Help me, please, with this little simple task! I cannot solve this problem for several days. SOS! ;) I'm trying to write a program for filtering events via web3j. I copied to start (for the test) from ...
1
vote
1answer
2k views

(Solidity Browser) VM Exception: invalid opcode

I access the solidity browser from the following URL. https://ethereum.github.io/browser-solidity/ There are one basic sample code and one "Ballot" sample code when the page is opened by default. I ...
4
votes
2answers
308 views

Why is the jump address calculation so complex in compiled Solidity code?

I have the following simple Solidity contract: pragma solidity ^0.4.0; contract Test { function Test() { intfunc(5); } uint8 store; function intfunc (uint8 a) internal { ...
3
votes
1answer
4k views

How to call a function from an already deployed contract?

I tried to use the function "Call", as described here: Calling function from deployed contract But seems it is not working at all. How can I call a function from an existing deployed smart contract? ...
1
vote
0answers
74 views

Check coinbase balance in Ethereum online compiler (Remix)?

Is there a way to check the balance of the accounts when using the online compiler in Javascript VM mode?
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
529 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
375 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.
22
votes
2answers
13k 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
682 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
418 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
932 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
243 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
535 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
5k 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
844 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
110 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 ...