Questions tagged [truffle-compile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
2answers
94 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 ...
5
votes
1answer
424 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 ...
5
votes
1answer
297 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 ...
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: ...
3
votes
2answers
754 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 ...
2
votes
3answers
1k views

Solidity: Conversion bytes memory to uint

Is there a workaround to convert a bytes memory to uint256?
2
votes
1answer
651 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 ...
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: { ...
2
votes
1answer
295 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
2answers
65 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
738 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 ...
2
votes
1answer
518 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
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 ...
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
672 views

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

When I run truffle compile, it throws the following error: Invalid input source specified.
1
vote
1answer
34 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 ...
1
vote
1answer
230 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 ...
1
vote
1answer
335 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 (...
1
vote
1answer
457 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" ...
1
vote
1answer
656 views

Truffle Compile on Windows “Could not find a suitable configuration file” [duplicate]

I am trying to do a simple Truffle Compile on window 10 using git bash but i keep getting "Could not find a suitable configuration file" I have tried "Truffle Compile" after running truffle init. I ...
1
vote
1answer
556 views

failure to verify truffle compiled contract on ropsten.etherscan.io

Recently just pushed my first smart contract from truffle to the ropsten testnet. As you can see from my terminal output below it compiles and was migrated with no problem: Was broadcast to the ...
1
vote
1answer
93 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 ...
1
vote
1answer
275 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
211 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 ...
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
1answer
368 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 ...
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 ...
1
vote
1answer
311 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 ./...
1
vote
1answer
226 views

Error on Truffle console - “missing ) after argument list”

while declaring a variable in truffle console error popped up. Code:- var ss undefined truffle(development)> ScoreStore.deployed().then(function(deployd){ss=deployed;}); SyntaxError: missing ) ...
1
vote
1answer
217 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 ...
1
vote
2answers
680 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
0answers
64 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
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!!
1
vote
1answer
340 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 ...
1
vote
1answer
120 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
0answers
310 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 ...
0
votes
2answers
315 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
317 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
1answer
49 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
77 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
2answers
261 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
1answer
238 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: ...
0
votes
1answer
238 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
199 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 ...
0
votes
1answer
151 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 ...
0
votes
1answer
72 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....
0
votes
2answers
37 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
14 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
0answers
146 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
162 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? ...