Questions tagged [truffle-compile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
31 views

Problems installing truffle

I've installed truffle multiple times, uninstall and installed again, all I get is command not found npm install -g truffle npm WARN deprecated [email protected]: testrpc has been renamed to ganache-cli, ...
ByteCypher's user avatar
0 votes
0 answers
47 views

abortHandshake(this, req, `Unexpected server response: ${res.statusCode}`);

truffle migrate --network sepolia Compiling your contracts... Everything is up to date, there is nothing to compile. /mnt/c/pr0/bootcamp-completed/node_modules/ws/lib/websocket.js:542 abortHandshake(...
Soyaya's user avatar
  • 31
0 votes
0 answers
21 views

Truffle contract size limit is severely impacting the functionality of my contracts. Is there a way around this?

Basically what the title says. I have in total 4 contracts. 2 of them serve one of the rest as what I call data banks and this one is imported and acted upon by the remaining one to instantiate the ...
Devansh Gupta's user avatar
1 vote
2 answers
1k views

Facing an error while running "truffle compile"

I'm facing an error while running truffle compile- Error: Failed to fetch the Solidity compiler from the following locations: https://relay.trufflesuite.com/solc/bin/,https://solc-bin.ethereum.org/bin/...
Aryan Raj's user avatar
0 votes
1 answer
39 views

Type Error with Function

I have been following a course, and, I followed their code, somehow, when I compile my code, it gave me an error, and the course I followed didn't get an error, somebody help me please. pragma ...
Korumaq1xa's user avatar
1 vote
0 answers
80 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 ...
Zainan Victor Zhou's user avatar
2 votes
0 answers
129 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....
aj3423's user avatar
  • 251
0 votes
0 answers
59 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 ...
p3cardoso's user avatar
0 votes
1 answer
91 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\...
Prabhat Dongare's user avatar
0 votes
1 answer
368 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 [email protected]), but it didn't fix the error. ...
Josh D's user avatar
  • 3
1 vote
1 answer
226 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 { ...
Mariia Synelnyk's user avatar
1 vote
0 answers
70 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. ...
ibaralf's user avatar
  • 111
1 vote
2 answers
2k 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 --...
Naveh Mevorach's user avatar
0 votes
1 answer
142 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'...
Jim's user avatar
  • 173
0 votes
1 answer
47 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 ...
Abhishek Kochar's user avatar
0 votes
1 answer
130 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(...
Helo's user avatar
  • 1
0 votes
1 answer
175 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 ...
jalapina's user avatar
  • 195
0 votes
0 answers
166 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 { ...
Devin's user avatar
  • 1
0 votes
1 answer
304 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 ...
Conscious Nova's user avatar
1 vote
2 answers
3k 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 ...
greentriangles1's user avatar
0 votes
2 answers
1k 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 ...
architect's user avatar
5 votes
2 answers
3k 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, "&...
Danil's user avatar
  • 151
2 votes
1 answer
1k 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 &...
Adam Faturahman's user avatar
0 votes
1 answer
592 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/...
jalapina's user avatar
  • 195
2 votes
0 answers
181 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 ...
Loui's user avatar
  • 71
1 vote
1 answer
761 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 : { ...
Kaleb Amarante's user avatar
0 votes
0 answers
26 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 ...
Muhammad Raffiq Mohd Khalil's user avatar
0 votes
2 answers
149 views

Compile error on address.call

My syntax seems to be ok, so I do not understand this CompileError
HallonDev's user avatar
2 votes
3 answers
1k 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 ...
n00bC0der's user avatar
3 votes
5 answers
4k 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 ...
dhequex's user avatar
  • 31
1 vote
1 answer
102 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 { ...
HallonDev's user avatar
0 votes
1 answer
515 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 ...
david's user avatar
  • 1
1 vote
1 answer
730 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 ( ...
NinjaMAN's user avatar
  • 409
0 votes
0 answers
466 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 ...
Lionel Lim's user avatar
5 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 ...
Lionel Lim's 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 ...
Lionel Lim's user avatar
1 vote
1 answer
2k 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 ...
NinjaMAN's user avatar
  • 409
0 votes
0 answers
164 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 ...
Guest's user avatar
  • 11
0 votes
1 answer
957 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/...
Sreesankar G Warrier's user avatar
4 votes
1 answer
6k 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-...
linoleparquet's user avatar
0 votes
1 answer
882 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 { ...
linoleparquet's user avatar
0 votes
1 answer
296 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....
widad-star's user avatar
0 votes
1 answer
922 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 ...
Ali Alkhateeb's user avatar
0 votes
1 answer
40 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 ...
kallu's user avatar
  • 1
1 vote
3 answers
5k 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 ...
Al-kadafi's user avatar
0 votes
1 answer
202 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; ...
Aaryamann's user avatar
0 votes
0 answers
2k views

TypeError: Operator != not compatible with types string storage ref and int_const 0

Im using blockchain technology for the first time, for a college project. Im trying to run a smart contract from Github (in Powershell windows 10). Im unable to compile the contract due the following ...
sweet archita's user avatar
0 votes
1 answer
408 views

Im getting the following error: ParserError: Expected primary expression. struct ManagingOrder.Parking memory new_Parking = Parking({

Im using blockchain technology for the first time, for a college project. Im trying to run a smart contract from Github. After debugging the errors shown while compiling the smart contract (in ...
sweet archita's user avatar
1 vote
1 answer
2k views

Enabling truffle compile optimizer does not change the deployment gas cost

I am trying to deploy my contract by enabling the optimizer to see how much I can save from the gas costs. I am using truffle for the deployment. In truffle I enable the optimizer by the following ...
kuzdogan's user avatar
  • 617
0 votes
1 answer
633 views

truffle compile/migrate gives error: "ParserError: Expected pragma, import directive or contract/interface/library definition."

The tutorial I'm following created a 2_Migrations.sol with the following: const Token = artifacts.require("Token"); module exports = function(deployer) { deployer deploy(Token); }; "Truffle ...
NealWalters's user avatar