Unable to deploy Upgradeable ERC20 using Truffle: The requested contract was not found

Hi @vito,

Welcome to the community :wave:

Unfortunately I wasn’t able to reproduce your error.

I was able to use your token and migrations script to deploy to Truffle development network.

Can you try using the contract and migrations script and deploy to Truffle develop?

I am using WSL2 on Windows 10:

$ npx truffle version
Truffle v5.1.56 (core: 5.1.56)
Solidity - 0.6.12 (solc-js)
Node v10.22.1
Web3.js v1.2.9

I used the setup from: OpenZeppelin Upgrades: Step by Step Tutorial for Truffle

I installed OpenZeppelin Contracts Upgradeable

$ npm i @openzeppelin/contracts-upgradeable

Deploy

Using Truffle develop

$ npx truffle develop
Truffle Develop started at http://127.0.0.1:9545/

...

truffle(develop)> migrate

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.



Starting migrations...
======================
> Network name:    'develop'
> Network id:      5777
> Block gas limit: 6721975 (0x6691b7)


1_initial_migration.js
======================

   Deploying 'Migrations'
   ----------------------
...

2_deploy_token.js
=================

   Deploying 'MyToken'
   -------------------
...

   Deploying 'ProxyAdmin'
   ----------------------
...

   Deploying 'AdminUpgradeabilityProxy'
   ------------------------------------
...


truffle(develop)> token = await MyToken.deployed()
undefined
truffle(develop)> await token.name()
'My Token'
truffle(develop)> (await token.totalSupply()).toString()
'100000000000000000000000'