Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:59
    cds-amal closed #5589
  • 09:59
    cds-amal edited #5589
  • 09:47
    cds-amal synchronize #5591
  • 09:47

    cds-amal on bump-nativize-timeout

    decoder: bump timeout for test … (compare)

  • 09:44
    cds-amal review_requested #5591
  • 09:41
    cds-amal opened #5591
  • 09:40

    cds-amal on bump-nativize-timeout

    decoder: bump timeout for test … (compare)

  • 09:36

    cds-amal on bump-nativize-timeout

    decoder: bump timeout for (compare)

  • 09:14
    glaksmono commented #2702
  • 08:50
    cds-amal review_requested #5590
  • 08:50
    cds-amal review_requested #5590
  • 08:50
    cds-amal opened #5590
  • 08:44

    cds-amal on unclad

    from-hardhat: use jest to skip … (compare)

  • 08:35
    cds-amal opened #5589
  • 08:34

    cds-amal on will-fetching-solc-hang

    WIP: only test PACKAGES config (compare)

  • Oct 04 23:38
    cds-amal edited #5543
  • Oct 04 23:08
    cds-amal synchronize #5543
  • Oct 04 23:08

    cds-amal on 18

    CI: remove npm@6 constraint for… (compare)

  • Oct 04 20:34
    cds-amal commented #5543
  • Oct 04 20:34
    eggplantzzz synchronize #5587
trishulpani
@trishulpani_twitter
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
Matt C
@MattCroftTech_twitter
Got all tests passing now. i removed the contracts/artifacts directory it was complaining about and started working
image.png
Shuo Qu
@shuo625:matrix.org
[m]
@zaidzac95: sry, I am not familiar with Mac. Maybe You can Google how to execute command as a root on Mac.
Philip Jonsén
@philipjonsen
Hey all! Im and old investor in eth and many other projects. I have many smart contracts i could need help with from my old myetherwallet
Last week i made a tranfser from eth1 to eth2 trough a proxy and deposit 6 million into gnosis vault
dont know how that really happend
image.png
here are some old contracts in my wallet
image.png