Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

Problem with Syntax in Solidity with sale contract

Good evening. Well, I have really been battling with this and have followed instructions to the "T" but somehow i'm not getting the Syntax right on Solidity. I'm using Remix in my Web.3 Browser. I ...
0
votes
0answers
19 views

What is the API Key to input for Etherscan Contract Verification in Remix IDE?

I would like to ask, where can I obtain the said API Key for Etherscan Contract Verification in Remix IDE? I did provide the API Key as highlighted in Yellow Color but is Invalid API Key. What type ...
0
votes
2answers
7 views

Transaction won't be mined / Failed signing of transaction

I'm trying to send a transaction that writes somesthing on ethereum(kovan) but it seems my transaction is not mined and probably not even send to the network? All my view requests to ethereum work, so ...
0
votes
1answer
26 views

Returned error: gas required exceeds allowance (8000000) or always failing transaction

I am running private block chain using geth, Here is my geth command : geth --datadir $ethereum_home/chaindata --networkid 45683 --verbosity 3 --rpc --port 30304 --rpcport 8545 --rpcaddr "0.0....
1
vote
1answer
14 views

Error: Invalid bytes6 value

I'm trying to create a TicketPurchaser application. Here is the whole code for the smart contract, although I think the problem I'm asking about is a type error, most of the code is not important. ...
0
votes
0answers
37 views

Deploy ERC725 Identity with ERC735 Claims

I am using ERC725v1 and ERC735 Interfaces to add a contract which can deploy an ERC725 based Identity contract that can hold an Identity key and further Add Claims from that Identity for the ...
0
votes
1answer
15 views

Does returning “false” prevent bool function from further execution in Solidity?

example: function proceed() returns (bool success) { if (msg.sender != owner) return false; return important_function(); } So important_function shouldn't be reached if msg.sender isn'...
1
vote
1answer
22 views

ERC-20 Token Smart Contract Redeployment

Hello everyone am wondering how can someone redeploy ERC-20 Token Smart contract thats already deployed? I have already deployed few contracts both on Ropsten Test Network and on Main ETH Network ...
1
vote
0answers
24 views

Remix IDE Desktop + Geth node as test network

I'm trying to connect the Remix Desktop client to my local Geth node. as usual i added: geth --rpc --rpccorsdomain https://remix.ethereum.org while starting up the node. This obviously only works ...
1
vote
0answers
18 views

Failed to create genesis block [closed]

I tried creating genesis block. I have created a directory to store the chaindata. But on initializing genesis.json file I am getting this error: invalid genesis file:invalid character '<' ...
1
vote
0answers
19 views

Metamask+Remix gives different gas than Web3.js+Infura

I have one transaction, that can be executed with 2 different ways: - Remix with Metamask wallet - Web3.js with Infura network In both ways, I am connected to Rinkeby network. The Gas is ...
1
vote
0answers
16 views

Can't deploy Token from Remix in Rinkeby Test Network

I get the error "This contract may be abstract, not implement an abstract parent's methods completely or not invoke an inherited contract's constructor correctly." My full code is: pragma solidity ^...
1
vote
1answer
31 views

Unable to send ether to a function of an imported contract

pragma solidity 0.5.16; contract receive{ function dep() external payable{ //Processing the received ether } } function fallback() external payable{} pragma solidity 0.5.16; import "./...
1
vote
0answers
45 views

Can't import Interface to another contract. (TypeError)

This is a snippet of my main code: pragma solidity ^0.6.0; import 'IERC20.sol'; contract Kaarya is IERC20 { uint public constant _totalSupply = 1000000; string public constant symbol = "KRY"...
1
vote
3answers
35 views

Address as name of an array in solidity?

silly question. But can i make an array with its name as address of user? For example string[] public 0x7v77wfr349C9864De0119E94c3f8d something like that?
0
votes
1answer
31 views

Error: This contract may be abstract

My solidity contract compiles in Remix, but when I try to deploy it it fails and throws Error: This contract may be abstract, not implement an abstract parent's methods completely or not invoke an ...
2
votes
0answers
15 views

Guidance on where to start for a better foundation study

I'm a newbie to the block chain technology, where should I start from as a bigger for a better masterly and successful learning? Can I kindly get anyone who can offer to mentor me for the realization ...
-1
votes
0answers
16 views

Type Error: Invalid Implicit conversion from uint256[1] memory to uint256[2] memory

I am facing an error while deploying a contract containing the following code, //Original Code pragma solidity ^0.4.14; import './Verifier.sol'; contract sha256hash is Verifier { bool public success ...
1
vote
0answers
26 views

Solidity logic implementation using block.timestamp

i'm trying to implement some logic involving block.timestamps and i keep getting this weird transaction revert: The first time i call the function doLogic(), the transaction gets reverted. The second ...
0
votes
2answers
26 views

Am I Able To Save Remix.IDE Files To My Device?

I am a computer science student and for my coursework, I want to write a smart contract program. I discovered the Remix.IDE is a web-based IDE, not like previous IDEs I have used, such as IDLE for ...
0
votes
1answer
39 views

Ether Forward and Token Sweep Contract? [closed]

I've written a simple ether forwarding contract coupled with a sweep function which when called automatically, sweeps all tokens of specified token contract address to pre-defined recipient addresses. ...
0
votes
1answer
22 views

remix compiler warning infinite gas requirement

I'm trying to deploy a trivial faucet program which compiles OK with remix but I get the following error. "Gas requirement of function Faucet.withdraw(uint256) high: infinite. " This means that while ...
1
vote
0answers
27 views

What are “if” and “this” in this function?

function() public { if(delegate.delegatecall(msg.data)) { this; What are the requirements for "if" to execute "this" and what does "this" refer to in this function?
1
vote
1answer
25 views

Transaction working in remix but not errored from dapp

I have a master contract which deploys instances of other contracts. pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; contract DataEntityContract { DataEntity DE; constructor(...
0
votes
0answers
14 views

Calling function of deployed contract and getting return value in matrix?

I am looking for some help here. I would like to know how (using matrix) that I could call a function of an already deployed contract on the Ropsten net and get the return value. I have searched a ...
1
vote
1answer
28 views

Validating equality between two address variables

I'm testing the challengeOpponent function in my Connect4 contract in remix. The function creates a new Escrow contract instance so that each player in the game has a place to hold their funds until ...
1
vote
1answer
16 views

What is the max number of Blocks which can be created in Quorum

I have nodes running from past few days, with almost 4100+ transactions successfully completed. When i try to interact with the contracts again to add/modify details it shows error Error when ...
0
votes
1answer
47 views

Why Remix IDE asks for CallData and what value we have to give? [duplicate]

In my several programs which I ran through remix IDE, I got a CallData text box. I don't know what value I have to give to this Calldata text box. I tried the following: from: address : "...
0
votes
1answer
30 views

Transfer money between accounts in solidity

I am writing a contract where I want to transfer money (present in the contract owners account and not the contract) to an account address passed to a function in the contract. for some reason this ...
1
vote
1answer
58 views

Remix IDE: What is the purpose of Calldata and Transact Tab

I am trying to execute the following code on Remix IDE. pragma solidity ^0.5.4; contract GuessTheNumberChallenge { constructor() public payable { require(msg.value == 1 ether); } ...
0
votes
1answer
19 views

Declaration Error in Nested Struct

I am writing the contract below to store json in a nested struct in remix: pragma solidity ^0.5.11; contract Analytics { address lastAddress; uint timeStamp; string label; uint count; ...
0
votes
1answer
29 views

VM error: revert. Try to send ether from contract to another contract

I just facing a little issue here in sending some ether from Sender contract to another contract Escrow by msg.sender value. Btw, I'm executing code on Remix, and specify the value from the sender ...
1
vote
1answer
61 views

Upgrading contract for modern compiler version

I am upgrading the old contract from 0.4.24 for new solidity compiler version 0.5.16 however it doesn't work with modern solidity compilers, Could anyone make my contract compatible with solidity ...
1
vote
1answer
27 views

Payable constructor gives revert message

I am trying to execute the following contract on remixe IDE: pragma solidity ^0.5.4; contract GuessTheNumberChallenge { constructor() public payable { require(msg.value == 1 ether); } ...
1
vote
1answer
23 views

Variables in storage not getting updated according to transaction

As part of my project, I am using a code from github and modified it according to my requirement. This is a Auction contract. I am using remix IDE for interaction. I tried deploying in the rinkeby ...
0
votes
0answers
32 views

Sending ether to Contract from another Contract

pragma solidity ^0.5.0; contract Contract1 { address payable owner; uint public value; constructor() public payable { owner = msg.sender; value = msg.value; } function() ...
1
vote
1answer
25 views

ERC20 coin transaction not successful

I called the mint function on a default coin to send some of my new coin to my METAMASK account but it looks like nothing was received. I can't tell what specifically could have gone wrong, so here's ...
1
vote
1answer
22 views

Contract Call from another Contract

I am trying to refer to this Solidity Docs https://solidity.readthedocs.io/en/v0.6.2/control-structures.html and trying to execute the following code pragma solidity >=0.4.0 <0.7.0; contract ...
1
vote
1answer
30 views

Re-entrancy Vulnerability?

function transferFunds(uint _value) private { uint _fee = (3*_value)/(2*100); //Perform Ether transfer method merchant.transfer(_value - _fee); admin.transfer(_fee); ...
0
votes
1answer
75 views

How to use erc20 transfer in another contract in remix ethereum using metamask?

I read a lot of documentation in here and another web pages, I have a question and I so tried to solved but nothing works for me. I am using this example. It works fine with truffle, but I don't ...
1
vote
2answers
36 views

Why does a miner still pay gas for a reverted transaction?

I ran a contract here, I got the message "Transaction mined but execution failed". : [vm]from:0xca3...a733cto:Will.deceased() 0xbbf...732dbvalue:0 weidata:0x72f...af2d9logs:0hash:0xac5...6c5be ...
0
votes
1answer
33 views

Read and write products using solidity

I am new to Solidity, trying to store a product in the purchaser wallet and retrieve the information from the owner wallet. I have some ideas but didn't know which one will be best. To store an ...
1
vote
1answer
36 views

Solidity error message on compilation (DeclarationError: Identifier not found or not unique. using Address for address;)

I'm trying to compile a code for a crowdsale contract (Timed and with allowance) from openzeppelin library that is based on a deployed token. However during compilation on remix i get a syntax error ...
0
votes
0answers
20 views

Contract is not deploying properly on Geth private network using web3j SDK

I am new to Ethereum. I have created private blockchain using Geth on my local and trying to deploy my smart contract using java web3j SDK. I am able to deploy my contract using java and getting ...
0
votes
0answers
32 views

Unable to change/read local variable in a smart contract on a local private geth blockchain

I trying to create and test an ERC-20 Token on a local geth blockchain. I tried compiling and testing my contract on Remix's Javascript VM environment and it works fine. Then, I wanted to try ...
0
votes
1answer
29 views

Always raising “Gas required exceeds allowance or always failing transaction” when the condition of require() is not met

I tried to run the following code to check the error message when the condition of require() is not met. pragma solidity ^0.5.16; ... function addUser(string memory name) public returns (int) { ...
2
votes
1answer
19 views

How to check if a mapping has not been written yet?

I have this mapping: mapping (uint256 => string ) private storedData; I am trying to do this: modifier dataNotStored(uint256 _index) { require( keccak256(abi.encodePacked(storedData[...
0
votes
1answer
23 views

How to resolve this error in solidity “The constructor should be payable if you send value.”?

In this solidity code the finalizeRequest() is giving a run-time error. Here is the error : Campaign.finalizeRequest(uint256) 0x692...77b3a transact to Campaign.finalizeRequest errored: VM error: ...
0
votes
1answer
25 views

Calculate most frequent value in a array in solidity

I have an array something like [0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2]. I want to find the most frequent value. If two are more are having highest frequency, the first occurance should be the result. ...
0
votes
1answer
23 views

Problem with understanding Buyer address

My account address on Remix IDE is 0xCA3…a733c and wallet address is 0x147…C160C. Following is my code obtained from Solidity Tutorial. In this code, buyer address is passed as an argument. I have got ...

1
2 3 4 5
32