0

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:enter image description here

1

1 Answer 1

0
const MonstersOnTheWayUp = artifacts.require('MonstersOnTheWayUp.sol');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.