Questions tagged [remix]

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

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

nested struct in solidity

Can someone help me with a nested struct , i am unable to map the nested struct my problem statement is i need to get a accept a user details name gender etc and his home address as well in a struct , ...
0
votes
0answers
6 views

Stack too deep, try removing local variables. _tOwned[sender] = _tOwned[sender].sub(tAmount);

I need help, i don't understand this Error... Code: function _transferFromExcluded(address sender, address recipient, uint256 tAmount, bool lottery, bool updateWinner) private { uint256 ...
0
votes
1answer
8 views

recive keyword in solidity

i am a beginner to solidity ,i was making a smart contract in which i wanted to send and receive ether code :- contract coin_transfer_to { function() public payable { } function get_balance() public ...
0
votes
0answers
14 views

I want to update the balance of “usersDetails” when admin enters the same address again

i want to check if user is already in my array so only update the balance of user. I would appreciate any help in this regard pragma solidity 0.5.6; contract ERC20 { /** * @dev Returns the amount of ...
0
votes
0answers
6 views
0
votes
0answers
8 views

emit Transfer error: data out-of-bounds on Remix

Newbe here. I am testing a smart contract on Remix. When I try to burn ERC20 tokens by sending them to the 0 address I get the following error transact to Ex.transfer errored: Error: data out-of-...
0
votes
1answer
11 views

Get value from multi mapping in solidity

I have this code: struct VotesInfo { string name; uint256 voteCount; bool enabled; uint256 check; } mapping(address => mapping(uint256 => VotesInfo)) private _votelist; How can ...
0
votes
0answers
11 views

Contract Created successfully but I don't receive tokens ? Bscscan testnet

I'm really sorry for the basic question. I've made some basic contracts from youtube videos, now I've tried to take contracts from BSCscan and put them through Remix on Testnet to try them, but I ...
0
votes
1answer
13 views

How to import and compile contracts of different versions solidity

How to import and compile contracts of different versions using solidity in remix? When I import a contract I get this error: ParserError: Source file requires different compiler version (current ...
0
votes
0answers
10 views

Remix crash (Error code: Out of Memory)

We're having issues with remix. It crashes on third iteration in for loop. When we try to run verify method, it successfully runs 2 iterations of for loop. However, in third iteration remix crashes. ...
1
vote
2answers
28 views

What is a nightly build in solidity? [closed]

I have received an error that says so: ParserError: Source file requires different compiler version (current compiler is 0.8.3+commit.8d00100c.Emscripten.clang) - note that nightly builds are ...
0
votes
1answer
7 views

How to Properly use “Memory” After Function Parameters

I have a question about writing functions in Solidity - I am trying to create an array of dog structs but I can't seem to get the function declaration correctly: pragma solidity ^0.5.1; contract ...
0
votes
0answers
12 views

Is Remix compiler broken? [duplicate]

I was able to use remix, an online compiler for solidity. However, I can't anymore. When I go to the website, I cant even see the files under "file explorer", it is just empty. When I click &...
0
votes
0answers
14 views

Is there any method to generate new public private key pair in solidity?

I want to generate a new ethereum account in solidity(if possible in online Ide remix) & sign transactions with the private key. In other words, I want more ethereum account apart from the default ...
0
votes
1answer
17 views

TypeError: Type String Memory is not implicitly convertable to expected type adress

I see the following error: TypeError: Type String Memory is not implicitly convertable to expected type adress while trying to execute with the following code: pragma solidity >=0.4.18 <0.5.13;...
0
votes
0answers
11 views

Simple Web3 installation and calling contracts

I have been trying to inject metamask into my site using web3. I have called web3 in my site as below and started the site using local server(VS Code extension which gives me port:5500) window....
0
votes
0answers
5 views

what is the difference between .json files and .metadata.json files in the artifacts folder in remix?

From here, I have read that: artifacts saves the ABI, binary of contract and other info related to the contract. In Remix when I open the artifacts folder I see a .json and a .metadata.json file. ...
0
votes
0answers
27 views

How to sign a smart contract deployment transaction?

I have a question related to smart contract deployment and wallets. Since I am new to the Ethereum blockchain world, I want to get an insight on how it actually works and write down what a developer ...
0
votes
1answer
16 views

Problem with smart contract's constructor instantiating another smart contract

I have the following two smart contracts in the same ".sol" file: Credentials and Proposals. Every Proposals smart contract should refer to a single Credentials smart contract, in order to ...
1
vote
1answer
91 views

Correctly compiled contract on remix returns empty ABI

I have two questions. My contract has compiled and deployed successfully both using remix and truffle. However: q1) remix returns an empty array of ABI. Also, after I hit compile the contract at the ...
0
votes
1answer
31 views

I AM Trying to connect my Website with Remix Ethereum IDE and getting Error { (index):85 Uncaught TypeError: CoursetroContract.at is not a function}

''' Document <link rel="stylesheet" type="text/css" href="main.css"> <script src="https://unpkg.com/web3@latest/dist/web3.min.js"&...
0
votes
1answer
25 views

How to deploy a Vyper smart contract? Remix fails to compile

I have been trying all the solutions and tutorials I found on the Internet, with no success. Remix fails to compile vyper smart contracts in local and remote. How to make it work?
1
vote
1answer
18 views

setting value using address.call() doesn't works

I am trying to run a setter function (testCallBar) in Caller contract which should run setVal() of Receiver contract using call method. But it does not works. testCallFoo() works as expected but ...
0
votes
2answers
32 views

Call state modifying function in view function

Is it somehow possible to do something like this? contract Test { function test (bool isTransaction) public view { if (isTransaction) { foo(); } ... } ...
1
vote
1answer
24 views

Reading out single elements from a struct of an other contract

here a shortcut from my both contracts. Is it possible to read out and change single elements(from contract B) of the struct (Contract A) ? e.g. from contract B like p.submission(_id).studentaddress ? ...
0
votes
0answers
18 views

Debugging mainnet contract [duplicate]

I'm hoping to be able to debug a main net transaction without needing to pay the gas fees to have it fail. Metamask tells me that it is going to cost 1.8 eth to run the transaction so I cant exactly ...
2
votes
1answer
47 views

Remix IDE File Explorers is missing

I have no idea what happened, but all of a sudden, the file explorers in remix ide is gone. I tried all I can to recover it, including restarting it, switching back and forth between new and old ...
0
votes
1answer
13 views

DeclarationError: Undeclared identifier issue

Can't figure out this error. Please help! "DeclarationError: Undeclared identifier. (bool success, ) = recipient.call; value; amount ;(""); ^---^" function sendValue(address ...
0
votes
0answers
10 views

what will be the auction end time value? [duplicate]

what should be the auction end time value like I entered bidding time value? I had never entered anything over there if manually I have to do then how should I do it?
0
votes
0answers
15 views

How to change deposit eligible token to other token?

I forked a smart contract from Github. Check it here. The contract mints "WETH" after a user deposits "ETH" and vice-versa. But I am unable to change the "ETH" to any ...
2
votes
2answers
210 views

invalid arrayify value while using bytes32 array

Since we cannot pass string arrays as parameters in solidity I used a byte32 array in a function. The code gives no error at compile time. But when I give input to the drawCard function as below in ...
0
votes
0answers
6 views

Why would Web3 return an empty array after calling the solidity function

So I want to interact with my Smart Contract from remix with python library called Web3. The problem is when I try to call the function from the smart contract it runs successfully but it only returns ...
1
vote
1answer
21 views

Structs giving error while creating nft on ropsten

I am trying to create 10 random nfts with different supplies using solidity version 6 and remix ide. However I keep getting the following errors: contracts/bullrun_cards.sol:29:16: TypeError: Type ...
0
votes
0answers
18 views

Remix IDE Waring for “Required Compiler Version”

I am well versed with solidity and often use Remix IDE. Quite recently, despite adding a compiler version in my code. I am still getting this warning Warning: Source file does not specify required ...
0
votes
1answer
23 views

Funding contract with LINK tokens revert error

When I try creating a Chainlink contract from "master contract" and fund it with LINK, I keep getting the error: "VM error: revert. revert The transaction has been reverted to the ...
0
votes
0answers
13 views

ERC-1155 safeTransferFrom() issue: contract doesn't have permission to send tokens from itself

I have a function in an ERC1155 contract that looks like this: function foo(uint _id, uint _amm) external{ safeTransferFrom(address(this), msg.sender, _id, _amm, ""); } Assume the ...
0
votes
1answer
19 views

Can not verify source code on Etherscan (ERC721 contract)?

pragma solidity ^0.7.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.4/contracts/token/ERC721/ERC721.sol"; import "https://github.com/OpenZeppelin/...
1
vote
1answer
29 views

Compilation Error while using ChainLink

I am using Remix IDE for my smart contract development. I am using the following import line import "https://github.com/smartcontractkit/chainlink/blob/develop/evm-contracts/src/v0.6/...
0
votes
0answers
8 views

Require messages on Remix or a similar tool

Our team is using Remix for a long time for the first exploratory tests or to call administrative methods (that we do not have specific UI). I remember that some time ago I saw the messages that we ...
0
votes
0answers
21 views

Calling function does not work

So this is for avax network and there is pangolin dex it's the same as uniswap and I just want to call a function to get pair. pragma solidity 0.7.1; interface IPangolinFactory { event PairCreated(...
0
votes
0answers
24 views

How do i use pangolin dex intefaces [closed]

Im trying to execute functions from pangolin dex smart contracts but how do I do it here are Factory address: 0xefa94DE7a4656D787667C749f7E1223D71E9FD88 Router address: ...
0
votes
0answers
27 views

How do I access data in another contract/node?

I have two contracts - Data.sol and Buy.sol. Data.sol contains information on products, etc. I want to use Buy.sol to get and update data in Data.sol, somewhat like having a database. I know this can ...
0
votes
1answer
11 views

Remix IDE: Problem with Executing set method

I have created a contract and trying to run the contract on the Remix IDE. Following is the code of my contract: pragma solidity 0.5.9; contract MyContract{ uint256 peopleCount; struct ...
1
vote
1answer
18 views

Derived contract not selected by defaut on remix

I have two simple contracts, a base one (BaseClass.sol): // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.0; abstract contract BaseContract { address private immutable wallet; ...
1
vote
1answer
20 views

compile contract success but some function don't work once it's deployed

I tried to modify someone works that I found in stackexchange for learning reference. I was going to make shoppinglist contract, it could be compiled but when I deployed the contract, getitemcount, ...
0
votes
1answer
24 views

Solidity Undeclared identifier. s not (or not yet) visible at this point. but it is

I'm making if else function and if price == stopOrder it should do executeOrder but it's giving me error function sellLogic() public { require(StopOrder != 0 || LimitOrder != 0, "stop ...
2
votes
2answers
30 views

How can I multiply a fixed decimal var by a uint in solidity?

In base to this example: Dealing with multiplying fractions in solidity I am adding th DSMath correctly. I can operate and compile with integers but if I try to compile a contract with any decimal ...
0
votes
1answer
15 views

Solidity if else 2 things how to

So I got an if-else statement if the price of eth is the same as stop order sell will be = to true, but I also want to do if the price is same or bigger then limit also sell = true. If price under ...
1
vote
1answer
12 views

“{” error in remix ide [closed]

Please help. I don't get what the following error means: "browser/DGC1.sol:102:1: ParserError: Expected pragma, import directive or contract/interface/library/struct/enum definition. {contract ...
0
votes
1answer
22 views

Is it possible to display numbers as hex in Remix?

I'm using a fixed-point math library that works with binary numbers, so values like 0x10000000000000000 are assumed to be 1. I implemented a function that raises a given number to a given power. ...

1
2 3 4 5
39