I'm trying to deploy the following smart contract:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
contract MonstersOnTheWayUp is Initializable, ERC20Upgradeable {
function initialize() initializer public {
__ERC20_init("Promethium", "PRM");
}
}
I'm using this script for migration:
// migrations/3_deploy_upgradeable_box.js
const { deployProxy } = require('@openzeppelin/truffle-upgrades');
const MonstersOnTheWayUp = artifacts.require("../contracts/MonstersOnTheWayUp");
module.exports = async function (deployer) {
await deployProxy(MonstersOnTheWayUp, [""], { deployer, initializer: 'initialize' });
};
But when I try to run the command:
npx truffle deploy --reset --network rinkeby
I get the following error:
Error: The requested contract was not found. Make sure the source code is available for compilation
Why is this happening? This is my project directory: