ERC1967Proxy.test.js 451 B

123456789101112
  1. const shouldBehaveLikeProxy = require('../Proxy.behaviour');
  2. const ERC1967Proxy = artifacts.require('ERC1967Proxy');
  3. contract('ERC1967Proxy', function (accounts) {
  4. // `undefined`, `null` and other false-ish opts will not be forwarded.
  5. const createProxy = async function (implementation, initData, opts) {
  6. return ERC1967Proxy.new(implementation, initData, ...[opts].filter(Boolean));
  7. };
  8. shouldBehaveLikeProxy(createProxy, accounts);
  9. });