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.

1
vote
1answer
141 views

Why use VS Code IDE instead of remix?

I've seen that during the course of tutorials I am following, the intructors have gradually shifted over to Visual Studio code rather than use remix. I could not find any such explanation as to why ...
0
votes
1answer
140 views

How calldata is stored in memory?

when I execute this: bytes8 h = 0x000008dfe2f440000733c; t.call.gas(0x7e0b0)(bytes4(keccak256("enter(bytes8)")),0x8dfe2f440000733c0000000,h); the calldata is : 0: ...
1
vote
1answer
67 views

what are the diffrences between <address>.call and <address>.<function name>?

contract GatekeeperOne { address public entrant; modifier gateOne() { require(msg.sender != tx.origin); _; } modifier gateTwo() { require(msg.gas % 8191 == 0); _; } ...
-1
votes
1answer
56 views

Remix Solidity Stopped Working / CRASH

I'm trying different random algorithms on smart contracts. I have an array where I can push accounts, then I use the random algorithm to select one. When I have ~ 20-50 entries everything works fine ...
0
votes
1answer
19 views

Calling a function of one Contract inside another Contract not workig correctly?

I have a problem like this. I am very new to solidity. I have tried an example that I was found by a Google Search in the remix editor. But I was unable to get any output like in the example.This is ...
2
votes
1answer
18 views

Why won't remix finish launching all of my libraries?

I've run into an issue. I have a contract with a hierarchy of libraries (some lower level libraries import higher level libraries). All libraries are ultimately imported by our main contract. ...
3
votes
2answers
43 views

Stopping Raffle Smart Contract

A smart contract has an enter() function where participants can send 1 Ethereum to enter a raffle. Is there an easy way to stop allowing the others calling this function while the winner is picked?
1
vote
1answer
491 views

What is the maximum value an int and uint can store

I am new to solidity. I need to understand the couple of things maximum value an int and unit can store ? does maximum values stored in int and uint are same ?
0
votes
2answers
60 views

Calling external contract running out of gas?

hope you can assist. I have this very basic template setup, where contract TokenVote should simply store some data on the SimpleStore contract (Sort of eternal storage) Yet my code always runs out ...
1
vote
1answer
31 views

How to hide an inherited function?

I checked this but it does not help me. I am writing an inherited contract and I would like to hide the CheckValue function from the console. How do I go about this? I wish to check if the value I am ...
2
votes
0answers
294 views

Contract too large

I am sure this has already been answered but I could not find a clear answer. I get the following error: Contract creation initialization returns data with length of more than 24576 bytes. The ...
0
votes
1answer
56 views

SyntaxError: invalid syntax on web.py with contract ABI

everybody, I'm stuck with a SyntaxError: invalid syntax every time I try running this script on the contract_abi variable that I got from the Remix IDE. I'm currently trying to connect with a smart ...
0
votes
1answer
28 views

Why is gasestimate coming as “infinite” when I'm trying to return a dynamic array in solidity?

I understand, that as the list grows it is going to cost infinite gas. I'm making a temp array in memory of size of our dynamic array at present size and then returning that array. But does that make ...
0
votes
1answer
190 views

The difference between msg.sender.balance and owner[msg.sender]

Hello everyone i have a code like: mapping(address => uint)owner; function show() view public returns(uint) { return owner[msg.sender]; //return msg.sender.balance; } in slodity and ...
1
vote
1answer
46 views

Out of gas in web3 but not Remix?

I have a test function: function test(uint[400] subscriptions, uint[400] subscriptionIndexes) public view returns (uint[4000], uint[4000], uint[400]) { uint[4000] memory postSenders; ...
0
votes
2answers
56 views

Set public function to private?

Let's say I have any function in my smart contract and for a small period of time I want that function to not be PUBLIC but PRIVATE. Is it possible in Solidity? If not, could this be solved with a ...
2
votes
2answers
40 views

Multiplication and iteration in solidity

Iteration uses a lot of gas. I was thinking at different options I could minimise the costs. I must understand why one thing doesn't work: Why can't I push into an array using multiplication rather ...
0
votes
1answer
29 views

Account used to Deploy not same as account associated with contract

So I am testing out a new contract I have been working on in Remix. I expected that the Account I selected would be the one associated with the actual contract, but it is not. In fact, I tried it a ...
1
vote
1answer
310 views

TypeError: This type is only supported in the new experimental ABI encoder

I am practicing my Solidity skills and while I did expect to get an error, I did not expect this error TypeError: This type is only supported in the new experimental ABI encoder. Use "pragma ...
0
votes
1answer
41 views

How do i get a smart contract to interact with a website?

I have a site, let's say a user solves a game, i want that user to be stored in a database that represents users who solved the game, users stored in this database will then be able to redeem tokens. ...
1
vote
1answer
105 views

How send transaction with msg.data in Remix?

The fallback function may receive additional data (exposed in msg.data). How can I send a transaction with additional data in Remix?
2
votes
1answer
405 views

Understanding how a simple contract breaks into bytecode

I'm trying to understand how contracts look in terms of bytecode and struggling to do that just based on the yellow paper. In particular, consider the following empty contract: pragma solidity ^0.4....
1
vote
1answer
105 views

How to map Array of Structs in Solidity [duplicate]

Need this architecture { address1 => [struct1, struct2], address2 => [struct1, struct2, struct3,], address3 => [struct1, struct2, struct3, struct4, struct5], ......
1
vote
1answer
52 views

How can Remix Ethereum decode output address of smart contract is created from another smart contract

I have seen that when I create a new smart contract from another smart contract Remix Ethereum return to me the address of smart contract. But When I do it with web3js the callback function just ...
1
vote
1answer
62 views

The transaction has been reverted to the initial state. Note: The constructor should be payable if you send value

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

How do I solve/get around this 'Gas estimation failed' error in my smart contract?

It appears after I compile, deploy the contract on remix (using Rinkeby test network), and call the JoinDXCon( ) method using any string "foo". Here's the error: And here's the smart contract: ...
1
vote
1answer
71 views

Verifying Signed Data

I am busy trying to get my head around recovery of an address using ecrecover(). The I'm having trouble recovering the correct address when providing signed data to the contract. The contract that I'...
1
vote
1answer
67 views

Oraclize handling long response from cryptocompare

I have very custom task and I need to make sure what are limits of each technology. I haven't found nothing similair in this forum yet. I am using Oraclize to get response from this url: https://...
1
vote
1answer
116 views

Unable to test Solidity Remix

I am writing my own smart contract in Solidity and trying to test in Remix. The main Remix site appears to be down (https://remix.ethereum.org/). I found another site: https://ethereum.github.io/...
2
votes
1answer
16 views

Contract - Demo - Identifier - Only 3 Lines for my contract to work - ¿does somebody know how to fix this?

pragma solidity ^0.4.23; contract Owned { address owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); ...
1
vote
0answers
33 views

Why does gas rise when the require will fail?

Here is the contract, function being called is voteForCharacter: pragma solidity ^0.4.19; contract CharacterEveryDay { event CharacterSelected(uint8 _character, uint64[256] characterVotes, uint64 ...
0
votes
1answer
147 views

Remix warning - Is constant but potentially should not be.

I am getting the warning on the code shown below. Could you please assist me know to resolve this warning ? warning message - "Is constant but potentially should not be"
0
votes
1answer
30 views

Transfer half of balance?

I have a smart contract which balance is very dynamic. Is there a way to transfer just half of the balance? I tried: account[4].transfer(this.balance / 2); I think it's not the greatest idea ...
4
votes
1answer
473 views

this.balance VS address(this).balance

What is the difference between this.balance VS address(this).balance in solidity contracts?
1
vote
1answer
91 views

Error when running Truffle Test in Terminal

I am trying to use truffle to test my smart contracts and have written some test files. I am getting an error on the terminal trying to run the test and am unsure what the reason is. I access my ...
1
vote
0answers
32 views

I cannot verify contract on etherscan

I cannot deploy my contract so I test with simplestorage but I cannot verify it either. pragma solidity ^0.4.24; contract SimpleStorage { uint storedData; function set(uint x) public { ...
2
votes
2answers
56 views

send() or transfer() functions always fail

I created a few code below pragma solidity ^0.4.19; contract SendAndTransferExample { function SimpleSendToAccount() public returns(bool) { return msg.sender.send(10000000000000000000); ...
2
votes
1answer
64 views

Contract working on Javascript VM and not Web3 Provider, why?

Here is the code: Calling contract: pragma solidity ^0.4.24; contract Caller { address public called_address; constructor() public payable { } function set_address(address _addy)...
1
vote
0answers
14 views

What happens to the missing coins in this transaction? Copy paste this code into remix to reproduce my original bug. Thank you

pragma solidity ^0.4.24; contract TheCaseOfTHeMissingCoins{ string public name; string public symbol; uint8 public decimals = 18; address public owner; mapping (address => ...
1
vote
0answers
39 views

Gas requirement of function client.<function_name>() high: infinite

I've tried fix that problem. but still i don't know what was wrong If someone can fix this problem, please save me. I'm still trying this. below sample code contract HelloWorld { uint private ...
2
votes
1answer
72 views

msg.sender is Null in Base Constructor

When I create the child class object and try to access value of msg.sender from parent class it always comes 0. Can anyone please help me in this? Below is the sample code: contract Test1 is Test2 { ...
1
vote
0answers
17 views

Can't deploy contract in Mist

I'm trying to deploy contract using Mist on Mac OS X. It worked fine on testnet but when I try to do it on main net the transaction just hangs on "Couldn't estimate gas, restoring to default ...
0
votes
1answer
39 views

Transaction reverting when it hits Require statement in function

I have below contract. I deploy my contract in remix and put 1 ether in value but when I execute enter() function I get an error. This is the contract: pragma solidity ^0.4.17; contract Lottery{ ...
1
vote
2answers
132 views

Smart contract interaction (with another contract) example for solidity version 0.4.24 that works on Remix

I was going through this code and I decided to test it on RemixIDE... Creating a function that calls another contract I kept getting "VM Exception while processing transaction: revert" when I ran a ...
2
votes
0answers
36 views

Estimated gas is always low

web3.eth.estimateGas is always calculating low gas for the transaction. Here is a reference to a trasaction in ropsten. https://ropsten.etherscan.io/tx/...
2
votes
0answers
70 views

Getting Json file from remix

I have been deploying contracts on rinkeby but we are almost done to go to mainnet. I have been comparing deployments with truffle and remix and there is a huge difference in gas uses, so I would ...
1
vote
1answer
254 views

hacked contract

Unfortunately, the contract we created with great hopes last night was hacklendi. we still do not understand how it is, the owner's address is changed. we are trying to figure this out because we want ...
2
votes
1answer
107 views

How Do I take a Snapshot and Migrate Token Holders to a new ERC20 Contract?

I want to Migrate my ERC20 Contract to a new Address, How do I do this ?
2
votes
1answer
65 views

Gas Estimation Error when I try to burn token

pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. ...
0
votes
2answers
48 views

Ethereum Remix IDE Not Returning Values

Here I am having an issue where the values are not appearing to function correctly in the Remix IDE browser. I am trying to have a buyer where they can transfer funds to each other, and the seller ...