I am following the tutorial from Truffle to create a "pet shop" contract. I can follow everything until he tells me to truffle migrate
.
Here is the contract:
pragma solidity ^0.5.0;
contract Adoption{
address[16] public adopters;
function adopt(uint petId) public returns (uint) {
require(petId >= 0 && petId <= 15);
adopters[petId] = msg.sender;
return petId;
}
function getAdopters() public view returns (address[16] memory) {
return adopters;
}
}
The migrate #1:
var Migrations = artifacts.require("./Migrations.sol");
module.exports = function(deployer) {
deployer.deploy(Migrations);
};
The migrate #2:
var Adoption = artifacts.require("./Adoption.sol");
module.exports = function(deployer) {
deployer.deploy(Adoption);
};
The network seems to be configured right on the truffle-config file
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// for more about customizing your Truffle configuration!
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*" // Match any network id
}
}
};
And Ganache(testing) seems to not have mined any blocks even though the network is right:
It is weird, I haven't found anyone else with the same issue as me, any ideas?