Hello,
I created ERC20 - Upgradable Transparent Proxy Contract. When I try to transfer an ownership to GnosisSafe: to transfer ownership, truffle is used and run the following script:
const { admin } = require('@openzeppelin/truffle-upgrades');
module.exports = async function (deployer, network) {
const gnosisSafe = "XXX"
if (network !== 'test') {
await admin.transferProxyAdminOwnership(gnosisSafe);
}
};
It is getting an error as shown below:
4_deploy.js
=================================
RuntimeError: VM Exception while processing transaction: revert
at Object.transferProxyAdminOwnership (/node_modules/@openzeppelin/truffle-upgrades/src/admin.ts:25:15)
at module.exports (/migrations/4_transfer_ownership_to_Gnosis.js:16:5)
at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:75:1)
at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:56:1)
at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:217:1)
at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:87:1)
at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:258:1)
at setupDryRunEnvironmentThenRunMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:246:1)
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:215:1)
at Command.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:183:1)
Truffle v5.4.24 (core: 5.4.24)
Node v16.13.0
Gnosis Safe is created for rinkeby. Idea idea?
Thank you
Code to reproduce