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
41 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
64 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
16 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
10 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
8 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
9 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
77 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
85 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
23 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
43 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
20 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
16 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
25 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
57 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
13 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
119 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
27 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
388 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,"...
2
votes
0answers
146 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
10 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
46 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
25 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
27 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
13 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
521 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
1answer
44 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
24 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
21 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
36 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 ...
0
votes
1answer
18 views

How do I give access to only owner to call the function?

How do I give access to only owner to call the function? As when I try this code owner is not able to access or else both owner as well as others are able to access the function. modifier _ownerOnly(){...
0
votes
0answers
40 views

How to buy self-created ERC-20 token via simple transaction?

Pretty sure that this is something newbie, but here is the problem: I created smart contract I got initial balance using official faucet of Rinkeby network and Metamask I deployed contract using ...
2
votes
1answer
23 views

can I use the chainlink oracle somehow at v.0.8.0?

there are some functions on solidity i want to use for a project but I also need to use the chain-link oracle to get the latest price on a coin, and the chain-link oracle will only let me use it at 0....
0
votes
1answer
19 views

How do I hide specifically "private_key" from being viewed by everyone as everything is getting stored on the array publically including private_key

How do I hide specifically "private_key" from being viewed by everyone as everything is getting stored on the array publically including private_key? I want to display all the data like ...
1
vote
1answer
679 views

Why am I receiving "creation of NFT errored: Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }" in my remix.eth. code?

I am trying to publish my collection of 5,000 NFTs and I'm just about to upload them to Opensea... I just keep receiving the error in the title. I had no problem producing 1, 20, or 50 NFTs of the ...
0
votes
0answers
13 views

How to make a call function into index format to sort the users?

How to make a call function into index format to sort the users ? function getAllUsers()public view returns(User[] memory){ return registeredArray; } output- 0: tuple(address,string,string,...
0
votes
1answer
28 views

How can I add function and array to already deployed contract on the main net

How can I add function and array to already deployed contract on the main net. //Already deployed contract struct User { address wallet_address; string userId; string ...
0
votes
0answers
31 views

How to get a list of all registered user details like address, userId,firstname,last name,email id,private key that are registered through my dapp

How to get a list of all registered user details like address, userId,firstname,last name,email id,private key that are registered through my dapp. struct User { address wallet_address; ...
0
votes
0answers
7 views

How to make a function to get the entire list of users with all details like adress,userId,f name,l name,email id,private key that are registered [duplicate]

How do I make a function to get the entire list of users with all details like adress,userId,first name,last name,email id,private key that are registered on my dapp struct User { address ...
0
votes
1answer
315 views

How to fix Error: invalid address

I am trying to run the smart contract listed in the documentation here https://docs.soliditylang.org/en/v0.8.7/introduction-to-smart-contracts.html#subcurrency-example // Sends an amount of newly ...
0
votes
1answer
20 views

Supply chain contract cannot pay

I have a supply chain contract and the basic idea is: in itemManger contract: create an item where input string and uint. For example, "Iphone", 123. input 0 into item function 0: address: ...
0
votes
0answers
19 views

Simple eth sending tx won't work [duplicate]

Why doesn't this work on remix? It compiles the contract but when you execute 'f' it reverts back the tx and sends the error message. pragma solidity 0.8.7; contract Testing44{ uint256 amount = ...
0
votes
1answer
29 views

Issue with assigning arbitrary values to .call{value: msg.value}

Just learning Solidity here. I am trying to pass an receiving address, and an arbitrary amount (other than msg.value) to my transfer function, but it is just not working for me. This is the code: ...
0
votes
2answers
241 views

Remix - Create new file not working

I'm literally just trying to create a new file in remix and it is not working. Same goes for new folder. When I try to create a new file/folder the empty bar appears for me to type in and yet I cannot ...
0
votes
1answer
40 views

how do i change the price feed token from eth /usd to busd/usd with the chainlink oracle?

I am trying to get the price feed for BUSD/USD using the chainlink pricefeed oracle but it tells me that the code was reverted. this is also happening when i switch to any other token, i am using the ...
0
votes
0answers
20 views

How to take input in remix for 2D array in solidity?

My Contract code contract SomeTokenVesting { mapping(address => uint256[6]) public vestingAmounts; constructor() { // some code } function addSomeBeneficiaries(address[] ...
0
votes
1answer
212 views

Getting Error : ERC20: transfer amount exceeds allowance

contract Token is ERC20 { constructor() public ERC20('DonkeyCoin', 'DKC'){ _mint(msg.sender, uint(100 * 10 ** uint(decimals()))); } // now we can make the approve for the msg.sender the amount it ...
1
vote
1answer
92 views

when i try to upload a contract with remix i get error on gas estimate Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }

When uploading a project from remix (bsc testnet) i get this msg, Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force ...
0
votes
0answers
7 views

Is there a solidity library with Java StringBuffer like utility?

I am going to be dynamically constructing some JSON. It is a pure view function so dont care about gas cost. Still, it seems lots of string concatenation is very slow, at least in Remix. Maybe some ...

1 2
3
4 5
48