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
2answers
327 views

TypeError: Data location must be “memory” for parameter in function, but none was given

Contract fail to compile in IDE Remix.due to the following error: TypeError: Data location must be "storage" or "memory" for parameter in function, but none was given. version:0.5.6+commit....
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: ...
2
votes
1answer
90 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
1answer
6 views

Gas requirement of function “testCompile.showString() high: infinite”

I have written simple function in remix. pragma solidity ^0.5.0; contract testCompile{ string myString = "Hello World"; function showString() public view returns (string memory){...
0
votes
1answer
116 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....
0
votes
2answers
29 views

Save all customers who buy an item online

I am writing a contract where I am trying to save the account addresses of customers who buy an item online. I tried it with arrays but it did not work. Can anyone please suggest a way of doing this?
0
votes
1answer
263 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
0answers
9 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
18 views

Function to transfer tokens to a second address with fixed percentage

I'm trying to code a transfer function that automatically sends tokens to a second address taking a specific percentage from the original sent value. What I wrote: address public _ExtAddress; ...
0
votes
1answer
14 views

Problem understanding the owner assignment

Suppose I have 3 contracts, namely Owner, B and C: contract Owned { address public owner; constructor() public { owner = msg.sender; } modifier onlyOwner { require(...
1
vote
1answer
112 views

Simple Open Auction example - how to run it?

I'm trying to run Simple Open Auction, compiled successfully in Remix. I receive "Exception while processing transaction: revert" when I try to enter recipient account addresses from Ganache, or "...
0
votes
1answer
188 views

transferFrom function showing error

transgerFrom function is showing error and always falied . please help. function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { uint256 allowance = ...
0
votes
1answer
62 views

Solidity smart contract interacting with deployed smartcontract

Below are the steps (take note, no issues when I test this on remix, it works absolutely fine) Two smart contracts, Usermapping.sol and CoffeeNetworking.sol in truffle "2_deploy_contract.js" enable ...
0
votes
2answers
23 views

use the caller of the wrapper function to call the inner function

Suppose, I have 2 contracts A and B: contract A{ function someMethod() public{ // Something happens here } } And contract B containing its instance and its wrapper function ...
0
votes
2answers
119 views

Batch processing of contracts

Is there a way of defining contract data to be deployed and then running in a batch to deploy to the Blockchain? I am developing an application and would like to have the ability to load up test data ...
0
votes
1answer
43 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
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 ...
1
vote
1answer
32 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 pass a file to a function the function should return the hash value. can ...
1
vote
0answers
18 views

Why after managing to deploy contract to POA Ethereum blockchain I can't interact with it?

We are using a private ETH proof of authority blockchain. In order to deploy a contract I'm using 0 gas price and it deployed immediately. Then, Tried to deploy many types of contracts with ...
1
vote
1answer
270 views

Error Ganache: Run out of gas - Works in Remix/Not from dApp

I am working on an application that stores and retrieves personal data on/from the ethereum blockchain. Just working on this to improve my Solidity and SC expertise and get comfortable with the ...
1
vote
1answer
19 views

Is it possible to connect to public Ethereum like blockchain with Remix to deploy and view contracts?

I've tried to do so by specifying the web3 provider and the 8584 port but it gets stuck on every try. Is this possible? if so, is there another solution for that need?
0
votes
2answers
87 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....
1
vote
1answer
28 views

web3 - Contract deployment has been reverted by the EVM

I want to deploy a contract but my transaction gets reverted. This only happens with Web3, while it works fine with Remix.I can assure the ABI and Bytecode are correct because I pasted them from Remix,...
1
vote
1answer
21 views

Newbie. Getting cannot read property 'abi' of undefined when trying to deploy on Ubuntu

let abi = compiled.contracts.example.PartyTime.abi; This is the line of code that is causing the error. I copied the abi code from Remix into an abi.json file. But it doesn't seem to be reading it ...
1
vote
1answer
15 views

Error in Declaring a Sized Array: Generating no gas Exception

I have created a fixed size array: pragma solidity ^0.5.1; contract Underflow1 { uint8 arr[256]; uint8 i= 0; function testf2() public returns (uint8){ for(i=0; i<arr.length; ++i);...
3
votes
1answer
22 views

Compilation error using SafeMath

I am trying to do subtraction operation using the SafeMath library. The following is my code: pragma solidity ^0.5.1; library SafeMath { function sub(uint256 a, uint256 b) internal pure returns (...
0
votes
1answer
110 views

A contract works in remix but not when used with truffle

Below is the contract: uint32 firstTimeUserPoints=10; struct struUser{ string orginalName; string originalKshoplink; string orginalDocumentConvention; bool ...
0
votes
1answer
11 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 ...
1
vote
1answer
31 views

Oraclize can't compile Remix “undeclared identifier”

I was following this, I assume, very simple tutorial for generating a random number using oraclize: https://www.youtube.com/watch?v=J05DBPdkeAo But I end up getting this error and I dont understant ...
1
vote
1answer
38 views

How to measure size of stored data in the blockchain?

I know that remix can measure the execution cost and transaction cost. I want to measure the storage overhead ( Size of data in Bytes) on creating a contract on the etherum blockchain or calling a ...
0
votes
1answer
30 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 ...
0
votes
1answer
102 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( ) { ...
0
votes
3answers
658 views

Send Transaction failed : invalid address

Trying to execute a transaction on Remix IDE which is connected to the Ethereum blockchain via Metamask.io Google Chrome extension. Send transaction failed: invalid address . if you use an injected ...
1
vote
0answers
16 views

delegatecall (assembly) didn't change state variable in Remix with Web3 Provider

I am trying to test proxy pattern in Remix, which connected to my private chain with Web3 Provider. By the way, miner is working all the time. After invoking add function of Proxy contract, the state ...
0
votes
1answer
21 views

Compilation Error: Error: Expected identifier but got '(' msg.sender.transfer(uint(amount));

I am compiling the following code on solc & remix ide: pragma solidity ^0.5.1; contract Signed1 { uint val= 0; function withdrawOnce(int amount) public returns (uint){ ...
1
vote
2answers
149 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
1answer
24 views

condition check of struct mapping in solidity?

struct User { string username; string password; address userid; bool isAdmin; } mapping (uint => User) users; function checkIfUserExists(address userid) public ...
1
vote
1answer
29 views

ERC721: Interface ID Registration

Why we need to register Interface ID in ERC721 token. I was just going through the openzeppelin-solidity erc721 code and curious to know that why we need to use this. That interface id register code ...
1
vote
1answer
143 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 ...
1
vote
1answer
115 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
116 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
28 views

What is the meaning of “0”: “uint8 255”?

In the console, I am getting: Decoded output { “0”: “uint8: 255” } and in the return value I am getting: 0: 0x00000000000000000000000000000000000000000000000000000000000000ff What the above ...
0
votes
1answer
32 views

Remix Compiler Not Displaying Underflow

I can't see underflow happening in latest Remix compiler. I have used the following code: pragma solidity ^0.5.1; contract test { event testV(uint indexed value1); uint val= 0; ...
0
votes
1answer
17 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; } ...
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
2answers
22 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
3answers
20 views

how to send ether from contract to Ethereum account

I have 100 ether in my smart contract now I want to transfer the ether from contract to account automatically
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....
1
vote
2answers
136 views

What is from address and Topic address in Remix log

I am invoking the buyTicket function of contract from account "0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C" in remix IDE with 20 ethers which is clear from log but confused what is "from" and "topic" ...
0
votes
1answer
26 views

Remix - Pass bytesX to function

Using Remix, I can't pass a set of bytes ["0xee", "0xff", "0xgg", "0xhh", "0xii"] to my function function foo(bytes5 input) { // Do something } I've already tried all these formats: ["0xee", "...