Questions tagged [truffle]

Questions regarding the implementation and use of the Truffle development and testing environment.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Truffle ganache debug not working

I have installed truffle and ganache and the @ganache/console.log library. Furthermore, I have the following contract from an online course which serves as an example to demostrate the debug mode of ...
TheDude's user avatar
  • 111
0 votes
1 answer
71 views

HOW TO SET UP TRUFFLE CONFIGURATIONS FOR SEPOLIA ETH

** HOW TO SET UP TRUFFLE CONFIGURATIONS FOR SEPOLIA ETH ** I want to know how to set up my config on truffle to be able to deploy my contract on the eth testnet, I already have an infura api key
Emkiddo Skits's user avatar
0 votes
0 answers
21 views

Truffle migration error Network up to date

module.exports = { networks: { sepolia: { provider: () => new HDWalletProvider({ mnemonic: { phrase: MNEMONIC }, privateKeys: private_keys, ...
efe's user avatar
  • 1
1 vote
0 answers
10 views

Why are my exceptions rendered differently after versions update?

I don't remember the previous versions I was using but I remember upgrading because I hoped to have a local test network (via Ganache) supporting EIP-1559. My versions are: Truffle v5.11.5 (core: 5.11....
Luis Masuelli's user avatar
0 votes
1 answer
39 views

Solidity Smart Contract Behaving Weird on Goerli Testnet

I have a vite-project in typescript that I want to have eth deposit and withdrawal capability. I'm new to the crypto space and trying to implement a simple wallet contract using Truffle on the ETH ...
s_tanay's user avatar
0 votes
0 answers
9 views

Why does truffle test break my migrations?

I have created a deployment script for an upgradable token contract which takes a flag from the command line for the deployment type. I type... truffle migrate --reset --type initial truffle migrate --...
John Pringle's user avatar
0 votes
0 answers
16 views

How Remix IDE compiles smart contract code to ABI and bytecode?

I am building a DApp where user uploads his smart contract code file and his smart contract gets deployed using his private key ( After he connects his metamask account to the DApp ) . How RemixIDE is ...
Gaurav Pant's user avatar
1 vote
0 answers
28 views

Truffle migration of an ownable contract

Initially, I deploy everything using REMIX IDE, currently I would like to try to deploy a contract that is ownable into local ganache blockchain using truffle migration: pragma solidity ^0.8.18; ...
tony's user avatar
  • 13
0 votes
1 answer
25 views

Controlling Contract

Using truffle and makes me use truffle console but I dont want to and wouldnt either. Is there any other way interact with contracts and controlling their propreties and everything with an app or ...
seojunchian's user avatar
0 votes
0 answers
16 views

Transaction gets reverted when using send web3 function in angular

I am using [email protected] to access my ganache blockchain through localhost. I am new to dapp development and I'm trying to call a function that updates the ganache blockchain through web3 in angular. I ...
newcoder's user avatar
1 vote
0 answers
85 views

RuntimeError: VM Exception while processing transaction: revert\n at EIP1559FeeMarketTransaction.fillFromResult

I've been working on a smart contract in Solidity, the code shown below: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; ...
aussastan's user avatar
0 votes
1 answer
39 views

Perplexing issue: Ownable: caller is not the owner'

i am a new developer and i am struggling with an issue since two weeks now and can't get to the bottom of it. Here is some context: I have two smart contracts, one minting an NFT and the other issuing ...
Brandas's user avatar
0 votes
1 answer
34 views

Identifier not found or not unique. using SafeMath for uint

I keep getting this error when I try to run my contract on truffle....(Identifier not found or not unique. Using SafeMath for uint). Truffle v5.1.39 (core: 5.1.39) Node v14.19.0 Below is the contract ...
Edward Ilemba's user avatar
1 vote
0 answers
37 views

How to get transaction fees and minus it from balance

I created an auction exchange smart contract using solidity programming language and I am using ganache for testing this is a test file written in JavaScript. seller is the creator of auction and ...
Huzaifa Ahmed's user avatar
0 votes
0 answers
95 views

When sending a transaction using web3 I recive EIP1559FeeMarketTransaction.fillFromResult error

I am using a ganache local blockchain and truffle to test my smart contracts, this problem started to occur all of a sudden, since before I wasn't running into this problem. So when I call the ...
blackopps166's user avatar
0 votes
1 answer
23 views

Metacoin - why does `send` show the contract address in `receipt.to`?

I've recently started learning web3 and am playing with truffle. truffle(develop)> truffle migrate ... Deploying 'MetaCoin' -------------------- > transaction hash: ...
HankCa's user avatar
  • 165
0 votes
0 answers
15 views

How to find issue with a bare bone token bridge

Basically, I want to setup a very simple token bridge try to bridge some custom tokens between BSC testnet & Goerli testnet. For BSC testnet, I created 2 solidity code: TokenBSC.sol & ...
Yong Dong Zhang's user avatar
1 vote
0 answers
32 views

Truffle console: debug not showing me the code line that reverts a transaction

I'm trying to deploy my own swap router on the development network. I've got a transaction hash which reverts. I'm calling truffle console and then, when I press enter I get undefined. I can't reach ...
Radek_pl's user avatar
  • 791
1 vote
1 answer
18 views

VM Exception while processing transaction: revert while buy token

I built a token based on ERC20, when I try to buy tokens I get this error In the truffle console Quinn.deployed().then(function(ins){token=ins}) QuinnSale.deployed().then(function(ins){tokenSale = ins}...
Mizanur Rahman Sohan's user avatar
1 vote
0 answers
17 views

Mainnet fork deployment - Error: *** Deployment Failed *** "Migrations" hit an invalid opcode while deploying

I am trying to deploy contracts on a mainnet fork. I have my fork running with the command ganache --fork https://mainnet.infura.io/v3/$INFURA_API_KEY --wallet.unlockedAccounts=$MY_ACCOUNT --chain....
justinsacco's user avatar
1 vote
1 answer
873 views

Got `invalid opcode` when deploying a contract to Ganache test network from Truffle

I have launched Ganache 2.7.1 in Mac and using truffle 5.11.3. I tried to deploy below contract to Ganache but filed: helloworld.sol // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.18; ...
Joey Yi Zhao's user avatar
1 vote
0 answers
17 views

Can't pass Truffle test with an uint256 array as event property

I have this simple test in truffle: it("should emit the correct Transfer event", async function() { await this.contractNFT.multiSafeMint(accounts[0], "CID/metadata.json", 3, {...
viac92's user avatar
  • 33
1 vote
1 answer
79 views

Problems installing truffle

I've installed truffle multiple times, uninstall and installed again, all I get is command not found npm install -g truffle npm WARN deprecated [email protected]: testrpc has been renamed to ganache-cli, ...
ByteCypher's user avatar
0 votes
0 answers
18 views

Can not delete the address from the struct and array in JavaScript

My other functions are working so I guess other codes are fine. I am just getting this error after clicking the delete key: "Error deleting patient: Error: invalid address at v (web3.min.js:2:...
Jubayer Hossain's user avatar
-1 votes
1 answer
39 views

how can i deploy my Dapp?

what if I have deployed my smart contract on truffle and used ganache to deploy the same and i havn't used any test network, so if I go to deploy it on netlify to demonstrate the same will it work??
kaustubh sharma's user avatar
2 votes
1 answer
19 views

Truffle console: How to print uint array

How to print uint array in Truffle's Java script environment? Hi, I am following the link: Printing uint256 value to console while debugging with Truffle I am working on truffle console environment ...
zak100's user avatar
  • 1,406
0 votes
0 answers
69 views

abortHandshake(this, req, `Unexpected server response: ${res.statusCode}`);

truffle migrate --network sepolia Compiling your contracts... Everything is up to date, there is nothing to compile. /mnt/c/pr0/bootcamp-completed/node_modules/ws/lib/websocket.js:542 abortHandshake(...
Soyaya's user avatar
  • 31
0 votes
0 answers
29 views

How to deploy a smart contract using CREATE2 with truffle?

How can I deploy a new smart contract using CREATE2 upcode (EIP-1014) with truffle?
Ehsan Khodarahmi's user avatar
0 votes
1 answer
262 views

ERC20 transfer amount exceeds balance error in Solidity contract

I'm encountering an error while trying to transfer tokens from one address to another in my Solidity contract. When I attempt to print the balance of msg.sender, it shows a value of ...
Anantashayana Hegde's user avatar
1 vote
0 answers
9 views

In truffle, why are the accounts in testing different from the actual accounts of my mnemonics?

Say, the first account from my mnemonic yields 0x123, how come account[0] from accounts in the Truffle test suite differs from the original? Example: const BatchTransfer = artifacts.require("...
code_learner93's user avatar
0 votes
0 answers
17 views

Truffle not finding any functions (uncaught TypeError) or acknowledging debug commands (uncaught referenceError) on WSL

I'm trying to get started with using Truffle but I keep running into issues with the SimpleStorage contract and getting Truffle to work. I'm able to deploy the basic SimpleStorage contract and do x = ...
birdbamboo's user avatar
0 votes
1 answer
573 views

Cannot read properties of undefined (reading 'address') when trying to use 'truffle run verify'

I have successfully deployed my contracts to the goerli testnet but for some reason, I am not able to verify my contracts using "truffle-plugin-verify". I have added the following keys to ...
ohShoes's user avatar
  • 53
0 votes
0 answers
28 views

Getting this error while deploying contract on truffle

I am using command {truffle migrate --network 'Network Name'} to deploy on truffle. I don't know where this error is comming from. Someone who has worked on truffle, kindly help.
Manav Notnani's user avatar
0 votes
0 answers
30 views

Are accounts on Ganache Blockchain considered Nodes?

I wanted to ask a question: the accounts on Ganache are nodes, for example I mean, if I am in the project, I let the account send the transaction to another account This process considers that you are ...
Ghada AbdulWahab's user avatar
1 vote
1 answer
394 views

"Migrations" hit an invalid opcode while deploying [duplicate]

I do not understand why this is happening, I have tried many solutions, but still without effect. Updating the truffle version did not help. truffle migrate --reset 1_initial_migration.js =============...
Vi S's user avatar
  • 11
0 votes
0 answers
21 views

Compiling Vyper files results in a 'path exists outside base folder' error

I was working with the truffle VyperStorage Example Box. When I execute truffle compile it shows me the error above. I have installed Vyper using pip.The truffle config.js file is used as default so ...
Muhammad Uzair's user avatar
0 votes
1 answer
89 views

Truffle migrate Error: PollingBlockTracker

I'm trying to deploy a contract on Avalanche Fuji testnet using Truffle. Here is my truffle config: require('dotenv').config(); const mnemonic = process.env["MNEMONIC"]; const infuraUrl = ...
code_learner93's user avatar
0 votes
0 answers
15 views

Error relating to emittery package while running truffle migrate: when I am running truffle migrate following error comes. Can anyone help me on this

const mixin = emittery_1.default.mixin.bind(emittery_1.default); ^ TypeError: Cannot read properties of undefined (reading 'bind') at Object.call (C:\Users\...
MJT's user avatar
  • 1
1 vote
0 answers
15 views

IP host management in truffle_config.js (Private Ethereum Network)

I have 3 Amazon Ec2 instances (each with a Geth node running on them) and I'm running over them my Private Geth Ethereum (PoA) blokchain and I wanted to ask if it was necessary to specify the IPs of ...
AlexCav's user avatar
  • 51
0 votes
0 answers
18 views

Truffle migrate didn't migrate contract despite calling truffle migrate --reset

Here's my 2_gimmy_migration.js const Gimmy = artifacts.require("Gimmy_NFT.sol"); module.exports = function (deployer){ deployer.deploy(Gimmy); }; I had tried truffe migrate --reset ...
YaiMiChiLaoMa's user avatar
0 votes
1 answer
71 views

Truffle test USDC transfer to contract + instantiate contracts

I'm writing my smart contract tests in JS and using Truffle. I want to test a specific function in my contract that requires a token address and contract address as parameters: address _asset, ...
Piji's user avatar
  • 1
0 votes
0 answers
6 views

the command isn't running when I run the command truffle server

truffle serve is not a valid truffle command. Please see truffle help for available commands
manish reddy's user avatar
1 vote
0 answers
178 views

How to implement a custom consensus mechanism in Ganache

As a beginner in the Ethereum world, I have developed a blockchain network in Ethereum using Truffle, Ganache and Web3.js. I can deploy smart contract to Ganache network and transactions are included ...
Tripoli's user avatar
  • 11
1 vote
0 answers
17 views

How safe is it to use Truffle and store a seed in a script? [closed]

I want to do a script to automate an action. The script would run locally on my computer, using Truffle/HD-wallet-provider. Is it safe? Having my seed in the first line of the script, or do I have to ...
Thomas Marchand's user avatar
1 vote
0 answers
37 views

How to write in etherscan.io "Info" tab with hardhat/truffle?

I would like to achieve the same result as the below images. How could I populate the "Info" tab on etherscan.io with hardhat/truffle ? Example 1: https://etherscan.io/address/...
 Hovo Pinelopi 's user avatar
1 vote
1 answer
96 views

storing and retrieving data in Solidity

in another solidity study, I want to implement a contract to store user links. users must log in using the wallet address and be able to save data by name, description, type, and the link itself. ...
Lll Cilician's user avatar
2 votes
1 answer
103 views

Security and Performance of Solidity Contract

I continue to explore solidity. I wrote a small distributor contract that collects ETH from incoming transactions, records the addresses of incoming transactions with a given condition, and ...
Lll Cilician's user avatar
1 vote
1 answer
66 views

developing a contract that distributes tokens

I am developing a contract that distributes tokens and has already implemented the main functionality. The contract accepts tokens from the owner and distributes them by 1KK to each address from the ...
Lll Cilician's user avatar
2 votes
1 answer
60 views

error when working with arrays: DeclarationError: Undeclared identifier

**I am developing a smart contract distributor in the solidity language that will accept BEP20 tokens from the owner with the special contract address: 0x0000000000000000000000000000. the owner of the ...
Lll Cilician's user avatar
1 vote
1 answer
21 views

Error in truffle initial migration file

I'm learning solidity with the book "Master etherum". I'm trying to use following program in truffle. https://github.com/ethereumbook/ethereumbook/blob/develop/code/Solidity/Faucet4.sol // ...
YaiMiChiLaoMa's user avatar

1
2 3 4 5
59