Questions tagged [visual-studio-code]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

i got "Expected '(' but got identifier"

function addAdmin(address _adminAddress) public onlyAdmin { require(msg.sender == administrateur || isAdmin(msg.sender), "Vous devez être l'administrateur ou un administrateur pour appeler ...
manal's user avatar
  • 1
0 votes
0 answers
47 views

How to unistall foundry in wsl?

I got "segmentation fault" error when I tried to run "forge init" in vscode .So I want to uninstall foundry and reinstall it. But how can I unistall foundry in wsl
kumar's user avatar
  • 61
0 votes
0 answers
22 views

Error: cannot estimate gas; transaction may fail or may require manual gas limit. I cannot see which gas limit it refers

I am trying to deploy a SimpleStorage solidity contract using javascript on WSL studio and Ganache. The terminal talks about gas fees though neither my solidity code nor my javascript code talks about ...
Samuel's user avatar
  • 1
0 votes
0 answers
77 views

Solidity Visual Developer

Can someone let me know for what are those frames around the variables used for and how to turn them off. I assume I added them after installing Solidity Visual Developer plugin for VSC. There are ...
Dakata's user avatar
  • 225
1 vote
0 answers
134 views

Ethereum remix vs code extension not working

I installed ethereum remix extension on vs code today. It isn't working. When I click on remix logo on left side, two sections - Remix and Remix Plugins starts loading and after a minute, loading ...
Brihat Sharma's user avatar
1 vote
1 answer
322 views

No module named 'ethereum'

I'm trying to write a python code that uses the ethereum module. When I use visual stuidio code pip install ethereum to install the module I get the following error ERROR: Could not build wheels for ...
DC_Scooby's user avatar
2 votes
2 answers
1k views

Why isn't VS code recognizing my solidity code? my solidity files are not different colors or self correcting as if they are code

My .sol files are reading like a text file...no different colors or autofill happening. I'm using VS Code I've used several different solidity extensions but the text is not being recognized as code. ...
Derek Hall's user avatar
0 votes
0 answers
316 views

Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)

const fs = require("fs-extra"); async function main() { //http://127.0.0.1:7545 const provider = new ethers.providers.JsonRpcProvider( "http://127.0.0.1:7545" ); const ...
Suraj Sahoo's user avatar
0 votes
1 answer
291 views

VSCode Solidity Visual Developper Audit tags

I was just wondering if anyone knew of a comprehensive list of all the @audit tags available on the Consensys plugin in vscode. I know of those 4: @audit, @audit-info, @audit-ok, @audit-issue. ...
Olivier Demeaux's user avatar
1 vote
2 answers
441 views

How do I decode the bytes from an address call return?

I'm using the following to send eth to a contract using solidity 0.8.16: (bool success, bytes memory data) = payable(msg.sender).call{value:someEth}(""); I've tried to get the info from the ...
Rolan's user avatar
  • 135
1 vote
1 answer
161 views

Hardhat not installing in VSCode on Windows 10

I wanted to install Hardhat in VSCode but it's not installing. I first ran "npm init" then I ran the command "npm install --save-dev hardhat" and I keep getting this error message ...
Ololade's user avatar
  • 73
1 vote
0 answers
155 views

Smart contract in VS Code not connecting to Ethereum Test Network

Language: Solidity I wrote a smart contract in VS Code editor and wanted to test it with a MetaMask Ethereum Test Network. However, I keep getting chainId address mismatch because the contract keeps ...
Ololade's user avatar
  • 73
3 votes
1 answer
41 views

from where do we give the gas fees while deploying from vscode on a testnet?

just a quick question I was following the patrick collins course on solidity with javascript and in it, we deployed a contract created on vscode using hardhat deploy on a testnet rinkeby But since ...
Jaskaran Singh's user avatar
2 votes
1 answer
204 views

ValueError: Unknown URI

I'm following a solidity tutorial from Patrick Collins and when trying to run the following: brownie run scripts/get_weth.py --network mainnet-fork I get an error: INFO: Could not find files for the ...
Dev Ajay Mathew's user avatar
0 votes
0 answers
556 views

pip install web3 error

Below is my detailed query: When i try to import web3, solcx, & dotenv, it gives me an error saying: Import "web3" could not be resolved Import "solcx" could not be resolved ...
Ashvin Kumar's user avatar
1 vote
1 answer
103 views

How do I make sure I have enough gas for my transaction to go through. I get a value error whenever I try to deploy a contract in brownie

I am following Patrick Alphas tutorial using brownie https://youtu.be/M576WGiDBdQ . I have a fund_and_withdrawl script that has been compiled . With that, I am trying to deploy a fundme contract on a ...
Light Samus's user avatar
1 vote
1 answer
2k views

why vs code not recognizing the node version

when I install a "truffle for vs code" extension in vs code and try to create a new solidity project then nodejs version is not recognized but I have installed nodejs's correct version.
Hitesh's user avatar
  • 21
0 votes
1 answer
198 views

Cannot add JSDOC comments in .sol file in VS Code. Any help?

I have been trying to use JSDOC comments in my smart contract files (as many contracts already have), but my VS Code seems to be not picking up the structure using the usual commant of /** */ Although,...
Shubham Sharma's user avatar
0 votes
1 answer
85 views

Contract Development: How can I run an entire folder of scripts through Brownie?

I am trying to run my "deploy.py" file, and I was having trouble just deploying that at first, however, I figured that out. Is there a way that I can run every script under a certain folder ...
Gray Blanchard's user avatar
1 vote
2 answers
704 views

Override Warning Showed Up in VSCode But Compile Not Error

I have a smart contract like this // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/...
fahadh4ilyas's user avatar
3 votes
2 answers
680 views

NodeJs & Web3 having problem with VS Code IntelliSense (autocomplete)

I'm having issue with autocomplete of Web3 module members in the VS Code. As can be noticed on the screen below web3.eth. not proposing any member of the module. web3 module has been installed over ...
mattaspen's user avatar
3 votes
4 answers
3k views

Solidity Formatting In VSCode

Hello everyone! Sorry for such a trivial question but after spending all day solving a pointless task I decided to ask smarter people 😅 The problem is simple. I have a solidity extension by Juan ...
AGJoYy's user avatar
  • 416
1 vote
0 answers
293 views

Is there a tool in VScode to predict optimal amount of gas price?

On MetaMask, it shows you the optimal (estimated) gas price (and you can even tweak it). Is there a similar tool for VSCode (Visual studio code) as well? Below is the screenshot of MetaMask:
MehmedB's user avatar
  • 241
2 votes
4 answers
2k views

Problem with using OpenZeppeling contracts with Hard Hat - not found: File import callback not supported

I was writing and testing my smart contracts in Remix where I was importing some contracts from OpenZeppelin, and now I want to move it to my project in VSC. But now my VSC is screaming with an error: ...
BlackH3art's user avatar
1 vote
1 answer
247 views

Brownie "No Module named"Users"" error

I keep on getting this error, following the Freecodecamp solidity tutorial. Brownie seems to be fine when making the accounts and adding private key like seen in video, and ganache-cli is installed ...
Unreal._.N1K's user avatar
0 votes
1 answer
119 views

solc_version not working on VS Code (Mac OSX)

I tried running the code below and gave me the error message (bottom of post). with open("./SimpleStorage.sol", "r") as file: simple_storage_file = file.read() print(...
j-ananto's user avatar
0 votes
0 answers
25 views

Truffle deployment error in VS code [duplicate]

I am using Ganache and Truffle to deploy a practice smart contract from VS code. When I run: HelloWorld.deployed().then(function(instance){return instance}); in the truffle development console, I get ...
gogo's user avatar
  • 150
2 votes
0 answers
543 views

VSCode Extension for auditing solidity code [closed]

I work as an auditor in the DeFi space, which means I get to dive into other people's code quite a lot in my everyday work. I usually get to read several contracts in each project i'm working on, some ...
Mcert's user avatar
  • 21
3 votes
2 answers
1k views

Brownie / Rinkeby ValueError: Gas estimation failed: "you must set the gas limit manually"

from brownie import AdvancedCollectible, accounts, config, network from scripts.helpful_scripts import get_breed import time static_seed = 123 def main(): dev = accounts.add(config["wallets&...
Zakariae Bekri's user avatar
0 votes
2 answers
353 views

Solidity Expected '(' but got identifier

So I am working on a flash loan arbitrage in solidity and was coding the arbitrage logic when I got hit with Expected '(' but got identifier here is the code for the arbitrage function startArbitrage( ...
AngelDev's user avatar
  • 107
7 votes
4 answers
1k views

How to debug Brownie in VSCode?

How to debug Brownie program in Visual Studio Code? I suppose there should be some launch.json created but don't know which one.
Vitaly's user avatar
  • 158
1 vote
1 answer
107 views

Plugins to open deployed contract in IDE?

I can view contract code from the browser eg https://etherscan.io/address/0x8509d347caa93e7db87e0287ee51867bfcb7b9d2#code or on avax eg https://cchain.explorer.avax.network/address/...
mmdanziger's user avatar
0 votes
0 answers
68 views

Truffle : Source code in build/contracts/HelloWorld.json doesn't change after first migrate

build/contracts/HelloWorld.json line 890: "source": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.7;\r\n\r\ncontract HelloWorld{\r\n function hello() public pure returns(...
Омар Меджидов's user avatar
0 votes
2 answers
609 views

Error: *** Deployment Failed *** -- Invalid number of parameters for "undefined". Got 0 expected 1!

I am trying to deploy my smart contract. Upon deployment, I get this error message. Here is my contractToken.sol pragma solidity ^0.5.2; contract BPToken { uint256 public totalSupply; ...
Skyler Davila's user avatar
1 vote
2 answers
189 views

Getting an error even using the same compiler version (Visual Code)

I made a contract using Remix and it's working perfectly. When I create a project in Visual Code (in order to make a DApp) I'm getting this error when I import a source of Chainlink: If I compile ...
Joncarre's user avatar
  • 281
0 votes
1 answer
536 views

Create and deploy NFT collectibles ERC721 collection with smart contract

I want to start developing with Solidity in my Visual Studio Code my first ERC721 Collectible NFT collection so i installed Visuall Studio Code first, then nodejs and npm and in the end Truffles and ...
froggie's user avatar
1 vote
0 answers
98 views

What I have to do to write and copile solidity on VS code

I am new and I want to start build code in VS code. So I added solidity (by Joun Blanco) to my VS and I need something else? (i mean node and npm) I am sorry for stiupid question but I do not found ...
FryOne's user avatar
  • 11
0 votes
1 answer
144 views

Create my first ERC721 Collectible collection (VS CODE) //Need Advice

I want to start developing with Solidity in my Visual Studio Code my first ERC721 Collectible collection so i installed Visuall Studio Code first, then nodejs and npm and in the end Truffles and ...
wolfbooy's user avatar
0 votes
3 answers
987 views

Truffle Install // npm WARN and Vulnerabilities -- How i solve that issues?

I want to start working with Solidity in my Visual Studio Code so i installed Visuall Studio Code first, then nodejs and npm and in the end i try to install Truffles. -I work on Window 10 OS -Nodejs ...
wolfbooy's user avatar
5 votes
3 answers
20k views

Set up Solidity with VS Code - Beginner

I just started learning about Solidity and i want to learn more about smart contracts and all the universe about Solidity programming. So i downloaded VS Code and i installed the Solidity extension in ...
wolfbooy's user avatar
0 votes
0 answers
53 views

Please help with Parsing Expected ',' but got ';'

I have looked far and wide for a solution and have read solidity documentation. Please help me find the parsing error in the code. Thanks in advance. var KiwiCoinSale = artifacts.require('KiwiCoinSale'...
Julian Martinez's user avatar
9 votes
2 answers
12k views

How to fix Solidity version missmatch from Visual Studio Code

So I have install the Solidity extension for Visual Studio. V0.0.76 https://github.com/juanfranblanco/vscode-solidity And when I start my Solidity code with pragma solidity ^0.5.0; I get the ...
MadeInDreams's user avatar
  • 1,500
2 votes
1 answer
948 views

Visual Studio Code's Solidity extension shows unecessary warnings/errors

I am using Juan Blanco's Solidity extension for VSC. I am noticing it is showing just too many warnings everywhere, including the OpenZeppelin contracts in the node_modules folder. Is there any ...
Anshu Jalan's user avatar
4 votes
1 answer
799 views

VS code Expected identifier, got 'LParen'solc

I keep getting this error/warning on my vscode when I emit events and build constructors. or After a bit of googling I understand it is something about my compiler, since solc <0.4.18 does not ...
João Quintanilha's user avatar
5 votes
1 answer
1k views

VS Code and Solidity files have a lot of warnings

Every time I use VS Code to develop Solidity, files I have a lot of this weird warnings saying: no-trailing-whitespace: Line contains trailing whitespace I googled a bit and I understand why they ...
João Quintanilha's user avatar
1 vote
1 answer
901 views

Truffle will not compile contract written in VS code. Pragma error

I'm trying to run example from https://truffleframework.com/tutorials/pet-shop, but when I run truffle compile I get error saying Error parsing C:/WINDOWS/system32/TruffleTest/pet-shop-tutorial/...
Karlos's user avatar
  • 13
6 votes
3 answers
2k views

Error when calling the selfdistruct method in solidity

I am quite new to solidity, and I have not managed to find a solution for this problem. I am passing the function an address but it says the following: "Invalid type for argument in function call. ...
Ana Maria Naneş's user avatar
0 votes
1 answer
576 views

Data location must be "memory" for parameter in function, but none was given

I code my solidity contracts and I test in Remix Web IDE. When I test and I not get errors I copy to my project folder in my local machine. And all this errors appear in Visual Studio Code. I can ...
UnexpectedCharacter's user avatar
7 votes
7 answers
8k views

Solidity version error

I use Solidity Remix IDE for develop purpose. And when I finish I copy in VisualStudio Code and i attach to my project folder. But visual is telling me that i have a problem with the version. I can ...
UnexpectedCharacter's user avatar
6 votes
2 answers
5k views

Why use VS Code IDE instead of remix?

I've seen that during the course of tutorials I am following, the intructors have gradually shifted over to Visual Studio code rather than use remix. I could not find any such explanation as to why ...
R.D's user avatar
  • 505