Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Mint erc20 tokens

I mint 1,000,000 of tokens (MAX SUPPLY). I want that 50% of the tokens can be minting like a reward. I have to send that 500,000 tokens a wallet or i can leave it in the contract?
0
votes
1answer
7 views

How to prompt an error message when user inputs invalid argument to the public getter function

I'm new to solidity and smart contract programming. I'm currently using the online remix IDE to run my program. I want to display a error message when the user tries to ask for the value of an array ...
1
vote
1answer
12 views

Why can I not get Remix to deploy to Polygon Mainnet?

I have a contract that I have deployed to both Ropsten and Fantom Mainnet. I want to try it with Polygon. I have plenty of Matic, the contract compiles, but when I try to deploy it I get the error: ...
0
votes
1answer
10 views

ERROR: transact to Lottery.(receive) errored: VM error: revert

I have been developing a personal project and I am getting this error: transact to Lottery.(receive) errored: VM error: revert. Can someone help me? // SPDX-License-Identifier: GPL-3.0 pragma ...
1
vote
1answer
13 views

VSCode and parser not recognizing import statements

When I try to use brownie to compile my solidity code on VS Code using brownie compile, it throws an error, saying my contract should be labeled as an abstract. However, the parser is not recognizing ...
0
votes
0answers
7 views

How to use contract function to send a message to a Rinkeby blockchain?

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1....
0
votes
0answers
10 views

Executing contract in compiled code form

For certain contracts on Ethereum (example), I can connect my web3 wallet and execute functions. For others (example), I don't see this option on Etherscan -- instead there is a link to verify and ...
0
votes
1answer
21 views

How to update an array of struct?

this is my code: struct Entity{ address _address; uint data; } Entity[] entityArray; function addEntityArray(uint _data) public returns(uint){ entityArray.push(Entity((msg.sender), ...
0
votes
1answer
11 views

Create a MAX SUPPLY to Mint ERC20

I want to create an ERC20 on Solidity. I want 1000 TOKENS of MAX SUPPLY (Like the 21m of bitcoin). PERSON A: Mint to his wallet 700 Tokens. (Thats okey) Only 300 Tokens are available. PERSON B: Mint ...
0
votes
1answer
13 views

How to specify max supply ERC20

im creating an ERC20 token and i want to specify a maximium supply for my token? I want to mint 2000 tokens. 1000 of that tokens to my wallet, and leave in the contract the other 1000 tokens. Is that ...
0
votes
1answer
16 views

incrementing and transfering to Holders

Hallo guys Every time i try to sell and distrbute to Holders i get reverted transaction Hash : 0x511a62a40ac43fef117bba410bb375eb67e5ae964c29f3f2d400c04fb0a79562 the Debug shows fail in the Sell token ...
1
vote
1answer
27 views

addliquidity() function revert every time

I am having issue with Uniswap addLiquidity() function. I tried a lot of things but I didn't. Here is my code. I am trying on remix. edit: i am just trying add liquidity weth and dai not new pair. ...
0
votes
0answers
10 views

How to fix transaction reverted while selling token?

transact to FpsCrowdsale.sellTokens errored: VM error: revert. The transaction has been reverted to the initial state. Reason provided by the contract: "ERC20: transfer amount exceeds allowance&...
0
votes
0answers
17 views

The called function should be payable but I don't want it to be payable

I already checked the internet for possible solution but none could help me. I'm using Solidity ^0.8.7 Below is a function to update a ranking of addresses and is triggered by function transfer(). ...
0
votes
1answer
16 views

How can i create a token ERC20 with a customized function

I want to create a and ERC20 token with a specially function. The question is the following: PERSON A: Create 1000 example Tokens. PERSON B: Execute a function that mint 10 of that example Tokens. Im ...
0
votes
1answer
40 views

Is there a way to programmatically set gas limit?

My smart contract has a centralized web app as front end using Ethers.js to communicate (in a Flutter app). When I'm executing a function, I need to pass the gas limit. How can I know what is a good ...
2
votes
1answer
74 views

Low Level Calls in Solidity

I am a beginner to solidity and I came across this concept called "Low-Level Calls". What exactly is a Low-level function? and How is it different from others?
0
votes
2answers
29 views

Chainlink "TypeError: Immutable variables cannot be read during contract creation time..."

I have tried using @chainlink/contracts many ways (truffle, hardhat, remix). In all cases I run into an error that seems to be some bug deep inside on the chainlink library: > Compilation warnings ...
0
votes
0answers
9 views

How to bulk upload NFTs to an existing collection?

I'm planning to create a new collection contains 10000 NFTs using Remix.ethereum with smart contract. I would like to upload 1000 NFTs for the first time, then upload another 1000 NFTs a month later ...
0
votes
1answer
10 views

Invalid parameters: must provide an Ethereum address

Uncaught (in promise) {code: -32602, message: 'Invalid parameters: must provide an Ethereum address.'} (anonymous) @ index.js:64 setTimeout (async) _fireError @ index.js:63 o @ index....
1
vote
2answers
13 views

CONTRACT DEPLOYMENT [duplicate]

I am trying to deploy a contract on ETH Testnet and have been unable to get test ETher. Can anyone assist me on how to get test Ether? I've tried Goerli facucet and Metamask Faucet, all to no avail
0
votes
0answers
7 views

Is there any verified ERC1155

Hey so am looking for a verified well written ERC1155 Contract with EIP2981 for an NFT Marketplace
0
votes
0answers
5 views

"Compiler not yet loaded." in Remix IDE on Chrome Browser

Unable to load Remix IDE local Javascript VM in Chrome Browser. I somewhere read that this issue might be caused due to Adblocker but even after disabling the adblocker error still stayed the same. ...
0
votes
0answers
8 views

Can’t use transferFrom of other contract [duplicate]

I'm creating a paid membership in my contract and I'm using Binance USD as payment token. This is the method: function PayMembership(uint256 membershipID) external { require(msg.sender != address(...
1
vote
1answer
33 views

Getting a compile error every time I try to compile a contract with Brownie that includes an import statement from the web

I have a contract that starts with the following import statements: import 'https://github.com/aave/protocol-v2/blob/master/contracts/flashloan/base/FlashLoanReceiverBase.sol'; import 'https://github....
0
votes
0answers
23 views

Does anyone have a working solidity swap example for a UniSwap v2 on Ropsten in Remix?

Does anyone have a working solidity swap example for a UniSwap v2 on Ropsten in Remix? I've read these article: https://soliditydeveloper.com/uniswap2#comment-5084771054 And this post: Swap ether to ...
0
votes
1answer
14 views

HELP I have root:"REVERT opcode executed. Message: 2"

pragma solidity ^0.8.6; contract Contract1 { uint index; address owner; uint256[] values; mapping(uint => address payable) addresses; constructor() { ...
0
votes
0answers
15 views

Import existing code in Solidity, does it affect contract gas price?

I understand that import your own code in smart contract effect it's gas price (you can find more here: Import in Solidity.. Does it affect the Gas?) But what about already existing code? Let's say I'...
0
votes
0answers
17 views

buy function is not working please help

transact to FpsCrowdsale.buyTokens errored: VM error: revert. revert The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value ...
1
vote
0answers
15 views

in remix -> "Storage" -> what is the meaning of this top level key?

what is the meaning of this key? it's not a memory address of value - this is thisobject.key contract code (but it doesn't matter) // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.5.12; ...
0
votes
1answer
20 views

I cannot divide these two values together in solidity

function calculate( uint index )public view returns(uint, uint, bool){ uint avh1; uint avh2; uint avh3; uint avl1; uint avl2; uint avl3; uint allowbuy; uint ...
0
votes
1answer
30 views

TypeError: Type tuple() is not implicitly convertible to expected type uint256. userStructs[userAddress].index = userIndex.push(userAddress) - 1;

pragma solidity ^0.6.0; contract UserCrud{ struct userStruct{ uint userAge; uint index; bytes32 userName; bytes32 userEmail; } mapping(address => ...
0
votes
1answer
7 views

What is "call stack" in remix ide debugger and how it is calculated?

in remix ide (based on https://remix-ide.readthedocs.io/en/latest/tutorial_debug.html): deploy any smart contract in remix logs you -> for transaction that created a new smart contract -> click ...
0
votes
0answers
24 views

Remix: Upgradable Open Zeppelin ERC20 Token is not usable

When I deploy my token, it doesn't show the owner, doesn't change the decimals to 8, and doesn't show a symbol when accessing the public variables. // SPDX-License-Identifier: MIT pragma solidity ^0.8....
0
votes
1answer
19 views

Is there a way to check if the transactions are happening on binance smart chain network or ethereum smart chain?

I'm new to block chain development and developing a DApp on binance smart chain. In my DApp, I changed the network provider from default ethereum web provider to binance test network provider. DApp is ...
0
votes
0answers
79 views

Error: [ethjs-query] while formatting outputs from RPC, when trying to deploy Contract from remix

I get the following error when i try to deploy my smart contract on remix onto the polygon chain: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"...
1
vote
0answers
34 views

I couldn't make ERC2981 royalties work

I have implemented royalty function to my ERC721 NFT smart contract. When I deploy my contract, royalty contract is equal to my address so this way I have defined which address the royalties get ...
0
votes
1answer
4 views

Remix Unresponsive - How to recover files that were not downloaded?

So I had a lot of files saved, Remix is unresponsive and I don't want to exit the page and lose my files. What should I do? I saved it in Remix but didn't download my files after the changes I made. I ...
0
votes
1answer
26 views

How to store mapping with inline assembly?

I have a special needs, store the mapping with assembly code. thank you very for everyone who can response this question. for example: contract assemblyMappingTest{ mapping(address => uint) ...
0
votes
1answer
15 views

"Member not found or not visible" when trying to access individual struct members

I'm new to Solidity and coding in general and this code may be a disaster, but I'm learning. Basically, I'd like to get members of a struct with a function. I can return the entire struct in the form ...
0
votes
0answers
18 views

Error testing call function

I am trying to test the call function using the contracts provided in this link. Attempting on Truffle running Solidity 0.6.12 (I think this is the most recent version) I get the following errors For ...
0
votes
0answers
11 views

Error in Remix, TypeError: Operator || not compatible with types bool and address

Full source code:https://github.com/laronlineworld/RebaseDividends/blob/main/Rebasedividends.sol modifier initialDistributionLock { require(initialDistributionFinished || owner() || ...
1
vote
1answer
116 views

How to Transfer ERC20 Tokens to a contract on a function call

I created a Smart Contract, and i want that custom tokens interact with it. Example: pragma solidity >=0.7.0 <0.9.0; contract PaymentInvoiceSplit { uint productPrice; constructor (uint ...
0
votes
0answers
15 views

Insert the array into the constructor

I cloned the code from here. when I want to import the owners array into the constructor, it gives this error: ‍‍‍‍‍‍‍‍‍‍‍‍creation of MultiSigWallet errored: Error encoding arguments: Error: expected ...
0
votes
1answer
30 views

unable to input negative value in power for an int variable in remix

I want to input the following values to this function function rebase(uint256 epoch, int256 supplyDelta) epoch (5 minutes later) supplyDelta -0.000000000000001 I tried doing so in remix but got an ...
0
votes
0answers
8 views

How to make a new contract using remix with a function in which I want to get the user details from my already deployed contract on the blockchain

How to make a new smart contract using remix with a function in which I want to get the user details from my already deployed contract on the blockchain? Please be elaborate on the answer with some ...
0
votes
0answers
18 views

Can anybody tell whats wrong with my code

Can anybody tell whats wrong with my code. I am trying to call a function to get the user details from my already deployed contract and I am using interface for my new smart contract but still I am ...
0
votes
1answer
22 views

I am trying to call the other contract which is already deployed on the blockchain. But when I try compiling it with remix , it doesn't compile

I am trying to call the other contract which is already deployed on the blockchain. But when I try compiling it with remix , it doesn't compile contract Othersurround { function ...
0
votes
0answers
17 views

How do I call a function of a deployed smart contract using remix?

How do I call a function of a deployed smart contract using remix? How do I call a function of a deployed smart contract using remix? Here is the deployed contract with a call function having two ...
0
votes
1answer
19 views

How do I call a function of a deployed smart contract?

How do I call a function of a deployed smart contract? Here is the deployed contract with a call function having two input parameters - user address and email id and it returns the user details. How ...

1
2 3 4 5
46