Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [remix]

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

0
votes
1answer
15 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
0answers
46 views

How require() and assert() work in solidity?

I'm trying to validate a condition using require(). If the condition is false for the first time, the contract is stopped and reverted to its initial state. On the other hand, if the condition is true ...
0
votes
0answers
33 views

Cannot read property length of undefined in Remix / tried to increase gas not working

My contract was working just fine, but I don't know what happened, now when I try to interact with a new instance of my contract from Remix I get this error 'cannot read property "length" of undefined'...
0
votes
1answer
50 views

How to send struct data as function input on Remix or web3 call?

I've created a function which gets a struct which contains int+struct. Now when I want to test it, what data should I send for example on Remix: here's the code, got from another SO question on - ...
1
vote
1answer
38 views

How to check balance of a smart contract in Remix IDE Javascript VM?

I'm working on a smart contract that can hold some ETH. Currently, I'm unable to see what is its balance in the Remix IDE. I'm trying to use the console: I have access to web3 but how to check the ...
1
vote
0answers
52 views

Etherscan verification bytecodes don't match

Hi I'm trying to verify a token deployed at 0x87ab739464881af0011052d4ca0b0d657e8c3b48 in tx 0xbaa8f3fe86a35d2e0b7ed16b24782743e7dfb1eb21cfbb12253d0a50ef2ff365. (Mainnet) I compiled and deployed it ...
0
votes
1answer
53 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
37 views

Is there an issue using event overloading and event logs that contain arrays?

My event fires, but the last parameter is never logged. It appears as if it doesn't even exist. Here is my solidity code: pragma solidity >=0.5.6; contract EventTest { event marketCreated(...
0
votes
1answer
22 views

Where to store data when creating a blockchain based solution?

I have a question regarding the storage of data when creating a Dapp. For example i create a real estate website on ethereum blockchain where people will buy or sell properties on the basis of tokens ...
0
votes
1answer
11 views

Gas estimation failed when calling the play function

I am trying to deploy this contract on the test network and am able to do so successfully but when i try to call the play function i get gas estimation error and can do nothing further. I am using ...
0
votes
1answer
24 views

Calling a function from another contract is not working. But calling the function from deployed contract is working

I have a problem with calling a function from another contract. I don't know why it is not working. Contract DateTime(https://github.com/pipermerriam/ethereum-datetime) is a util for converting ...
0
votes
2answers
52 views

Solidity event isn't fired

I'm trying to listen for an event I've created on remix IDE , from NodeJS. I call a smart contract method from where the event is triggered and I'm waiting for it in my console...but I don't receive ...
0
votes
1answer
20 views

Getter and Setter Functions in Solidity not showing any output

I have written a smart contract with the Getter and Setter functions but it is not showing any output in IDE-Remix. My code is ''' pragma solidity ^0.4.21; contract GetandSet{ string name; ...
0
votes
1answer
40 views

How do I compile using the nightly build of the Solidity compiler

Using the Remix IDE, I'd like to try out some of the new features of Solidity by using the nightly compiler build, but it's giving me a wrong compiler error. When I try pragma solidity 0.6.0; //......
0
votes
1answer
59 views

Unable to transfer 1 ether

I want to write a function let user deposit 1 eth to a specific address for registering purpose. pragma solidity ^0.5.0; contract Election { mapping(uint => UserRequest) public userRequest; ...
0
votes
0answers
30 views

Gas Limit exeeded (-3200 error) - verifier and Zokrates with Rinkeby

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? gas required exceeds allowance (6995524) or always failing ...
0
votes
1answer
33 views

What's the root cause “contract error - Gas estimation failed Gas estimation errored with the following message (see below)”?

Rest of the error: The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. I got that message on several cases, usually on different mistakes. What'...
2
votes
1answer
50 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: ...
0
votes
0answers
11 views

Cannot connecting Remix to LocalHost!

I'm using windows 10 and i cannot connect VScode to Remix, i have both 'npm' and 'node.js' installed on my system. But i cannot connect to LocalHost. It works for me on ubuntu, but again only on Brave ...
0
votes
1answer
16 views

How to remove byte code of deployed smart contract which was deployed using Ropsten Test Network?

I 've deployed my smart contract on Etherscan using Ropsten Test network. I can see there is bytecode for my deployed contract on ropsten etherscan. I want to hide or don't want to show the bytecode ...
0
votes
1answer
59 views

VM error: revert. revert The transaction has been reverted to the initial state

Here my contract pragma solidity >=0.4.21 <0.6.0; import "./CertificateOwnable.sol"; import "./CertificateStorage.sol"; contract Certificate is CertificateOwnable { CertificateStorage ...
1
vote
1answer
35 views

ParserError: Expected token Semicolon

I got this particular Parser error and can you help me how to fix this issue:while using this code pragma solidity ^0.4.17; import "../node_modules/zeppelin-solidity/contracts/token/ERC20/...
0
votes
0answers
19 views

how is GET https://solc-bin.ethereum.org/bin/list.json net::ERR_CERT_DATE_INVALID corrected?

I am trying to load Remix via the website in Chrome. Reported here - https://github.com/ethereum/remix/issues/1167 I get mock compiler: source not found and in the console - GET https://...
0
votes
1answer
56 views

Is it possible to deploy a contract from python web3 if I have the ABI and bytecode from Remix?

Question says it all. I have a contract that I've written and compiled via Remix. I've dumped the ABI and Bytecode into local files, and I'm reading them into my python application. I'm following the ...
0
votes
1answer
73 views

Gas estimation failed: gas required exceeds allowance or always failing transaction

I have two contracts one for defining token and other for crowdsale. I am using remix ide. pragma solidity >=0.4.22 <0.6.0; contract owned { address public owner; constructor () public { ...
0
votes
0answers
25 views

Manage accounts in Remix Web3 Provider env connected to a TestRPC client node

When I run the TestRPC client (ganache-cli), it provides me with 10 different accounts and private keys along with a local server at localhost:8545 Available Accounts (0) ...
1
vote
0answers
65 views

Smart contract will not deploy to my private blockchain when using Remix IDE

So I'm a complete newbie and trying to deploy my first smart contract to a local Ethereum blockchain. I'm doing this on a Windows machine. I have created a private blockchain using geth, made an ...
1
vote
2answers
25 views

Constructor should be payable error on adding money

pragma solidity ^0.4.17; contract supplyChain { address public state; uint public unitCost = 10; uint public totalAmount = 0; function supplyChain() payable public{ state = ...
1
vote
1answer
116 views

Zepplin Proxy Code Pattern

I am trying to understand the Zepplin proxy code pattern so i deployed two contracts using remix Token.sol (logic contract - basic ERC20 contract) AdminUpgradeabilityProxy.sol (From zepplin) https://...
0
votes
1answer
124 views

Retrieving block hash of current block vs previous block

What is the formula for retrieving the blockhash of 1) previous block and of 2) current block?
1
vote
1answer
19 views

What is the difference between Remix and Remix IDE

What is the difference between Remix and Remix IDE?
0
votes
1answer
27 views

Soldity RNG threat comparison between Tron and Ethereum

Would a function such as the following: function random(bytes32 seed) internal returns (uint) { nonce++; return uint(keccak256(abi.encodePacked(now, msg.sender.balance, nonce, block.coinbase, ...
1
vote
2answers
327 views

Why remix account is empty when select “Injected Web3”? [duplicate]

Why remix account is empty when select "Injected Web3"?
0
votes
1answer
27 views

Different number of arguments in return statement than in returns declaration

pragma solidity ^0.4.18; contract graduate{ uint studentId; string name; string major; uint totalGrade; function setGraduate(uint x, string y, string z, uint v) public{ ...
0
votes
3answers
43 views

REMIX:This contract does not implement all functions and thus cannot be created

What should I do? pragma solidity ^0.4.21; contract ScoreInterface { function hit() public; function score() public view returns (uint); } This contract does not implement all ...
0
votes
0answers
45 views

Solidity, Web3 - Invalid number of arguments to Solidity function when I have correct number

I created smart contract and I deployed it on Ropsten network using Truffle. I tested it from Remix and it works. I have there 2 view with a same name checkInputData but different number of parameters....
0
votes
3answers
56 views

Truffle and Remix compiles differently

I have a smart contract that outputs a different bytecode when compiled with truffle, and with remix, even though both seem to use the same compiler version: 0.5.7+commit.6da8b019 Is that a known ...
0
votes
2answers
31 views

Solidity how to check if user is already used another contract?

I am trying to figure out how to set up a simple communication between contracts. For example, we have a contract Passport, in which the user writes his data. After that, through the Election ...
2
votes
1answer
52 views

How do I send ether from user address to smart contract address using a function/method (without using msg.value)?

I am relatively new to programming in solidity and trying to build my own auction platform for demonstrational purposes. What I am trying to do is, to send ETH to a contract and whenever the auction ...
1
vote
0answers
25 views

How to use the Ethereum Natural Specification Format?

I would like to make use of the Ethereum Natural Specification Format (https://github.com/ethereumproject/wiki/wiki/Ethereum-Natural-Specification-Format) but I do not understand how to implement it. ...
0
votes
0answers
85 views

msg.sender.transfer(rewardUnit) causes a revert exception

I'm trying to send a reward to the worker who submits a task using commitTask function and line code msg.sender.transfer(rewardUnit). However, line keeps failing throwing a revert exception. Also I ...
2
votes
2answers
568 views

Issue with New version of Metamask: Remix cannot detect the Metamask address

I have just installed Metamask version: 6.3.1 Now in Remix, the address of my account in metamask is not detected. The account box in remix remains always blank now (see picture below). Note that I ...
0
votes
0answers
43 views

Metamask is not injecting account into remix IDE [duplicate]

I am working on remix and I have logged into metamask, but seems metamask is not injecting account into remix IDE. screenshot is attached. I have tried re-installing the metamask. I have tried re-...
0
votes
1answer
30 views

creation of SmartBillions errored: transaction execution failed [closed]

I am trying to deploy smartBillions contract on remix for learning purposes. And following error is persisted creation of SmartBillions errored: transaction execution failed Following is the code ...
0
votes
0answers
67 views

Getting an VM Exception while processing transaction: revert

Post trying to initialize a task using the initTask function, I keep getting a revert exception. I've tried to remove the condition (msg.value >= _rewardUnit*_rewardNum) from the function and ...
0
votes
0answers
13 views

What is the cause of bad jump dest

I tried to figure out how bad jump destination error occurs. I found this topic How to debug Bad jump destination error and I tried to follow what that topic do. However, after I deployed and ...
1
vote
0answers
24 views

Smart Contract ABI in Remix (Ethereum)

When I deploy smart contract on the Rinkeby network using Remix the ABI of smart contract does not contain its address, so how do I connect it with my frontend application.
0
votes
1answer
17 views

Compile source code error expected pragma

I am getting an error when coding a token with the Ethereum wallet. Namely, Expected pragma, import directive or contract/interface/library definition. function burn (uint256 _value)public returns(...
1
vote
1answer
342 views

Metamask address not detected on remix-ide

My Metamask address wont show up on remix-ide either run on localhost and remix.ethereum.org I also have tried it on brave and chrome, none of them show the address. please help me :(
0
votes
1answer
38 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 ...