The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [truffle-compile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
7 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 ...
0
votes
1answer
17 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
121 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
157 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 ...
0
votes
2answers
58 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) { ...
1
vote
2answers
696 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. ...
1
vote
1answer
54 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
301 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
409 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
67 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 ...
0
votes
1answer
55 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
15 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
1answer
464 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/...
1
vote
1answer
241 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
2answers
96 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 ...
3
votes
2answers
760 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
0answers
163 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
251 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
317 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
176 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
116 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
44 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 ...
5
votes
2answers
109 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
675 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
308 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 ...
0
votes
1answer
323 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/...
0
votes
0answers
103 views

Struct Mapping: DeclarationError: Identifier not found or not unique for

Using openzepplin version 2.0.0 and solc version 0.5. I am writing an ERC721 token contract on truffle. Truffle compiles with no error on solc 0.4.23. I had to upgrade to 0.5 due to openzepplin ...
1
vote
1answer
287 views

truffle: ParserError: Expected identifier but got 'payable' address payable []array; ^-----^ Compilation failed

While compiling in truffle I got an error because of payable modifier. If I remove payable then there's no error. But I want to use payable. Can anyone please help me? error: truffle(develop)> ...
1
vote
1answer
225 views

ParserError: Expected identifier but got 'payable'

function getWinners() public onlyOwner { require (now > endQuiztime, 'Quiz did not end '); require (isReveal, "You didnt reveal Questions"); // calculate winner for each ques based on ...
0
votes
0answers
525 views

FATAL ERROR: Rebalance Allocation failed - process out of memory

So while running truffle compile for my contracts on AWS Ubuntu server I got the following error: <--- Last few GCs ---> [17055:0x3985730] 11958 ms: Scavenge 511.7 (553.4) -> 506.9 (553.4) ...
-1
votes
1answer
100 views

Problem with the compilation in the truffle framework

I made a smart contract in Remix-Solidity IDE, when I compiled it I had no errors and I was able to remove the contract but when I tried to use the truffle for my Dapp and compiled it it showed me ...
1
vote
1answer
342 views

Error parsing … ParsedContract.sol:33:18: ParserError: Expected token Semicolon got 'LParen'

When compiling my contract code in truffle I receive this error: Error parsing zeppelin-solidity/contracts/token/ERC20/StandardToken.sol: ParsedContract.sol:33:18: ParserError: Expected token ...
-2
votes
1answer
107 views

ParserError compiling Smart Contract, what's wrong?

I'm getting this error when trying to compile a contract using cmd on windows: Error parsing C:/Users/alexa/Desktop/contracts/contracts/ApprovalContract.sol: ParsedContract.sol:6:37: ParserError: ...
1
vote
0answers
65 views

Interacting with contracts on Solidity 0.4.* and Solidity 0.5.* in Truffle v5

I have a big contract (A) that is built using Solidity 0.4.25. I also want to build several contracts (B) that will talk to (A), but they will be built using Solidity 0.5.*. As I understand, I will ...
1
vote
2answers
1k 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 { ...
1
vote
2answers
2k views

How do you compile a contract that uses Open Zeppelin's Standard Token in Truffle?

Compiling is failing. vi contracts/MyCoin.sol: pragma solidity ^0.4.18; import 'zeppelin-solidity/contracts/token/ERC20/StandardToken.sol'; contract MyCoin is StandardToken { string public name =...
1
vote
1answer
236 views

Solidity 0.5 Truffle Compile Error

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 installed truffle@beta so that it can use v5. The problem I have is that ...
2
votes
1answer
1k views

truffle compile with solc 5.0.0 error: solc.compileStandard is not a function [duplicate]

Trying to use Solidity v0.5.0 with Truffle. Starting v5.0.0 Truffle allows setting solc version in truffle.js, as per its docs I tried both native compilers: { solc: { ...
1
vote
1answer
1k views

Contracts will not compile using truffle with the “emit” keyword included in front of events [duplicate]

I notice there has been changes made to solidity and that the word emit is now to be used in front of event triggers (to distinguish from functions being called). However when I include these in ...
2
votes
2answers
66 views

Working of Truffle

The following is my code in solidity pragma solidity ^0.4.2; contract DappToken { //Constructor // set no of Tokens // Read the total number of Tokens uint256 public totalSupply; ...
2
votes
2answers
774 views

'truffle compile': TypeError: Type uint256 is not implicitly convertible to expected type tuple(uint256,address)

Attempting to test this repo in Ubuntu 18.04: https://github.com/ETH-Pantheon/Aion Truffle v4.1.14 (core: 4.1.14) Solidity v0.4.24 (solc-js) Here is the main contract I've already deployed to my ...
0
votes
1answer
246 views

Pass parameters into Solidity Constructor from Truffle CONSOLE

How do we pass in constructor parameters to a contract that we want to test? I understand that the initial contract deployment occurs in the migrations file, but if, for testing/debugging purposes, we ...
1
vote
0answers
36 views

truffle can not build success

when I fllow this document step by step enter link description here,I have something wrong with my truffle build,and I delete truffle.js ,this is photo, please help thx!!
0
votes
3answers
2k views

I can't run truffle commands in powershell Ise

I am looking around for questions similar to mine but basically I cannot run any truffle commands in the powershell Ise ONLY. I can make it run on the node.js command line. example: > PS C:\Users\...
2
votes
3answers
2k views

Solidity: Conversion bytes memory to uint

Is there a workaround to convert a bytes memory to uint256?
3
votes
1answer
319 views

I'm getting an error when i have more than 3 indexed arg for an event

I want to add all the arguments for my event to be indexed event TokenPurchase( address indexed purchaser, address indexed beneficiary, uint256 indexed value, uint256 indexed amount, ...
2
votes
1answer
533 views

How to interact with smart contracts using Truffle console? [duplicate]

This is a super basic question so I apologize in advance, but I am trying to learn how to develop and deploy smart contracts and I couldn't seem to find an up to date answer on this. How do I interact ...
0
votes
0answers
55 views

Truffle contract compilation from STDIN or something like this

My contracts have some methods that used only for testing i.e. exposes some internal contract data and I do not want to deploy it to live network. for now Solidity does not supports C-style ...
0
votes
1answer
202 views

Cannot verify a particular smart contract code on Etherscan with optimization enabled

I've already deployed many smart contracts to Ropsten testnet and successfully verified them in Etherscan, but today I encountered one contract which doesn't get verified through all my attempts. This ...
4
votes
2answers
1k views

How to import a smart contract on github in a truffle contract?

I am using a smart contract that imports and uses the Oraclize contract at https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.4.sol, if in the remix editor this can be done as follows: ...