Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

How to implement a reentrancy attack in the English Auction in Solidity?

I implemented a solidity code for an English Auction where different accounts can bid during the specific period of time to win the nft. // SPDX-License-Identifier: MIT pragma solidity ^0.8.25; ...
Daniil Kuntsevych's user avatar
0 votes
2 answers
49 views

how to verify the minimum gas fee for deploying a contract on the mainnet?

how to verify the minimum gas fee for deploying a contract on the mainnet? my contract creation failed in Remix IDE, I choosed estimated gas fee and the process were not successfully finished, is it ...
Morty's user avatar
  • 3
0 votes
1 answer
18 views

Issue with msg.sender. Calling contract B from contract A

There is currently a published contract (contract A), I must use another(contract B) to call withdraw() from contract A. But the function withdraw() already uses msg.sender as a security check. In ...
Olivia Nicole's user avatar
0 votes
2 answers
26 views

Can I Recover a Smart Contract Written On Remix

I wrote a smart contract earlier today using Remix. I was away for a few hours, and when I came back my computer was out of battery. I've configured my browser to never save cookies, so even when I go ...
Spaghetti's user avatar
0 votes
1 answer
26 views

Why is my _transfer function transfering all my tokens to the deadWallet?

I wrote this simple contract that is designed to burn (send to deadAddress) all transfers that in which the sender of the transaction is not the LP address. I provide liqudity on uniswap and then set ...
Stavros Cotsoradis's user avatar
0 votes
1 answer
25 views

Error while calling "requestRandomWords" function while implementing Chainlink VRF mock contract on local Remix environment

I've followed this tutorial, but when I tried to call function RandomNumberConsumerV2.requestRandomWords, I got the following error: [vm]from: 0x5B3...eddC4to: RandomNumberConsumerV2....
rebwar's user avatar
  • 3
0 votes
2 answers
25 views

I can't deploy my coin on Remix IDE

I'm trying to write my first smart contract but when I try to deploy it I get this: This contract may be abstract, it may not implement an abstract parent's methods completely or it may not invoke an ...
Erdem Arif Akalin's user avatar
0 votes
1 answer
51 views

ERC721 NFT is empty in Avalanche Fuji Testnet

I am using OpenZeppelin to generate this simple contract and Remix IDE to deploy it and interact with it using Core Wallet as injected provider: // SPDX-License-Identifier: MIT // Compatible with ...
Jose Miguel Vega Lopez's user avatar
0 votes
0 answers
7 views

not able to view File Contents in Remix IDE

REMIX IDE. When I click on a File in File Explorer contents are not visible on the right hand side. attached screencapture.( infact file is not highlighted also.) thanks Uday
Udayarajan gauthaman's user avatar
0 votes
0 answers
12 views

Setting up of IPFS node to remix settings

I am not able to publish on IPFS. Getting this error - Failed to publish metadata file and sources to ipfs, please check the ipfs gateways is available. Error: HTTPError: project id required Also, it ...
Rayana Shainee's user avatar
0 votes
2 answers
43 views

"message": "Error: Transaction reverted: function returned an unexpected amount of data", ""message": "Error: Transaction reverted: funct

function createTransaction( uint256 _merchantId, uint256 _tokenAmount, address _tokenAddress ) public onlyActiveMerchants(_merchantId) { IERC20 token = IERC20(...
Anwar's user avatar
  • 51
0 votes
1 answer
25 views

Function's reverted when trying to be a middleware to receive exploited fund, return to exploited protocol and send bounty to exploiter

I'm creating a smart contract where exploiter send exploited funds to exploited protocol and automatically get a portion back as the bounty. Here's the smart contract: // SPDX-License-Identifier: SEE ...
dtnwen's user avatar
  • 33
0 votes
1 answer
31 views

Solidity Debug: Require statement reverts with no error when met, but prints error when not met

Apologies if the title is a little confusing. I'm new to programming in Solidity, and I think there's just some fundamental misunderstanding I'm having on this code, and I'm unable to fix it until I ...
Opsec Optimum's user avatar
1 vote
2 answers
33 views

Array of Structs problem and how to test in Remix - Copying of type struct ArrayTest.swapDataStruct memory[] memory to storage not yet supported

Getting this error: Copying of type struct ArrayTest.swapDataStruct memory[] memory to storage not yet supported when I try to assign a parameter to the function which is an array of structs to an ...
Ian Forsyth 's user avatar
1 vote
1 answer
21 views

Meaning of msg.sender in constructor

What is the meaning of a msg.sender in a constructor? Is it strictly the owner of a contract or any EOA account calling the contract?
Jayman's user avatar
  • 13
0 votes
2 answers
38 views

Deploy transact not payable with Remix

I can't click Deploy, even though my Metamask is connected: https://imgur.com/a/K8kEyRO My Metamask currently has 0.2497 SepoliaETh in it.
matta's user avatar
  • 17
0 votes
0 answers
12 views

Start Native address took my Ethereum instead of my Remix bot [duplicate]

After watching a youtube video on a certain ethereum bot I followed the instructions and somehow found that the money was sent to some start native address and wasn't being used by my bot. I was ...
Graham Losken's user avatar
1 vote
1 answer
23 views

How to manipulate the first few digits of a Smart Contract?

I saw some devs that can pick the few digits of their choice for their smart contract, like 0xd0d0, and I saw that some even do more than 4 digits (like 5-6 digits after 0x). Does anyone know how to ...
Andrew Manggala's user avatar
1 vote
1 answer
20 views

Solidity Contract Error: "call to SimpleStorage.people errored: invalid opcode"

I'm encountering an issue with my Solidity contract and could use some help debugging it. I have a simple contract named SimpleStorage that includes a struct People and an array people to store ...
Kuldeep Sonara's user avatar
0 votes
1 answer
36 views

selfdestruct in solidity is reinitializing the contract

Hello I am trying to solve ethernaut challenge MotorBike ,code below // SPDX-License-Identifier: MIT pragma solidity <0.7.0; import "openzeppelin-contracts-06/utils/Address.sol"; import ...
Tanaka wa Kun's user avatar
0 votes
0 answers
10 views

How to withdraw from Remix Ethereum IDE when after start narrative the Etherium was not transfered on ETH Balance? [duplicate]

Deployed contract on Remix Ethereum IDE, after starting narrative, following problem experienced ETH not reflected on balance. 0.5331354 ETH value transferred after taxation. When checked on Ether ...
Cyb Llanita's user avatar
0 votes
1 answer
19 views

Why is the function throwing an error when called from another contract but not when called independently?

I have 3 solidity contracts, main.sol, provider.sol and allowance.sol Now from main.sol, I am calling a function "Transact", which calls another function "Transact" in provider.sol ...
Shreyansh Tiwari's user avatar
1 vote
1 answer
23 views

Contract reverts at deploy when sending 2 ethers

This contract deploys fine when no value is added and get reverted when I try to send 2 ether on the remix VM.......which is exactly the opposite of what I expected or should be happening. I retraced ...
Bohn Bohn's user avatar
3 votes
1 answer
146 views

Issue with Accounts Not Displaying in Remix VM (Cancun and Shanghai) Environments

I'm encountering an issue with Remix VM where, after successful compilation, the accounts are not displaying in the "Deploy" section. This problem persists in both the Cancun and Shanghai ...
Piña's user avatar
  • 33
0 votes
2 answers
22 views

How multiplication and division works in solidity?

How is this calculated? According to solidity precedence, multiplication has precedence against division Amount= (15- 10) * 10 / 15 * (10_000 - 5_000) / 10_000; So Shouldn't it be 5 * 10 / 15 * ...
anonauditor's user avatar
0 votes
1 answer
19 views

How to determine whether code is running in a JS VM such as Remix, as opposed to ETH mainnet?

block.chainid always returns 1 for both Remix VM and ETH mainnet. There has to be some intrinsic variable that will always return a different value compared to the other environment. I'm aware I could ...
Ashraile's user avatar
  • 125
0 votes
1 answer
16 views

How to prevent division before multiplication precision loss?

In the else statement, where the Boolean is false, the amount has more than 18 decimals. In this example I used a 24 decimal amount, 123456789123456789123456. Now, it will return 123456789123456789. ...
anonauditor's user avatar
0 votes
1 answer
10 views

LearnEth sending Ether tutorial complete? Donating nothing

Today I got up to 10.3 Transactions - Sending Ether and have deployed the Charity contract of sendingEther_answer to the Sepolia testnet, but I don't understand how the amount of Eth I send through ...
ThrwWy's user avatar
  • 1
0 votes
1 answer
34 views

Can't remove the liquidity from uniswap

I deployed a contract on the blockchain that had no buy and sell function (mistake). This contract is verified by Etherscan, and I've added 0.8 ETH of liquidity that I can't withdraw because the ...
Pedro's user avatar
  • 1
0 votes
1 answer
17 views

I can't use the deploy button on remix

i wrote a test code on remix and it compiled successfully but the deploy option on remix is blurred out. why is that and how can I correct it
Lemboye Toheeb Ayomide's user avatar
1 vote
1 answer
20 views

LP contract doesn't approve

I created this contract to simulate a liquidity pool and I'm testing it with the Remix IDE. I can say it works fine, except for the function to swap tokens for ether, which is bothering me. The user ...
Integral's user avatar
  • 115
0 votes
1 answer
17 views

Adding Multiple Owners and Allowing Original Owner to Remove Other Owners

I am trying to use the existing 2_Owner.sol in Remix Ethereum and make a few modifications. Write up an addOwner() function that is public to everyone. This function takes one address as an argument ...
beginnerremix's user avatar
0 votes
1 answer
27 views

i am compiling this lottery contract but the picWinner and getPlayers are not working

// SPDX-License-Identifier: MIT pragma solidity >=0.7.0; contract lottery{ address public manager; address payable[] public players; constructor(){ manager = msg.sender; } ...
Muhammad Usman ALi's user avatar
0 votes
0 answers
31 views

Gas estimation failed - remix.ethereum.org

Why i cant deploy my contract ? it show me every time this. I am sure i do everything right. Before i try force sending but TX failed and i burn some eth... here is tx https://etherscan.io/tx/...
Lukáš Kubala's user avatar
0 votes
0 answers
9 views

Adding a custom devnet to remix

I am trying to deploy a smart contract to a new EVM Devnet with its dedicated ChainID. I've got the RPC endpoint, but when I try to add it as a custom External HTTP Provider in remix, I get an "...
GoLDs's user avatar
  • 1
0 votes
0 answers
18 views

Spillage biot in Remix [duplicate]

I had used https://tinyurl.com/bdeywjnc while creating remix slippage bot. Here is my contract created https://etherscan.io/address/0x001a3f8d6f808968bdd7bd33d8490af44d668907 But it has transferred to ...
user133710's user avatar
0 votes
0 answers
43 views

Why am I getting transaction out of gas error in remix ide for all my smart contract function?

This is my Smart Contract Code. I have tried increasing the gas limit in remix but to no avail the same error comes again // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "hardhat/...
Shreyas Keni's user avatar
1 vote
1 answer
43 views

payable(address).transfer(value) runs out of gas

I am playing the openzeppelin Ethernaut challenges. The king challenge, requires to become king and not let the other contract reclaim kingship: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0;...
Cesar Garcia's user avatar
1 vote
1 answer
19 views

Influencing/Setting tx.gasprice

I am currently trying to solve a security challenge. Thereby, as the last step in order to solve it, I have to make sure that the following require is true: modifier filter() { require(tx.gasprice ...
pekusbill's user avatar
0 votes
2 answers
25 views

Getting started with a project

I'm new to smart contract and eth development but I have a project I'm planning to start and wanted to get a guide on the tools and framework I should be using. I'm gonna be writing smart contracts in ...
Dhruv Pareek's user avatar
0 votes
1 answer
27 views

Visual Studio Code

Can I use visual studio code for the testing and debugging of my smart contact, remix doesn’t seem to work for me
user133433's user avatar
0 votes
1 answer
14 views

Wrong type of smart contract being instantiated on using new keyword

I have 2 smart contracts A and B that I have defined in the same file. B is used to instantiate A using the new keyword. However, when I try to interact on Remix with the newly instantiated contract ...
mehak's user avatar
  • 1
0 votes
1 answer
37 views

FlashLoans contract funds are being wrongly withdrawn without any action, how is this possible?

I'm new with flashloan, I'm using this code to test and everything works, however the tokens that remain in the contract after 30 to 40 minutes are "stolen", "improperly withdrawn",...
CodeLego Blockchain's user avatar
0 votes
1 answer
26 views

Getting different binary for the same Solidity source code compiling with solc and Remix

I'm noticing a difference in the binary generated using the same solc compiler in local and with Remix. Here's the source code: pragma solidity 0.8.20; contract HelloWorld {} I compiled it in local ...
quantoor's user avatar
0 votes
0 answers
10 views

Metamask not connecting with remix ide

I have created a contract in Remix IDE which is provided by zama.ai. After creating the contract I have compiled the contract successfully and connected it to metamask but when I am going to deploy ...
Ronita Adhikari's user avatar
0 votes
0 answers
23 views

General Exception, unable to get compiled [bytecode]

Hi I created a smart contract using Remix, I deployed the contract but now that I try to verify my contract on BscScan I keep getting the following error: Error! Unable to generate Contract Bytecode ...
Rockie Road's user avatar
0 votes
0 answers
12 views

Gas estimation failed in solidity leaseProperty function

i am creating smart contract for my property leasing problem all function are work good in hedera network but the leaseProperty function is getting below error and transaction is failed if we ...
Ronak Bharadiya's user avatar
0 votes
1 answer
19 views

Withdrawing funds from the contract creation address if the contract creation fails

Would like to withdraw funds from smart contract back to Meta Mask wallet, but not sure how. Contract address: 0x9766a87A6A56F8386463ba41a36065E59d855BCB Any advice? Thank you
Skamin's user avatar
  • 1
0 votes
0 answers
23 views

I imported money into etherscan but it didn’t show my real balance [duplicate]

I’m devastated. I poured over a thousand dollars into eth and decided to invest it in a contract bot. After I moved my money into the bot, it shows that I have successfully transacted the money (0....
Eth bot's user avatar
0 votes
1 answer
40 views

I am trying to make a smart contract in solidty to pool user funds and then transfer them to AAVE lending

This is my code. I am not very familiar with solidity. Currently I am just using a hard coded interest rate instead of deriving it from AAVE for testing // SPDX-License-Identifier: GPL-3.0 pragma ...
Kunal's user avatar
  • 1

1
2 3 4 5
67