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

How to use Ganache, Remix IDE, MetaMask, and Web3js without Truffle

I am having an issue migrating a contract using Oraclize API to Ganache from Truffle. However, everything is working fine when running the contract from Remix IDE via MetaMask. As I want to write the ...
1
vote
0answers
24 views

SSL Certificate for remix-ide environment

I have installed remix-ide in my azure vm.Through http:/publicip:8080 i can able to access the remix-ide environment but i dont know how to make it as a https and where to mentioned the ssl ...
0
votes
2answers
27 views

solidity split each number

uint number = uint(keccak256(abi.encodePacked(now)) Split each number. For example, if the value of number is 1562, I need to be able to extract the result as: uint a = 1, uint b = 5 , uint c = 6, ...
-1
votes
0answers
60 views

Remix: Problem with Deploying Contracts: Invalid Address & Pending?

I am trying to deploy contract on Remix but for one contract, I am getting the message: Creation of MyContract5 Pending… pragma solidity ^0.4.22; import "./MyContract5.sol"; contract ...
0
votes
1answer
222 views

i want get random number between 100-999, as follows

function random() internal returns (uint) { uint random = uint(keccak256(now, msg.sender, nonce)) % 1000; nonce++; return random; } In this way, you can generate random numbers, but there ...
1
vote
1answer
40 views

Discrepancy in Solidity compiler output for Remix and offline (same version, same code)

I'm compiling the following contract locally and on Remix and getting two different bytecode results. Contract pragma solidity ^0.4.25; contract ReadBool { bool public flag; function ...
2
votes
1answer
47 views

Using oraclize and solidity-util - having trouble splitting string separated by space

I am learning to use Oraclize to connect it to random.org to generate random numbers. Here's my test contract code: pragma solidity ^0.4.25; import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"...
0
votes
1answer
40 views

Is data inputted as a parameter for a smart contract function visible?

Let's say I have something like this: bytes32 person; function registerPerson(address _person) public { bytes32 x; x = sha256(abi.encodePacked(_person)); person = x; } For privacy reasons, ...
2
votes
1answer
25 views

Remix + Metamask not fetching any values

I have a simple test contract that stores a hash and I deployed it via Remix and Metamask pragma solidity 0.4.25; contract Hash { bytes32 hash; constructor(bytes32 _hash) public { ...
0
votes
1answer
35 views

Problem getting data from a different deployed contract - Solidity

I've been working on the cryptozombies tutorial and now i want to go further but when trying to deploy the contract on REMIX to test it i'm having problems. I get: transact to ZombieFeeding....
0
votes
1answer
22 views

Problem transferring ether to contract (Error: transact to EtherInteractionTest.deposit errored: VM error: revert)

I'm trying to test a simple contract to deposit and withdraw ether in remix. Code: pragma solidity ^0.4.17; contract EtherInteractionTest { function withdraw() public { msg.sender....
0
votes
1answer
75 views

Transaction reverted during contract execution [Reverted]

I sent ETH to a contract address, and the transaction "failed" saying : Warning! Error encountered during contract execution [Reverted]. contract address and transaction failure here: https://...
0
votes
1answer
34 views

How is gas adjusted for a transfer in solidity?

I am using Remix with Metamask on the Ropsten test system, and when I try and transfer Wei I get a gas error. I tried a few combinations but there are various errors relating to gas. Has anyone any ...
0
votes
1answer
30 views

how remix generate functions of a smart contract after deploy?

When a smart contract deployed on Remix it gives a UI from where we can interact with Smart contract. How Remix generate it? Do Remix also use web3js library to interact with smart contract?
0
votes
1answer
27 views

Output of the following function

address[] twitteruser; function twitterhandles(address _address,string _twitterhandle) public { for(uint i=0;i<=twitteruser.length;i++){ if(twitteruser[i] ==_address) throw;...
1
vote
0answers
74 views

passing byte[] to smart contract using nethereum

I made a solidity function that allow a user to send multiple transactions with the same nonce as a singleton Tx signer: function multipleTransferPreSigned ( bytes[] _signature, address[] ...
0
votes
1answer
17 views

Contract failing at updateUserTask

The contract intends to create a set of tasks dynamically, eg: tasks can be added(There is no need for deletion.) Some tasks will be related by a variable within the struct called smart contract Each ...
2
votes
0answers
52 views

Difference between execution costs on remix an Ganache?

I created a contract on remix and then deployed it. when I call any function there is an execution cost in gas. I also deployed the same contract on Ganache for testing. I find the execution cost in ...
1
vote
1answer
26 views

Cant pass a byte into a function without an error

The code below compiles perfectly and seems to work, however when I try to call addTask like: "item1", 1, "i1", 1 I have tried every possible variation of quotes parenthesis, brackets... ...
5
votes
2answers
2k views

Smart Contract Error: Returned values aren't valid, did it run Out of Gas?

Deployed a contract using Remix IDE to Rinkeby testnet. Etherscan contract address and code is here. contract SimpleCounter { int counter; constructor() public { counter = 0; } ...
0
votes
1answer
39 views

Geth/Remix Error: gas required exceeds allowance or always failing transaction.How to solve this issue?

I have tried to deploy the example given in the following link(using remix and geth).While deploying, an error occurred in both geth and remix. And I found that the usage of "require" causes the ...
1
vote
1answer
21 views

How do I see how much gas a .call() transaction used in remix IDE connected to ganache-cli?

I've got remix connected to ganache-cli and I'm running some read-only transactions. I can't seem to figure out how to see how much gas those transactions used up? Any help would be great thanks!
0
votes
1answer
117 views

How to connect Quorum nodes with Remix?

I'm trying to use the Quorum-examples/7nodes to test my contract. I followed the step on github and open a terminal to attach to node1. https://github.com/jpmorganchase/quorum-examples/tree/master/...
1
vote
0answers
46 views

Triggering contract fallback function by sending ether from another contract

contract A { uint public u; event abc(address); constructor() payable{ u=100; } function () payable{ emit abc(msg.sender); u = 25; } function setu(uint i) { u = i; } function ...
0
votes
1answer
111 views

How to Save solidity remix.ethereum file in local disk with sol extension|How to upload/direct load on github after save on local disk?

Below is my solidity code on remix.ethereum and also created token in ethereum blockchain and now i wants to save my file in my local disk and after save wants to upload on github with verified ...
0
votes
1answer
49 views

Redeploying a contract using bytecode on the blockchain?

It seems redeploying a contract using bytecode on the blockchain is not possible (even assuming the ABI is known). The reason for this assumption is that the compiled code includes instructions for ...
4
votes
1answer
66 views

How to map from two keys to one value?

I'd like to store a unique mapping from NFT's to some state data in my contract. NFT's are globally unique based on: the NFT contract address, and the uint ID within the NFT contract. I would ...
0
votes
1answer
48 views

Sorting elements from mapping according to certain value?

I have created a function that receive some values from users an store them in a mapping. How to arrange the stored values in mapping according to a certain value ( Priority as in the shown example ...
0
votes
1answer
198 views

how to import multiple files on remix IDE using github url?

i'm using the following way! but got error URL not parseable: Ownable.sol!! import "github.com/OpenZeppelin/zeppelin-solidity/contracts/ownership/Ownable.sol";
0
votes
1answer
80 views

Contract deployed in private blockchain not returning output

This is my smart contract: pragma solidity ^0.4.24; contract Greet { string message; constructor() public{ message="I'm ready!"; } function setgreetings(string _message)public { ...
0
votes
2answers
165 views

How to do division and multiplication using solidity?

I am building a program on solidity that receives 3 values(bonus, value1, value2) through function, Then, another value called priority is calculated as follows: Priority= (0.5*Value1 + 0.5*value2) / ...
0
votes
2answers
38 views

Infinite gas on assigning struct

I have this code and it gives me infinite gas. please help me improve it. pragma solidity ^0.4.23; // v6 contract owned { constructor() public { owner = msg.sender; } address owner; ...
2
votes
2answers
111 views

Self executing smart contract? [duplicate]

If I need to implement a smart contract with a function that should be automatically executed each 1 hour (for example). Any suggestions for how to implement such a smart contract?
0
votes
1answer
62 views

what should be the proper block gas limit? [duplicate]

I have created a private network and trying to deploy my contract using Remix IDE. Remix is connected to my private blockchain at port 8545, my coinbase account have 2 ethers and I have set my Gas ...
1
vote
0answers
56 views

Execute javascript code in Remix IDE?

I noticed that the remix IDE now says that I can run Javascript code from .js file. I can't find any documentation. Is this possible? How do you do this? Thanks!
1
vote
1answer
26 views

Solidity contract state is not updated by signed transaction in nodejs

By signed transaction using web3 in nodejs Transaction hash 0x3c7688326afc83e6524e8c491f203852e34aa0f572d952569b6253e98dbd83a1 Data ...
0
votes
2answers
102 views

Array of addresses

I have an array of addresses and a function which returns how many times an address is in the array. For example, if the array has ['0x00', '0x01', '0x00'] the function will return 2 for 0x00 and 1 ...
1
vote
3answers
36 views

Warning: Using contract member “balance” inherited from the address type is deprecated. Convert the contract to “address” type to access the member

I have looked at the other posts with similar warning but I do not see how they apply to my context. This is the exact line that is causing the error: players[index].transfer(this.balance); which ...
1
vote
1answer
58 views

Transfer Token value is decimal when define decimals in smart contract?

I am new to ethereum block-chain. I create a ERC20 base smart contract. I set decimals values 18. When I call transfer function and pass the address and value parameters. So it's convert no.of token ...
1
vote
1answer
398 views

Truffle contract deployment either exceeds block gas limit or out of gas

I've been having the same issue when I was trying to deploy a contract using truffle develop console. The contract is not extremely big but does initiate two other contracts when called a certain ...
0
votes
1answer
23 views

acess variable from token contract to ico contract , both placed in diffrent files

//token.sol pragma solidity ^0.4.24; /*import "./Ownable.sol"; */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) ...
1
vote
0answers
76 views

Transaction hash using web3.py received but variable state not changed

Trying to send a value to function and set it to a variable. Making transaction using txn = contractInstact.transact({ 'from': Web3.toChecksumAddress("...
0
votes
1answer
35 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
47 views

what is the difference between payable and view in a smart contract in solidity?

I don't quite understand the concept of payable in a function in the smart contract and the difference between payable ,view and pure.
1
vote
3answers
112 views

Remix is not connecting to my private network

I have initialized the genesis file then run that command in the console- geth --rpc --rpcaddr 0.0.0.0 --rpcport 8549 --rpccorsdomain "*" --rpcvhosts "*" --rpcapi "network,admin,personal" --...
0
votes
1answer
20 views

ICO functions & limitations

One thing I try to understand is the limitation of smart contracts. I was looking into ICOs and I always asked a question: Is it possible to implement an 'enterICO' function without requiring ...
1
vote
1answer
71 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
0answers
17 views

What does `JUMP [out]` stand for in Remix IDE?

After compiling this contract: pragma solidity ^0.4.25; contract Simplest { constructor() public { } function two_paths(bool _a) public pure returns (uint) { if (_a == true) { ...
0
votes
1answer
45 views

Why is this random algorithm not good enough?

Many lotteries on Ethereum use random algorithms to determine a 'winner'. For instance, this function is bad because has some vulnerabilities (read here about some): function random() private view ...
0
votes
1answer
19 views

Calling a function of another contract is not working properly?

I have a problem like this. I am very new to solidity stuff. I have created two contracts and I have called a one contract function inside another contract. Here I am providing my contracts. This is ...