Skip to main content

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
14 views

Error: *** Deployment Failed *** "IdentityVerification" -- unknown account. Migrating a smart contract on Truffle connecting to Geth nodes

I have created a test blockchain network and created a smart contract for validators to verify members, which I am trying to deploy with truffle. A bootnode serves as the Host on the main network: ...
Matt's user avatar
  • 1
0 votes
0 answers
8 views

eth_getBlockByNumber loop in truffle genache

When writing contracts and testing them with truffle develop, I like to have two terminals: truffle develop --log truffle develop One is for logs so I see what is happening and in another one I test. ...
user680891's user avatar
0 votes
0 answers
16 views

Uncaught ReferenceError: handleRegistration is not defined at HTMLButtonElement.onclick

I have created and deployed a smart contract for IP management using truffle. I have created a frontend to interact with this deployed contract. <head> <meta charset="UTF-8"> ...
Yash R. Khandelwal's user avatar
1 vote
2 answers
42 views

Ganache alternative in docker

After the Sunset of Truffle and Ganache . Are they already some alternative to the Ganache docker image https://hub.docker.com/r/trufflesuite/ganache with enabled persistent data for local development ...
Majd TL's user avatar
  • 3,237
1 vote
1 answer
28 views

truffle console doesnt work: Unexpected error setting up the environment or provisioning contracts while instantiating the console

(base) ➜ METoken truffle console bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?) Unexpected error setting up the environment or provisioning contracts ...
yuyang yu's user avatar
1 vote
0 answers
36 views

Truffle deployment Failed " hit an invalid opcode while deploying."

This is a token maker code, so its failing to deploy with the following reason: > *** Deployment Failed *** "TokenMaker" hit an invalid opcode while deploying. Try: * Verifying that ...
emkiddo's user avatar
  • 21
0 votes
0 answers
10 views

Truffle debugger can't connect to node

I'm trying to debug a contract. I have ganache open forking the Ethereum mainnet that uses in the settings the same host and port as my truffle-config.js (127.0.0.1:7545). I can migrate/deploy and ...
Hiperfly's user avatar
0 votes
0 answers
10 views

DNS using blockchain (how can i hashed my domain name ) in the code below help me to complete this code

import Web3 from "web3"; import Registry from "./contracts/Registry.json"; import Resolver from "./contracts/Resolver.json"; import Cache from "./contracts/Cache....
Zain Alramahi's user avatar
0 votes
1 answer
15 views

Wrong type of smart contract being instantiated on using new keyword

I have 2 smart contracts A and B that I have defined in the same file. B is used to instantiate A using the new keyword. However, when I try to interact on Remix with the newly instantiated contract ...
mehak's user avatar
  • 1
0 votes
0 answers
28 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
487 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
38 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
14 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
45 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
10 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
23 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
29 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
29 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
100 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
54 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
48 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
41 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
99 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
24 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
  • 175
0 votes
0 answers
16 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
36 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
22 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
20 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
2k 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
99 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
54 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
21 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
102 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
37 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
577 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
23 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
814 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
36 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
570 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
1 answer
126 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
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
1 answer
85 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
1 vote
0 answers
222 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
199 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

1
2 3 4 5
59