Questions tagged [truffle-compile]
The truffle-compile tag has no usage guidance.
88
questions
0
votes
2answers
17 views
0
votes
1answer
9 views
40:5: ParserError: Expected primary expression. } [closed]
pragma solidity ^0.5.16;
import "./WavearcToken.sol";
contract WavearcTokenSale {
address admin;
WavearcToken public tokenContract;
uint256 public tokenPrice;
uint256 ...
0
votes
0answers
28 views
Slither not working with Truffle imports
Currently I have a project that needs slither run against it so I pulled down the docker image for slither as specified in the docs here https://hub.docker.com/r/trailofbits/slither/, then I shared ...
0
votes
1answer
86 views
Truffle artifacts are not being generated when compiling
I am new to smart contract development and I am trying to deploy my first contract. When running the truffle compile for the first time I can see that a build folder was generated on my project ...
1
vote
1answer
18 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
1answer
58 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
33 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
157 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 ...
1
vote
1answer
104 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
163 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
127 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
0answers
30 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
180 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
881 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
282 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
57 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....
0
votes
0answers
54 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, ...
0
votes
1answer
76 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
21 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 ...
1
vote
2answers
751 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
52 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
180 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 ...
0
votes
1answer
58 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 ...
0
votes
1answer
329 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 ...
0
votes
1answer
214 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 ...
1
vote
1answer
326 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
2
votes
1answer
1k 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
793 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
238 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
126 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
3k 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
730 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 ...
2
votes
1answer
501 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
400 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
612 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
1k 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
102 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
295 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
573 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
1answer
468 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
237 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
755 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
507 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
945 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
3answers
1k 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
129 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
145 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: ...
2
votes
0answers
68 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
301 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 ...
4
votes
2answers
930 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 ...