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

Transfer a fixed value of ether

pragma solidity ^0.4.19; contract Test { address one; function Test(address _one) public { one = _one; } function send1() public payable { one.transfer(10); } function send2() public ...
1
vote
1answer
250 views

Unable to test Solidity Remix

I am writing my own smart contract in Solidity and trying to test in Remix. The main Remix site appears to be down (https://remix.ethereum.org/). I found another site: https://ethereum.github.io/...
1
vote
1answer
146 views

Solidity Oraclize error

I am learning to use oracles in solidity and I have taken this code to see how it works. But I get the following error: "VM error: revert. revert The transaction has been reverted to the initial state....
4
votes
1answer
312 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 ...
0
votes
1answer
117 views

Is remix ABI generator still working?

I have recently used the ABI generator fo remix, but when I copy the ABI and paste it in my Geth I get an error: var abi=x; // where x is abi copied from remix ethereum website. However, if I copy ...
0
votes
1answer
180 views

Sorting elements from mapping according to certain value?

I have created a function that receive some values from users an store them in a mapping. How to arrange the stored values in mapping according to a certain value ( Priority as in the shown example ...
1
vote
1answer
52 views

One contract accessing data from another fails

I am trying to get two contracts to interact: pragma solidity ^0.5.10; contract C2 { address public addr; constructor(address per) public { addr = per; } function ...
1
vote
1answer
12 views

What is the max number of Blocks which can be created in Quorum

I have nodes running from past few days, with almost 4100+ transactions successfully completed. When i try to interact with the contracts again to add/modify details it shows error Error when ...
-1
votes
0answers
19 views

Store patient health record in solidity [closed]

I am new to solidity, I need to store patient record and details in solidity process.Patients may have multiple data like ambulance booking,doctor appointment of this user, my query is how to achieve ...
1
vote
3answers
839 views

Remix always throws the error: exceeds block gas limit

Dear Ethereum developers. I started to learn Solidity this week and am trying to deploy a contract via Remix, but this doesn't really work. Running environment is set as Web3 Provider. (Because the ...
0
votes
1answer
109 views

Remix IDE: How can I open a file from GitHub repository ID

I want to compile and use a smart contract located in a GitHub repository on a specific branch or compile ID. I did it the same thing in the past but I've always used a URL which prompted the Git ID ...
1
vote
1answer
105 views

Balance Of and the amount raised does not increase sender an account

Can someone give me a hint or correct what is wrong with the code. Maybe it is obvious where the error is but I do not see it and I'm stuck. What to do next ?. The code is here: https://ropsten....
0
votes
1answer
36 views

How to use erc20 transfer in another contract in remix ethereum using metamask?

I read a lot of documentation in here and another web pages, I have a question and I so tried to solved but nothing works for me. I am using this example. It works fine with truffle, but I don't ...
2
votes
1answer
138 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 ...
0
votes
0answers
12 views

MultiSigWallet issue

I need to implement a token that´s minted by a process verified by 4 peers, for that I´m going to use MultiSigWallet code (GitHub) and I´ve do some changes to adapt it but the modifier "notExecuted" ...
0
votes
1answer
25 views

Why Remix IDE asks for CallData and what value we have to give? [duplicate]

In my several programs which I ran through remix IDE, I got a CallData text box. I don't know what value I have to give to this Calldata text box. I tried the following: from: address : "...
0
votes
2answers
423 views

Remix Gas limit exceeded regardless of how high I set it

I am deploying a crowdsale contract in Remix but no matter how high I set the gas limit (set it to 40000000 once) or even how much I change the value field I can't get this contract to not exceed the ...
0
votes
1answer
494 views

Where do I find the “constructor arguments” for a contract deployed with Remix?

When try to verify token, I dont know what to put in for this line: Constructor Arguments ABI-encoded (For contracts that accept constructor parameters) I made token after looking at a YouTube ...
0
votes
2answers
99 views

Can i make all the functions in my smart contract as constant?

What if i make a smart contract that does modify the state, but the all its functions are constant.(it will still compile) It means that i can use my smart contract for free without paying for the gas....
0
votes
1answer
261 views

How to call get method of one contract from another?

I want to call a method of a contract from another contract. I've already read this post: calling one contract to another contract method, but it doesn't work for me. When I create the caller and try ...
0
votes
1answer
25 views

Transfer money between accounts in solidity

I am writing a contract where I want to transfer money (present in the contract owners account and not the contract) to an account address passed to a function in the contract. for some reason this ...
0
votes
1answer
90 views

Not able to connect metamask account with remix

Error: - Cannot get account list: Error: The method personal_listAccounts does not exist/is not available. Pop containing above message appears again and again. Privacy Mode in metamask is disabled....
0
votes
1answer
18 views

Getting error in Deposit function in smart contract : The constructor should be payable if you send value

I am getting the error while deposit the amount in remix. Following is my code pragma solidity ^0.4.19; contract Savings { address owner; uint256 deadline; modifier onlyOwner() { require(...
0
votes
1answer
135 views

Generating ERC20 Token on main network

I have done up the scripts on Remix and managed to generate Tokens successfully on Ropsten Network. However, when using the exact contract script on actual main network, the status remain as "pending ...
0
votes
1answer
24 views

Remix IDE: What is the purpose of Calldata and Transact Tab

I am trying to execute the following code on Remix IDE. pragma solidity ^0.5.4; contract GuessTheNumberChallenge { constructor() public payable { require(msg.value == 1 ether); } ...
0
votes
1answer
20 views

Variables in storage not getting updated according to transaction

As part of my project, I am using a code from github and modified it according to my requirement. This is a Auction contract. I am using remix IDE for interaction. I tried deploying in the rinkeby ...
0
votes
1answer
18 views

Declaration Error in Nested Struct

I am writing the contract below to store json in a nested struct in remix: pragma solidity ^0.5.11; contract Analytics { address lastAddress; uint timeStamp; string label; uint count; ...
1
vote
1answer
146 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 ...
0
votes
1answer
20 views

VM error: revert. Try to send ether from contract to another contract

I just facing a little issue here in sending some ether from Sender contract to another contract Escrow by msg.sender value. Btw, I'm executing code on Remix, and specify the value from the sender ...
2
votes
1answer
114 views

Solidity IDE Parser Error on Token Name

Getting this in Solidity: browser/ballot.sol:121:16: Parser Error: Expected Primary Expression. Here is my code, says that it is the name line with the parser error function ERC20Token( ) { ...
1
vote
1answer
57 views

Upgrading contract for modern compiler version

I am upgrading the old contract from 0.4.24 for new solidity compiler version 0.5.16 however it doesn't work with modern solidity compilers, Could anyone make my contract compatible with solidity ...
1
vote
1answer
24 views

Payable constructor gives revert message

I am trying to execute the following contract on remixe IDE: pragma solidity ^0.5.4; contract GuessTheNumberChallenge { constructor() public payable { require(msg.value == 1 ether); } ...
1
vote
1answer
32 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 ...
0
votes
3answers
186 views

Remix Deploy Error encoding arguments

I'm building a simple fund raising smart contract and having problems deploying this through Remix. I'm wanting to set the "goal" and "minimum contribution" values (in wei) during the contract ...
1
vote
2answers
177 views

function approveAndCall error

I creat token contract using remix. The function approveAndCall code is following. function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { ...
0
votes
0answers
30 views

Sending ether to Contract from another Contract

pragma solidity ^0.5.0; contract Contract1 { address payable owner; uint public value; constructor() public payable { owner = msg.sender; value = msg.value; } function() ...
1
vote
1answer
131 views

Is there an explorer like Etherscan for Remix JS VM sandbox blockchain

I created a contract and did some transactions. I would like to explore the transactions in the sandbox blockchain in my brower (Chrome). But the tx hash is not found in the REMIX VM Debugger http://...
0
votes
1answer
50 views

I'm trying to call a function from deployed contract, i get the following error

Gas estimation failed Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Invalid JSON RPC response: Contract ...
1
vote
1answer
167 views

How to call solidity function in html 'inspect' console properly?

I can see my contract in my console. The solidity code and abi is in the the index.html. I can't figure out how to call this function and send 0.01 ether with it as well. I would think it is something ...
3
votes
1answer
136 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 ["",...
0
votes
2answers
286 views

How to write a first solidity contract in remix - ide online?

I have written a small contract which is just to set and get a name. I choose JavaScript VM, when I deployed it and set my name as "vijay" and when I selected getname. I didn't got output. It shows ...
0
votes
2answers
213 views

2FA / Authentication Through Smart Contract

How can I generate something similar to 2FA on-chain? Could the private key or public key be used somehow in secrecy to compute a value or something? I need a way to authenticate a smart contract user ...
0
votes
1answer
186 views

Expected primary expression.-Error in compiling Solidity code

pragma solidity ^0.4.17; interface IERC20Token { function balanceOf(address owner) public returns (uint256); function transfer(address to, uint256 amount) public returns (bool); } ...
0
votes
1answer
19 views

if statement evaluate incorrectly when calling contract from another contract on Remix

I have a simple piece of code but I can't not get it to work correctly. pragma solidity ^0.4.18; contract Interface { function transfer(address _to, uint256 _value) public returns(bool); ...
1
vote
1answer
22 views

ERC20 coin transaction not successful

I called the mint function on a default coin to send some of my new coin to my METAMASK account but it looks like nothing was received. I can't tell what specifically could have gone wrong, so here's ...
0
votes
1answer
170 views

Why I do not get returned value of function of my smart contract using testRPC and a Graphical User Interface?

I have a smart contract that is tested with remix and it works well. Its code is as follows : contract Weechain: pragma solidity ^0.4.15; // --------------------------------------------------------...
1
vote
1answer
105 views

browser-solidity debug alternative for more automate process (rather than manually type in the function input everytime)

As specified in the title I use truffle to test now, but often times it just returns the error msg "invalid opcode" instead of clearly stating what happened. Any other testing/debugging tips will ...
1
vote
1answer
25 views

Re-entrancy Vulnerability?

function transferFunds(uint _value) private { uint _fee = (3*_value)/(2*100); //Perform Ether transfer method merchant.transfer(_value - _fee); admin.transfer(_fee); ...
1
vote
1answer
19 views

Contract Call from another Contract

I am trying to refer to this Solidity Docs https://solidity.readthedocs.io/en/v0.6.2/control-structures.html and trying to execute the following code pragma solidity >=0.4.0 <0.7.0; contract ...
1
vote
2answers
284 views

Error: gas required exceeds allowance or always failing transaction at chrome-extension

I'm using Remix, Metamask, ROPSTEN and can not deploy any contract...always getting the same message...it used to work...not working any more...happens in different machines, happens with Chrome or ...

1 2 3 4 5 32