Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [truffle-compile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
9 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
58 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
60 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
16 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
56 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
2answers
423 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
2answers
99 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
0answers
169 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
0answers
179 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
123 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
2answers
302 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
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
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
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
288 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
226 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
529 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
vote
2answers
699 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
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 ...
-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
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 ...
3
votes
2answers
763 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
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: ...
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: { ...
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 ...
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
778 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
249 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 ...
0
votes
1answer
467 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
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!!
3
votes
1answer
320 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, ...
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 { ...
2
votes
1answer
535 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 ...
2
votes
3answers
2k views

Solidity: Conversion bytes memory to uint

Is there a workaround to convert a bytes memory to uint256?
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 ...
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 ...
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 ...
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)....
1
vote
1answer
381 views

Truffle: Creating a single ABI file if contracts are in separate .sol files?

I am building a project which is divided into separate .sol files, one per contract or interface. The tutorial shows a single file cryptozombies_abi.js which appears to me to be something like the ...
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
0answers
105 views

Help on key.json file

Dears, I am getting the below error while trying to compile the contract. ~/Desktop/TstToken$ truffle compile TypeError: Cannot read property 'kdf' of undefined at Function.Wallet.fromV3 (/home/...
5
votes
1answer
437 views

Best practice for sharing truffle build files between developers

I am working on a few projects using truffle, as you know truffle compiles and migrates contracts to various ethereum networks e.g. MyContract.sol produces MyContract.json which contains a reference ...
0
votes
1answer
154 views

DeclarationError: Identifier not found or not unique when deploying a facotry contract

I am using truffle with angular to write DAPP. I have a factory contract which will deploy an other contract named rental through a function called newContract. here is my factory contract pragma ...
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
1answer
679 views

Is it OK to use the reset flag with every Truffle compile and migrate when using the TestRPC client?

I just spent a fair amount of time scratching my head trying to figure out why my truffle migration wasn't doing anything when trying to deploy to the TestRPC client. It just kept saying "using ...
1
vote
1answer
61 views

Trouble deploying Ethereum contract to live network (Truffle)

When trying to deploy to the Ethereum main net I am getting the error: Deploying Migrations... ... undefined Error encountered, bailing. Network state unknown. Review successful ...