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

Remix forced error

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. I got this error on my remix when I ...
0
votes
1answer
42 views

Cannot deploy new contracts with pending transactions (Ropsten)

I have a very strange and annoying problem. I am trying to deploy a new contract however it just keeps cycling. I have the same problem on the POA testnet and on Ropsten. Please see below: I have ...
0
votes
0answers
31 views

Is it possible to see the execution cost of a function before it is executed?

I would like to assert the cost of an execution within a Solidity (5.x) function before executing it. To the best of my knowledge, this sounds like an incomputable problem, but I would like to check ...
0
votes
1answer
46 views

Need a guide to access my ropsten test network contracts through my command line and not remix

I have written and published a contract on the ropsten test network using remix. Now I want to access the functions of the smart contract from my command line (My PC) and not the remix IDE. Is there a ...
0
votes
0answers
50 views

remix compiler just won't end compiling

I've just started my journy with etherium, so now I am trying to get my first script complied. I tried starting with this project https://github.com/san-lee-ai/simple_auction But I could not get the ...
1
vote
1answer
28 views

Invalid opcode when trying to pass address as parameter to contract

When I try to pass address as parameter to this addEmployee function it gives me this error: invalid opcode The execution might have thrown. Debug to get more information. modifier onlyOwner(...
0
votes
1answer
57 views

Sending entire contract balance to address

I am trying to establish a basic reversed auction in solidity using the Remix IDE. In the last function i want to pay back the whole contract balance to a certain address. My approach with .transfer(...
0
votes
1answer
30 views

Way to create an event?

As soon as a function is called this other function should also be called!! Example: As soon as ether is deposited it should transfer funds into employees wallet. I already have functions deposit() ...
0
votes
1answer
25 views

How to transfer ether to wallet addresses in an array?

address[] emp = [address1,address2]; amount = total/emp.length; for(uint256 i=0;i<employees.length;i++) { wallet = emp[i]; wallet.transfer(amount); } So This is the error I get. TypeError:...
1
vote
0answers
18 views

Error encoding arguments: SyntaxError: Unexpected Token A in JSON at position 3

I was able to successfully deploy my first smart contract. But I am getting the runtime error. I am trying to create a new product structure for each wallet and trying to initialize the structure. As ...
0
votes
1answer
28 views

Adding a payee to a donation contract. Error: Transaction reverted

Disclaimer: I'm a noob when it comes to programming altogether let alone smart contracts. I refactored this code that was written like three years ago so it could work with solidity 0.5.0. I deployed ...
0
votes
1answer
29 views

Passing more than 20 parameters in solidity

How to pass more than 20 parameters in solidity function? I have tried using array[] parameter that uses pragma ABIENCODERV2 experimental feature. But this feature cannot be used in production purpose....
0
votes
1answer
11 views

How can I debug a my Solidity smart contract with a GUI?

Is there any way to debug a Solidity smart contract with a GUI, like remix? How can I do it for both testnets and mainnet?
0
votes
1answer
15 views

function overriding is quite working when called with web3.js

function getDetails(address publicKey) public view returns (Organization memory) { return s.getOrg(publicKey); } function getDetails(string calldata orgID) external view returns (Organization ...
0
votes
0answers
47 views

Smart Contract is not working on Geth private network, while it does work on Ganache as well as Remix

I've only begun working with geth from last week and have faced the quite a challenge. I've written a smart contract and it works on remix (JavaScript VM) but somehow it does not work on my geth ...
0
votes
0answers
39 views

Smart contract function not returning value (decoded output) in Remix

I am completely new to Solidity and would appreciate any help. I have a supply chain smart contract and it contains a function that is supposed to be called by customers and after the call, the ...
0
votes
0answers
34 views

One Proxy delegate contract to ten another proxy contracts

I'm trying to figure out why this code reverts. I need to make 10 bottles. This is how I do this: deploy Logic contract deploy 10 Proxy contracts call "upgrade" at each Proxy and pass Logic address ...
0
votes
1answer
29 views

cannot be able to connect to private blockchain hosted at local VM

I want to use remix IDE and want to connect web3provider which needs to be connected to private blockchain running on VM locally. My system is running on Windows 10 and I am running the VM on my local ...
0
votes
1answer
12 views

Cannot call functions from another deployed contract that inherits yet another contract

I am just trying this using Remix editor. I am able to call functions from another deployed contract(plain as simple) but when that another deployed contract inherits yet another contract, Now the ...
0
votes
0answers
13 views

what to sign to close the contract on JVM?

Full Contract I cannot sign the message correctly thus failing to close the contract.
0
votes
0answers
96 views

Remix never returns a transaction - but everything works - why?

This code supposedly works. Its supposed to let the owner withdrawal collected ERC20 tokens in a contract. It calls the balanceOf() for the erc20, then calls transfer(). Only have this error when ...
0
votes
1answer
65 views

Ethereum Smart contract calling a function in another smart contract that has a address payable return value give error

I am new to solidity. Anyway, I have written the following smart contract: pragma solidity >=0.4.22 <0.7.0; contract SP { address BlockAddress; bytes32 _Mhash; function ...
1
vote
1answer
38 views

str.slice is not a function

I ran two command lines of web3 and it returned an error > length ='0000000000000000000000000000000000000000000000000000000000000002' ...
0
votes
1answer
45 views

One contract accessing data from another fails

I am trying to get two contracts to interact: pragma solidity ^0.5.10; contract C2 { address public addr; constructor(address per) public { addr = per; } function ...
0
votes
0answers
27 views

Simple functions and constructors not working

I am working with a private blockchain, and am having a problem where simple functions and constructors simply fail to work. For instance: constructor(address admin) public{ owner = msg....
0
votes
2answers
34 views

How do I get the return uint value of a method in Solidity contract from another contract

Trying to get the return function of a contract from another contract. Don't know what I am doing wrong. I can see the return value when I call contract A directly but when I try calling the function ...
0
votes
1answer
22 views

Error While Compiling In Remix During Tutorial

During a tutorial on my first compile I received this error: :1:1: Parser error: Expected import directive or contract definition. pragma solidity ^0.5.12; ^ What's that about? How do I fix it? I'...
3
votes
0answers
18 views

Remix debugger ignores breakpoint

Description of issue I'm trying to debug a simple contract using remix on chrome v. 65 on Ubuntu. I must be doing something wrong, because I have the following issue: When I place a breakpoint in ...
0
votes
1answer
24 views

Two smart contracts interact can't pass value when I using web3.js

I have two different smart contracts interaction_1 and interaction_2 I input the data(team) from remix ide. What I want to accomplish is when user input team in user_input function at interaction_1,...
0
votes
0answers
28 views

not able to assign address to a public property using web3

while everything is working fine when working on remix ide but on truffle its not updaing value of a property (player2) i am also returning that address value and its returning as it should be. but ...
4
votes
2answers
62 views

Verifying a Token Contract with Interface

I managed to deploy a token contract with interface on Kovan Testnet. Now I wanted to verify the code. However this is a bigger problem than I thought. The contract got successfully deployed to: ...
0
votes
2answers
47 views

Am I Generating Random Numbers In A Non-Mallable Fashion?

Would this be a non-malleable way to generate numbers for my particular use case? Let me explain: I allow people to register for a lottery-type event. If a winning seed belongs to their ticket set, ...
0
votes
1answer
43 views

Gas estimation errored using ERC20 in REMIX

I'm trying to test making some smart-contract that uses DAI ERC20 tokens on Kovan testnet (DAI contract on kovan is 0xc4375b7de8af5a38a93548eb8453a498222c4ff2). I developed this very simple contract ...
0
votes
1answer
68 views

Verify simple smart contract on etherscan

I'm having trouble with verification of smart contracts and some ERC20 tokens. The only tokens I was able to verify were the ones derived from ERC20Detailed. Here's a simple contract that I found on ...
0
votes
0answers
13 views

Random Number Generation, Appropriate case or no? [duplicate]

I'm building a lottery where I need to generate a list of random numbers. Basically, I have a group of people who will commit to a prize by staking a certain amount of tokens to their commitment - ...
0
votes
0answers
13 views

TypeError: Function overload clash during conversion to external types for arguments

Why do I get following error "TypeError: Function overload clash during conversion to external types for arguments." when using compiler version ^0.5.0; but when I choose 0.5.2; and later releases ...
0
votes
0answers
32 views

Deploying contract using web3js but failed

I am a beginner for solidity 👶 My question about deploy using with web3js. I have two smart contract and in main contract I have a createContract function which is create a new subtoken contract ...
0
votes
1answer
34 views

Web3.js is taking lot of time to return a promise

Web3 is taking time near about 5 minutes even after the transaction got 3 confirmations to return a promise from a smart contract which is deployed on kovan testnet. Please give some suggestion how to ...
0
votes
0answers
28 views

Undefined Contract

I am finally able to come up with a compilable code. As I attempt to verify the contract, the Remix - Ethereum output is "undefined". Someone advice me on what to do. My ABI is as follows: [ { "...
1
vote
2answers
72 views

Cannot install web3 on nodejs

When I try to install web3 using 'npm install ethereum/web3.js --save' command, I get the following error messages- npm ERR! path git npm ERR! code ENOENT npm ERR! errno ENOENT npm ERR! syscall ...
0
votes
1answer
18 views

Get array of structs by giving address as parameter

Here's my code: contract company { struct contractDetails { string contractId; string companyA; string companyB; address A; address B; uint256 ...
0
votes
1answer
77 views

I would like to 3 mappings

I am a beginner. I would like to 3 mappings I know 2 mapping looks like this: mapping (address => mapping (address => uint256)) public allowed; and my question is: is 3 mappings look like ...
1
vote
0answers
29 views

I am newbie here,I need some help in retrieving one particular use using a userid, how do we do that as per below code?

struct Rider{ //address riderAddr; uint rider_Id; bytes32 Rname; bool set; } mapping(address => Rider) public riders; function registerRider(address _riderAddr, uint _riderId, ...
0
votes
2answers
41 views

ParserError: Expected pragma

Hi guys. I have got one big problem. When i try to compile my code i'm getting some kind of unusuall error. I think everything is ok but when i try to "node compile.js" my main file ("inbox.sol") ...
0
votes
1answer
34 views

Function should return all objects stored in the mapping array

Here's my solidity code. And I want all the objects to be returned stored in mapping array contracts in the getContract method by giving address as a parameter to the getContract function. pragma ...
0
votes
2answers
124 views

Remix Deploy Error encoding arguments

I'm building a simple fund raising smart contract and having problems deploying this through Remix. I'm wanting to set the "goal" and "minimum contribution" values (in wei) during the contract ...
0
votes
2answers
56 views

ParserError: Expected pragma, import directive or contract /interface/library definition

In an attempt to compile my ABI and verify my contract, I am getting the following warning: "ParserError: Expected pragma, import directive or contract /interface/library definition" on the first line ...
0
votes
0answers
40 views

Transactions go to an older contract address rather than the present deployed one

Though I have deployed a new contract but the transactions go to a previously deployed contract in my application. I'm attaching the screenshot of my Remix-ide code and the code for the front end ...
0
votes
1answer
46 views

# issue: Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?

issue: 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 or always failing ...
5
votes
3answers
200 views

Remix now force to use https, how can i continue to use http://remix.ethereum.org?

Recently I was able to both use http://remix.ethereum.org or https://remix.ethereum.org, but today I was not able to direct by browser to the unsecure version of remix. The reason I need to do so is ...