Stack Exchange Network

Stack Exchange network consists of 174 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
22 views

i have erorr when sendTransaction web3

file javascript //smartcontract window.onload = function() { if (typeof web3 === 'undefined') { document.getElementById('metamask').innerHTML = 'Instal metamask dulu' ...
0
votes
1answer
47 views

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

I can't implement ERC223 contract. remix said " This contract does not implement all functions and thus cannot be created." please tell me what bad it is. pragma solidity ^0.4.25; library ...
1
vote
1answer
23 views

Remix IDE: How to get rid of the stated warning message on the online Remix IDE

I am trying to compile the following contract on Remix IDE. pragma solidity ^0.5.1; contract ProofofExistence{ event ProofCreated( uint256 indexed id, bytes32 documentHash);//an ...
1
vote
1answer
58 views

Unable to return address array in solidity

I have the following code for a simple gambling game. The code works fine except for getPlayers function pragma solidity >=0.4.22 <0.6.0; contract Lottery { address payable public manager; ...
1
vote
1answer
128 views

SyntaxError: Source file requires different compiler version

I am trying to compile the following contract on Remix IDE (online): pragma solidity ^0.4.24; contract ProofofExistence{ event ProofCreated( uint256 indexed id, bytes32 documentHash);/...
1
vote
1answer
25 views

ERC20- Error encountered during contract execution [Reverted] Transfer Already Created Token

I have created contract on Ropston TestNet which will send any already created tokens. Unfortunately its giving me error Transaction Details Available at: https://ropsten.etherscan.io/tx/...
2
votes
1answer
74 views

Solidity Getter and Setter Error [duplicate]

I started my first code in solidity . when i was implemented getter and setter i have face some error . The Following code, pragma solidity ^0.5.0; contract MyFirstContract{ string private name;...
1
vote
1answer
47 views

constructor arguments require 'memory' as a data location but not uint?

Ok I am trying to figure out why Remix IDE is throwing an error saying the Data location 'memory' must be given..... for a string argument but the uint arguments don't throw any error? pragma ...
1
vote
1answer
20 views

Recover Deployed Contract on Remix

I am working on the text, Mastering Ethereum and I deployed a contract and sent it test ether. However, for unrelated reasons I had to restart my browser, upon returning the only way I could continue ...
1
vote
1answer
31 views

Remix - Solidity IDE - function revealWinners not public

I defined a modifier in my contract Auction modifier onlyOwner() { //Part 2 Task 1 require (msg.sender == beneficiary); _; } This modifier should be used in ...
1
vote
1answer
80 views

Unusual error with bytes calldata

pragma solidity >=0.4.22 <0.6.0; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract ...
0
votes
0answers
11 views

Unable to pass the value to function's parameter in Remix

I am testing a contract which has a transfer function which accepts the array of values and address. It works fine when I pass a smaller value as mentioned in the below transaction. https://ropsten....
0
votes
1answer
18 views

Function of emitting event [duplicate]

I've recently started with Solidity and like to know about the emit event as I wasn't sure of why it is being used in the program. contract MyToken { string public name; string public symbol;...
-1
votes
0answers
56 views

Safe deploy of ERC20Mintable token and crowdsale contract

I have created the Token contract and the crowdsale contract using open Zeppelin library. After migrating the Token and crowdsale contract, I have added the crowdsale contract address as a minter in ...
1
vote
1answer
53 views

How do I verify and query my transaction? (Web3.py + Infura + Remix)

I've used buildTransaction() (which works at Contract.transact()) and I can see my transaction has taken place. (https://ropsten.etherscan.io/tx/...
2
votes
2answers
18 views

Format of Event logs structure in Remix

I am running a simple contract in remix. I have an event in my contract which will be emitted just to check values of stateVariables. contract stateVariable{ uint stateVariable1=10; uint ...
1
vote
0answers
32 views

Connection of web3 with Ropsten

How do I connect my web3 to ropsten network. I know how to pass the url of ropsten netwrok in web3 instance in my script tag but when i try to to console.log(web3.eth.defaultaccount) it gives me ...
0
votes
1answer
19 views

Remix - Solidity IDE - Gas requirements high

Compiled an "Auction contract" and got a warning regarding high gas requirements. Means: cannot run it. Below the lines with comments and that lines I included (//Part 1 Task n Line n). // CANNOT BE ...
0
votes
1answer
25 views

Transaction not getting confirmed because of transfer function even after making the address payable

The finaliseRequest transaction is not getting confirmed no matter what I do. I am sure it is failing at the transfer function. I had made the address to address payable also and changed the function ...
0
votes
1answer
30 views

How do I take value from array of objects?

I have a problem with my code. contract Registration { address public owner; uint conceptPrice; uint conceptValue; function Registration(uint _conceptPrice) public { owner = msg.sender; ...
0
votes
2answers
34 views

Refund Ether stored in a Contract

i'm trying to store Ether inside a Contract and refund it when I call the function paypackEther(). Inside of the Remix IDE with the JavaScript VM it works perfectly, but when I execute it on Rinkeby ...
-1
votes
0answers
12 views

Problem in executing GetHighestBidder() function

I am trying to get the highest bid of a user. Its working if i set the environment to JVM/ ropsten but is not working when i am connecting it to local host. pragma solidity ^0.4.24; contract ...
0
votes
1answer
44 views

Remix - Solidity IDE - ParserError

Cannot compile the "contract Auction". Got this error for Miscellaneous methods. //Miscellaneous methods: Below methods are used to assist Grading. Please DONOT CHANGE THEM function getPersonDetails(...
-3
votes
1answer
29 views

How to built the own wallet using solidity [closed]

I am working on blockchain . I created own cryptocurrency and i want to transfer the coin by own wallet so how to built wallet. I want to built own ethereum wallet to transfer the coins.so share the ...
0
votes
1answer
33 views

Difference between Binary of the Contracts in Hex and contract bytecode?

I use the command "solcjs --bin mycontract.sol" to get the "Binary of the contracts in hex" and it looks like: It can be used as a parameter of evm in geth after the command "evm --code". When I use ...
1
vote
0answers
23 views

access remix addresses within contact

I want to write tests for my simple solidity contract and one of the tests I have is to pass an address dynamically from remix or ganache-cli. Is there a way to access all other addresses from remix ...
2
votes
1answer
47 views

web3.eth methods in remix console don't work

I was working with one of my contracts in remix, running in javascript vm environment. And i just had to check the balance of my contract. when i tried this in the console web3.eth.getBalance("...
1
vote
1answer
25 views

Multiple Array[] along with mapping handling

This code is running but when the same user make a bid then the bid is being replaced from the first bid and event is printing twice the same record. i want that one address make a bid and for his ...
1
vote
1answer
105 views

REMIX: ParserError: Expected identifier but got 'payable' address payable target

Hello i have the follow contract: https://pastebin.com/dQJY55hs I want add this code tu the code above: constructor(uint _totalSupply) public { totalSupply = _totalSupply; balanceOf[msg....
0
votes
2answers
118 views

Error from Remix: “ParserError: Expected primary expression”

This is my code: pragma solidity>0.4.99<0.6.0; contract Election { struct Candidate { string name; uint voteCount; } struct Voter { bool authorized; bool voted; uint vote;...
4
votes
1answer
84 views

Remix + Ganache - Cannot call one contract from another

I have an innocent looking contracts that work painlessly in Remix. Test contract can easily call Another if I use JavaScript VM in Remix. I also have ganache-cli running on port 7454. If I connect ...
-1
votes
0answers
18 views

Return Values in Remix vs. Web3JS

How does Remix return values from function calls compared to a call with Web3? Usually they return the same (as they should), but when I want to return a string[] (it's still an experimental feature, ...
0
votes
1answer
31 views

make a contract send a percentage to a specific wallet (always)

how can I make a contract send a percentage to a specific wallet (always)? Example that whenever a transaction is made from this token the 1% go to X wallet. Thank you. Ok felix dolderer thanks for ...
1
vote
1answer
104 views

Why call() function stopped working in solidity 0.5.0?

I am sending ether to another smart contract and calling its fallback function with higher gas as like: contractAddress.call.value(1 ether).gas(53000)(); It was working in solidity version 0.4.25 ...
4
votes
1answer
2k views

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

/// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param ...
1
vote
3answers
40 views

Problems connecting Remix with Web3 Provider

Trying to connect to my ethereum private instance (CentOS VirtualMachine) with Remix IDE I´m getting a error and I don´t now how to solve it. Using geth in the power shell i can conect but in via web ...
2
votes
1answer
64 views

Web3JS incorrect return value

When I return a string array with web3 I don't get the original array as expected, but rather I get an array of the same size, with the index off by one. So instead of ["One","Two","Three"] I get ["",...
0
votes
1answer
24 views

Smart contract function throwing error in remix

I am writing a PreICO Smart contract. I got a code snippet which I am trying to understand. I am stuck in function buyXYZTokens function which is throwing error. Here is the code snippet: Contract ...
1
vote
0answers
63 views

Deploying a smart contract

i was following this nice tutorial to make simple Daap,and at one place i got stuck. I'm really newish to that, so hope someone could explain that. This is the link and the place where i get stuck,if ...
2
votes
2answers
49 views

SyntaxError: no visibility specified. Remix

Going through some tutorials on ethreum, and got stuck here. The code seems ok for me. I tried to add the public/private as the error says, then i got another error like: parsererror function ...
0
votes
1answer
15 views

Remix IDE: Infinite gas problem with withdraw(…) method

I am trying to compile the following contract. I am using Remix IDE. It is giving me infinite error in the Withdraw method. pragma solidity ^0.4.24; contract financialContracts4{ ...
1
vote
1answer
21 views

Ethereum Smart Contract deployed token not showing

pragma solidity ^0.4.24; contract owned { address public owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); ...
2
votes
1answer
103 views

why solidity 0.5.0 version code does not verify on etherscan?

The solidity version 0.5.0 at v0.5.0+commit.1d4f565a seems some issue while verifying at Etherscan.io The contract I deployed: https://rinkeby.etherscan.io/address/...
1
vote
1answer
28 views

Smart Contract To Send Multiple Outputs

I'm learning about smart contracts currently and a bit confused as to how they really work. My website allows users to send ETH from their wallet on site to another address off site. During which I'd ...
4
votes
4answers
3k views

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

I have created the contract below using the online IDE Remix. the smart contract was fine until late last night when i got the following error for all functions(targeting the string data types ...
1
vote
1answer
26 views

Set just a couple of parameters in a Struct

I have a struct with 10 parameters. The idea is to apply this struct for represent the flow of a trace. So I have to set variables values in a stepped way. Now i´m trying to call a function to set the ...
0
votes
1answer
31 views

Unable to store array of hash as a string in Smart Contract

I am converting array of hash into a string then store it in the smart contract. It is throwing error as; transact to Test.set errored: Error encoding arguments: SyntaxError: Unexpected number ...
0
votes
1answer
34 views

Remix IDE Error: Different number of arguments in return statement than in returns declaration

I am trying to compile the following contract on Remix. pragma solidity ^0.4.24; contract financialContracts3{ address issuer; constructor() public{ issuer = msg.sender; } modifier ifIssuer()...
1
vote
1answer
206 views

Remix is compiling the smart contract but not solc command

I am able to successfully compile a smart contract in remix IDE. However when I try to do the same with solc npm command, it shows a JSON error when compiling. Voting.sol pragma solidity ^0.4.25; ...
0
votes
2answers
60 views

Returning error message from smart contract

I am trying to return error messages from solidity. I have this contract: pragma solidity ^0.4.23; contract Simple { function arithmetics(uint a, uint b){ require(...