@openzeppelin/wizard 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@
9
9
  "author": "",
10
10
  "license": "ISC",
11
11
  "devDependencies": {
12
- "@openzeppelin/contracts-upgradeable": "^4.8.0",
12
+ "@openzeppelin/contracts-upgradeable": "^4.8.3",
13
13
  "@openzeppelin/hardhat-upgrades": "^1.21.0",
14
14
  "@ethersproject/abi": "^5.7.0",
15
15
  "@ethersproject/providers": "^5.7.2",
package/src/erc721.ts CHANGED
@@ -143,6 +143,7 @@ function addURIStorage(c: ContractBuilder) {
143
143
 
144
144
  c.addOverride('ERC721URIStorage', functions._burn);
145
145
  c.addOverride('ERC721URIStorage', functions.tokenURI);
146
+ c.addOverride('ERC721URIStorage', supportsInterface);
146
147
  }
147
148
 
148
149
  function addBurnable(c: ContractBuilder) {
package/src/governor.ts CHANGED
@@ -117,6 +117,7 @@ function addBase(c: ContractBuilder, { name }: GovernorOptions) {
117
117
  c.addOverride('Governor', functions._cancel);
118
118
  c.addOverride('Governor', functions._executor);
119
119
  c.addOverride('Governor', supportsInterface);
120
+ c.addOverride('Governor', functions.cancel);
120
121
  }
121
122
 
122
123
  function addSettings(c: ContractBuilder, allOpts: Required<GovernorOptions>) {
@@ -365,6 +366,8 @@ function addBravo(c: ContractBuilder, { bravo, timelock }: GovernorOptions) {
365
366
  path: '@openzeppelin/contracts/governance/compatibility/GovernorCompatibilityBravo.sol',
366
367
  });
367
368
  c.addOverride('IGovernor', functions.state);
369
+ c.addOverride('IGovernor', functions.cancel);
370
+ c.addOverride('GovernorCompatibilityBravo', functions.cancel);
368
371
  c.addOverride('GovernorCompatibilityBravo', functions.propose);
369
372
  c.addOverride('IERC165', supportsInterface);
370
373
  }
@@ -433,6 +436,16 @@ const functions = defineFunctions({
433
436
  returns: ['uint256'],
434
437
  kind: 'internal',
435
438
  },
439
+ cancel: {
440
+ args: [
441
+ { name: 'targets', type: 'address[] memory' },
442
+ { name: 'values', type: 'uint256[] memory' },
443
+ { name: 'calldatas', type: 'bytes[] memory' },
444
+ { name: 'descriptionHash', type: 'bytes32' },
445
+ ],
446
+ returns: ['uint256'],
447
+ kind: 'public',
448
+ },
436
449
  state: {
437
450
  args: [
438
451
  { name: 'proposalId', type: 'uint256' },
@@ -4,12 +4,10 @@ import hre from 'hardhat';
4
4
  import type { BuildInfo } from 'hardhat/types';
5
5
  import type { SourceUnit } from 'solidity-ast';
6
6
  import { findAll } from 'solidity-ast/utils';
7
- import _rimraf from 'rimraf';
7
+ import { rimraf } from 'rimraf';
8
8
  import { promisify } from 'util';
9
9
  import { version } from "@openzeppelin/contracts/package.json";
10
10
 
11
- const rimraf = promisify(_rimraf);
12
-
13
11
  import type { OpenZeppelinContracts } from '../../openzeppelin-contracts';
14
12
  import { writeGeneratedSources } from '../generate/sources';
15
13
  import { mapValues } from '../utils/map-values';