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

How to pass a document as function argument(upload document)

I am working on a project in solidity where I want to generate a SHA256 hash value for the document. So which means when I choose a file using a function the function should return the hash value. ...
0
votes
1answer
11 views

VM error transaction has been revert to initial state [on hold]

pragma solidity ^0.5.8; contract PharmaChain { address public superAdmin; //address of the super admin uint quotlist; enum Status { NotExist, Pending, Aproved, Rejected, ...
1
vote
1answer
20 views

How to increase the number of test accounts?

I have encountered a problem where I need a large number of test accounts. How can I increase the number of test accounts from 10. Remix and ganache only give 10 accounts. I require more than that.
0
votes
1answer
20 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
0answers
14 views

transfering ERC20 token from one account to another and some percentage of it will reflect into some more acoount [on hold]

I am sending token(100) from my account to another then some percentage of it will reflect to other account also ex- 10-10 erc20 token will reflect to other two account also.
0
votes
3answers
36 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
8 views

ecrecover function in solidity [duplicate]

how to extract sub-bytes r,s from bytes(signature). Is there any function to split the bytes into sub-bytes of desirable length starting from some fixed index?
0
votes
0answers
39 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
19 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
14 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
34 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
30 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
29 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
26 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
42 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
45 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
35 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
21 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
10 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
20 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
47 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
16 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
24 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
49 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
25 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
26 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
45 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
8 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
15 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
34 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
28 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
15 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
37 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
38 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
18 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
51 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
22 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
111 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
59 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
15 views

What is the difference between Remix and Remix IDE

What is the difference between Remix and Remix IDE?
0
votes
1answer
26 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
288 views

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

Why remix account is empty when select "Injected Web3"?
0
votes
1answer
16 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
34 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
35 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
42 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
30 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
37 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
24 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
80 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 ...