Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
22 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
8 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
11 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
16 views

how to deploy usdt contract through remix browser [closed]

pragma solidity ^0.4.11; /** * Math operations with safety checks */ library SafeMath { function mul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b);...
0
votes
0answers
73 views
+50

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
32 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
24 views

str.slice is not a function

I ran two command lines of web3 and it returned an error > length ='0000000000000000000000000000000000000000000000000000000000000002' ...
0
votes
1answer
37 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
24 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
22 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
16 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
21 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
25 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
47 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
41 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
26 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
64 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
11 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
8 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
31 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
21 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
27 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
39 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
17 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
75 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
27 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
29 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
32 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
66 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
33 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
38 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
21 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 ...
4
votes
3answers
138 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 ...
0
votes
1answer
38 views

What I need to verify contract with open-source license?

i m deployed contract in etherscan mainnet. i m verify it with open-source license like (MIT, GNU). now the problem were i don't know were to define license in etherscan ?? and etherscan will validate ...
1
vote
1answer
48 views

Web3 - Assign nonce to smart contract transact

I have a smart contract. I want to execute one of its state modifying functions. This is the code: const result = await smartContractObject.methods .addSomething(_valueToAdd) .send( { gas: '...
1
vote
2answers
39 views

“Gas estimation failed” on Ropsten with Invalid RPC JSON

I'm running into an issue going through a basic example in "Mastering Ethereum"... I have a Faucet contract (on Ropsten) per the book that looks like... pragma solidity ^0.5.1; //mastering ethereum ...
2
votes
2answers
44 views

Web3 - Access return value of events

I want to get the value that my smart contract returns in javascript. Here is the contract. (version 0.4.25 - web3 version 1.2) pragma solidity ^0.4.25; contract SimpleStorage { uint public ...
1
vote
0answers
35 views

Error: Operator << not compatible with types bytes1 and int_const 1 return b10 << 1;

I don't know how to correct the code of function 4 & 5. pragma solidity ^0.4.4; contract C { bytes1 b10 = 0x6c;// l-> 0110 1100 6c转换为10进制-》12*16^0+6*16^1=108 bytes1 b11 = 0x69; ...
0
votes
1answer
18 views

Call to other contract method return false when two parameters are passed

Caller Contract Called.call(abi.encodeWithSignature("test(address, address)"),empAddress, empContAddress) Called Contract event ad(address); function test(address e, address f)public{ ...
0
votes
0answers
35 views

Error: Member “transfer” not found or not visible after argument-dependent lookup in address 0.4.4 [duplicate]

pragma solidity ^0.4.4; contract PayableWorld { function deposite () payable{ address dyw2 = 0x1De57DD112092D60F45c9e2045424003e6B2C75a; dyw2.transfer(msg.value); } how can i change the ...
0
votes
1answer
29 views

Parser Error On Remix Solidity ERC20 Smart Contract Token

This Is My First ERC20 Smart Contract Token. I Am Trying To Compile It Using Solidity 0.5.0. Plz Need Your Help Guys. pragma solidity ^0.5.0; contract TusharCoin { uint256 public totalSupply; ...
0
votes
1answer
33 views

How can I store multiple strings mapped to an address in Smart Contract (solidity)?

I want to save multiple files in Ipfs and store its hashes mapped to an user address. I thought of having an array mapped to address and pushing to it, but does not seem to be the right approach. ...
0
votes
1answer
40 views

ERC20 - Approve & TransferFrom not working

The getTokenBalance function seems to retrieve data from the ERC20 contract just fine so I don't think there is an issue with how I'm using the interface. Additionally, I also tested out separating ...
0
votes
0answers
31 views

Solidity Contract cost calcuation

How can I calculate the cost of running my contract and running each function? I've noticed in Ethereum when a transaction is successful we have a transaction cost and a execution cost, what the ...
0
votes
0answers
9 views

DigixDAO smart contract functionality/pattern

Can someone explain the usage of initialisation functionality and _resolver arguments in the various constructors of digixdao? i.e. following contract What is a resolver and isn't the job of a ...
0
votes
1answer
25 views

Getting information from contract address?

pragma solidity ^0.5.0; import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol'; contract SubToken{ using SafeMath for uint; struct token{ ...
0
votes
1answer
12 views

interface function declarations to be used internally

Is it possible to use externally declared interface functions internally in a smart contract? i.e. say contract A inherits interface A, would contract A be able to implement the functions from ...
0
votes
1answer
57 views

Is it possible to insert some custom data in the DATA field of an Ethereum Transaction?

i am working on trying to get some data encoded/inserted into an ethereum transaction. Let me describe my environment first, i am using Web3py, Ganache and Remix IDE. I am able to successfully ...
-3
votes
2answers
46 views

Trying to create an instance of an abstract contract

pragma solidity ^0.5.0; import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol'; contract SubToken{ mapping(address => uint) balances; ...