Questions tagged [truffle-compile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
12 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 { ...
0
votes
0answers
19 views

Am getting unexpected identifier error while trying to compile a simple smart contract

2_deploy_hello.js ================= C:\Users\Asusupernova\Downloads\TrufflePart2\migrations\2_deploy_hello.js:7 module exports = function(deployer) { ^^^^^^^ SyntaxError: Unexpected ...
1
vote
1answer
136 views

Can an ABI file be made from separate json files by stripping out information?

I am looking at the CryptoKitties KittyCore contract. What I notice is that there are multiple contracts within the file. (https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code)....
0
votes
2answers
168 views

Problem with smart contract deployment

I have compiled test crowdsale smart contract with inheriting from other contracts( like TestToken is MintableToken). The main smart contract consists only of one file, where I described all ...
1
vote
3answers
2k views

ParserError: Expected identifier, got 'LParen'

I am following the truffle tutorial for creating a token. I get this error when trying to compile the contract. ParserError: Expected identifier, got 'LParen' constructor () public { ...
2
votes
1answer
437 views

“Migrations” hit an invalid opcode while deploying on deploy Migrations.sol with Truffle

An error occurs when truffle migrate try to deploy Migrations.sol contract, i don't understand why pragma solidity >=0.4.21 <0.6.0; contract Migrations { address public owner; uint public ...
0
votes
1answer
25 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 ...
1
vote
1answer
16 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 ( ...
0
votes
0answers
33 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 ...
0
votes
1answer
28 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 ...
0
votes
1answer
46 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 ...
0
votes
1answer
82 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/...
2
votes
1answer
361 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-...
0
votes
1answer
63 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 ...
0
votes
1answer
38 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 ...
1
vote
1answer
223 views

what is 'UnimplementedFeatureError: Not yet implemented - FixedPointType' error?

what is 'UnimplementedFeatureError: Not yet implemented - FixedPointType' error in solidity while compiling through truffle ? How to fix it ? Using solidity compiler version - 0.5.9
1
vote
1answer
79 views

Truffle console no compile or init options

While using truffle.cmd console I tried to use the compile option, or even init. These options are not available, so I cannot compile using console. truffle(development)> .help .break Sometimes ...
1
vote
1answer
482 views

UnimplementedFeatureError: Encoding type “struct BiddingContract.Bidder memory” not yet implemented

The code is broken with the new upgrade v0.5, using Truffle v5.0.1 (core: 5.0.1) struct Bidder { address bidders_address; uint productId; uint bidValue; } struct Product { uint ...
0
votes
0answers
22 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 ...
0
votes
1answer
158 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 { ...
0
votes
1answer
40 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....
1
vote
2answers
477 views

Getting async/await to work in truffle JS tests

I see many examples are happily using async/await in their JS tests, but it looks like mine doesn't seem to be using ES8? I'm not sure how to check. I installed truffle using "npm install truffle" ...
0
votes
0answers
32 views

How to keep track of deployed versions and implement a CD strategy with truffle?

My original question on SO here didn't had much success... so I copy/paste it here, hoping for more interest. Thanks in advance! I'm working on a dapp project which includes a main smart contract, ...
1
vote
2answers
404 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 ...
0
votes
1answer
36 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 ...
0
votes
1answer
19 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 ...
0
votes
1answer
42 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; ...
0
votes
0answers
96 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 ...
1
vote
1answer
688 views

Error compiling OpenZeppelin imported contracts

I'm running a truffle project and have imported OpenZeppelin contracts. While running truffle compile I'm facing following error: github.com/OpenZeppelin/openzeppelin-solidity/contracts/crowdsale/...
4
votes
2answers
894 views

Truffle Compile with Solidity 0.5.0

I just upgraded my code to Solidity 0.5 and am trying to use the truffle framework with it. I did update my code in Remix and it does seem to work. The problem I have is that I am unable to compile ...
0
votes
2answers
659 views

ParserError: Expected identifier, got 'LParen' constructor() public {

i don't know why i get this problem, anybody who can helps thanks a lot pragma solidity ^0.4.21; contract MathContract { function mulAtoB(uint a, uint b) pure public returns(uint) { ...
0
votes
1answer
180 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 ...
1
vote
3answers
924 views

Truffle migrate no error but does not create build directory

I'm trying to develop a simple dapp using ReactJS.I used Charterhouse/truffle-create-react-app box suggested by truffle website. The problem is truffle compile and truffle migrate do not seem to work. ...
0
votes
0answers
79 views

Truffle - set or disable optimizer only for selected contracts

I have over 40 contracts in my project, for example: admin groups votings registry token In my truffle config I have optimizer enabled with 600 runs. compilers: { solc: { version: "0.5....
0
votes
1answer
149 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 ...
2
votes
1answer
825 views

Could not find __Truffle__NotFound.sol from any sources

This is the file I'm trying to compile. I've been using truffle for a few years and I remember that we used to be able to compile files with different names than the contracts inside. I'm using ...
0
votes
2answers
935 views

Truffle: Error: Could not find a compiler version matching 0.5.0

I wonder why I get the error when I have v0.5.0 everywhere and do the following: In my Action.sol: pragma solidity ^0.5.0; In Migrations.sol: pragma solidity >=0.5.0 <0.6.0; When running truffle ...
0
votes
2answers
2k views

File import callback not supported import “./IERC20.sol”;

when I try to compile my contract I see errors like this : DemirelToken.sol https://eksiup.com/p/4z49413damc3 here's the code : pragma solidity ^0.5.0; import "node_modules/openzeppelin-...
0
votes
1answer
100 views

ERC721Enumeration: DeclarationError for tokenOfOwnerByIndex(address owner, uint256 index)

I am new to the smart contract and please let me know why I have the error shown below. I compiled with the command, "truffle compile". I did not make any particular edits to the original contract ...
0
votes
1answer
143 views

ReferenceError: config is not defined [closed]

require("babel-register"); require("babel-polyfill"); require("dotenv"),config(); module.exports = { networks: { development: { host: "127.0.0.1", port: 7547, network_id: "*" ...
0
votes
2answers
508 views

Unused function parameter. Remove or comment out the variable name to silence this warning

I have a smart contact which have 2 owner address and 3 functions. my set functions is set a users with msg.sender and my getUser functions is returns name,surname and age and I want to add a admin ...
0
votes
1answer
650 views

how do i fix Expected primary expression error

Expected primary expression. j* = 10; ^ $ truffle migrate Error parsing C:\Users\Welcome\Downloads\ethereum-dapp\contracts\Integers.sol: ParsedContract.sol:29:16: ...
1
vote
1answer
409 views

Truffle “TypeError: Cannot read property 'legacyAST' of undefined”

I had just finished editing what seems like the last of my error in my contracts because truffle will get to the last contract I have to compile, hangs for a second and the does this: Compiling ./...
0
votes
0answers
347 views

Truffle.js file is not created with truffle init command

I have run the truffle init command successfully with creating the following directories and files such as contracts, migrations, test, and truffle-config.js but the one file is missing as truffle.js? ...
1
vote
1answer
457 views

Truffle compile fails: could not find file from any sources

I'm following the steps of this tutorial. I created a simple contract, TodoList.sol pragma solidity ^0.5.0; contract TodoList { uint public taskCount = 0; } Then I run truffle compile and get ...
0
votes
0answers
75 views

solc command is generating empty .bin files

Firstly, this is not an inheritance problem like in this post I have the following two files ( ManagedWallet.sol & ManagedWalletLookup.sol ) pragma solidity ^0.4.24; contract ...
7
votes
2answers
229 views

Is it safe to commit truffle build files to Github (open source)?

Regarding the json build files that Truffle produces based off of my smart contract, is it safe for this information to be treated as public? I just want to be sure it doesn't contain any sensitive ...
1
vote
1answer
718 views

Truffle Compile Error (Invalid input source specified, Compilation Failed)

When I run truffle compile, it throws the following error: Invalid input source specified.
5
votes
1answer
453 views

Using truffle migrations for seeding lots of data inside a smart contract?

I have been developing a smart contract (ERC-721 compliant) which needs to be populated with lots of various pieces of data. Approximately 300 ERC721 tokens need to be minted inside the contract at ...
1
vote
1answer
428 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/...