by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:42
    wbt commented #3083
  • 19:24
    haltman-at commented #3079
  • 19:21

    haltman-at on lowlights

    (compare)

  • 19:20

    haltman-at on develop

    Update highlightjs-solidity ver… Merge pull request #3090 from t… (compare)

  • 19:20
    haltman-at closed #3090
  • 19:03
    prestwich commented #3079
  • 18:50
    wbt commented #3078
  • 18:46
    wbt commented #3078
  • 14:12
    FilipLaurentiu edited #3091
  • 13:53
    Komari-Koshigaya commented #2692
  • 12:50
    FilipLaurentiu edited #3091
  • 11:22
    FilipLaurentiu opened #3091
  • 06:27
    haltman-at commented #3090
  • 06:26
    haltman-at review_requested #3090
  • 06:26
    haltman-at review_requested #3090
  • 06:26
    haltman-at unassigned #3090
  • 06:26
    haltman-at unassigned #3090
  • 06:26
    haltman-at assigned #3090
  • 06:26
    haltman-at assigned #3090
  • 06:26
    haltman-at opened #3090
Anh Dung Le
@anhdungle93
Hi, is it possible to specify the solidity version in the command truffle init? I can specify the solc compiler in truffle-config.js but the generated Migrations.sol already has a default version. Thanks a lot.
emeline-sc
@emeline-sc

Hi there, I got a problem when I install and open file truffle-config.js I got 22 problems, with the same error :

"truffleframework": Unknown word.
"Infura": Unknown word.
"hdwallet": Unknown word.
"Infura": Unknown word.
"infura": Unknown word.
"gitignored": Unknown word.
"hdwallet": Unknown word.
"infura": Unknown word.
...
  • Operating System: MAC OS
  • Ethereum client: ganache
  • Truffle version (truffle version): Truffle v5.1.27 (core: 5.1.27)
  • node version (node --version): v14.3.0
  • npm version (npm --version): 6.14.5
    Solidity - 0.6.0 (solc-js)
    Web3.js v1.2.1

Anyone know how to fix that ? Thanks !

Joris
@JorisM

Hi! I'm trying to compile the default tezos project unboxed using truffle unbox tezos-example. So far so good.
The next steps truffle compile fails:

truffle compile          

Compiling your contracts...
===========================
> Compiling ./contracts/Contract.ligo
> Compiling ./contracts/Migrations.ligo
> Compiling ./contracts/SimpleStorage.ligo
> Using entry point "main"
ligo: : /project/contracts/Contract.ligo: Permission denied {}


Compilation of /home/hidden/tezos-example/contracts/Contract.ligo failed. See above.
Truffle v5.3.0-tezos.2 (core: 5.3.0-tezos.2)
Node v12.16.3

The path prefix /project seems off to me, but not sure how to debug this.
I'm runing fedora 32. Any ideas? Thanks!

Joris
@JorisM
Alright, it's a selinux vs docker issue. You can ignore me :) turning off selinux is making it work, I'm looking for a real fix now, but this seems OS related
Krishna14K
@Krishna14K
truffle-contract.js:425 Uncaught (in promise) Error: Contract has not been deployed to detected network (network/artifact mismatch)
at truffle-contract.js:425
at async Object.loadContract (app.js:63)
at async Object.load (app.js:14)
1 reply
please help me out
Faruk Mustafic
@tms1337

he llo good truffle folks

So I have a usecase where I would want to simulate the changing gas price on the network to test the relayer
I made a small middleware for that in front of ganache which does not let the tx through unless gas price is sufficient

But it would be much more handy to do it in ganache directly via miner_setGasPrice function, which is currently not supported in Ganache

I would like to fork off Ganache and try to add this functionality, but not sure if doable straight away, any1 willing to point me in the right direction?

Anton Grigorev
@BaldyAsh

Hi everyone! While I compile the project (sorry, can’t provide any source), I got 2 different errors cases:

  1. As I understand it happens when there are too many contracts in project

RuntimeError: memory access out of bounds
at wasm-function[6963]:639
at wasm-function[6197]:449
at wasm-function[6187]:691
at wasm-function[7439]:13
at invoke_ii (/Users/antongrigorev/.config/truffle/compilers/node_modules/soljson-v0.6.8+commit.0bbfe453.js:1:8756802)
at wasm-function[6194]:1333
at wasm-function[6187]:539
at wasm-function[7439]:13
at invoke_ii (/Users/antongrigorev/.config/truffle/compilers/node_modules/soljson-v0.6.8+commit.0bbfe453.js:1:8756802)
at wasm-function[6194]:1333
at wasm-function[6187]:539
at wasm-function[7439]:13
at invoke_ii (/Users/antongrigorev/.config/truffle/compilers/node_modules/soljson-v0.6.8+commit.0bbfe453.js:1:8756802)
at wasm-function[6194]:1333
at wasm-function[6187]:539
at wasm-function[6182]:453
at wasm-function[6181]:35
at wasm-function[7586]:21
at invoke_iiiiii (/Users/antongrigorev/.config/truffle/compilers/node_modules/soljson-v0.6.8+commit.0bbfe453.js:1:8757662)
at wasm-function[6104]:255
at wasm-function[7523]:17
at invoke_iiii (/Users/antongrigorev/.config/truffle/compilers/node_modules/soljson-v0.6.8+commit.0bbfe453.js:1:8757302)
at wasm-function[262]:104
at wasm-function[136]:331
at ccall (/Users/antongrigorev/.config/truffle/compilers/node_modules/soljson-v0.6.8+commit.0bbfe453.js:1:8312)
at /Users/antongrigorev/.config/truffle/compilers/node_modules/soljson-v0.6.8+commit.0bbfe453.js:1:8662
at runWithCallbacks (/usr/local/lib/node_modules/truffle/build/webpack:/packages/compile-solidity/node_modules/solc/wrapper.js:151:1)
at compileStandard (/usr/local/lib/node_modules/truffle/build/webpack:/packages/compile-solidity/node_modules/solc/wrapper.js:207:1)
at Object.compileStandardWrapper [as compile] (/usr/local/lib/node_modules/truffle/build/webpack:/packages/compile-solidity/node_modules/solc/wrapper.js:214:1)
at invokeCompiler (/usr/local/lib/node_modules/truffle/build/webpack:/packages/compile-solidity/run.js:254:1)
at <anonymous>

  1. When the project has more contracts than in the first case

  2. Line 1, Column 1
    Syntax error: value, object or array expected.

  3. Line 1, Column 3
    Extra non-whitespace after JSON value.

I can solve it with scripts for project compilation in parts. But I don’t like this decision

hydris-bessa
@hydris-bessa

If someone has already encountered this message, can they tell me where the problem is located?

hydris LAPTOP-JPBVRK0A ~ code qlay_token master 3✎ 2+ $ ganache-cli
Ganache CLI v6.9.1 (ganache-core: 2.10.2)
Error: Callback was already called.
at /home/hydris/.nvm/versions/node/v14.3.0/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:17:276
at s.<anonymous> (/home/hydris/.nvm/versions/node/v14.3.0/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:17:2238)
at s.emit (events.js:315:20)
at s.destroy (/home/hydris/.nvm/versions/node/v14.3.0/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:712589)
at finish (_stream_writable.js:658:14)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

My spec :
WSL
Truffle v5.1.26 (core: 5.1.26)
Solidity - 0.6.2 (solc-js)
Node v14.3.0
Web3.js v1.2.1

Benjamin Smith
@bh2smith

Hello @here again!

We have encountered some unexpected behaviour being returned from web3.eth.sign calls to @truffle/ganache-cli. That is, the recovery byte v as the last byte of the signature returned is coming back with values like 0 and 1. According to Ethereum Yellow Paper, the recovery byte is supposed to be 27 or 28. We are aware of the situation and capable of working around it, but just wanted to know if this was intentional, on your radar or something you might approve us reporting an issue for.

Furthermore, we have detected an inconsistency with the @truffle/hdwallet-provider

Benjamin Smith
@bh2smith
That is, for example, the last byte of web3.eth.sign("test", accounts[0]) is 0 with ganache and 27 HDWalletProvider.
Audrey Felicio Anwar
@AudreyFelicio

I've been trying out truffle for the first time. I ran into problems when I execute truffle init

The error message is:

Starting unbox...

✔ Preparing to download box
⠇ DownloadingError: read ETIMEDOUT
at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
My dependencies versions are:

Truffle v5.1.27 (core: 5.1.27)
Solidity v0.5.16 (solc-js)
Node v10.19.0
Web3.js v1.2.1
Anyone has the same issue and resolved it before? Really need some help, thanks in advance!

cezarvatafu
@cezarvatafu
Hello Truffle Team, I hope you can help me with a quick question : I have set up Hyperledger Besu to authenticate with JWT, is there a way to configure Truffle config. js file so that when I want to migrate./deploy a smart contract. to use. this JWT token on a premises network ? I know there are ways to connect with a 3rd party service like 0auth but want I am interested is just to pass this java token for authentication. Is it even possible ? Thank you
Anh Dung Le
@anhdungle93

Hi, I am following the tutorial https://www.trufflesuite.com/tutorials/getting-started-with-drizzle-and-react and wrote a test

const MyStringStore = artifacts.require("./MyStringStore.sol");

contract("MyStringStore", accounts => {
  it("should store the string 'Hey there!'", async () => {
    const myStringStore = await MyStringStore.deployed();

    // Set myString to "Hey there!"
    await myStringStore.set("Hey there!", { from: accounts[0] });

    // Get myString from public variable getter
    const storedString = await myStringStore.myString.call();

    assert.equal(storedString, "Hey there!", "The string was not stored");
  });
});

but when I ran the test the following error occurred

TypeError [ERR_INVALID_REPL_INPUT]: Listeners for `uncaughtException` cannot be used in the REPL
    at process.<anonymous> (repl.js:255:15)
    at process.emit (events.js:327:22)
    at process.emit (/Users/anhdungle/.nvm/versions/node/v13.11.0/lib/node_modules/truffle/build/webpack:/node_modules/source-map-support/source-map-support.js:485:1)
    at processEmit [as emit] (/Users/anhdungle/.nvm/versions/node/v13.11.0/lib/node_modules/truffle/build/webpack:/node_modules/signal-exit/index.js:155:1)
    at _addListener (events.js:358:14)
    at process.addListener (events.js:406:10)
    at Runner.run (/Users/anhdungle/.nvm/versions/node/v13.11.0/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:868:11)
    at Mocha.run (/Users/anhdungle/.nvm/versions/node/v13.11.0/lib/node_modules/truffle/node_modules/mocha/lib/mocha.js:612:17)
    at /Users/anhdungle/.nvm/versions/node/v13.11.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/test.js:145:1
    at new Promise (<anonymous>)
    at Object.run (/Users/anhdungle/.nvm/versions/node/v13.11.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/test.js:144:1)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Can anyone help me with that? thank you
coinmaster4you
@coinmaster4you
@coinmaster4you
Is possible to interact with onchain contracts wich is ^0.5.0 with ^0.6.0
?
ArseniyGl
@Lupen2002
Hello! Please help me. I written tests with typescript. But after run truffle test threw exception SyntaxError: Cannot use import statement outside a module. How can I import types?
* How can I import types in my tests?
Bryan Stitt
@WyseNynja
I just submitted an issue on GitHub. I think something is wrong with ganache's traces. trufflesuite/ganache-cli#758
ArseniyGl
@Lupen2002
Hello! Please help me. I written tests with typescript. But after run truffle test threw exception SyntaxError: Cannot use import statement outside a module. How can I import types?
Mars Robertson
@marsrobertson
How do I update to Solidity v0.6?
I just did npm uninstall, then npm install -g but still on v0.5
Nazzareno Massari
@naszam
Hi, I've just opened a new issue on truffle, trufflesuite/truffle#3077
When deploying there seems to be a bug with abstract/interface
(truffle migrate or truffle test)
@cds-amal
Matt Rice
@mrice32

When defining providers like this:

provider: function() {
      return new HDWalletProvider(mnemonic, `https://${name}.infura.io/v3/${infuraApiKey}`, 0, 2);
    }

Why is that function called multiple times? Is it reasonable to construct it only on the first call and then return the same value for all subsequent calls?

To be more specific, when invoking truffle console, I'm seeing it being called 6 times.
cfperna
@cfperna
I'm trying to write a truffle exec script that does an HTTP API request. Is the possible? I am getting this error: XMLHttpRequest is not defined
Said another way, can you do an API request in a truffle exec script?
Hayden Young
@haydenyoung
when truffle builds the contract manifests (I.e. in build/contracts) does it store some kind of unique hash of the sol file?
cfperna
@cfperna
The .sol files are not changed by truffle, the only change I see buy running the truffle migrate command is the generation abi files.
Pep (The Don)
@pepthedon
has anyone ran into an issue where migrations only get past the initial deployment? i can confirm the tx was confirmed but the deployment script doesnt progress past the initial migration - this is the case for even the default 1_migration.js script
I can confirm the same migrations work fine with ganache, but trying to deploy to testnet isn't working as expected
Pep (The Don)
@pepthedon
image.png
the tx has been mined a long time ago but truffle is still stuck
Fabio Bonfiglio
@fabiobonfiglio4_twitter
Hi all.
Is there someone with good CI/CD-for-smart-contracts experience that could share insights about that SO question please ?
https://stackoverflow.com/questions/62092848/should-i-include-contracts-build-files-in-version-control-when-using-truffle
Asmita Dhungana
@asmitadhungana
Hello, I tried to truffle compile my contract that contains a receive ether function, but it fails to recognize it... While using OpenZeppelin cli to compile, it works decently enough, but that doesn't seem to be the case with truffle v5.1.28
it's an upgradeable smart contract... so i need to receive ether function... can anyone help me with the workaround...?
blackbear10000
@blackbear10000
Hi. Is the OpenEthereum’s config file same with Parity?
Robbie Heeger
@rheeger

Hello. Doesn't anybody know how to remove this error from the compiler?

./node_modules/@truffle/hdwallet-provider/node_modules/web3-eth-accounts/src/scrypt.js
Critical dependency: the request of a dependency is an expression

I have the following dependencies when I yarn list web3-eth-accounts

├─ @truffle/hdwallet-provider@1.0.35
   └─ web3-eth-accounts@1.2.1
does anybody
Robbie Heeger
@rheeger
resolved for now by updating package.lock to:
  "resolutions": {
    "@truffle/hdwallet-provider/web3": "1.2.4"
  },
DeepalUsyD
@DeepalUsyD
Hi All, how could I make truffle add more than one transaction per block? I heard that truffle only has one transaction per block
swkim109
@swkim109
@rheeger I guess web3 1.1.x is dependent on scrypt.js. You'd better use web3 1.2.x
Hadrien Croubois
@Amxx
I'm trying to reproduce the bytecode in an artefact. I have the source, the metadata (compiler option) and everything needed, but I can't managed to reproduce it :/
I've also noticed that running truffle compile, with the same contracts, but from a different folder (absolute path) changed the bytecode produced ...
Raashid
@raashidjunaid1
Hi there, has anyone managed to integrate https://github.com/Web3Modal/web3modal with drizzle? or in general how can I support multiple wallet providers with drizzle?