Questions tagged [truffle-contract]
The truffle-contract tag has no summary.
319 questions
0 votes
1 answer
117 views
"ContractExecutionError: Error happened while trying to execute a function inside a smart contract" after calling it via mint button
Contract Code: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/...
0 votes
1 answer
51 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 ...
1 vote
0 answers
46 views
Deactivate clean-room environment in truffle
Everything is in the question, does anyone have a way to prevent the redeployment of the contract every time you run a test and keep using the same "contract" feature ? Edit : I've found it, ...
2 votes
3 answers
896 views
why command Truffle init not creating Migrations.sol?
I created new folder in truffle with command truffle init version of truffle and others Truffle v5.5.30 (core: 5.5.30) Ganache v7.4.0 Solidity - 0.8.17 (solc-js) Node v16.16.0 Web3.js v1.7.4 but it ...
1 vote
1 answer
33 views
Issue with Array of fixed count
What is the difference between using mapping and without mapping? can I declare the tickets variable with mapping? Ticket[TOTAL_TICKETS] public tickets; Here is the solidity smartcontract pragma ...
0 votes
1 answer
453 views
Verify that a method call is initiated from a specific Smart Contract
As my smart contract is >24k, I read that I need to break it into multiple (smaller) smart contracts. So, my current design is to have a Core contract that has all the data in arrays. This Core has ...
1 vote
1 answer
466 views
truffle installed but not working
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 ...
0 votes
1 answer
485 views
ERC721 is being minted to null address
Here is the contract code to mint ERC721 tokens: contract NFT is ERC721URIStorage, Ownable { mapping(uint256 => address) private _owners; mapping(address => uint256) private _balances; ...