Ganache v7 is out! Read more about it here: https://trufflesuite.com/blog/introducing-ganache-7/
sukanyaparashar on fix-url-to-console
Test if CI passes (compare)
cliffoo on fix-imports
cliffoo on develop
dashboard-message-bus-client: F… dashboard-message-bus-common: F… Merge pull request #5246 from t… (compare)
sukanyaparashar on fix-url-to-console
Fix bug in truffle console comm… Refactor console-child.js to re… Add more tests to cover all the… and 7 more (compare)
cliffoo on dash-woah
Add --url option to truffle con… Add url option in the usage sec… Add integration test for consol… and 53 more (compare)
Hello everyone! I'm following along with the truffle tutorial and after a few tweeks got everything working great! However, now I'm struggling to add a returnPet() function to my solidity smart contract. The transaction fails and somehow metamask knows this ahead of time because it warns me that it might fail before confirming ("let's try anyway"). I've posted on stackoverflow, but responses have been slow. I feel like I'm missing something fundamental and could really use some help figuring out where to look first.
Thanks for reading.
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;
| ^^^^^^^^^^^^^^^^^^