Gitter support is deprecated! Please post in GitHub discussions (https://github.com/orgs/trufflesuite/discussions)
eggplantzzz on tweak-supplier
re-use file not found message (compare)
eggplantzzz on tweak-supplier
change wording for error message (compare)
eggplantzzz on tweak-supplier
fix a bunch of asynchronous syn… correct some more tests and che… (compare)
haltman-at on panopticon-cli
Add CLI startup code for debugg… Add fetchStorage integration to… (compare)
haltman-at on web3-182
haltman-at on develop
Update web3 to 1.8.2 Merge pull request #5862 from t… (compare)
fainashalts on add-solver
Add variables to types Remove errant console log Add network check and truffle e… (compare)
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?
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.
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
Hi All - having issue with running
npm install truffle -g
on Mac OS 12.1 with latest node and npm too. Getting the following errorERR! 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.
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
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;
| ^^^^^^^^^^^^^^^^^^
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! sh: 1: node-gyp-build: not found
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?