Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
32 views

ERC20 token smart contract check

I wrote a ERC20 token smart contract that I did not find any problems in my tests and reviews, honestly, I would like you to help me check this code and tell me its possible problems in terms of ...
Ali's user avatar
  • 51
0 votes
1 answer
15 views

How to find a variable declaration in an AST object

I'm using Javascript, and I have a Solidity AST object. Is there a library or an example out there to easily find if a text string (variable/function/mapping/struct etc declaration) exists and return ...
Salman Fazal's user avatar
1 vote
1 answer
33 views

how come loading the funcSig from data isn't enough, you have to shift it also to use it in the rest of the code/function

basically we have this function function FlaggedMethods( bytes memory data ) public returns (address) { bytes4 funcSig; assembly { // Shift right by 224 bits ...
owl's user avatar
  • 13
0 votes
2 answers
48 views

provide steps to deploy this contract from solidity by example

When i tried deploying this contract using 10 ethers, and then providing : claimPayment() -> amount - 9000000000000000000 i.e 9 ethers -> nonce - 123 -> signature - ...
ImBatman's user avatar
0 votes
0 answers
9 views

org.web3j.protocol.exceptions.TransactionException: Transaction receipt was not generated after 600 seconds

Yesterday I could deploy the code successfully, but today onwards I am facing the below error. I tried to reduce/increase the gas fees yet the error is still not resolved. If anyone is willing to ...
Selva Kumar's user avatar
0 votes
1 answer
21 views

Getting Error in the code ParserError: Function, variable, struct or modifier declaration expected

pragma solidity >= 0.8.2 <0.9.0; contract Types {  // Declaring a dynamic array uint[] data;  uint8 j = 0; function loop() public returns(uint[] memory){ while(j < 5) { j++; data.push(j); } ...
Moody's user avatar
  • 111
0 votes
1 answer
22 views

Smart contract deployment pending forever

I have a smart contract that is compiled and deployed using Remix and verified on Sepolia testnet. https://sepolia.etherscan.io/verifyContract-solc?a=0xA3Bc4ac115CF4C57b507797731F43c14Ff6A2A6c&c=...
pigfox's user avatar
  • 213
0 votes
1 answer
15 views

Unable to change the storage using Delegate call

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Preservation { // public library contracts address public timeZone1Library; address public timeZone2Library; address public ...
kumar's user avatar
  • 3
0 votes
1 answer
12 views

How to change the storage using Delegate call

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Preservation { // public library contracts address public timeZone1Library; address public timeZone2Library; address public ...
kumar's user avatar
  • 3
0 votes
1 answer
17 views

How to give allowance to a contract and send erc20 between accounts

I wrote the following contract: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract enviaToken { address public ...
CaioBonani's user avatar
1 vote
1 answer
25 views

Creating a uniswap V1 pool and Interracting with it

I have the project of making some educational content on the history of AMMs and to do so I’m trying to interact with Uniswap V1 contracts on Goerli. I’m quite new to all that (this exercise is also ...
toto_story's user avatar
0 votes
1 answer
16 views

Is it secure to use multiple admin

im trying to do multiple admin system in my solidity and here is example //SPDX-License-Identif`ier: MIT pragma solidity 0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; ...
Mert Tanıtan's user avatar
1 vote
1 answer
13 views

remix.ethereum.org - you cannot test payable methods

I am using: https://remix.ethereum.org contract: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Receiver { receive() external payable {} function getMoney() public payable ...
Harry's user avatar
  • 11
0 votes
0 answers
4 views

Remix offline/online freezes and goes blank when TX of a test contract being debugged with a test function having an unammed calldata array parameter

A test contract deployed: // SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "hardhat/console.sol"; contract Workdesk { function calldataCheck(uint256[] calldata) external { ...
Xirexor's user avatar
  • 81
0 votes
1 answer
21 views

MetaMask - failed transaction, maximum gas rate suggested is to low

I recently bought a code for a coin flip game and I have been modifying it while I learn to program. I have reached the point of launching the website but when I play and approve the transaction I ...
VelasTiger's user avatar
0 votes
0 answers
6 views

Remixd local host instance not Working!

I am trying to run remixd in the terminal, and it first initially looks for open ports and I am able to connect to my local host, but after a few moments it shuts down because of some restrictions on ...
John Daison's user avatar
0 votes
0 answers
11 views

How to find issue with a bare bone token bridge

Basically, I want to setup a very simple token bridge try to bridge some custom tokens between BSC testnet & Goerli testnet. For BSC testnet, I created 2 solidity code: TokenBSC.sol & ...
Yong Dong Zhang's user avatar
0 votes
1 answer
29 views

I cant verify my contract. It is very basic code

I cant verify my contract. It is very basic code. I cant understand why. https://i.stack.imgur.com/tBEUl.jpg
user125862's user avatar
0 votes
0 answers
17 views

Can someone help me fix the what I'm missing in my Remix Contract

This is the error that I'm having trouble with: Error! Unable to generate Contract Bytecode and ABI (General Exception, unable to get compiled [bytecode]) Also says that it's looking for a Bytecode: (...
drekerm 's user avatar
2 votes
1 answer
22 views

Invoking a function with different amount of input than the function takes

function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b,...
Harsh Dhankhar's user avatar
1 vote
0 answers
11 views

Why EVM does CALLDATALOAD and MSTORE an array parameter and its elements individually instead of CALLDATACOPY all of it?

I debugged a simple function execution on Remix: function megaTest(uint256[] memory p) external pure returns(uint256[] memory r) {} What I noticed is that CALLDATALOAD and MSTORE were used to copy ...
Xirexor's user avatar
  • 81
0 votes
2 answers
43 views

Error: gas required exceeds allowance or always failing transaction in Remix

Im trying to deploy my NFT contract and works fine but only if i mint less then 1000 nfts. When i tried to raise up to 2000, 5000, 8000 and even 10000 i got the gas exceeds allowance error. Can some ...
kauan's user avatar
  • 1
3 votes
1 answer
31 views

If returning string via assembly requires pointer, length and data in memory, why there is no pointer in memory when returning using return keyword?

1- Solidity: function name() external view returns(string memory) { return _name; // No pointer slot } 2- Assembly: function name() external view returns(string memory) { ...
Xirexor's user avatar
  • 81
0 votes
2 answers
18 views

What are the standard solutions to enable new users to interact with a DApp contract for free without gas fees?

I'm developing a decentralized application (Dapp) where new users receive a free NFT upon registration. I want to allow these users to list their NFTs for sale without requiring them to have any ...
kat N's user avatar
  • 1
0 votes
1 answer
31 views

.call{}() in solidity

This is a Smart Contract written in solidity, compiled and deployed in remix // SPDX-License-Identifier: MIT OR Apache 2.0 pragma solidity ^0.8.8; contract Payable{ // payable address can send ...
Nitesh Modi's user avatar
2 votes
2 answers
62 views

Uniswap V3 GetAmountsOut to view-only, StaticCall

I am currently trying to perform a low-level call in Solidity using staticcall to invoke a function in another contract. My code looks like this: solidity struct QuoteExactInputSingleParams { ...
R4C0N's user avatar
  • 21
0 votes
1 answer
24 views

Trying to access the retrieve method from deployed smart contract but not able to using ether.js

Above is the the error I'm getting when trying to access the retrieve method from the smart contract I've written although I'm able to get the contract object which means I've connected to the ...
Prakhar Srivastava's user avatar
2 votes
1 answer
27 views

What's Wrong With My Polygon Mainnet Aave Flashloan Script? - Fail with error '27' & Fail with error 'ERC20: transfer amount exceeds balance'

I have successfully deployed and executed a flashloan on the Polygon network in testnet and have since adapted it for mainnet. On Mainnet it compiles and gets deployed with no problem, but when I ...
Peter's user avatar
  • 23
1 vote
1 answer
25 views

Is it possible to batch-call the function multiple times so it's executed asynchronously and make profit from that?

If an attacker batch-calls the vulnerable contract's function in a re-entrancy attack attempt, would the transaction with a CEI pattern violation be fully executed before the other transactions are ...
Mila A's user avatar
  • 202
1 vote
1 answer
18 views

Can someone tell me you to pass an array argument to external function in assembly/yul?

So far I have tried this: function swapEthForToken( address router, uint256 minAmount, address _tokenIn, address _tokenOut ) public payable { assembly { ...
Mehul Singh Rathore's user avatar
1 vote
0 answers
32 views

How to merge two arrays, and remove the duplicated elements sametime with solidity?

// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; contract BatchData { function getArray1() internal view returns (address[] memory) { address[] memory arr = new address[](3); arr[0] ...
Noldorin Zhang's user avatar
0 votes
0 answers
18 views

code is correct on Remix but can not run on local,

I am testing a time dependency question while I don't know why the code can be run successfully on Remix but the error alert is File "/opt/homebrew/lib/python3.11/site-packages/web3/_utils/...
Zoey Zou's user avatar
0 votes
0 answers
25 views

Hello, Can you help me for issue? (ETH CONTRACT DEPLOY)

I am learning to deploy contracts to improve myself. I copied a contract that was actually deployed and deployed it on the Goerli testnet. However, I have these parts and I wonder why. It has an ...
BluePlanet's user avatar
0 votes
1 answer
27 views

ethers.js contract function calls keep failing

I am trying out my first Solidity project; a todo app. I have worked on the smart contract using remix and tested all its functions, which work as intended. I worked on my frontend and connected it ...
Irom Ibe's user avatar
1 vote
0 answers
26 views

Reverted when adding another logic in Uniswap swap functions

I have been learning how to use Uniswap V2 recently and am trying to add logic on top of the original code. I want to have a fee of 1% on each swap transaction using the input token. I was ...
rasyidred's user avatar
1 vote
1 answer
60 views

how to verify a contract on etherscan?

thank you for your answers, but I think I'm still missing something, I don't know where to look for the elements that I don't like? does anyone have a solution please? I try with CONTRACT VERIFICATION ...
Bryce De Nyce's user avatar
1 vote
1 answer
16 views

Simple operation causes Remix gas estimate to become infinite [duplicate]

Completely new to using Remix (first few hours of using it) but confused by this behaviour. In the simple code example below using Remix, why does an operation as simple as incrementing a uint256 (...
cryptophile's user avatar
1 vote
1 answer
24 views

Why does deploying programatically through nodejs cost more than deploying through remix?

I've written code to deploy contracts programatically. However when I set the same settings as remix ("gas price, gas limit, etc). The transaction mines but I get the error: Warning! Error ...
learningAsIGo's user avatar
0 votes
1 answer
33 views

Can I modify a smart contract's code? [duplicate]

I get scammed big time, not proud! The worst? I can see the ETH on a watched only account. I think there's not really withdraw function at all in the code. Can I modify it to withdraw the funds and ...
Lucie Maheux's user avatar
0 votes
1 answer
20 views

Gas Estimation Error during deploy a smart contract using remix IDE with Injected Provider (Metamask)

When I try to deploy this smart contract address Using Remix IDE with Injected Provider Metamask wallet (Polygon Mumbai testnet) //SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; import &...
Faisal Hussain's user avatar
1 vote
1 answer
23 views

Smart Contract Working in Remix Testnet but Reverting Transactions in DApp with Metamask

Question: I'm encountering a perplexing issue with my smart contract that's causing transactions to be reverted when interacting with it through a DApp using web3.js and Metamask. Strangely, the same ...
adi farhan's user avatar
1 vote
2 answers
49 views

Why i get evm revert error when calling the method from dapp front end (web3js & metamask)??? but my contract works fine on remix and bscscan

I've created a smartcontract & deployed on bsc testnet. For the past 8 weeks, i have been upgrading and testing the contract on remix and website and they always works fine. I can mint on remix ...
adi farhan's user avatar
1 vote
2 answers
38 views

Remix IDE - CompilerError: Stack too deep

I'm learning solidity language with Remix IDE using my phone then I encountered an error message like this: CompilerError: Stack too deep. Try compiling with --via-ir (cli) or the equivalent viaIR: ...
Cimiwce's user avatar
  • 11
0 votes
1 answer
33 views

Using getter function in require statement is resulting in an error

I am using Remix ide to deploy the contract, Order of deployment is Test1 ===> Test2(address of Test1), Amount send for the function in Test2 contract is 1 Ether I am getting an error while ...
Swastik Majhi's user avatar
2 votes
0 answers
32 views

I can't deploy contract on eth mainnet

I have deployed this code on many different chains with success except for ETH mainnet and Sepolia. return error: Transaction mined but execution failed https://github.com/lamxoan92/ct/blob/main/a.sol
Nguyễn Lâm's user avatar
0 votes
0 answers
21 views

Flash loan on Pancakeswap utilizing equalizer.finance provider

I'm trying to write a smart contract on Remix-Ethereum IDE to do a Flash loan on Pancakeswap utilizing equalizer.finance provider. the smart contract function is to borrow token1 swap token1 with ...
ASG's user avatar
  • 1
0 votes
1 answer
18 views

I am trying to replicate a deployed contract but it doesn't work for me. I want to learn to please tell me what I am doing wrong. Goerli lets me do it

contract : https://codeshare.io/BA1yqK The error : Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Returned ...
newDev's user avatar
  • 1
1 vote
1 answer
36 views

Creating an ICO contract

I'm creating a simple ICO contract, it sends the amount of the token bought to the buyer as soon as the contract receives ether, and then sends the received ether to a different wallet, I've been ...
Santos's user avatar
  • 17
3 votes
0 answers
35 views

Implementing Verkle Trees in Solidity, Generating Proofs, and Using Zokrates

I'm working on implementing Verkle Trees and looking for guidance on how to implement Verkle Trees in Solidity. I have a working python code with implementation of verkle trees, proof generation and ...
Shrigouri's user avatar
1 vote
1 answer
18 views

Hardhat compile code on file change (like remix)

Is there any way (preferably an official Hardhat plugin) to automatically compile the Smart Contracts' code on file change? I'd want to have the same developer experience as when using Remix, or ...
Alexander Herranz's user avatar

1
2 3 4 5
65