The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [remix]

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

408 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
27 views

Create lots of hashes with ID

I have this code to create hash. function getUniqueHash(address _hashunique) public view returns (address) { bytes20 b = bytes20(keccak256(msg.sender, block.timestamp)); uint ...
0
votes
0answers
32 views

address.call(abi.encodeWithSignature(“func(<param>)”, _params) doesnot work

contract C1 { uint public num; address public sender; function callSetNum(address c2, uint256 _num) public { (bool res,) = c2.call(abi.encodeWithSignature("setNum(uint256)",_num)); ...
0
votes
0answers
20 views

Block-chain data retrieval

I'm using a testrpc to test my sensor contract, where many account get to submit data to the block-chain whether using an html client side application or using the smart contract is self. How can I ...
0
votes
0answers
24 views

How does remix decode a contract response without the ABI?

Remix seems to be able to decode the output of a contract to a block of JSON without having the ABI (say I just specify the contract address). How is this achieved - I'm interested in doing something ...
0
votes
1answer
22 views

error in ico token and ico contract

function () public payable { require(currentStage == Stages.icoStart); require(msg.value > 0); require(remainingTokens > 0); Blockquote fallback typos error ...
0
votes
0answers
19 views

Can't call contract function in Remix in Web3 provider mode, but it works in Javascript VM

A simple contract for addition, an error is reported when calling the function add in Web3 provider mode: "Gas estimation errored with the following message (see below). The transaction execution ...
0
votes
1answer
47 views

what does external means ? how can i call the test2() inside my class

pragma solidity ^0.5.7; contract Test { function test() public view returns (uint){ return 10*10; } function test2() external view returns (uint){ ...
0
votes
1answer
50 views

Deploy contract to Parity dev chain using Remix

I'm trying to deploy a contract via remix to my local development chain. However, the transaction never gets mined and is pending forever. When I use a node script it works (at least I receive the ...
0
votes
1answer
21 views

Gas estimation failed when using web3 provider testrpc

Gas estimation failed error while invoking a simple function pragma solidity ^0.5.9; contract sample{ uint number; function setNumber(uint _number) public{ number = _number; } ...
0
votes
2answers
48 views

how to write backend for contract if you use infura ropsten metamask and remix

i'm using metamask with ropsten. deployed my contract on ropsten using remix. for the backend i used infura to create instance of web3. ew Web3(new Web3.providers.HttpProvider('https://ropsten.infura....
0
votes
0answers
43 views

vm exception while processing transaction invalid opcode

I have been running this code in remix but getting error. pragma solidity ^0.5.8; // import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; import "github.com/oraclize/ethereum-api/oraclizeAPI....
0
votes
0answers
22 views

DeclarationError: Undeclared Identifier. Did you mean “_data”? data = _data ^__^. All i want is to create a cryptocurrency

pragma solidity ^0.5.1; contract owner { address public owner; function owned() public { owner = msg.sender; } function set( string memory _data) public { data = ...
0
votes
1answer
21 views

Sending the bool to ```function() payable``` in another contract

I am trying to create a pair of contracts, let's say C1 and C2. I want to add an if...else in payable function function() public payable{} of C2, which works on the bool value returned by contract C1, ...
0
votes
1answer
37 views

How to view or transfer initial ethereum smart contract balance?

I created a new smart contract token with initial supply and deployed it via MetaMask. Then I added this token into MetaMask but token balance is Zero. Now, My question is when we create a new ...
0
votes
1answer
54 views

error message ParserError: Expected ',' but got 'memory'

I have this error but I do not know what is wrong? browser/arry.sol:6:58: ParserError: Expected ',' but got 'memory' function addScore(unit24 s) public returens(unit24 []memory){ ...
0
votes
2answers
34 views

Automating user data storage on a blockchain

I have a smart contract that contains a function to store data onto the blockchain. The function stores two integer variables to the blockchain. Now, I can manually store the values from the remix-ide ...
0
votes
2answers
62 views

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

I'm new here and code with openzeppelin framework 2.2.0. There is no error occurred when compiling with solidity 0.5.8. But when I'm going to deploy the contract, I have no bytecode and cannot ...
0
votes
0answers
186 views

How to decode SHA256 hash value and retrieve data in Solidity

I am working on a project in solidity where i am encode a string to SHA256 hash value, and now i want to decode SHA256 hash value and retrieve the actual data. please help hoe to do it. Below is the ...
0
votes
0answers
111 views

Store data on ethereum blockchain from a text file

I have a simple smart contract running over a local Ethereum node. It has two functions: one for sending data and another for retrieving it back. I have a text file and want to send data from it to ...
0
votes
1answer
16 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
97 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
54 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
74 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
16 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
42 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
62 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
47 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
0answers
36 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
0answers
37 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
130 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 ...
0
votes
0answers
31 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
439 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
39 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) ...
0
votes
0answers
65 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
0answers
98 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 ...
0
votes
0answers
73 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
16 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 ...
0
votes
1answer
25 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(...
0
votes
1answer
46 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 ...
0
votes
0answers
76 views

How should I pass a nested struct as a function argument in Remix IDE?

Example contract: pragma solidity ^0.4.24; pragma experimental ABIEncoderV2; contract someContract { struct structOne { uint a; } struct structTwo { uint b; ...
0
votes
0answers
55 views

How dapp owners pay for their clients transcaction fees in the Ethereum Blockchain?

I am currently dealing with a problem in Ethereum Blockchain. I wrote a smart contract in Solidity Language, about a site that someone can make his Registration and after the transaction is completed ...
0
votes
0answers
49 views

transferFrom function works but approve does not

I'm building an escrow contract and using web3js to interact with it. Currently, I am trying to approve and send an amount of custom ERC20 token from a wallet to the escrow contract. The problem is, ...
0
votes
2answers
151 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
0answers
19 views

ethereum smart cotract ioT implementation

For the preparation of a project in my thesis, I need to implement ethereum blockchain to control the access of the IoT using smart contract. Can you recommend me a tutorial to prepare this without ...
0
votes
1answer
42 views

remix - gas limit exceeded, but contract is running on blockchain

i studying remix and ethereum, and create my local blockchain. and create contract with remix.the contract just print simple word. pragma solidity ^0.4.8; contract HelloWorld{ string public ...
0
votes
1answer
79 views

problem calling balanceOf from another contract

I try to learn solidity and i have a problem. I've created a base token and i want to call the balanceof method from this token in another contract. In Solidity Remix i get : call to BaseTokenBet....
0
votes
0answers
97 views

How does a message signed in Remix IDE?

What is signing method that is used in remix IDE and how is the hash value calculated from the message that is being signed?
0
votes
0answers
47 views

could n't find ABI constructor in my input data

I have developed the solidity code and need to verify the smart contract but I could not find Constructor Arguments ABI-encoded check the screenshots, i have developed in testnet
0
votes
0answers
30 views

How to create multi forwarder address (contract)?

How to create multi forwarder address (contract)? my code https://pastebin.com/raw/ADwPtz8q error InternalCompilerError: Compiled contract not found. pragma solidity 0.4.25; contract Factory { ...
0
votes
1answer
21 views

Error when checking the value in a mapping

I am trying to keep track of the number of bidders in my contract. function bid() public payable an_ongoing_auction returns (bool){ uint oldval = bids[msg.sender]; require(msg.value+oldval &...