All Questions
10 questions
1
vote
1
answer
128
views
developing a contract that distributes tokens
I am developing a contract that distributes tokens and has already implemented the main functionality. The contract accepts tokens from the owner and distributes them by 1KK to each address from the ...
2
votes
0
answers
143
views
Truffle compiles different binary than RemixIde, even with same compiler version and evm version
The code:
pragma solidity <0.9.0;
contract Callee {
address public a;
address public b;
function test(uint256 i) public returns(uint256){
a=address(this);
b=msg....
0
votes
3
answers
775
views
Can't compile Truffle project that imports a .sol with different pragma version
I have a contract pragma solidity 0.6.12 version that imports several 0.6.12 version contracts and one pragma solidity 0.8.0.
My truffle-config:
compilers: {
solc: {
version: "^0.6.12 &...
1
vote
2
answers
3k
views
Set specific compiler version in truffle but still get "Source file requires different compiler version" error
I get the "Source file requires different compiler version (current compiler is 0.8.6+commit.11564f7e.Emscripten.clang)" at the first line:
pragma solidity ^0.7.0;
In truffle-config.js, I ...
1
vote
1
answer
792
views
Compiler version incompatibility nightmare
I'm new to Solidity and Truffle. I'm trying to compile my Solidity code within Truffle to create an ERC-20 token. I have @truffle/hdwallet-provider and @openzeppelin/contracts as my dependencies. Now,...
0
votes
2
answers
9k
views
Function, variable, struct or modifier declaration expected [duplicate]
I am using the following code structure;
pragma solidity ^0.5.0;
contract TtdmToken {
uint256 public totalSupply;
function TtdmToken () public {
totalSupply = 1000000;
}
}
...
1
vote
2
answers
739
views
Unhandled Rejection (Error): invalid string value (arg="x", coderType="string", value=5)
Using Truffle unbox react to unbox a boilerplate.
received the following error from running npm run start
Changes:
Addition of "memory" parameters in the simpleStorage.sol
Changed unit to string in ...
1
vote
2
answers
2k
views
Unable to run truffle compile
I want to run truffle compile on my AWS Ubuntu 18.4 server. I'm able to compile the same contracts on my local with no compilation errors but when I tried to run truffle compile on AWS ubuntu server ...
1
vote
1
answer
1k
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 ...
2
votes
1
answer
720
views
Undeclared identifier when compiling with truffle compile
I have this contract and can't figure out where's the problem. Any ideas? (I'm a noob in solidity, just started a few days ago).
HelloWorld.sol file:
mapping (address => uint) balances;
function ...