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,15 @@
const { accounts, contract } = require('@openzeppelin/test-environment');
const shouldBehaveLikeUpgradeableProxy = require('./UpgradeableProxy.behaviour');
const UpgradeableProxy = contract.fromArtifact('UpgradeableProxy');
describe('UpgradeableProxy', function () {
const [proxyAdminOwner] = accounts;
const createProxy = async function (implementation, _admin, initData, opts) {
return UpgradeableProxy.new(implementation, initData, opts);
};
shouldBehaveLikeUpgradeableProxy(createProxy, undefined, proxyAdminOwner);
});