Add Proxies from OpenZeppelin SDK (#2335)

This commit is contained in:
Francisco Giordano
2020-08-27 21:02:42 -03:00
committed by GitHub
parent 0b489f4d79
commit cb791a1b21
17 changed files with 1618 additions and 0 deletions

View File

@ -0,0 +1,17 @@
const { accounts, contract } = require('@openzeppelin/test-environment');
const shouldBehaveLikeUpgradeableProxy = require('./UpgradeableProxy.behaviour');
const shouldBehaveLikeTransparentUpgradeableProxy = require('./TransparentUpgradeableProxy.behaviour');
const TransparentUpgradeableProxy = contract.fromArtifact('TransparentUpgradeableProxy');
describe('TransparentUpgradeableProxy', function () {
const [proxyAdminAddress, proxyAdminOwner] = accounts;
const createProxy = async function (logic, admin, initData, opts) {
return TransparentUpgradeableProxy.new(logic, admin, initData, opts);
};
shouldBehaveLikeUpgradeableProxy(createProxy, proxyAdminAddress, proxyAdminOwner);
shouldBehaveLikeTransparentUpgradeableProxy(createProxy, accounts);
});