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

Know which function was called

I'm using remix and i want to know which function was called so that I can update a state variable. Does anyone know how to do this?
0
votes
0answers
4 views

getTransactionReceipt() in JavaScriptVM Environment

Is it possible to get a transaction receipt using Remix in JavascriptVM Environment? If it is how can i do that? Thanks in advance
1
vote
0answers
15 views

Non linear State Machine Pattern

The State Machine presented at solidity documentation shows a good way to implement the pattern in linear cases. However, when the states don't transact in a non-linear manner there is no example. ...
0
votes
0answers
7 views

Remix not loading in Chrome and Firefox

For some reason i cant access the online Remix IDE. http://remix.ethereum.org it gives me a blank page with a logo. Tried to access from Firefox, Chrome and Edge aswell as disabling all extensions ...
0
votes
1answer
17 views

Set block size and block number

Is there a way to set the block size and the block number in Remix IDE? If not, could you suggest another platform where I can change these parameters? Thanks
0
votes
0answers
11 views

how to calculate the message part for pedersen hash in solidity

I am trying to implement pedersen hash using solidity. Is it possible to implement and how to split the message according to the conditions of pedersen hash.
0
votes
1answer
17 views

Access input of a different function but in same contract

Is there a way for a function B() to have access to the input given at function A(), knowing function A() and function B() belong to the same contract XPTO?
0
votes
1answer
33 views

Contract not showing the name and symbol

I deployed a contract on ropsten but it was not showing the name and the symbol. I have the feeling that there is something wrong at the deployment and I think it has to do with the parameters. As you ...
0
votes
0answers
16 views

Is it possible to pass arguments obtained in a web3 app to a smart contract and then call it?

I have this transaction that I got from a response from the 0x protocol, is it possible to pass it as an argument to a function within a smart contract?
0
votes
1answer
23 views

Passing structures between contracts with ABIEncoderV2 [closed]

Hello I am having problems passing accessing the structure Rental in my secound contract can some one help? contract RentalCompleting{ struct Rental { uint256 stratingDate; uint256 endingDate;...
1
vote
1answer
23 views

What's the purpose of the following code in the program?

I was following a tutorial on building a simple Solidity program for Ethereum transactions between a smart contract and account. However, I didn't understand the following code:- balanceReceived[msg....
0
votes
0answers
19 views

Auction project in Solidity: Why do I get “VM error: invalid opcode” for this code?

I am trying to do an Auction project and this part is bugging me. I can't figure out what is the problem that's causing the following error message: "VM error: invalid opcode.". Even if I do ...
0
votes
0answers
18 views

Switching addresses in Remix

I am creating contracts similar to VM error: revert. revert The transaction has been reverted to the initial state. Note: The called function should be payable if but combined with the restricting ...
0
votes
1answer
26 views

cannot transfer token from EOA account to a contract from function

i was making a contract for staking where user transfer its token to a contract and i will give him interest but i got stuck to this problem i have been searching for 3-4 days but for it is not ...
0
votes
1answer
21 views

Access Tuples elements

I have the following tuple: ( , , uint256 standardDepositAmount, , ) I need to use the standardDepositAmount in a require, like: require(standardDepositAmount == something) how can i do that?
0
votes
1answer
23 views

What is the proper way to store timestamp in blockchain?

I am trying to store the timestamp in the blockchain using block.timestamp or now. But that keeps throwing warning as Use of "block.timestamp": "block.timestamp" can be influenced ...
1
vote
1answer
21 views

What is the right way to calculate gas price and limit for contract deployment?

I have tried several times and reached up to a gasPrice of 65 Gwei and a gasLimit of 500,000 which is $7.6 and still the deployment fails with error "Out of gas". After spending tens of USD ...
-1
votes
0answers
13 views

Why i cant select my contract in remix?

i cant acces my "inheritorContract.sol". when i click it just marks it as text, and "heritageContract.sol", that imports inheritor, cant compile and doesnt show the error this is ...
1
vote
0answers
33 views

Alternative to ganache

can someone please tell me an alternative to Ganache? Tried installing ganache on my laptop and it's not supported. Ganache works on 64 bit computers and mine is 32bit. Is there a way I can go round ...
0
votes
1answer
20 views

Error in code Expected pragma, import directive or contract/interface/library definitio

I am getting the below error when i compile the below code. Using remix compiler version 0.5.11 ****browser/TodoList.sol:7:2: ParserError: Expected pragma, import directive or contract/interface/...
2
votes
1answer
28 views

“out of gas” message when calling another solidity contract's method

I want to call another solidity contract's method using Call/DelegateCall. Although the transaction seems successful, but I did not get the expected result, and it shows "Although one or more ...
0
votes
2answers
31 views

solidity, how to wait n second function or others solution

I am working on a project for p2p energy trading using blockchain. I am building an experiment on my own to demonstrate the concept for my master thesis. For this project I have two python scripts, ...
0
votes
1answer
24 views

How to withdraw Other ERC20 tokens besides Ethereum from my contract

I'm trying to implement something like this (which works) function withdraw() public { msg.sender.transfer(address(this).balance) } but I need to be able to withdraw ERC20 tokens other than ...
-1
votes
1answer
20 views

i can't figure out why i keep getting this parser error

pragma solidity ^0.5.13; contract WorkingWithVariables { uint256 public myUint function setMyUint(uint_myUint) public { myUint = _myUint; } bool public mybool; ...
0
votes
0answers
24 views

Is possible to use a smart contract with custom buyTokens method in TestNet?

I'm trying to test a smartcontract in TestNet that is working in my private ethereum blockchain network. I can deploy it in Ropsten and Rinkeby, but I can not execute my buyTokens method from Remix. ...
1
vote
1answer
32 views

How to install solc of a specific version?

I want to install solc 0.4.24 but the commands given below installs the new version. sudo add-apt-repository ppa:ethereum/ethereum sudo apt-get update sudo apt-get install solc Or sudo snap install ...
0
votes
0answers
47 views

Exchanging tokens to ETH using Uniswap (v1)

I am trying to create a simple function that buys a token from uniswap (v1) and then immediately sells the token back to ether. I am able to buy successfully but when adding the calls to the sell ...
0
votes
1answer
24 views

Why does Remix's jsVM show incorrect gas?

I tested the gas consumption of a contract in the jsVM, which showed consistent outputs. I then deployed it to mainnet, and the function calls consume much different amounts of gas. Is the jsVM ...
1
vote
1answer
31 views

Why does retrieving stored data cost so much compared to using calldata in Solidity?

I have a function that I need to pass an arbitrary length array of addresses to. In remix, just calling a function that has an address[] costs around 30k gas for an array of 5 addresses: function fun(...
1
vote
0answers
32 views

How do I find the amount of Ether the deployed contract on Remix IDE holds?

Assuming I have successfully deployed a contract on the online Remix IDE and sent Ether to the address the contract is deployed to; how do I find the amount of Ether that the contract/address now ...
0
votes
2answers
24 views

SyntaxError: Use of the “Var” keyword is disallowed

someone could tell me how to define this function without using "var"? I don´t know if I have done it well. This is part of my code: struct user{ uint time_transation; uint ...
0
votes
0answers
20 views

Warning Message: Gas Requirement: Compiling Multiple contracts Remix IDE

I am getting following warning message while compiling the test contract on Remix IDE : Gas requirement of function Test.send(address) high: infinite. If the gas requirement of a function is higher ...
0
votes
2answers
64 views

How do I give every user Ethereum an address and does it affect security

I have a project with Ethereum Blockchain the users send the data to the server and the server writes the data in the blockchain network My question is how do I represent the server in the smart ...
0
votes
0answers
30 views

How to import a contract with lower Solidity version?

I want to import a deployed smart contract TetherToken and use its functions. Solidity version of deployed contract TetherToken is: pragma solidity ^0.4.17; ... I want to use its functions in my own ...
0
votes
1answer
55 views

Transfer money between contracts

I'm quite new at smart contracts/Solidity, which I'm learning for a postgraduate course. In one of the assignments, we have to implement a little competitive game (something like the game of Seven ...
0
votes
0answers
11 views

Unable to debug Mainnet transaction in Remix

I am trying to debug mainnet tx with Remix debugger and I get following error in the console after I provide the tx hash in the debugger box. Is it even possible to achieve what I'm trying to do here ...
1
vote
0answers
15 views

Remix not getting connected to local

I have been trying to connect remix to my machine and I have tried the following command: remixd -s ./contracts --remix-ide http://remix.ethereum.org Also, I have tried the https and other ...
0
votes
1answer
27 views

Why array.pop() doesn't work on my private network?

I have deployed a PoA network using Hyperledger Besu and I'm using Remix in order to code a very simple smart contract. Here is the smart contract code: // SPDX-License-Identifier: MIT pragma solidity ...
0
votes
2answers
36 views

what address(0) means? more specific where those token go?

I am trying to get balanceof an address but i dont know what i should input for address token. I looked at some other answers. One answer said the tokens send to address(0) is burn. What does that ...
0
votes
0answers
28 views

Remix contract balance transfers Failing (Metamask / JS VM)

There is an issue with my smart contract not transferring any funds to any other address on the connected ganache instance. Regardless if I choose "JavaScript VM" or connect to my Remix, the ...
0
votes
0answers
26 views

Remix IDE Ethereum is blank page on local host

After installing Remix IDE, it shows blank page! I use these command lines to install remix IDE: sudo apt install build-essential sudo npm install -g node-gyp npm install remix-ide -g remix-ide ...
0
votes
0answers
16 views

Ethereum Remix : Console trow an error: 'unexpected token: identifier'

I'm follow this tutorial to learn about smart contract on Ethereum.This is the pieces of code I already made. pragma solidity ^0.4.24; // Naming the contract contract MyContract { string value; ...
0
votes
1answer
18 views

Ethereum token not logging txs

I'm back again with another token question. If you have seen my previous posts, they have all been about merged mining and prevented eth burn, etc etc. I am in the process of creating V2 of a token I ...
0
votes
1answer
14 views

Populating struct throws error

Hi I am trying to run this code in remix. It deploys successfully but whenever I add a Customer using the addCustomer function, it shows this message "transact to MyContract.addCustomer pending ...". ...
1
vote
0answers
25 views

WWarning! Error encountered during contract execution [Bad instruction]

When I invoke toll function, it encountered "Error encountered during contract execution [Bad instruction] " warning. Who knows why? thx pragma solidity ^0.4.24; /// 使用0.4.24是为了moac链 - www.moac.io //...
0
votes
1answer
22 views

Add a new user using smart contract

I am trying to make a smart contract which can add /delete and modify users in the smart contract. I have just written the code for adding the user but I am getting an error saying "revert The ...
0
votes
0answers
49 views

How do I inject Web3 into Remix IDE?

when going on to the remix IDE, i get the error No injected Web3 provider found. Make sure your provider (e.g. MetaMask) is active and running (when recently activated you may have to reload the page)...
2
votes
1answer
42 views

Destroy smart contract and collect its funds

I'm quite new at smart contracts/Solidity, which I'm learning for a postgraduate course. In one of the assignments, we have to implement a short example of dutch auction (wiki link). Now my question ...
0
votes
0answers
17 views

Remix IDE not showing return value

Using the following code as an example: // SPDX-License-Identifier: MIT pragma solidity ^0.5.0; contract SimpleStorage { event StorageSet(string _message); uint256 public storedData; ...
0
votes
1answer
36 views

Data location can only be specified for array, struct or mapping types, but “memory” was given

I am new to solidity. I was trying to compile the following code in chrome browser with Remix. I am getting the following error "Data location can only be specified for array, struct or mapping types, ...

1
2 3 4 5
34