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

3 level ether transfer

contract foster{ vulnerable v = new vulnerable(); attacker a = new attacker(address(v)); constructor() public payable{ // a.deposit(address(v)); // transferring 3 ethers to ...
0
votes
1answer
15 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
11 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
10 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){ ...
3
votes
0answers
16 views

String Input of three numbers (comma seperated) doesn't work in Remix

So when I try to put in three numbers as a String in a usual setter-method, it doesn't work. Does anybody know why? function test(string memory x) public view returns(string memory){ return x; }...
0
votes
2answers
20 views

How to handle JSON in a smart contract?

I want to store JSON input in my Smart Contract. Like { "name":"John" } First I thought i could just handle it like a String, but it is not working because of the double quotes. Remix says, that ...
0
votes
1answer
11 views

Parse Error, Expected Pragma on remix

I am new to remix and can't figure out what is wrong with this basic function. pragma solidity ^0.5.1; contract Pie { uint256 public p; } function pie () public returns (uint256) { ...
0
votes
1answer
20 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 [closed]

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
22 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
15 views

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

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
2answers
37 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
44 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
37 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
31 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
31 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
46 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
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
19 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
29 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
51 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
26 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
29 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
46 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
36 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
29 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
42 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
42 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
20 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
53 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
71 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
298 views

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

Why remix account is empty when select "Injected Web3"?
0
votes
1answer
17 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{ ...