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

A little help with the Uniswap V3 flash loan arbitrage code

I'm trying to use flash loans on Uniswap V3 to trade across different pools (two of these four: 0.01%, 0.05%, 0.30%, 1.00%) I've tried running codes from multiple tutorials: https://solidity-by-...
Joseph Capozza's user avatar
0 votes
1 answer
10 views

Calling Uniswap Multihop Function returns Error

Deployed on Polygon Mumbai. Code compiles fine on REMIX and is meant to perform multihop swaps on Polygon Mumbai, but it returns error after function is called. Deployed Contract always funded with ...
Samuel Aniss's user avatar
0 votes
0 answers
14 views

Brownie Request for Random number (Mock VRF) reverts

Using chainlink tutorial and concept for testing a random request locally, Request Randomness fails to execute in brownie for VRFCoordinatorV2Mock, however, I tested the same code in remix IDE and it ...
Obanla Andrew's user avatar
0 votes
0 answers
9 views

How Remix IDE compiles smart contract code to ABI and bytecode?

I am building a DApp where user uploads his smart contract code file and his smart contract gets deployed using his private key ( After he connects his metamask account to the DApp ) . How RemixIDE is ...
Gaurav Pant's user avatar
2 votes
1 answer
28 views

Assembly 'create2' and 'new' with salt not determining the same address

Since solidity 0.8.0, we can now specify the salt for contract creation using new keyword Using 'new' bytes32 _salt = bytes32("0x4"); address addr = address(new DummyContract{salt: _salt}());...
Xirexor's user avatar
  • 127
0 votes
1 answer
16 views

How can I fetch the current dollar price of BNB in a Solidity smart contract?

How can I fetch the current dollar price of BNB in a Solidity smart contract? Are there any recommended APIs or secure, decentralized methodologies for this?Is there a way to fetch the dollar price ...
Nishant Patil's user avatar
0 votes
1 answer
10 views

How do you deal with relative imports in a contract you depend on?

Goal I am attempting to create a smart contract that uses contracts from the iden3 library. I am using the Remix IDE. Problem My issue is that the contract I need (IdentityBase.sol) has several ...
Code on the Rocks's user avatar
0 votes
1 answer
16 views

Trying to issue ERC 3475 tokens

I'm trying to issue ERC 3475 tokens from a relatively simple contract using Remix. The contract compiles and deploys when gas is optimized, but when I try to issue the tokens I get an error of "...
Xavier83's user avatar
0 votes
0 answers
18 views

Kill a smart contract where my funds are currently stuck inside

I am the owner of the contract however I didnt write it but have some funds stuck inside, when i try to withdraw or run the contract the remix IDE tells me that "Gas estimation errored with the ...
Envestor's user avatar
0 votes
1 answer
12 views

importing other contract in remix gone wrong despite write file name or path [closed]

import "./filename.sol" output Error: not found SimpleStorage.sol
Robi prem's user avatar
0 votes
0 answers
20 views

Different bytecodes when verifying contract on Etherscan Goerli for code from OpenZeppelin Wizard

I went to https://wizard.openzeppelin.com to generate an ERC20 contract and then pasted the contract on Remix and deployed on Goerli. Then, I flattened the same code and tried to verify it on Goerli ...
ratib90486's user avatar
0 votes
1 answer
39 views

Error happened while trying to execute a function inside a smart contract: Chainlink Functions Contract Deployment

Attempting to deploy this smart contract on the Mumbai Testnet. The contract deploys and it's address is 0x435daA3ba0d89A92b91174DC745D013c201fcF6a. But, when I try and press on the accept ownership ...
kixsmart's user avatar
0 votes
1 answer
31 views

ELI5: Converting an arbitrary gas cost in Remix IDE to USD

Let's say the gas (transaction) cost of a function in Remix is 139508. How would I easily convert this to USD? I know this is a totally noob question and I know better, but I can't for the life of me ...
Ashraile's user avatar
1 vote
1 answer
19 views

Do dynamic arrays in memory require a pointer to where the length and elements are stored in the memory?

At 29:07 of the video here: Devcon it is mentioned and written in the slide that dynamic arrays have pointer slot, length slot and elements after the length slot However, when I debug the following on ...
Xirexor's user avatar
  • 127
0 votes
0 answers
22 views

Can't call open trading function

So I try to call the open trading function in my code which is as follows: function openTrading() external onlyOwner() { require(!tradingOpen,"Trading is open"); ...
JumpingRoofs's user avatar
0 votes
1 answer
17 views

How signature verification works?

I have read that to sign a message we need the private key but in the below code snippet hasing is done in the 'getMessageHash' function and 'signing' is done in the 'getEthSignedMessageHash' function....
kumar's user avatar
  • 41
0 votes
0 answers
16 views

Catch Revert message [duplicate]

How to catch revert messages from another contract using call method? // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; import "hardhat/console.sol"; contract Logiccontract{ ...
user128080's user avatar
0 votes
1 answer
16 views

require message is not coming?

Im calling storage contract from logic contract, but when i change the owner to new logic contract, Line 27 : require(owner==msg.sender,"only owner can call"); This is not properly ...
sachin murali's user avatar
0 votes
0 answers
12 views

failed transaction using flash loan

I, I`m new to flash loan, while i compiled this code trying to use the flash loan but i keep getting "Gas estimation failed Gas estimation errored with the following message (see below). The ...
jose celis's user avatar
0 votes
2 answers
37 views

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Returned error: invalid opcode

Unable to deploy this code on any chain. I have done all i could, cleared my browser and restarted my pc and still could not deploy. what could be the issue please. // SPDX-License-Identifier: MIT ...
Bamu Gift's user avatar
0 votes
1 answer
55 views

Unable to deploy on Eth mainnet

i done all the steps and when im connecting to "Injected provider" its still asking to be on EVM version: shanghai. i want to deploy the CA on the mainnet.
TryingToDeploy's user avatar
0 votes
0 answers
14 views

How to add 5% buy and 5% sell fees to live-token?

I want to add 5% Sell and 5% Buy Fees to a token contract on Remix The Token is already live, so i just want to update it from 0% to 5%. But the numbers are all in uint256, what is the correct number ...
LoveAngel's user avatar
0 votes
1 answer
51 views

Why am I not able to deploy ERC721 contract to Avalanche Fuji?

// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; contract NFTERC721 is ERC721 { uint256 private _nextTokenId; ...
Gaurav Pant's user avatar
0 votes
1 answer
35 views

Trying to send Matic from one wallet to another on Mumbai but it is not sent

Below is my solidity code. I am trying to send MATIC to the "receiverAddress". Everything looks fine. I have 2.3875 MATIC in my wallet and I'm inserting 87500000000000000 as sending MATIC ...
nihilisama's user avatar
0 votes
0 answers
14 views

Issues in the ERC20 token Contract burn

I was just going through this contract and that the _balances[account] is being deducted before the require statement. Is this still correct? also there was no else and seemed like it will be ...
Priyanshu Dwivedi's user avatar
0 votes
1 answer
26 views

Trying to send matic to a wallet but Can't stake MATIC

basically what I am trying to do is create a contract that different wallets can send MATIC to one single wallet and after some time withdraw with some reward as MATIC. ie. Stake 100 matic, then ...
nihilisama's user avatar
0 votes
2 answers
37 views

Sending fix amount of ETH without manually input value in remix

I tried writing a contract so that we can send eth without inputting value manually in this field in remix. So, we just need to click the sendEth button below ( no need to input anything) The ...
tony's user avatar
  • 13
0 votes
2 answers
23 views

Funds not showing on remix contract

I set up a contract using remix, followed all the steps but when I sent funds to the contract them aren't showing I can see the transfer from my wallet on etherscan but can't see them on the contract ...
matt weeks's user avatar
0 votes
1 answer
36 views

Approve function called by an address in a smartcontract different from the token contract

I would like to know if an address can give approval to spend his tokens to another address or contract by calling the function approve in the same contract (not the token contract but another). Thank ...
biel Serrat's user avatar
0 votes
1 answer
43 views

Is Making an NFT on Binance Smart Chain on Remix currently possible? (compiler versions problem)

I'm trying to make a basic imageless NFT for Binance Smart Chain using remix.ethereum.org (for NFT identity verification purposes) but I've encountered a problem. Basically solidity version 0.8.2 or ...
Adjam's user avatar
  • 137
0 votes
0 answers
3 views

transact to VRFD20.rollDice pending

Guys whichever function i'm calling after deployment , its saying transact to be pending... what is the reason behind this , i'm not getting it
MD AZAD's user avatar
0 votes
1 answer
21 views

How to identify from where exactly the transaction got reverted while deploying and running the code in remix?

After testing a smart contract with several test cases, in some cases it reverts back and says errored: Error occured: revert. revert The transaction has been reverted to the initial state. Note: The ...
ImBatman's user avatar
0 votes
0 answers
29 views

Deploying On Remix Returned Error 32000 Gas Issue?

So i am trying to publish a smart contract using a guide. https://github.com/tanishbaansal/legendary_token/blob/main/Legendary.sol When i am trying to deploy to livenet it gives me the following error,...
Jim Mike's user avatar
0 votes
1 answer
73 views

Generic "Error" with no further message when trying to interact with ERC-4337 Entry Point from Remix IDE

I try to learn basics of ERC-4337 standard, so I deployed a simplest possible example of a contract implementing account interface on Goerli testnet - it just has one operation that changes its ...
cosiek's user avatar
  • 1
0 votes
1 answer
53 views

What is wrong with this code that it is not deploying on the testnet binance smart chain and giving me infinite gas error [duplicate]

// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; // Import the OpenZeppelin library for security. import "@openzeppelin/contracts/access/Ownable.sol"; interface IERC20Token { ...
Jaylukmann's user avatar
0 votes
1 answer
28 views

local initialization

I was working in this solidity code. here is the code sample from my project interface customeInterface { function token0() external view returns (address); function token1() external view ...
Biruk Damte's user avatar
0 votes
0 answers
12 views

Bytecode from online version of remix at https://remix.ethereum.org/ on Firefox is a string of chars

I am running solidity 0.8 contract on remix online in Firefox browser/MacOS. After compiling the contract, the byte code returned is just a huge chunk of random chars string which is completely ...
user938363's user avatar
0 votes
1 answer
30 views

Gas estimation failed while trying to deploy a smart contract on remix

I tried to deploy this solidity code on Remix // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // Import ChainlinkClient from the Chainlink library import "@chainlink/contracts/src/v0.8/...
Paschal's user avatar
0 votes
1 answer
29 views

transaction fails when i use address[] memory

i was practicing on BSC testnet and my solidity code is // SPDX-License-Identifier: MIT pragma solidity 0.8.0; interface IUniswapV2Pair { function factory() external view returns (address); ...
Biruk Damte's user avatar
0 votes
1 answer
42 views

Calling approve function of an erc-20 contract not working

I'm dealing with a problem, I hope someone can help me. token: 0x9216e1BbC58Ba2bD90c5b49524659209ccaB32Da contract: 0x8ca112e2fdFF220217609D391eec0B95d5E505a2 alumne: ...
biel Serrat's user avatar
0 votes
0 answers
50 views

Withdrawing from already deployed smart contract [duplicate]

First, I am sorry to say I have no knowledge in crypto nor coding, and in need of your help. I have followed steps on this YouTube video: https://www.youtube.com/watch?v=Vhkb9G2SyVw&ab_channel=...
Drop's user avatar
  • 1
0 votes
0 answers
19 views

Is this the correct way to add string extra string data to a solidity contract

This is my first solidity contract, it was working until I wanted to add extra data to the transaction. I'm not sure if I'm calling it wrong with webjs3 or the contract itself is flawed in some way. ...
Brian's user avatar
  • 101
0 votes
1 answer
103 views

No commission comes from buying and selling on the Goerli network

Deployed the contract on the Goerli testnet via Remix. Added liquidity with the openTrading function. I buy tokens from another wallet through Uniswap, the purchase is successful, but the commission ...
Eugene's user avatar
  • 1
0 votes
1 answer
40 views

Sign_transaction and send_raw_transaction error in Web3.py

I would like to sign_transaction and send raw transaction with custom transaction fields. But I could not do it. Any help will be appreciated. Thanks
Narayan Khatri's user avatar
0 votes
0 answers
52 views

Web3.py exception contract logic error; execution reverted: VM exception

I would like to contract the transactions to solidity compiler and got the following error; raise ContractLogicError(f"execution reverted: {message}", data=data) web3.exceptions....
Narayan Khatri's user avatar
0 votes
1 answer
14 views

How to fix invalid BigNumber string error in Solidity?

this is a simple contract. where I want to develop a function, optimizer, upon calling it will transfer an amount of eth to an address. but when I deploy it on the testnet, connect my Metamask and try ...
stofu's user avatar
  • 93
0 votes
0 answers
57 views

Send transaction failed: Error: [number-to-bn] while converting number [] to BN.js instance

error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "" . if you use an injected provider, please check ...
Dilshan Madhuranga's user avatar
0 votes
1 answer
34 views

ERC20 token with a uniswapV2 router address initialized in the constructor. I also have method to change the router address. but confused

I'm working on ERC20 token with a uniswapV2 router address initialized in the constructor. I also have method to change the router address. but I'm confused because when i create the new Pair with a ...
Hamza Shafeeq's user avatar
1 vote
1 answer
39 views

remix fund me gas estimation error

Q)Why am I getting this error ? "Gas estimation errored with the following message (see below). The transaction > execution will likely fail" -> withdraw function is showing infinite ...
shyam sharma's user avatar
0 votes
0 answers
15 views

Asking too much gas fee for transaction, Returned error: theta RPC returns an error

I have deployed my contract on theta mainnet. It was working fine for few days but now it is asking too much gas fee for transaction. I am using web3 "v1.3.1" on server side nodejs
Ilyas Khan's user avatar

1
2 3 4 5
65