Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 21:44
    eggplantzzz synchronize #5445
  • 21:44

    eggplantzzz on and-tests

    fix an error with prep for a te… (compare)

  • 21:04
    lsqproduction closed #5443
  • 21:04

    lsqproduction on extractOptions

    (compare)

  • 21:04

    lsqproduction on develop

    allow extractOptions to work wi… Merge pull request #5443 from t… (compare)

  • 21:03
    lsqproduction commented #5443
  • 21:03
    lsqproduction commented #5443
  • 20:11
    haltman-at commented #5443
  • 19:57
    eggplantzzz synchronize #5445
  • 19:57

    eggplantzzz on and-tests

    remove seemingly unneeded packa… (compare)

  • 19:42
    cliffoo edited #5241
  • 19:21
    eggplantzzz commented #5443
  • 19:20
    eggplantzzz commented #5443
  • 19:19
    eggplantzzz commented #5443
  • 19:05
    eggplantzzz synchronize #5445
  • 19:05

    eggplantzzz on and-tests

    add package to ignored list for… (compare)

  • 18:59

    haltman-at on yet-another-network

    (compare)

  • 18:59

    haltman-at on develop

    Add godwoken network to sourcif… Merge pull request #5444 from t… (compare)

  • 18:59
    haltman-at closed #5444
  • 18:49
    eggplantzzz synchronize #5445
Alexander Dan
@apdan510
Alechary, do you have a public repo to take a closer look at this compiling issue?
Wahas Ali Mughal
@wahas-mughal

Ekran görüntüsü 2022-01-22 104557.png

getting same error while installing truffle node version 16.13.1

tonmoyk988
@tonmoyk988
hello ...is there any problem with the truffle website ...in my case the truffle logo is occupying the most of the area of the screen .so i cant read the documentation well.any suggestion ?
Amit Kawad
@AmitKawad
How can i use ganache with https and not http
Levi W.
@lwillmeth

Hi all, new to truffle (v5.4.30) and when I run a test that initializes my contract, it fails with: "intrinsic gas too low".

It compiles fine, but I tried reducing my contract's constructor to only calling the ERC777 constructor, and still get this error.
I tried increasing truffle-config's networks.live.gas and gasPrice, but nothing changed.

The only google results are from a couple years ago, using older versions of truffle. I can run other tests, and this contract's constructor looks simple, so I'm not sure what's wrong here. Any ideas?

Levi W.
@lwillmeth

I'm still having trouble finding my problem, but using a fresh truffle init, I boiled it down to extending a contract from @openzeppelin/contracts
Here's a gist of my boiled-down contract and migration, any tips are much appreciated:
https://gist.github.com/lwillmeth/8050be839f6baa3e31dbc16500b63d1c

The error goes away if I copy the parent contract out of the library and into contracts/, so maybe this is a syntax mistake on my part? I'm not seeing it, and the contract compiles, but won't initialize.

Levi W.
@lwillmeth
It seems this only happens with @openzeppelin's ERC777 contract. I'm able to extend several of their other contracts without problem.
1 reply
MiAnClGr
@MiAnClGr
Hi guys, i'm having so much trouble installing the Truffle suite onto Windows 11, can anyone help?
trishulpani
@trishulpani_twitter
Hi All - having issue with running npm install truffle -g on Mac OS 12.1 with latest node and npm too. Getting the following error
ERR! note: '__uint128_t' declared here
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
npm ERR! typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
npm ERR!         ^
npm ERR! note: '__uint128_t' declared here
npm ERR! In file included from ../deps/leveldb/leveldb-1.20/db/builder.cc:5:
npm ERR! In file included from ../deps/leveldb/leveldb-1.20/db/builder.h:8:
npm ERR! In file included from ../deps/leveldb/leveldb-1.20/include/leveldb/status.h:16:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:505:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string_view:176:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__string:57:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:642:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:61:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string.h:61:
npm ERR! In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:61:
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
npm ERR! typedef __uint32_t      __darwin_wctype_t;
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h:31:9: error: unknown type name '__darwin_size_t'
npm ERR! typedef __darwin_size_t        rsize_t;
npm ERR!         ^
npm ERR! fatal error: too many errors emitted, stopping now [-ferror-limit=]
npm ERR! 20 errors generated.
npm ERR! make: *** [Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/17.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/truffle/node_modules/ganache/node_modules/leveldown
npm ERR! gyp ERR! node -v v17.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
What can i check to get this resolved? Any help is much appreciated. Thanks!
Zachary Becker
@zrbecker
When writing tests using solidity, how do I access the addresses of the accounts that are setup automatically in ganache? In javascript, they are passed as an array to the test, is there something equivalent I can do in solidity?
trishulpani
@trishulpani_twitter

Hi All - having issue with running npm install truffle -g on Mac OS 12.1 with latest node and npm too. Getting the following error

ERR! note: '__uint128_t' declared here
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
npm ERR! typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
npm ERR!         ^
npm ERR! note: '__uint128_t' declared here
npm ERR! In file included from ../deps/leveldb/leveldb-1.20/db/builder.cc:5:
npm ERR! In file included from ../deps/leveldb/leveldb-1.20/db/builder.h:8:
npm ERR! In file included from ../deps/leveldb/leveldb-1.20/include/leveldb/status.h:16:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:505:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string_view:176:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__string:57:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:642:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:61:
npm ERR! In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string.h:61:
npm ERR! In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:61:
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
npm ERR! typedef __uint32_t      __darwin_wctype_t;

I was able to mitigate this issue by doing a combination of OS updates, XCode Command line tool updates, updating npm config set python to python3 after updating python using brew.

John Coggeshall
@coogle

Hello all,

Trying to get a basic set up running and I was following along setting up Truffle on Avalanche with these docs:

https://docs.avax.network/build/tutorials/smart-contracts/using-truffle-with-the-avalanche-c-chain/

But when I try to open the console, I get this error:

Error: ProviderSubprovider - specified provider does not have a sendAsync method

I feel like there is something just out of date in the docs, but I'm having a hard time nailing down exactly what's going wrong here.. Anyone able to point me in the right direction?

Truffle v5.4.31 (core: 5.4.31)
Solidity - 0.8.11 (solc-js)
Node v17.3.0
Web3.js v1.5.3
Giovanni
@giovannic

Hello, does anyone know the proper way to import ABI jsons? This minimal example doesn't appear to work:

pragma solidity >=0.8.0 < 0.9.0;

import '@uniswap/v2-periphery/build/IUniswapV2Router02.json' as IUniswapV2Router02;

contract Minimal {

  IUniswapV2Router02 immutable uniRouter;

  constructor(address _uniRouter) public {
    uniRouter = IUniswapV2Router02(_uniRouter);
  }
}

It fails with the following error. It should recognise that IUniswapV2Router02 is a contract right?

Compiling your contracts...
===========================
> Compiling ./contracts/Migrations.sol
> Compiling ./contracts/Minimal.sol

TypeError: Name has to refer to a struct, enum or contract.
 --> project:/contracts/Minimal.sol:8:3:
  |
8 |   IUniswapV2Router02 immutable uniRouter;
  |   ^^^^^^^^^^^^^^^^^^

Compilation failed. See above.
Truffle v5.4.31 (core: 5.4.31)
Node v16.13.2

The ABI is from "@uniswap/v2-core": "^1.0.1"

I've also tried importing without as IUniswapV2Router02;. Then I get

DeclarationError: Identifier not found or not unique.
 --> project:/contracts/Minimal.sol:8:3:
  |
8 |   IUniswapV2Router02 immutable uniRouter;
  |   ^^^^^^^^^^^^^^^^^^
Dimitry Kudryavtsev
@dk8996
Hey Guys. I'm having a lot of issues installing truffle 5.4.31 on a clean docker box.
npm ERR! command failed npm ERR! command sh -c node-gyp-build npm ERR! sh: 1: node-gyp-build: not found
Using Node version 16.13.2
Dimitry Kudryavtsev
@dk8996
Also tried it with node 17.x.
Dimitry Kudryavtsev
@dk8996
I think I figured it out. See my comments here (trufflesuite/truffle#4658)
Levi W.
@lwillmeth

Is there a way to get an interface ID in my truffle test?

I can get it from the contract via a function that returns type(<my interface>).interfaceId, but I'm not sure how to build it in my JS test.

Ahmad Hajjar
@ashajjar

Hi guys

Are truffle asserts exactly the same as Mocha's?

Naira Garg
@naira_garg_twitter
hey, I am a backend developer ...but new in blockchain development.Can anyone tell me how to use tuffle?
mpoletiek
@mpoletiek:matrix.technomystics.com
[m]
There's a tutorial on the website
Dimitry Kudryavtsev
@dk8996
@naira_garg_twitter I created a Docker stack that has Truffle, Ganache, and React. You will mostly likely need Ganache to use Truffle. You can checkout the tutorial on the website but it's kinda hard to figure out how to set it up. You can take a look at my get started project here.
Zachary Luety
@zrluety

I am working through the pet-shop tutorial. When I get to the migrations step, I get the message below. Any ideas?

Screen Shot 2022-02-05 at 7.19.37 AM.png

2 replies
Capito
@defi_legend_twitter
hello
I am having issues with using ganache
I get this error
image.png
But on ganache it says my chainid is
image.png
Someone got any clue?
swkim109
@swkim109
@defi_legend_twitter chain id is 1337 and network id is 5777. You should use chain id if you need chain id. In most cases, they are same.
MiAnClGr
@MiAnClGr
Hi can anyone here help right now?
Jason Payne
@NeoXtreem

I get the following error when executing truffle migrate --network rinkeby --compile-all:

Error: Client network socket disconnected before secure TLS connection was established
    at connResetException (internal/errors.js:639:14)
    at TLSSocket.onConnectEnd (_tls_wrap.js:1570:19)
    at TLSSocket.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

My truffle-config.js contains:

rinkeby: {
  networkCheckTimeout: 1000000,
  provider: () => new HDWalletProvider(mnemonic, `wss://speedy-nodes-nyc.moralis.io/${moralisId}/eth/rinkeby/ws`),
  websockets: true,
  network_id: 4,
  gasPrice: 10e9,
  gas: 10e6,
  skipDryRun: true
}

moralisId is of course the unique ID to resolve my full Moralis Speedy Nodes URL.

This error happened after changing the HDWalletProvider URL from wss://rinkeby.infura.io/ws/v3/${infuraProjectId} which is of course Infura and worked absolutely fine.

However, if I compile the contracts first, and use --compile-none instead of --compile-all, it's fine, but this bloats my pipeline. I've tried adding networkCheckTimeout: 1000000 to the config (as suggested elsewhere, and can be seen above), but to no avail.

What am I missing?

Emanuel Ferreira
@EmanuelCampos
Hi, how can I set the ganache timestamp to my currently timestamp?
I'm getting block.timestamp like 113124
swkim109
@swkim109
@EmanuelCampos I think ganache-cli has -t option
Shuo Qu
@shuo625:matrix.org
[m]
Hey everyone. I am using the ganache and I have linked a workspace to a project. But when I want to check the contracts I get the follow:
I am using ganache on Ubuntu and I am sure that I have installed Node and add Node to PATH. Does anyone have some ideas? Thanks so much.
zaidzac95
@zaidzac95
Screenshot 2022-02-07 at 10.16.16 PM.png
4 replies
hey guys, i am not able to installed truffle on mac terminal any reason why?
zaidzac95
@zaidzac95
any help will defnitely be welcomed! as i am new to programming
Matt C
@MattCroftTech_twitter
image.png
Hi I am going through the pet shop tutorial and am having trouble when trying to run the solidity test i get this error above
I am confused why it is saying it can't find Migrations artifacts. when i compile and migrate i get no error
Matt C
@MattCroftTech_twitter
I just created the Javascript test and that is working fine.. posting screen shot below
image.png