Questions tagged [visual-studio-code]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
23 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 ...
2
votes
0answers
110 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 ...
1
vote
1answer
279 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&...
0
votes
2answers
86 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( ...
2
votes
1answer
210 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.
0
votes
1answer
25 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/...
0
votes
0answers
24 views

Visual Studio different version of solidity compiler version

I have in my workspace different contracts and interfaces with different solidity pragram For that, I am set in the hardhat-config.js following: solidity: { compilers: [ { version: '...
0
votes
0answers
34 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(...
0
votes
2answers
124 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; ...
1
vote
2answers
102 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 ...
0
votes
1answer
404 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 ...
1
vote
0answers
53 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 ...
0
votes
1answer
88 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 ...
0
votes
3answers
703 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 ...
4
votes
2answers
9k 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 ...
0
votes
0answers
137 views

erc20 transfer amount exceeds allowance during transaction into nethereum

Getting error "erc20 transfer amount exceeds allowance" during transfer eth in nethereum. any solution please......... MY SOURCE CODE: public async Task<string> TransferAsync(string ...
0
votes
0answers
41 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'...
7
votes
2answers
6k 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 ...
2
votes
1answer
307 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 ...
4
votes
1answer
462 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 ...
4
votes
1answer
682 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 ...
1
vote
1answer
690 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/...
5
votes
3answers
1k 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. ...
0
votes
1answer
558 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 ...
7
votes
6answers
5k 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 ...
5
votes
2answers
2k 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 ...
11
votes
5answers
13k views

Solved: How to change Solidity linter [solc] compiler version in Visual Studio Code?

Hi may I know how to change my Solidity linter compiler version in Visual Studio Code(vscode)? OR Visual studio code how to specify solidity compiler version? The only Solidity related extensions I ...
7
votes
3answers
767 views

VS Code Syntax error when emitting events in Solidity 0.4.21

I'm having a syntax error in VS Code in the parts where I emit events using new notation for Solidity v0.4.21. Remix doesn’t raise any errors, though. My User Settings in VS Code contain "solidity....
13
votes
2answers
2k views

How can I debug a truffle JS unit test with vscode?

I am using visual studio code and truffle and would like to easily debug my JavaScript tests. A similar question has been asked here: how can I run a truffle test in a debugger?. This has been ...
1
vote
1answer
390 views

Specify Token Price

I'm pretty much new on this. But I really want to learn. I just created a contract for mintable token on Kovan test-net. But, I'm getting confused when I try to buy the token, it's always shown x000....
4
votes
2answers
5k views

How to use solidity extension for visual studio code?

I am new to Ethereum and I am using visual studio code as an editor for solidity. I wrote a simple program and save it with .sol extension. pragma solidity ^0.4.0; contract SimpleStorage { uint ...
1
vote
3answers
2k views

Syntax highlighting for Solidity VS Code extension not working on linux

Even if the extension installation completes correctly, syntax highlighting does not work.
11
votes
3answers
12k views

Visual Studio Code Ethereum tutorial

Are there any tutorials on how to use MS Visual Studio Code to write contracts in solidity?