7 votes
Accepted

VS code Expected identifier, got 'LParen'solc

I have had a similar error, then I realized the culprit in this case was in fact a malfunctioning VS Code plugin not Solidity nor truffle. Please check your plugins list in VS Code and see if one of ...
user avatar
3 votes

Warning: Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable

The function is declared as returning a address[] memory, but the code doesn't return anything. If you want to return airlineVotes[newAirline] use the return. function addAirlineVotes(address ...
user avatar
  • 29.5k
3 votes
Accepted

Remix Warning - No visibility specified, Violate Checks-Effects-Interaction pattern, Function state mutability can be restricted to pure - Can ignore?

In general You can let the code run, ignoring the compiler warnings, but it's always good not to do so. Most of the time, compiler warnings are warning you about something that may cause a bug in your ...
user avatar
3 votes

Remix Warning: Function state mutability can be restricted to pure

View can be used to with a function that does not modify the state but reads state variables. Pure should be used with functions that neither modify state nor read ( access) state variables. They ...
user avatar
3 votes
Accepted

Yellow flags, simple replacement?

Change function Owned() public { //.... } to constructor() public { /... } And Change all Transfer(msg.sender, to, tokens); to emit Transfer(msg.sender, to, tokens); and Approval(...
user avatar
2 votes
Accepted

VS Code and Solidity files have a lot of warnings

The reason they exist is because you are using the VS Code Solidity extension. One feature of this extension is that it enables Solium (now Ethlint). This is a linter that checks your code for errors ...
user avatar
1 vote

compilerMetadata is modifying/artifacts/NAME_OF_CONTRACT.json

It's better to UNCHECK the Generate contract metadata. from the setting as @Akrramo mentioned otherwise if you UNCHECK the Auto compile then you have to compile the code every time you do some ...
user avatar
1 vote

Duplicate contract name

Change the name of the interface from A to something else.
user avatar
  • 812
1 vote

Remix Warning - No visibility specified, Violate Checks-Effects-Interaction pattern, Function state mutability can be restricted to pure - Can ignore?

browser/TestContract 8.sol:100:3 Warning: Function state mutability can be restricted to pure Answer: Functions can be declared pure in which case they promise not to read from or modify the state. ....
user avatar
1 vote

Remix Warning: Function state mutability can be restricted to pure

They're not the same. view functions have read-only access permission on state variables. pure functions do not. Those functions that you mention can all be declared pure. Side note: this library ...
user avatar
1 vote

Static Analysis raised 9 warning(s) that requires your attention. Click here to show the warning(s)

Yes. You should be able to run the smart contract since these are just warnings. Although they should be addressed at some point in the future. In addition, it would be helpful to post a link to the ...
user avatar
  • 463
1 vote

Why does this trivial function has "Gas requirement high: infinite"?

Leave default parameters in remix for Gaslimit and wei - dont touch it. Set it in MetaMask. It`s helped me, since I had same issue.
user avatar
  • 11
1 vote

Initializing full array warning

The size of the array you are trying to initialize is extremely big (1.1579209e+77 registers of 256 bits each one!!!!). If you do not know the maximum size you will require, just use dynamic arrays or ...
user avatar
  • 7,885

Only top scored, non community-wiki answers of a minimum length are eligible