Add Proxies from OpenZeppelin SDK (#2335)
This commit is contained in:
committed by
GitHub
parent
0b489f4d79
commit
cb791a1b21
17
test/proxy/TransparentUpgradeableProxy.test.js
Normal file
17
test/proxy/TransparentUpgradeableProxy.test.js
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user