Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [truffle-compile]

The tag has no usage guidance.

0
votes
1answer
25 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
11 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
23 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
25 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
31 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) ...
0
votes
1answer
28 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
26 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
30 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
35 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
104 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
343 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
61 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
438 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
28 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
47 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
207 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
97 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
0answers
197 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
27 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!!
2
votes
1answer
80 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
593 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
312 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 ...
1
vote
3answers
796 views

Solidity: Conversion bytes memory to uint

Is there a workaround to convert a bytes memory to uint256?
0
votes
0answers
47 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
234 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
149 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
99 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
259 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
197 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
84 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
259 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
103 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
921 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 ...
1
vote
1answer
327 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 ...
0
votes
0answers
34 views

compile contracts while using truffle with angular4

I am using angular 4 with truffle to build an application. I know how to compile and deploy contracts before starting ng server but what i want to do is to deploy a contract on run time when user want ...
1
vote
1answer
49 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 ...
0
votes
0answers
151 views

Truffle Compile Error (Parser Error)

I run truffle compile and I get this error: ParsedContract.sol:21:1: ParserError: Expected pragma, import directive or contract/interface/library/definition. compilation failed. see above.
1
vote
1answer
233 views

Solidity Array Element Access

In Truffle's pet-shop tutorial. Adoption.sol is -- pragma solidity ^0.4.19; contract Adoption { address[16] public adopters; // Adopting a pet function adopt(uint petId) public returns (...
0
votes
0answers
195 views

Smart way to link to Truffle library files using Visual Code on Ubuntu 14.04?

I'm a veteran coder but brand new to Ethereum/Solidity. My Ethereum dev environment consists of: Ubuntu 14.04 LTS Visual Code 1.20.0 Juan DeFranco's Solidity Plugin 0.0.31 Visual Code can't find ...
1
vote
2answers
1k 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 =...
0
votes
3answers
1k 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\...
0
votes
0answers
235 views

Truffle: 'compile' is really slow - how can I execute 'test' without it?

When I execute truffle test, it rebuilds all the contracts under the target folder. This seems to take a very long time. I'd like to somehow force truffle to use the "native" Solidity compiler ...
0
votes
1answer
167 views

Oraclize code not compiling using TRUFFLE COMPIL

I am trying to compile below mentioned code (taken from Oraclize documents) using TRUFFLE but am getting compilation error saying : 'Cannot parse one.sol: Unexpected token p in JSON at position 0'. ...
1
vote
0answers
289 views

Truffle (4.0) test multiple contracts

I'm trying to test a contract that wrote and compiled, and I need to use another deployed contract to test it. I am writing a test for a specific contract and trying to invoke another deployed ...
1
vote
1answer
584 views

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

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

How Do I Compile a Smart Contract from GitHub?

Our Smart Contract developer has provided our smart contract repo via GitHub The GitHub repo has the following folders: -keys -scripts -src And these files: -.gitignore -Disclaimer.md -LICENSE -README....
1
vote
1answer
393 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
2answers
130 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 ...
4
votes
2answers
868 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: ...
1
vote
0answers
209 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 ./...