TransparentUpgradeableProxy.test.js 703 B

123456789101112131415
  1. const shouldBehaveLikeUpgradeableProxy = require('./UpgradeableProxy.behaviour');
  2. const shouldBehaveLikeTransparentUpgradeableProxy = require('./TransparentUpgradeableProxy.behaviour');
  3. const TransparentUpgradeableProxy = artifacts.require('TransparentUpgradeableProxy');
  4. contract('TransparentUpgradeableProxy', function (accounts) {
  5. const [proxyAdminAddress, proxyAdminOwner] = accounts;
  6. const createProxy = async function (logic, admin, initData, opts) {
  7. return TransparentUpgradeableProxy.new(logic, admin, initData, opts);
  8. };
  9. shouldBehaveLikeUpgradeableProxy(createProxy, proxyAdminAddress, proxyAdminOwner);
  10. shouldBehaveLikeTransparentUpgradeableProxy(createProxy, accounts);
  11. });