el comando "migrar trufa" funciona correctamente (sin errores) pero solo migra "Migrations.sol". Ni siquiera intenta migrar con 2_deploy_contracts.js
1_migración_inicial.js:
var Migrations = artifacts.require("./Migrations.sol"); module.exports = function(deployer) { deployer.deploy(Migrations); };Migraciones.sol:
enter code herepragma solidity ^0.4.25; contract Migrations { address public owner; uint public last_completed_migration; modifier restricted() { if (msg.sender == owner) _; } function Migration() public { owner = msg.sender; } function setCompleted(uint completed) restricted public{ last_completed_migration = completed; } function upgrade(address new_address) restricted public{ Migrations upgraded = Migrations(new_address); upgraded.setCompleted(last_completed_migration); } }2_deploy_contratos.js:
var Election = artifacts.require("./Election.sol"); module.exports = function(deployer) { deployer.deploy(Election); };Elección.sol:
pragma solidity ^0.4.25; contract Election { // Store candidate // Read candidate string public candidate; // Constructor // Our constructor will be run when the contract gets deployed, so must be public constructor() public{ candidate = "Candidate 1"; } }Solución: eliminé la carpeta de mi proyecto y la reconstruí. Esto lo arregló. No estoy seguro exactamente de cuál era el problema.