Questions tagged [consensys-truffle]

Development and testing framework with integrated asset pipeline for the virtual currency Ethereum

Development and testing framework with integrated asset pipeline for the virtual currency Ethereum

45 questions
2
votes
1 answer

Smart contract good practice for reentrancy attacks

I'm a rookie working with solidity and blockchain technologies and I was reading some good practices to improve my code. And I have a question about a code that I'm not quite understanding very well: Source:…
Cortesao
  • 123
  • 1
  • 5
2
votes
1 answer

web3 calls Solidity contract function with extra parameter?

In the http://truffleframework.com/tutorials/pet-shop example, there is the following contract, and the function adopt(uint petId) has only one parameter. contract Adoption { address[16] public adopters; function adopt(uint petId) public…
ca9163d9
  • 27,283
  • 64
  • 210
  • 413
2
votes
2 answers

the tx doesn't have the correct nonce. account has nonce of: 5 tx has nonce of: 15

Using truffle (3.4.6), metamask (3.9.2) and testrpc (4.0.1), I call a transaction and get "Error: the tx doesn't have the correct nonce. account has nonce of: 5 tx has nonce of: 15". I have cut down the body of my contract method to something…
zakum1
  • 895
  • 6
  • 20
1
vote
0 answers

Intermittent Error on truffle test - Error: PollingBlockTracker - encountered an error while attempting to update latest block:

I have a CI pipeline on drone - This is how it executes - 'cd project' - 'npm install -g truffle' - 'npm i -g ganache@7.0.1' - 'ganache -p 9546' - 'echo "---> Installing local packages..."' - 'npm install' -…
Babita Bisht
  • 385
  • 1
  • 4
  • 18
1
vote
1 answer

Truffle installed but not working properly

I'm using node version 12.20.2 and npm version 6.14.11 and installed truffle with cmd as administrator, the truffle framework version 5.5.12 has been installed but when I run any command in the vs code, it pops up with an error PS E:\Testing (roughf…
1
vote
1 answer

Having a Problem Testing my Solidity Smart Contract (w/ Truffle)

So Im building a basic NF Token. Created a basic minting function and mapping. Im testing the app with truffle, tried both solidity testing and JS testing. Having the following errors. Using network 'development'. Compiling…
1
vote
0 answers

Truffle contract migration issue with infura ropsten

While migrating my smart contract,I came across an issue for command below truffle migrate --reset --network ropsten.Issue as given below Using network 'ropsten'. Running migration: 1_initial_migration.js Deploying Migrations... Error…
1
vote
1 answer

Best practice: How to handle 120sec timeout of contract callbacks?

With Truffle we get a nice wrapper for contracts. But it has one feature making me headaches: Example from documentation: MetaCoin.at(contract_address).then(function(instance) { coin = instance; return coin.sendCoin(account_two, 3, {from:…
haggis
  • 407
  • 2
  • 20
1
vote
1 answer

ParserError when verifying Truffle contract on Etherscan

I have a contract which has been deployed to the main Ethereum network, the contract code works and compiles fine when deploying and I can interact with the contract using metamask/MEW. However, when I go to verify the contract on Etherscan, I get…
1
vote
2 answers

What gasPrice to use to deploy contract on congested ethereum mainnet

I am attempting to deploy a contract onto the Ethereum mainnet, I have specified: network_id: 1, provider: infura, gas: 5000000, gasPrice: 140 And I continuously get the errors: Error: Contract transaction couldn't be found after 50…
1
vote
1 answer

How to deploy truffle contract to dev network when using inheritance?

I have been attempting to deploy a contract using the Truffle framework, I have recently been testing these contracts on the development network. My contract was very large and when I attempted to deploy it to a test net, I was instructed to split…
1
vote
1 answer

How to create new instance of contract for whole test suite truffle

I am setting up an ERC20 token ICO on the ethereum network using Solidity and Truffle. Can anyone tell me why this is not working, I have 4 test files (as I would ideally like to keep them as short and concise as possible), one for testing the…
0
votes
1 answer

Slither not importing the required files

I have this smart contract called Party.sol pragma solidity 0.8.17; import "../tokens/IERC721.sol"; import "./PartyGovernanceNFT.sol"; import "./PartyGovernance.sol"; I'm trying to extract the call graph using slither : …
0
votes
0 answers

Truffle (no module named truffle)

Traceback (most recent call last): File "C:\Users\something\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File…
0
votes
1 answer

truffle migrate only migrating first contract, not the second

the command "truffle migrate" works properly (no errors) but only migrates "Migrations.sol". It does not even attempt to migrate with 2_deploy_contracts.js 1_initial_migration.js : var Migrations =…