Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:46
    durgeshkmr commented #402
  • Jan 26 17:28
    cds-amal assigned #2792
  • Jan 26 05:31
    CruzMolina review_requested #2776
  • Jan 26 05:31
    CruzMolina review_requested #2791
  • Jan 26 05:31
    CruzMolina review_requested #2791
  • Jan 26 05:14
    CruzMolina review_request_removed #2791
  • Jan 26 05:14
    CruzMolina review_request_removed #2791
  • Jan 26 05:13
    CruzMolina synchronize #2776
  • Jan 26 05:13

    CruzMolina on compile-common

    Introduce & implement @truffle/… (compare)

  • Jan 26 05:07

    CruzMolina on tezos

    prettify json (contract-schema/… re-org & update README to match… specify in spec & README defaul… and 4 more (compare)

  • Jan 26 05:06
    CruzMolina synchronize #2791
  • Jan 26 05:06

    CruzMolina on travis-solc

    Update travis build to obtain s… (compare)

  • Jan 26 03:01
    robertmagier review_requested #2729
  • Jan 26 03:01
    robertmagier commented #2729
  • Jan 26 01:27
    robertmagier synchronize #2729
  • Jan 26 00:12
    robertmagier synchronize #2729
  • Jan 26 00:00
    robertmagier synchronize #2729
  • Jan 25 23:18
    robertmagier synchronize #2729
  • Jan 25 19:54
    cds-amal opened #2792
  • Jan 25 17:16
    robertmagier synchronize #2729
Mingfeng Yang
@fengzie
Hi, i'm fresh to Truffle. When following samples, to run project, it says to use command "truffle serve". However, I didn't find the "serve" command in my environment. The truffle version is v5.1.9. How to run a project in local?
image.png
I didn't find any doc for alternative command
Mingfeng Yang
@fengzie
The original builder was based on truffle-default-builder, but now looks like truffle doesn't support serve command, how to run the previous projects?
Emil Pop
@epop-cs
@eggplantzzz thanks for checking this. Actually, I am using @truffle/hdwallet-provider, the configuration I pasted is incomplete : const PrivateKeyProvider = require("truffle-hdwallet-provider");
const privateKeyProvider = new PrivateKeyProvider(privateKey, "http://ec2-34-248-21-129.eu-west-1.compute.amazonaws.com");
module.exports = {
// See http://truffleframework.com/docs/advanced/configuration
// for more about customizing your Truffle configuration!
networks: {
metamaskWallet: {
host: "34.248.21.129",
port: 8545,
provider: privateKeyProvider,
network_id: "*"
},
}
};
Andrew Stanger
@mcplums
guys, im getting migration problems when doing truffle test but not when doing truffle migrate. I am very confused. Please see this stack overflow post https://ethereum.stackexchange.com/questions/79199/truffle-test-cannot-read-property-gasused-of-null-error-truffle-migrate-wo
wat do?
Andrew Stanger
@mcplums
^i discovered the cause, truffle test does not work if ganache’s network ID is set to 69420 :) it works with id 69419 and 69421
Im making a GH issue
Andrew Stanger
@mcplums
tyler
@eggplantzzz
@epop-cs Oh I see, well that error indicates that it is not able to use the provider that you furnished to make a simple call to the network. (It tries to get the latest block) So check the url that you provided. Another thing to try is making provider a function that returns the provider in your config.
So
  .....
  port: 8545,
  provider: () => new PrivateKey.....
Try that in your config. I seem to remember that being an issue sometimes but I cannot remember the details exactly
Mark Wallace
@Mark92630
Brand new. macOS Mojave (10.14.6). Installed Ganache 2.1.2 successfully from .dmg file. Tried to install Truffle with "sudo npm install truffle -g", but it doesn't work. Error message from script is: "SyntaxError: missing ) after argument list". Next line is: ".then(async function(receipt) {" with the following line containing up-carets that point to "async". All of this is occurring in cli.bundled.js
In the above post, where I say "Next line" and "following line", both of those occur just before the line that begins "SyntaxError:"
Mark Wallace
@Mark92630
Fixed with help from Truffle Team. My version of Node.js was out of date. Installed nvm from GitHub and then used it to install Node.js 10.18.1. Then re-ran the npm command (without "sudo") and it worked perfectly.
Emil Pop
@epop-cs
@eggplantzzz thanks for replying. I tried applying your suggestion, however I am seeing the same message.
Configuration now is: metamaskWallet: {
host: "34.248.21.129",
port: 8545,
provider: () => new PrivateKeyProvider(privateKey, "http://ec2-34-248-21-129.eu-west-1.compute.amazonaws.com"),
network_id: "*"
},

Everything is up to date, there is nothing to compile.

/usr/local/lib/node_modules/truffle/build/webpack:/packages/provider/index.js:56
throw new Error(errorMessage);
^
Error: There was a timeout while attempting to connect to the network.
Check to see that your provider is valid.
If you have a slow internet connection, try configuring a longer timeout in your Truffle config. Use the networks[networkName].networkCheckTimeout property to do this.
at Timeout._onTimeout (/usr/local/lib/node_modules/truffle/build/webpack:/packages/provider/index.js:56:1)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
emilpop@Pops-MBP truffle-besu-petshop-tutorial %

Ai Suzuki
@aisuzuki
Does anyone have issue with evm_increaseTime lately? It seems that rpc call doesn't increase time using ganache-cli v6.8.2...
cedric walter
@cedricwalter
@eggplantzzz thanks it work as expected! (Instead of a mnemonic, you can alternatively provide a private key or array of private keys as the first parameter.)
tyler
@eggplantzzz
@micab Did you run your migrations before executing that code?
@epop-cs Can you share the entire contents of your truffle-config.js? You can subtract the private keys from what you share.
Also, what happens if you use a library like web3 to connect to using your provider url and try to run web3.eth.getBlockNumber?
If you have a valid url you should get a response with the latest block number (wrapped in a Promise).
Philip Rego
@7--
truffle(develop)> debug 0x4c42c692f02dfa01c0cc4081d9f4edff5e19c6e0cde985d4fa8aed61e01ce5e8
Starting Truffle Debugger...
✔ Compiling your contracts...
⠙ Gathering information about your project and the transaction...{ Error: Cannot find module "."
at webpackMissingModule (/usr/local/lib/node_modules/truffle/build/webpack:/packages/debugger/node_modules/semver/index.js:3:52)
at lazyRequire (/usr/local/lib/node_modules/truffle/build/webpack:/packages/debugger/node_modules/semver/index.js:3:52)
at Object.get [as satisfies] (/usr/local/lib/node_modules/truffle/build/webpack:/packages/debugger/node_modules/semver/index.js:10:1)
at contextRequiresPhantomStackframes (/usr/local/lib/node_modules/truffle/build/webpack:/packages/debugger/dist/debugger.js:1015:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/node_modules/reselect/es/index.js:70:1
at /usr/local/lib/node_modules/truffle/build/webpack:/node_modules/reselect/es/index.js:30:1
at /usr/local/lib/node_modules/truffle/build/webpack:/node_modules/reselect/es/index.js:84:1
at /usr/local/lib/node_modules/truffle/build/webpack:/node_modules/reselect/es/index.js:30:1
at runSelectEffect (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:730:1)
at runEffect (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:1204:1)
at digestEffect (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:1271:1)
at next (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:1161:1)
at currCb (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:1251:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:481:1
at exec (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:31:1)
at flush (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:87:1)
at asap (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:46:1)
at runPutEffect (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:468:1)
at runEffect (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:1204:1)
at digestEffect (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:1271:1)
at next (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:1161:1)
at currCb (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js:1251:1) code: 'MODULE_NOT_FOUND' }
The above error occurred in task session.saga
Tasks cancelled due to error:
listenerSaga
controller.saga
data.saga
evm.saga
solidity.saga
trace.saga
web3.saga
⠹ Gathering information about your project and the transaction...
this guide gives me this error when trying to debug https://www.trufflesuite.com/tutorials/debugging-a-smart-contract
Laurent Senta
@lsenta
Hi there, thanks for maintaining truffle,
I have an error when I try to use the hd-wallet lib with typescript:
yarn run v1.21.1
$ tsc -p tsconfig.release.json
node_modules/@truffle/hdwallet-provider/dist/index.d.ts:3:43 - error TS2307: Cannot find module 'web3/providers'.

3 import { Callback, JsonRPCResponse } from "web3/providers";
                                            ~~~~~~~~~~~~~~~~


Found 1 error.
Am I missing a package?
I resolved another type issue by installing: yarn add --dev @types/ethereum-protocol, but I couldn't find a relevant typedef for that one
Laurent Senta
@lsenta
I tried with the web3 version used in the hdwallet package.json (1.2.1) and the latest version 1.2.5-rc0 same result
tyler
@eggplantzzz
@lsenta Ooh, I'm not really too familiar with using hdwallet-provider with TypeScript. Maybe @gnidan might know more about this error?
William Bergamo
@bugduino
Hi There, I'm trying to deploy a couple of contracts with the Ledger Nano S via cli in kovan, I'm trying to use this package https://github.com/petertulala/truffle-ledger-provider and it deploys the first contract of the first migration successfully but while the tx is mined and confirmed in etherscan, in the cli I got stucked waiting for confirmations indefinitely. Is there an official way to deal with Ledger deploys? Any idea why is not getting the confirmations? With HDWalletProvider works as expected. I'm using Infura with truffle 5.1.4
Thanks
Mehdi Ko
@mabdehko
Hi there, can someone suggest the correct way to utilize truffle for production use.
Specifically want to have a script to run continuously, polling the main-net and executing transactions.
Don't want to put such an important script in the test folder. If there's a better strategy please let me know - apart from simply using node and web3.
Thomas Haller
@SurfingNerd
hmm is there any convinient way of deploying a contract on a static address with truffle ?
i am about to do it the same way ERC1820 get's deployed, but it is kind of a pain in the ass :D
Thomas Haller
@SurfingNerd
or at least getting the raw contract create call source, so i can manipulate the R S V values
and deploy it raw during migration steps
Laurent Senta
@lsenta
@eggplantzzz @gnidan thanks for looking into this, I found a patch online that seems to fix the issue: https://github.com/renproject/send-crypto/blob/a314104c2cf37787fa61475edc3ee04422fe98a8/patches/%40truffle%2Bhdwallet-provider%2B1.0.28.patch
It works but I'm not sure if that's the "right" solution
elizabeth-g-28
@elizabeth-g-28
Hello! When I run truffle migrate I get this error: Error: VM Exception while processing transaction: out of gas how do I fix this? Itsconnected to ganache.
trnhgquan
@trnhgquan
@elizabeth-g-28 have you check gas use by this tx? you should change field gas to 7 000 000 , by default ganache set it to 3 000 000
Varun Srinivasan
@varunsrin
has anyone had success setting up truffle to run on Github Actions for CI?
Eduardo Fonseca
@edsphinx
yes with travis I got truffle working fine
Will Shahda
@opz
@elizabeth-g-28 depending on the version of Solidity, IIRC that can actually just be an error in the code as opposed to actually being out of gas
Anyone have issues with Truffle spamming eth_getBlockByNumber?
My infura endpoint is getting hit with like 1.5mm requests a day, I'm pretty sure my infura key is used nowhere else but my truffle config
Emil Pop
@epop-cs

@eggplantzzz here is my truffle-config.js : const PrivateKeyProvider = require("truffle-hdwallet-provider");

//private key PetShop_Test Network -> 8F2A55949038A9610F50FB23B5883AF3B4ECB3C3BB792CBCEFBD1542C692BE63 - Andreea Account PetShop network
//const privateKeyProvider = new PrivateKeyProvider(privateKey, "http://ec2-34-248-21-129.eu-west-1.compute.amazonaws.com");

module.exports = {
// See http://truffleframework.com/docs/advanced/configuration
// for more about customizing your Truffle configuration!
networks: {
/ besuWallet: {
host: "34.248.21.129",
port: 8545,
network_id: "
" // Match any network id
}, /
metamaskWallet: {
host: "34.248.21.129",
port: 8545,
provider: () => new PrivateKeyProvider(privateKey, "http://ec2-34-248-21-129.eu-west-1.compute.amazonaws.com"),
network_id: "
"
},
}
};

thank you for your help