Questions tagged [truffle-compile]

The tag has no usage guidance.

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

Problems with find a compiler version matching 0.8.13 with truffle compile

I'm very lost with this issue. I'm trying to make a dapp but when I run truffle compile I get the error that I post on title. Next I run truffle compile --list and a receive this: $ truffle compile --...
user avatar
1 vote
0 answers
20 views

Why Solidity no deterministic AST

Question: I read that why recompile all truffle The technical reason is that since Solidity does not produce deterministic ASTs, the plugins are unable to resolve references correctly if they are not ...
user avatar
1 vote
0 answers
20 views

Truffle compiles different binary than RemixIde, even with same compiler version and evm version

The code: pragma solidity <0.9.0; contract Callee { address public a; address public b; function test(uint256 i) public returns(uint256){ a=address(this); b=msg....
user avatar
  • 193
0 votes
0 answers
35 views

Truffle with weird behavior dealing with uint type of variables

I´ve spent a couple weeks try to understanding what was heppening. The same solidity code worked great in REMIX but not in Truffle/Ganache. Let´s me explain. I wrote a code bases on Openzeppelin, but ...
user avatar
0 votes
1 answer
31 views

unable to install truffle

I'm trying to install truffle on node version 8.9.0 but it shows it has been installed and when I try to do anything on that, throws this error. C:\Users\com\AppData\Roaming\nvm\v8.9.0\node_modules\...
user avatar
0 votes
0 answers
45 views

Struct memory[] memory to storage not supported yet

I started working on a this smart-contract and i'm having trouble with figuring out the solution for not being able to work with array of struct in function parameters. Here is my code.. function ...
user avatar
0 votes
1 answer
98 views

Compiler Version not Found After Downloading

When I truffle compile, it says "Error: Could not find a compiler version matching ^0.8.11". I did some research and installed solc (npm install -g solc@0.8.11), but it didn't fix the error. ...
user avatar
  • 3
0 votes
0 answers
29 views

brownie compile error

ProxyError: HTTPSConnectionPool(host='solc-bin.ethereum.org', port=443): Max retries exceeded with url: /macosx-amd64/list.json (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(...
user avatar
0 votes
1 answer
65 views

Crowdsale - Invalid implicit conversion from contract IERC20 to contract ERC20 requested

I am using ^0.8.0 version of solidity compiler and trying to add crowdsale smart contract pragma solidity ^0.8.0; import "./Crowdsale.sol"; contract MyTokenSale is Crowdsale { ...
user avatar
0 votes
0 answers
10 views

"NFT" -- Invalid number of parameters for "undefined". Got 0 expected 1! [duplicate]

Here is my NFT.sol contract //SPDX-License-Identifier: MIT pragma solidity ^0.8.4; // we will bring in the openzeppelin ERC721 NFT functionality import '@openzeppelin/contracts/token/ERC721/ERC721....
user avatar
0 votes
0 answers
65 views

Problem with the truffle compile command

I have an issue with truffle compile command, when i run it the build folder is created but it is empty, there is no abi/bytecode inside. I tried to reinstall truffle but it doesnt help. In the ...
user avatar
1 vote
0 answers
41 views

Truffle-config outputSelection is not working

I'm trying to only select the truffle compile output using the outputSelection JSON config in truffle-config.json. But when I run truffle compile --all, the build JSON files still contains everything. ...
user avatar
  • 111
0 votes
0 answers
32 views

Using real account in deploy from truffle to testnet Binance

I want to publish my smart contracts on binance's Testnet network, and start testing in my application. My question is how can I deploy to Testnet network using my metamask account? Example, when I am ...
user avatar
  • 121
1 vote
2 answers
877 views

Error with "truffle compile" - Could not find a compiler version matching

I keep getting this error: Error: Could not find a compiler version matching ^0.8.0. Please ensure you are specifying a valid version, constraint or build in the truffle config. Run `truffle compile --...
user avatar
0 votes
1 answer
82 views

Why is "Methods" Always Empty When Building Solidity Smart Contract With Truffle?

When I the ABI for any smart contract it always creates "methods" as just an empty object... it should contain my public and external functions, but it doesn't. When I look at the ABI I don'...
user avatar
  • 113
0 votes
1 answer
23 views

Unable to run truffle console

When I'm running the truffle compile cmd getting the prompt "Everything is upto date." ABIS folder is created but the corresponding file related to contacts are not there. Basically, the ...
user avatar
0 votes
0 answers
91 views

Truffle compile error. ParseError: Expected ';' but got '}'

I am trying to compile my contract but I get ParseError while compiling Migrations.sol. I got this error after running E:\blockchain-learning\hooks-truffle-ganache>truffle develop truffle(develop)&...
user avatar
0 votes
1 answer
71 views

How to fix error of compiling the smart contract: Invalid number of parameters for "undefined"?

I want to compile a simple smart contract using truffle. my smart contract SimpleStorage.sol pragma solidity >=0.4.16 <0.7.0; contract SimpleStorage { int public sensorData; constructor(...
user avatar
  • 1
0 votes
0 answers
33 views

Is it possible to compile Yul with truffle?

I have a contract written in Yul that I want to compile. It is not clear to me if this is possible with truffle. Alternatively I tried compiling it in remix and then migrating the artifact file, but ...
user avatar
  • 101
0 votes
1 answer
102 views

ERC721Burnable TypeError: Definition of base has to precede definition of derived contract

I'm getting an error due to Burnable but it's not even in my contract. @openzeppelin/contracts/token/ERC721/ERC721Burnable.sol:12:46: abstract contract ERC721Burnable is Context, ERC721 ...
user avatar
  • 175
0 votes
0 answers
98 views

In my solidity file I have a parser Error but the line where truffle tells me the error has occurred is blank

I am building out a token and while testing using truffle my file failed to compile. pragma solidity ^0.5.0; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; contract Token { ...
user avatar
  • 1
0 votes
0 answers
24 views

I'm not able to get .json files after compile (truffle react box)

I'm using truffle react kit. It is assumed that after compile command I should get my .json files of my two contracts. But That's not happening. There's no error when I'm executing compile, but those ...
user avatar
  • 141
0 votes
1 answer
197 views

Truffle Compile Fails with Error " Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition"

When running truffle compile in the root directory of my project I get the following error: ParserError: Expected pragma, import directive or contract/interface/library/struct/enum/constant/function ...
user avatar
0 votes
2 answers
2k views

Set specific compiler version in truffle but still get "Source file requires different compiler version" error

I get the "Source file requires different compiler version (current compiler is 0.8.6+commit.11564f7e.Emscripten.clang)" at the first line: pragma solidity ^0.7.0; In truffle-config.js, I ...
user avatar
0 votes
2 answers
952 views

Truffle Deployment Error: has no network configuration for its current network id (97)

I'm having an issue deploying a contract with Truffle. The contract constructor takes 7 parameters which are all within the 2_deploy_xxx.js file. However, every time I do, I get an error when I get to ...
user avatar
3 votes
2 answers
2k views

How to pass a blank bytes calldata into a solidity function call?

I have a function that looks like this: function foo(uint _someVar, bytes calldata _data) public { ... } Then I make a call to it from another function with "" as _data: foo(123, "&...
user avatar
  • 131
2 votes
1 answer
791 views

I ran into an error when using Pragma Solidity 0.4.24

I use pragma solidity 0.4.24 on the smart contract, but when running the truffle compile command, an error appears like this: =========================== > Compiling ./contracts/ImageRegister.sol &...
user avatar
0 votes
1 answer
511 views

When I run truffle compile I get a ParserError: syntax error

Error i'm getting back when I run truffle compile ParserError: Expected ';' but got 'contract' How my contract looks: pragma solidity ^0.6.0; import "@openzeppelin/contracts/token/ERC721/...
user avatar
  • 175
2 votes
0 answers
159 views

Is it possible to create a button "connect to wallet"?

I'm learning web3 and blockchain in general. I'd like to create a button that says "connect to wallet " in order to connect with metamask wallet, but I do not know if 1- I need to connect ...
user avatar
  • 51
1 vote
1 answer
544 views

Running Truffle Compiler, Babel-register missing

I fixed my truffle config file so it's working properly require('babel-register'); require('babel-polyfill'); require('dotenv'); config(); module.exports = { networks: { development : { ...
user avatar
0 votes
0 answers
22 views

Received DeclarationError when calling other contracts file name and its function

So I created 2 contracts where the first one will be the app logic contract and the other one is the database contract. So I tried to "truffle compile" my contract but receive ...
user avatar
0 votes
2 answers
111 views

Compile error on address.call

My syntax seems to be ok, so I do not understand this CompileError
user avatar
2 votes
1 answer
853 views

Slither not working with Truffle imports

Currently I have a project that needs slither run against it so I pulled down the docker image for slither as specified in the docs here https://hub.docker.com/r/trailofbits/slither/, then I shared ...
user avatar
1 vote
3 answers
2k views

Truffle artifacts are not being generated when compiling

I am new to smart contract development and I am trying to deploy my first contract. When running the truffle compile for the first time I can see that a build folder was generated on my project ...
user avatar
  • 11
1 vote
1 answer
84 views

Error: "Expected ',' but got 'memory'" in Nodejs/truffle console when trying to compile

CompileError: /C/Users/Asusupernova/Downloads/TrufflePart2/contracts/Hello.sol:8:30: ParserError: Expected ',' but got 'memory' constructor(string _name memory) public { ...
user avatar
0 votes
1 answer
464 views

truffle solc specific compiler fail

,/C/Users/juhne/ipfs-image-dapp/contracts/Migrations.sol:1:1: ParserError: Source file requires different compiler version (current compiler is 0.5.16+commit.9c3226ce.Emscripten.clang - note that ...
user avatar
  • 1
1 vote
1 answer
592 views

CompilerError: Stack too deep, try removing local variables [duplicate]

While trying to fetch more than 6 variables I am having an issue. /** * Get data based on report id */ function getData(uint256 id) public view returns ( ...
user avatar
  • 359
0 votes
0 answers
444 views

TypeError: Cannot read property '0' of undefined AND TypeError: eventAdded.watch is not a function

I'm currently trying to test run source code from GitHub based on a 2018 tutorial where solidity was using version 0.5.16. I'm currently using truffle v4.1.14. Appreciate any help. Thanks! In the ...
user avatar
4 votes
2 answers
2k views

TypeError: "send" and "transfer" are only available for objects of type "address payable", not "address"

I'm currently trying to test run source code from GitHub based on a 2018 tutorial where solidity was using version 0.5.16. I'm currently using truffle v4.1.14. I understand that there was an update ...
user avatar
0 votes
1 answer
2k views

TypeError: Operator >= not compatible with types bytes1 and int_const 37

pragma solidity ^0.5.16; library EmailRegex { struct State { bool accepts; function (byte) internal pure returns (uint) func; } function state(uint id) internal pure returns (State ...
user avatar
1 vote
1 answer
1k views

How to re-compile contracts using truffle which are updated?

I deployed something in the test-net(ropsten). Later, realized that one of my contracts needs some amendments. In such cases how to compile specific contracts and deploy only that contract using ...
user avatar
  • 359
0 votes
0 answers
127 views

Compile error. Fallback function error

I use pragma 0.6.2. I am trying copile in truffle code which contain this lines: fallback() external payable{} I an getting error: The payable fallback function is defined here. fallback() external ...
user avatar
  • 11
0 votes
1 answer
869 views

Compilation Error

Hi guys I got this error when I try to compile using truffle develop. truffle(develop)> compile Compiling your contracts... Compiling ./contracts/StarNotary.sol /mnt/d/Blockchain/...
user avatar
4 votes
1 answer
5k views

Solidity ^0.6.0 Truffle Compile Error: Cannot read property ... of undefined

I initalised a new truffle project by using truffle init. I changed the solc version to ^0.6.0 in the truffle-config.js file. I ran truffle compile and got this error: TypeError: Error parsing C:/init-...
user avatar
0 votes
1 answer
837 views

Error compiling OpenZeppelin 3.0 ERC20 using Truffle

I'm trying to compile this code using the Truffle command truffle compile pragma solidity ^0.6.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract GLDToken is ERC20 { ...
user avatar
0 votes
1 answer
240 views

Error in smart contract solidity [closed]

Hello i have some problem when i compile my smart contract with truffle i use the network of truffle develop Truffle v5.1.14-nodeLTS.0 (core: 5.1.13) Solidity - ^0.4.0 (solc-js) Node v13.1.0 Web3....
user avatar
0 votes
1 answer
564 views

mnemonic.includes in not a function

I've been trying to compile my solidity smart contracts So I'd be able to deploy them on the Ropsten Test network when I run truffle compile I get this error : TypeError: mnemonic.includes is not a ...
user avatar
0 votes
1 answer
38 views

looking for a start in solidity [duplicate]

I am totally new to the Solidity Programing. I was working on NodeJS, express and mongoDB. Few days ago I started working on blockchain. I have to write the API'S for contracts. We are using truffle ...
user avatar
  • 1
1 vote
2 answers
4k views

ParserError: Expected '{' but got reserved keyword 'override'

Can someone explain to me about this error? I just tried override feature in Solidity v0.6, but I got error Expected '{' but got reserved keyword 'override' function totalSupply() public override ...
user avatar
0 votes
1 answer
153 views

Smart Contract Deployment Failed PowerShell

A beginner smart contract developer here. This is my smart contract: pragma solidity ^0.5.16; contract Ballot { struct Voter { uint weight; bool voted; uint8 vote; ...
user avatar