From 2e8827b8fe3bb1269587b44db8f7535e96dd2c56 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 10:14:03 -0500 Subject: [PATCH 01/18] Use named import - WIP --- packages/core/src/governor.ts | 10 +++++++++- packages/core/src/options.ts | 3 ++- packages/core/src/print.ts | 5 ++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/core/src/governor.ts b/packages/core/src/governor.ts index cd0226f8..88a2a705 100644 --- a/packages/core/src/governor.ts +++ b/packages/core/src/governor.ts @@ -250,6 +250,11 @@ function addCounting(c: ContractBuilder) { function addVotes(c: ContractBuilder) { const tokenArg = '_token'; + c.addParent({ + name: 'IVotes', + path: `@openzeppelin/contracts/governance/utils/IVotes.sol`, + transpiled: false, + }); c.addConstructorArgument({ type: { name: 'IVotes', @@ -313,6 +318,7 @@ const timelockModules = { openzeppelin: { timelockType: { name: 'TimelockController', + path: `@openzeppelin/contracts/governance/TimelockController.sol`, }, timelockParent: { name: 'GovernorTimelockControl', @@ -322,6 +328,7 @@ const timelockModules = { compound: { timelockType: { name: 'ICompoundTimelock', + path: `@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol`, transpiled: false, }, timelockParent: { @@ -359,8 +366,9 @@ function addTimelock(c: ContractBuilder, { timelock }: Required const timelockArg = '_timelock'; const { timelockType, timelockParent } = timelockModules[timelock]; + c.addParent(timelockType); c.addConstructorArgument({ - type: timelockType, + type: timelockType.name, name: timelockArg, }); diff --git a/packages/core/src/options.ts b/packages/core/src/options.ts index 0e7735fe..0442ebce 100644 --- a/packages/core/src/options.ts +++ b/packages/core/src/options.ts @@ -16,10 +16,11 @@ const upgradeableImport = (p: ParentContract): ParentContract => { // Use path.posix to get forward slashes return { ...p, + name: upgradeableName(p.name), // Contract name path: path.posix.format({ ext, dir: dir.replace(/^@openzeppelin\/contracts/, '@openzeppelin/contracts-upgradeable'), - name: upgradeableName(name), + name: upgradeableName(name), // Solidity file name }), } }; diff --git a/packages/core/src/print.ts b/packages/core/src/print.ts index 5a5490bd..3cb1f1c8 100644 --- a/packages/core/src/print.ts +++ b/packages/core/src/print.ts @@ -27,7 +27,10 @@ export function printContract(contract: Contract, opts?: Options): string { `pragma solidity ^${SOLIDITY_VERSION};`, ], - contract.imports.map(p => `import "${helpers.transformImport(p).path}";`), + contract.imports.map(p => { + const parent = helpers.transformImport(p); + return `import {${parent.name}} from "${parent.path}";` + }), [ ...printNatspecTags(contract.natspecTags), From be9b16ee3c8c7f2da078264dfaf8e518fba84e19 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 10:33:54 -0500 Subject: [PATCH 02/18] Improvements WIP --- packages/core/src/contract.ts | 21 ++++++++++++++------- packages/core/src/erc20.ts | 10 ++++++++++ packages/core/src/governor.ts | 4 ++-- packages/core/src/options.ts | 6 +++--- packages/core/src/stablecoin.ts | 11 ++++++++++- 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/packages/core/src/contract.ts b/packages/core/src/contract.ts index e866c6e7..e7142d54 100644 --- a/packages/core/src/contract.ts +++ b/packages/core/src/contract.ts @@ -5,7 +5,7 @@ export interface Contract { license: string; parents: Parent[]; natspecTags: NatspecTag[]; - imports: ParentContract[]; + imports: ImportContract[]; functions: ContractFunction[]; constructorCode: string[]; constructorArgs: FunctionArgument[]; @@ -16,11 +16,12 @@ export interface Contract { export type Value = string | number | { lit: string } | { note: string, value: Value }; export interface Parent { - contract: ParentContract; + contract: ImportContract; params: Value[]; + importOnly?: boolean; } -export interface ParentContract extends ReferencedContract { +export interface ImportContract extends ReferencedContract { path: string; } @@ -30,7 +31,7 @@ export interface ReferencedContract { } export interface Using { - library: ParentContract; + library: ImportContract; usingFor: string; } @@ -93,7 +94,7 @@ export class ContractBuilder implements Contract { } get parents(): Parent[] { - return [...this.parentMap.values()].sort((a, b) => { + return [...this.parentMap.values()].filter(p => !p.importOnly).sort((a, b) => { if (a.contract.name === 'Initializable') { return -1; } else if (b.contract.name === 'Initializable') { @@ -104,7 +105,7 @@ export class ContractBuilder implements Contract { }); } - get imports(): ParentContract[] { + get imports(): ImportContract[] { return [ ...[...this.parentMap.values()].map(p => p.contract), ...this.using.map(u => u.library), @@ -119,12 +120,18 @@ export class ContractBuilder implements Contract { return [...this.variableSet]; } - addParent(contract: ParentContract, params: Value[] = []): boolean { + addParent(contract: ImportContract, params: Value[] = []): boolean { const present = this.parentMap.has(contract.name); this.parentMap.set(contract.name, { contract, params }); return !present; } + addImportOnly(contract: ImportContract): boolean { + const present = this.parentMap.has(contract.name); + this.parentMap.set(contract.name, { contract, params: [], importOnly: true }); + return !present; + } + addOverride(parent: ReferencedContract, baseFn: BaseFunction, mutability?: FunctionMutability) { const fn = this.addFunction(baseFn); fn.override.add(parent); diff --git a/packages/core/src/erc20.ts b/packages/core/src/erc20.ts index 83237dc5..0bef7afa 100644 --- a/packages/core/src/erc20.ts +++ b/packages/core/src/erc20.ts @@ -168,6 +168,11 @@ function addPermit(c: ContractBuilder, name: string) { path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol', }; c.addParent(ERC20Permit, [name]); + + c.addImportOnly({ + name: 'Nonces', + path: '@openzeppelin/contracts/utils/Nonces.sol', + }) c.addOverride(ERC20Permit, functions.nonces); } @@ -183,6 +188,11 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { }; c.addParent(ERC20Votes); c.addOverride(ERC20Votes, functions._update); + + c.addImportOnly({ + name: 'Nonces', + path: '@openzeppelin/contracts/utils/Nonces.sol', + }) c.addOverride({ name: 'Nonces', }, functions.nonces); diff --git a/packages/core/src/governor.ts b/packages/core/src/governor.ts index 88a2a705..18ecae0f 100644 --- a/packages/core/src/governor.ts +++ b/packages/core/src/governor.ts @@ -250,7 +250,7 @@ function addCounting(c: ContractBuilder) { function addVotes(c: ContractBuilder) { const tokenArg = '_token'; - c.addParent({ + c.addImportOnly({ name: 'IVotes', path: `@openzeppelin/contracts/governance/utils/IVotes.sol`, transpiled: false, @@ -366,7 +366,7 @@ function addTimelock(c: ContractBuilder, { timelock }: Required const timelockArg = '_timelock'; const { timelockType, timelockParent } = timelockModules[timelock]; - c.addParent(timelockType); + c.addImportOnly(timelockType); c.addConstructorArgument({ type: timelockType.name, name: timelockArg, diff --git a/packages/core/src/options.ts b/packages/core/src/options.ts index 0442ebce..b86fe6c4 100644 --- a/packages/core/src/options.ts +++ b/packages/core/src/options.ts @@ -1,6 +1,6 @@ import path from 'path'; -import type { Contract, ReferencedContract, ParentContract } from './contract'; +import type { Contract, ReferencedContract, ImportContract } from './contract'; import { inferTranspiled } from './infer-transpiled'; const upgradeableName = (n: string) => { @@ -11,7 +11,7 @@ const upgradeableName = (n: string) => { } } -const upgradeableImport = (p: ParentContract): ParentContract => { +const upgradeableImport = (p: ImportContract): ImportContract => { const { dir, ext, name } = path.parse(p.path); // Use path.posix to get forward slashes return { @@ -26,7 +26,7 @@ const upgradeableImport = (p: ParentContract): ParentContract => { }; export interface Options { - transformImport?: (parent: ParentContract) => ParentContract; + transformImport?: (parent: ImportContract) => ImportContract; } export interface Helpers extends Required { diff --git a/packages/core/src/stablecoin.ts b/packages/core/src/stablecoin.ts index 0db75b89..e99f10fc 100644 --- a/packages/core/src/stablecoin.ts +++ b/packages/core/src/stablecoin.ts @@ -251,8 +251,12 @@ function addPermit(c: ContractBuilder, name: string) { path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol', }; c.addParent(ERC20Permit, [name]); - c.addOverride(ERC20Permit, functions.nonces); + c.addImportOnly({ + name: 'Nonces', + path: '@openzeppelin/contracts/utils/Nonces.sol', + }) + c.addOverride(ERC20Permit, functions.nonces); } function addVotes(c: ContractBuilder, clockMode: ClockMode) { @@ -266,6 +270,11 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { }; c.addParent(ERC20Votes); c.addOverride(ERC20Votes, functions._update); + + c.addImportOnly({ + name: 'Nonces', + path: '@openzeppelin/contracts/utils/Nonces.sol', + }) c.addOverride({ name: 'Nonces', }, functions.nonces); From 95952cfbe4854f7d072a4617a14a0f316666dfad Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 10:36:37 -0500 Subject: [PATCH 03/18] Fixes --- packages/core/src/governor.ts | 2 +- packages/core/src/stablecoin.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/src/governor.ts b/packages/core/src/governor.ts index 18ecae0f..4591cdfd 100644 --- a/packages/core/src/governor.ts +++ b/packages/core/src/governor.ts @@ -368,7 +368,7 @@ function addTimelock(c: ContractBuilder, { timelock }: Required c.addImportOnly(timelockType); c.addConstructorArgument({ - type: timelockType.name, + type: timelockType, name: timelockArg, }); diff --git a/packages/core/src/stablecoin.ts b/packages/core/src/stablecoin.ts index e99f10fc..1207bd06 100644 --- a/packages/core/src/stablecoin.ts +++ b/packages/core/src/stablecoin.ts @@ -235,6 +235,10 @@ function addCustodian(c: ContractBuilder, access: Access) { break; } case 'managed': { + c.addImportOnly({ + name: 'AuthorityUtils', + path: `@openzeppelin/contracts/access/manager/AuthorityUtils.sol`, + }); const logic = [ `(bool immediate,) = AuthorityUtils.canCallWithDelay(authority(), user, address(this), bytes4(_msgData()[0:4]));`, `return immediate;` From 84583c98306c9cf23da77139f1e10e669d8dda37 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 10:44:11 -0500 Subject: [PATCH 04/18] Update snapshots --- packages/core/src/contract.test.ts.md | 14 +- packages/core/src/contract.test.ts.snap | Bin 965 -> 974 bytes packages/core/src/custom.test.ts.md | 24 +-- packages/core/src/custom.test.ts.snap | Bin 802 -> 826 bytes packages/core/src/erc1155.test.ts.md | 78 ++++---- packages/core/src/erc1155.test.ts.snap | Bin 1715 -> 1788 bytes packages/core/src/erc20.test.ts.md | 162 ++++++++------- packages/core/src/erc20.test.ts.snap | Bin 1843 -> 1950 bytes packages/core/src/erc721.test.ts.md | 126 ++++++------ packages/core/src/erc721.test.ts.snap | Bin 2039 -> 2137 bytes packages/core/src/governor.test.ts.md | 220 ++++++++++++--------- packages/core/src/governor.test.ts.snap | Bin 1959 -> 2079 bytes packages/core/src/stablecoin.test.ts.md | 134 +++++++------ packages/core/src/stablecoin.test.ts.snap | Bin 1600 -> 1678 bytes packages/core/src/zip-foundry.test.ts.md | 48 ++--- packages/core/src/zip-foundry.test.ts.snap | Bin 3378 -> 3472 bytes packages/core/src/zip-hardhat.test.ts.md | 29 +-- packages/core/src/zip-hardhat.test.ts.snap | Bin 2221 -> 2284 bytes 18 files changed, 455 insertions(+), 380 deletions(-) diff --git a/packages/core/src/contract.test.ts.md b/packages/core/src/contract.test.ts.md index f4d77b57..40be15d7 100644 --- a/packages/core/src/contract.test.ts.md +++ b/packages/core/src/contract.test.ts.md @@ -24,7 +24,7 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "./Bar.sol";␊ + import {Bar} from "./Bar.sol";␊ ␊ contract Foo is Bar {␊ }␊ @@ -38,8 +38,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "./Bar.sol";␊ - import "./Quux.sol";␊ + import {Bar} from "./Bar.sol";␊ + import {Quux} from "./Quux.sol";␊ ␊ contract Foo is Bar, Quux {␊ }␊ @@ -53,7 +53,7 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "./Bar.sol";␊ + import {Bar} from "./Bar.sol";␊ ␊ contract Foo is Bar {␊ constructor() Bar("param1", "param2") {}␊ @@ -68,8 +68,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "./Bar.sol";␊ - import "./Quux.sol";␊ + import {Bar} from "./Bar.sol";␊ + import {Quux} from "./Quux.sol";␊ ␊ contract Foo is Bar, Quux {␊ constructor() Bar("param1", "param2") {}␊ @@ -183,7 +183,7 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "./Bar.sol";␊ + import {Bar} from "./Bar.sol";␊ ␊ contract Foo is Bar {␊ constructor() Bar("param1", "param2") {␊ diff --git a/packages/core/src/contract.test.ts.snap b/packages/core/src/contract.test.ts.snap index b1ffc2d928db0f289212e65aff1fdd7d1b559f2f..3b63457a1e0771dd73b607938f19353e13794965 100644 GIT binary patch literal 974 zcmV;<12OzTRzVe4zW<@ zOGpz8$RCRc00000000B+SG#W$F&Ixkyt1+J68aPgl#28&jQ}AkB$NUY5|2VVv<$7B zyYCv)JNvMGeNZ~Uz`zC)JC6~G0WpD?*gCN?@i(x5U_!oL(m1&U`cRWf+>+Qn+rQuM z``zcyFTJYIomu(p6)LKHLEBWxH>k>sKp6t%-%jhS&Cv!0S zz_wv*^wPxOHR>RfIC#}Xrl?0zoQLaI$8)v~BRmL+qE#PZo~jz$43XWzFhrj+7)kb% zFm=W%S*2Vk$V@;$a-X_XEy7gEI%k#3!?|1o+7-@WDYu+UFwZpx;^hg1L}(Cg(BCyf z-}O4Pjo4`ra-m?ULc}t7f(MYd>l@ z`k_prV8m~9)KL^J-ySKKiV**dCCaYOTWY*4qY#Ca3S||7-a6TGIG)vP#uM$qbgAcI zoCmvvbyvm+>-Ya*U4K|_sv3&XIG=7sP+LfFz511;Sr}-*=?bGALd!Dk4m#9&hz8t^ z(OgH zsVk+9pCf{js-I%A7lwLId#s)=SzwO%5yAyHT^{aU-Pc*AT!cRuwBGa^tvH-Y=z@@u zK=+i=l|q~gJOiB2S_S{&4vHRO87MO+|3=%eNEp#28=2NAgMKd4xcSP-)7q`BA$v{X$i;U)3e z_wM)c{O;YVQ*pU9Cm%gSMU{)(;!Fu*DX0)hElDLKzN~U3@2%Q4QDpMrzRdnicxAgY z2eWrf6UN6bO!i);7BY#wBQ`Qc9g1QAu8d6NOcRE==MzOMF2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H&i@fm1UkYp(QJn7^&to>O|2Zx~xc!SlF5lcP$Ynt;3vxLwxg1y4*4Fxq zyk^rxRck1-#tGuC!(?o&f4;G>q?MvHU3w0jT!$(btT@AplMWeIo*v$u>8N;kEpd#3 zWDg?Q2|>oe_alc9(8hC9=&jg}1vXHLy}rZ9aiol5iDW=TI)iX5i2hX~`X3G<`h!1+ zyY-Jk`2V_95dKR>__ZJF6~wyc3;0@t-7~ocrWc!+0-{?S|$F+H<;2Ap0GW ho=(`evm;YRz3}toiHQaUHN3*q@PFHtaTrNW000jnizEO5 diff --git a/packages/core/src/erc721.test.ts.md b/packages/core/src/erc721.test.ts.md index f0cedb01..4c986927 100644 --- a/packages/core/src/erc721.test.ts.md +++ b/packages/core/src/erc721.test.ts.md @@ -12,7 +12,7 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721 {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -27,7 +27,7 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721 {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -46,8 +46,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";␊ ␊ contract MyToken is ERC721, ERC721Enumerable {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -88,8 +88,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -124,9 +124,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, Ownable {␊ constructor(address initialOwner)␊ @@ -172,9 +172,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, Ownable {␊ uint256 private _nextTokenId;␊ @@ -220,8 +220,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ ␊ contract MyToken is ERC721, ERC721Burnable {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -236,9 +236,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, ERC721Burnable {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -273,9 +273,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Pausable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, ERC721Pausable, Ownable {␊ constructor(address initialOwner)␊ @@ -311,8 +311,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, Ownable {␊ constructor(address initialOwner)␊ @@ -334,8 +334,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ ␊ contract MyToken is ERC721, AccessControl {␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ @@ -370,8 +370,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ ␊ contract MyToken is ERC721, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -393,8 +393,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, Ownable {␊ uint256 private _nextTokenId;␊ @@ -419,9 +419,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ @@ -453,9 +453,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ @@ -487,9 +487,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ - import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ @@ -530,14 +530,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ + import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ + import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ @@ -603,15 +603,15 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ + import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ + import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ @@ -684,15 +684,15 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ + import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ + import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, AccessManagedUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ diff --git a/packages/core/src/erc721.test.ts.snap b/packages/core/src/erc721.test.ts.snap index 64c00819812840d152aebc1a4196c6fd7df3b370..fd6cdcf75d0493996322ceb4064c8eff671f2446 100644 GIT binary patch literal 2137 zcmV-f2&VTzRzV~aZ zUj1Y`&L4{i00000000B+Tgz`7#~HUQ2ML%Sl6!y-h#V-0`(8Wyb-!m*^Nj!g&q!clBh-T&o0t>m@&Oh6w_jTp6!6z;@2uZ? z^Opa!_QtJuZ?CNx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Tc<{|uWRKHbr3m`ROy)eA1{xg% z+SD{@*L8`|n>c_8&*6ZfBL_2NfL0GY4s2HLcRD; zU}(5qJ(9w$b@eia+iBB5T}Pa2J6$qfK92YmtYHqq1Pct!oi0Hvc9B7W9CZjL zE~JO2I3sujE&r^fm#~Ff_R8A zE8)g{kO1yUt6N*!$dD~Vw$YKT({dP5S3;JW5_s*-N0nM@(L5JPxjhL-6OM(BsZer@XObV0#o!i> zz$Vvp*0TjYV9@ULw5{6it@X;8oF+eTO*zu3(32S+F}z{p6>Iznq=xl5e!JvZU{Rhe zB^ER3i=`+!xfh*a4S26(iDR`8%VIT))ht$LFIJDjSQXepTtLfK+_!%vMe1jZao>JP zA~kYL-38;g`stoB6)(wM*Sv9C@r2xOD0q-wj+`ZRhUV1lU?NHe_6m?Cm*V9pmc*~hYygFXzodu0+8uj{T{3m6jF7g5{ubdP?bR1hzH_rVoF~eVS z88gh7Va5z6VTO~=wZFgnIIY=&@XR9UTV6&y`@76M@$_5!_A#TTeas2^Zx5b^ff7k2 zs9Upa(|-cs_8rEWq+b;#DTZ_(oe|=U5NCvVyq{dYrews!-gdqCyu^+F$++>na%1H~ zwu~ufOnHKIG{}c89bb+gTh0_`mi9+t&auLC#h%sgP{*Us>N(DmKTq&l_B;r5tVYJ5 VGX|Y8=(AwZ{{c*tb4Tq{006hh-<|*f diff --git a/packages/core/src/governor.test.ts.md b/packages/core/src/governor.test.ts.md index f60ee3ff..6e56da73 100644 --- a/packages/core/src/governor.test.ts.md +++ b/packages/core/src/governor.test.ts.md @@ -12,11 +12,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -109,11 +111,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -202,10 +206,12 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -292,10 +298,12 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -382,12 +390,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -496,12 +506,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorStorage} from "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorStorage, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -598,11 +610,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -691,11 +705,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -784,10 +800,12 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -874,12 +892,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -988,11 +1008,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1081,11 +1103,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1178,11 +1202,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1271,11 +1297,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {ICompoundTimelock} from "@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol";␊ + import {GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockCompound {␊ constructor(IVotes _token, ICompoundTimelock _timelock)␊ @@ -1364,12 +1392,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1478,11 +1508,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1571,12 +1603,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1685,11 +1719,13 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/governance/Governor.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ diff --git a/packages/core/src/governor.test.ts.snap b/packages/core/src/governor.test.ts.snap index fd365374cbb406d83757a910dfbad9db55d745d6..9bc66e9ab4ff824c7d4f598ae7d31292b09d5d17 100644 GIT binary patch literal 2079 zcmV+)2;lcYRzVLF~0zydJCK5N0Kplkxn`#p~OOi&-1t}E}iN28t z@gf>I_9PkA_P8_Sq@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yc!1tP?_&iS^bUHrog16p{|D{tl1>}j001&o=P3XH diff --git a/packages/core/src/stablecoin.test.ts.md b/packages/core/src/stablecoin.test.ts.md index 497e82c6..906d21f5 100644 --- a/packages/core/src/stablecoin.test.ts.md +++ b/packages/core/src/stablecoin.test.ts.md @@ -12,8 +12,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -28,9 +29,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Burnable, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -45,10 +47,11 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -84,10 +87,11 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import "@openzeppelin/contracts/access/AccessControl.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessControl, ERC20Permit {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ @@ -127,10 +131,11 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessManaged, ERC20Permit {␊ constructor(address initialAuthority)␊ @@ -166,11 +171,12 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -206,8 +212,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {␊ @@ -224,8 +231,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -240,9 +248,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -265,9 +274,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/access/AccessControl.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, AccessControl, ERC20Permit {␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ @@ -294,8 +304,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -310,10 +321,11 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Custodian} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Custodian, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -345,10 +357,11 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Allowlist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Allowlist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -391,10 +404,11 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Blocklist.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Blocklist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Blocklist.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Blocklist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -437,9 +451,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -472,9 +487,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -507,9 +523,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -551,9 +568,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20FlashMint {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ diff --git a/packages/core/src/stablecoin.test.ts.snap b/packages/core/src/stablecoin.test.ts.snap index 59942f98fd6f06eb0f6dae48a8fd08579f889349..f5935d03e92feca19da0d19d9140835cecd9810a 100644 GIT binary patch literal 1678 zcmV;9266d8RzV<71;sYTCrg} zML&SJD{^EnOztwfOWUgJL$5vd4bn&G8?@)5K+i>izCmB1;PP9hXiIhy)20qKB<}uq zW;yfYaLAX#fyIq|`SUNRsIt%*5J?S?iVQ3?IAv5a;>bO&XR2)HeZ32>8)TC+z&pWM0t%ZffN`=}E7YdG7HhT-56Br6^ zL-jN6Ap1U0Ya5|jTk(BlZ9UZg+mhU>E~Z5`P}o#WBZWr_nWUV_c0yrH`zdDz%Clr$ zMJ?I(#|8qG@F?_0ThUnnDnT#SfW(?`Tmb+uIFm}ahT@`D_m9`A$=THgRQp@o)p~OB z*pNCLpHxmNK^Vw50ASz>=6yLG33H#PB4Kf^(2?*s@belxR8eBB zA2JkmJ<9v!MR+tQSgDpHk(~#6%<)M@{~x-{P?Y;gfVDa}?!cl3aAu9PWMI7a*$Kuh z>R-kMTy`FbXjDq1-G=Qwgdw*qen{DFq$+_31b%=*P!lBxeBn}oCJaWf73557%#a<| zF^R%xkG*r=fbg5*4R9$_3lBer17f)t?-^wZ1tV7UL%41&>s$x>7!8)LgQ68K?l0;s z<}VVu8v*F({R{&6#1PyyMi#a$t|ocuRQ5KTif30F85cTYI7SYn}XaNo0agc5gMBfz6|V*E7UJW z(OkKbs3B2dB2jI^$S#^01>O%SrrKqJm&???zmMl+s=w=^otk@n*%~-FW$D*-)gBjA zjiy9lYR%diViza`1xh8Tq0pS2Vc8lbxI%E<%jkmS-Ie~9g4VCahSn=@hm?1{uc>8I z-UOF7!PAjXB`Y?8wzqgjl{WWo3V8F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wxJ6YNaZ)jmyTm&8}q0&ItbN}Q>;LkF5+$JS~Zfu?skwAjE z#3Z1@^07oQ!T?1_{#2&mVWCasB)W5AC)JmUMUwECj73JU63-L-AO)*AHbpDFsHu~K z+<<_o0bQzA4v?vfUP25i0+WDeg8I&%4wHYoVbs1+C%6#IcU_vfTE`v(+6kM^B9%+54hNN7LmOF|$s#-(n z5ttA}aT8moCA<@E5X^V`D5gm|P10$SUUrh+HYBN{E=omQ&rn=^nM+Z(%*DktMe|{6 z1>Bsz!gER=Gl;qO?wdN9`bJGNd@Bi|6Gv{zojuA_Gw53M9c(f@QcZ_4)IgeyxY%^* z5!x1!mamqKAP^dz4M`crdz1RQwN*3;zRPZCdw8JOBXWsR2U( diff --git a/packages/core/src/zip-foundry.test.ts.md b/packages/core/src/zip-foundry.test.ts.md index 39860ec1..281a63fb 100644 --- a/packages/core/src/zip-foundry.test.ts.md +++ b/packages/core/src/zip-foundry.test.ts.md @@ -122,13 +122,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import "@openzeppelin/contracts/access/AccessControl.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ @@ -329,11 +330,12 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC20Upgradeable, ERC20PermitUpgradeable, AccessControlUpgradeable, UUPSUpgradeable {␊ bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");␊ @@ -519,10 +521,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ @@ -685,8 +687,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC1155, Ownable {␊ constructor(address initialOwner)␊ @@ -851,9 +853,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ contract MyToken is Initializable, ERC1155Upgradeable, OwnableUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ @@ -1165,8 +1167,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ contract MyContract is Initializable, AccessManagedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ diff --git a/packages/core/src/zip-foundry.test.ts.snap b/packages/core/src/zip-foundry.test.ts.snap index 91dcca5c29ae35d338ea800236128a040fec3d13..5b63161281dec5decf6b71154364c3a9a5b8b992 100644 GIT binary patch literal 3472 zcmV;B4R7*6RzVevt zA4=w=ydR4Q00000000B+T+MGBw-ukYR^aIc9wpbavGm-+wg})Hlata}q zt?DC9>?8^`!`)>(L#|1V!)XtkA+ z31i8^pbnqqd$2%>Bq$)y3GEb_IF3`dZGg*g2YFAT9{h|vN8AUA!(M6Z#4BR0RwIg}nd|bq4f65K1Jp zT5ZNX46PPrEoJ(+>}f=>H2f0VKkQ-p2={t8AQbL0Dmn6`$S@lwb6F45=lV;_Gi~1A z{Mh-#c{Ez&G7i}$hKN#(ee9j1$%2_HD@1 zDKnGQ%iho0)lKc{-U`UZ2%Bf9%Gk$BFJazhJdFKoL(*Vm21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>?F3I6wa-EZ1#*#57jcFB2mf6WbRQc#fCajbkQxRbfRF1pzacSJ0 zkKlr3{qFnKosTNYJRMPHb?2jsW~)0N)t!&(&PRnPRChl1gD|{X-TA0siv8XBSnCHQ zlk2j3rvo^vu4kMKK*!TSqQRAXr}~-Q+s@m z#XNQA3ho-nxc^WG3WbDwh$-%XKO8r__RmoXcVt`EKQ36-E_eN(y}+uzF&Tz3H-t= z?I|&owJggGWzr6&^2-o_T$p!s3H@6W)0Ib*(AU}bG%n@(f1O=QqtwI8#rNlJC>=ja zqT`!@?_1}jBz$3Ph2(ml$Cw=WpHE;8{Fp#Nd(4NIc+WllucF7sNlx;N2ZVzCABwZq ILUMip074Ul2><{9 diff --git a/packages/core/src/zip-hardhat.test.ts.md b/packages/core/src/zip-hardhat.test.ts.md index 86654825..da2efc99 100644 --- a/packages/core/src/zip-hardhat.test.ts.md +++ b/packages/core/src/zip-hardhat.test.ts.md @@ -13,13 +13,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import "@openzeppelin/contracts/access/AccessControl.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ - import "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ @@ -147,10 +148,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ - import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ @@ -252,8 +253,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC1155, Ownable {␊ constructor(address initialOwner)␊ @@ -423,7 +424,7 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ contract MyContract is Initializable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ diff --git a/packages/core/src/zip-hardhat.test.ts.snap b/packages/core/src/zip-hardhat.test.ts.snap index 8ba480e971cb25943acb227259c7b6fb54f6540c..5bb901c65f06b93252c1987581a8879731a7406d 100644 GIT binary patch literal 2284 zcmVT6iuNdoWxTbyTlYM?&ZC$p z+6@68QZ>NaF|eOQ979MMUgt~+;wy=t+;rP+yB-VDj|i4Lqybe!{G{!E>~=aU^*W7W zE)+h#_jtY29^szg5pLY!F|cPA&GR!fPw}U~JR_R^?@AsvRwhC2CW4V}2(y5}kpd<@38GtI}`yr8oEy`ZV^Blx#sAtRY)^Jy^!&G7;*}@ZvV=uG!+`<#D zDSK+-YA=i<_U~LRKCWYoad)Ude$>Hn(haGPea@sJOyNgsdpq|Y??2vta1XEIr{MeK zY3JrGr%`y&Xs(=yv9k|S~$BKlSG0T zUq_TF5KV)ke~h0_V{3>_92+g%*xLQ9Q4&ZaR1iy_ALmm0eL@$dK>O2ax7+vzUTWhTH*f$xjYue+W;J*r zgsm(Bso*G$XD?yCqMW6goo4oSI17hm^O{Ast$a0D!e)ibS5yOq$@i63vl=XA{5)%QKAAk@v0Eq>BolpS*?hf&e zZ7FWazwsyA7|xvkUr6cw@3TqYTdZQctrgkPgp>73_L5j zs5lS1{79GGx+y$3UAtVNW!3nQ@rz~a(E$iu%$IQ^jRw99xy**0*Fuz8v`e>zIha=;Ntu@xjl{`$BvM}APY3v3g5j2+bfGkQ9 z#UU8e8rI;3v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!iXBh`?Cz(|#jSG?a}k zMinI?eR@e*b~n3oVjBL{*>!lhyFV^%;vRCu1p_KaBUH!Z*41%Ifvp~mMgza+CsOff zg+I-#lZy$HqyvjY!|UQsZfs{a0@(vOAAEi);KFuPWyTIUNOCvO0CJcNzZ?C|@zOiEr zmZvy-B7A=L+lJ4R^Eac*^24U)cOGW{?v;hv7ni4tn8tEK)4%niu>8F;mak_W^m~Hp zGjA+#+10(mEg4bA9~TSSCzpoxM*6FX>Hp^~W*x?LSSz*zO!cJM##AeFLGtFHDQE|K?mDj6KBFIttnMbeA|5OI>io zq2=Zvw3x`H+kg=;Ry@qt0^Dj(saUQw8c{zHv~fm*LE*^XN_WR)oR#641a-K#5|2PQk&m**Xb6R-wYxDx)O#y7= z3;1l-jc48XI(6fJIxnjmXG69WPTg5&-Skr3bn}Y4>Bg{GzNCg)N~BBW(eq`}_+6N7 zVdvh3-F7E6vacP4{ym4#A8sJ@$Eo+}yVq!+KGoIL#I9JrBYN?7J+qsO+0Di5=3+8L v_@)dIUc$}AbAyHFJl&n$JX``g9DQpy58oXSF;#v|iz@yH{obaBRx$tpL~uGJ From 417f60a537d115c0884592994ba23dc2406ba832 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 11:38:44 -0500 Subject: [PATCH 05/18] Remove unnecessary import --- packages/core/src/erc20.test.ts.md | 24 ++++++--------------- packages/core/src/erc20.test.ts.snap | Bin 1950 -> 1945 bytes packages/core/src/erc20.ts | 4 ---- packages/core/src/stablecoin.test.ts.md | 21 +++--------------- packages/core/src/stablecoin.test.ts.snap | Bin 1678 -> 1659 bytes packages/core/src/stablecoin.ts | 4 ---- packages/core/src/zip-foundry.test.ts.md | 3 +-- packages/core/src/zip-foundry.test.ts.snap | Bin 3472 -> 3459 bytes packages/core/src/zip-hardhat.test.ts.md | 2 +- packages/core/src/zip-hardhat.test.ts.snap | Bin 2284 -> 2282 bytes 10 files changed, 11 insertions(+), 47 deletions(-) diff --git a/packages/core/src/erc20.test.ts.md b/packages/core/src/erc20.test.ts.md index 8b108526..c7503cd3 100644 --- a/packages/core/src/erc20.test.ts.md +++ b/packages/core/src/erc20.test.ts.md @@ -14,7 +14,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Permit {␊ constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ @@ -32,7 +31,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Permit {␊ constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ @@ -51,7 +49,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -91,7 +88,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Pausable, AccessControl, ERC20Permit {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ @@ -135,7 +131,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Pausable, AccessManaged, ERC20Permit {␊ constructor(address initialAuthority)␊ @@ -176,7 +171,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -214,7 +208,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Permit {␊ constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {␊ @@ -233,7 +226,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Permit {␊ constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ @@ -251,7 +243,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -277,7 +268,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, AccessControl, ERC20Permit {␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ @@ -306,7 +296,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Permit {␊ constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ @@ -323,8 +312,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ @@ -359,8 +348,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ @@ -395,8 +384,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyToken is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ @@ -440,7 +429,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Permit, ERC20FlashMint {␊ @@ -461,8 +449,8 @@ Generated by [AVA](https://avajs.dev). import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ - import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ @@ -537,8 +525,8 @@ Generated by [AVA](https://avajs.dev). import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ - import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ @@ -623,8 +611,8 @@ Generated by [AVA](https://avajs.dev). import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ - import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ diff --git a/packages/core/src/erc20.test.ts.snap b/packages/core/src/erc20.test.ts.snap index ce8bfa71e7fb13ef60db3af824f4bdfe9105364b..afd5648a657b5a7634592299041565645c11a8f4 100644 GIT binary patch literal 1945 zcmV;K2WI#|RzVzHK%hH(IU5QVCl&WdfY8ZY{T( zXQ0cd1p|n%C9;x524dUX(#L5wozE1PUDsL^!5|YYBt^yA+NA z?f#BC2w)DpZZ(kT4Ngk{0H9OC1#@&kS*7Z?SIWV_at)N*J1@%B&FfN({BtAMF|rw~ z^ITpGFjDv%y|JPX>N?_F3wqB(oQ3PDfxxIy0S66(AP=mJyX1ud#nf$elmtOH8SzK0f=?EdTpeHOjnqyZc<4n)*T z0?{xP@w3^x~{K* z@ROi5;9w$J4f?-`CV|uz#V-y?{a7<4Y?88*qD~Vn@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I21noj17n7Z(?D1N06rk9O#lD@ diff --git a/packages/core/src/erc20.ts b/packages/core/src/erc20.ts index 0bef7afa..daf805a4 100644 --- a/packages/core/src/erc20.ts +++ b/packages/core/src/erc20.ts @@ -169,10 +169,6 @@ function addPermit(c: ContractBuilder, name: string) { }; c.addParent(ERC20Permit, [name]); - c.addImportOnly({ - name: 'Nonces', - path: '@openzeppelin/contracts/utils/Nonces.sol', - }) c.addOverride(ERC20Permit, functions.nonces); } diff --git a/packages/core/src/stablecoin.test.ts.md b/packages/core/src/stablecoin.test.ts.md index 906d21f5..20ad0158 100644 --- a/packages/core/src/stablecoin.test.ts.md +++ b/packages/core/src/stablecoin.test.ts.md @@ -14,7 +14,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -32,7 +31,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Burnable, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -51,7 +49,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -91,7 +88,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessControl, ERC20Permit {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ @@ -135,7 +131,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessManaged, ERC20Permit {␊ constructor(address initialAuthority)␊ @@ -176,7 +171,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -214,7 +208,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {␊ @@ -233,7 +226,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -251,7 +243,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -277,7 +268,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, AccessControl, ERC20Permit {␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ @@ -306,7 +296,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -325,7 +314,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Custodian} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Custodian, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -361,7 +349,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Allowlist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Allowlist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -408,7 +395,6 @@ Generated by [AVA](https://avajs.dev). import {ERC20Blocklist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Blocklist.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Blocklist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -453,8 +439,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -489,8 +475,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -525,8 +511,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ @@ -570,7 +556,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20FlashMint {␊ diff --git a/packages/core/src/stablecoin.test.ts.snap b/packages/core/src/stablecoin.test.ts.snap index f5935d03e92feca19da0d19d9140835cecd9810a..bbc71162a2e38b6d0e81c0e160232629952ce6f8 100644 GIT binary patch literal 1659 zcmV->288)RRzV}#^WvkL|!y$PgSceMf4-sV=dp6)!-qz*^NmE%ejMVZ78 z`o3Vnmy>~bh0%DN0b&C>p6& zAd#QOy3NsXMgJf8%uH8Zl(s_iUoj%yEzj4T!%f-T=VbwWX>p4C>U|f5AnFQyjVx`Xc|l3L(z%{4+jkf3kQkaHT*dIFb5#vf*0ID znZuGlGc5US%91fG>1s%5@3?bDqGbA9L9S%%%cDzws8D`77cV{y8^RQyFeunIXyw14_qp}UlQmBgXip# zX8y?V>eq6YF0W4wI?3oDay3`(v?MYcMFZ}4IvuzN_d9U!9@uD6mpHOkKbZmtCsP3U z06Nnr5oO7OF%{(?l4G7k{Fn*k%h|F9vb4AF(%zsoXY%f1#N|Fy#kXDEIp`EME-q-s z`CC}fyt$G|<;OS6n#$Lr;5c!GvA6PUE4RX!x-db7QSWE2aD_4DT_ZL&e_wl^bvG(~ za-&eR24AH219}#wJAo4J1kyWu%a@AVl;pf!a_fUkB;PA{C1Nplbex*&`i!b!GtoU; zfQ|5V*??rdD)EM7n@Zz`F;73LF(+x*r+8qF(I8Oyf=Q_LId{@*3@_-;u&@9;u&l%- z0y8a_SR){T-wu^I_k`P>3`st|U22kaV@EHWBu4mJk;HgaVv^|GelAgrV5I0olk_Qg zI&4!piFT&jN%=CN$fU<)C>pVqc%I<&DSTfqnFKBBYds+YP>2jUv+MulYvQ}0>1ie66tiW za?{l$M|tUbnhTTD)l1QJpR3#&;$IoE{$AP|;_Kj3M*GWP0xu%11xA#gab}&a>MQEV zcGz};LQC{TkALY!m(meKPs3%qTq{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|xw#ccVQUOc zx~vN^vAN4se&wJidy|5}`EBJe0dm{QcYaFc!ttG==0e%__3~ooK5u{Z>2_wHH*sKw zKCiCnu5h0>;awv%HoLZ;CUM85PuDtmN&F&N(&$|%i3lPJbGly_Gb&&hesz@%~(?bNi>@em5^yQwzVyz(MQqaoGxUmrFM9f=_l*ii480APK?|nObea{hF+P5yuU;cy zf?eTB@*^i!h`I%VyW=(oO#|Qbz!=|%{0B6e1n_}>O=7M+Kv8m`J`mZ+KmOJU;QxLZ7k= Y*%yh-j>$;k6+DptA7mMFB)>!e0FT=+l>h($ diff --git a/packages/core/src/stablecoin.ts b/packages/core/src/stablecoin.ts index 1207bd06..b9b1fc76 100644 --- a/packages/core/src/stablecoin.ts +++ b/packages/core/src/stablecoin.ts @@ -256,10 +256,6 @@ function addPermit(c: ContractBuilder, name: string) { }; c.addParent(ERC20Permit, [name]); - c.addImportOnly({ - name: 'Nonces', - path: '@openzeppelin/contracts/utils/Nonces.sol', - }) c.addOverride(ERC20Permit, functions.nonces); } diff --git a/packages/core/src/zip-foundry.test.ts.md b/packages/core/src/zip-foundry.test.ts.md index 281a63fb..137cc5de 100644 --- a/packages/core/src/zip-foundry.test.ts.md +++ b/packages/core/src/zip-foundry.test.ts.md @@ -127,8 +127,8 @@ Generated by [AVA](https://avajs.dev). import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ @@ -332,7 +332,6 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ - import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ diff --git a/packages/core/src/zip-foundry.test.ts.snap b/packages/core/src/zip-foundry.test.ts.snap index 5b63161281dec5decf6b71154364c3a9a5b8b992..52265f82a4b318ece87b34b09d40d5d607a59902 100644 GIT binary patch literal 3459 zcmV-}4Se!JRzV%4 zzx}pVv#r`WtM-<4v3AD#X6>w1JNM3+H_u(Z#;CI)CbBWv{^)b z2Nn`eabr~_c^^;*5$e=c(`Q7&jNK+VB|cD1d4HrLZN@uzj4Da}7-furyh5;oF?6Nu ziR-Sr!Ppb0gJnA*bwtdXq3Q7;wL79C05c4toKT7&u0Lh(R(y zn~eBCBy3>Ch;3rN#fg-$q;M0K@6F9G-g81MkPUt7hQxz}>6!ro<)EUqNK`4>X zYPA{nFtl2fwUp`OvZoQj((p@c|FDPYBi!rZfKa&0sN~3#BExK$%w;`HpX)Cz&$M}e z^JC`|=h0}9%Q$447$QnB_OYLKAhlGR1XzjYAqeidcUeRw=8j;2F7!C*$wB#`Mq)82 zmxJ=uqDBKD8OI}rC_4y=>5J{>d>=RtQLjg6M`=ph+If zO5W9%w5!{zT_RGJJ`Ncbk|T))AQeQ3mo|w61`i4Bz(U+REMSYsE+8L4k0EZr)0pPsM{Asz5@hnp&|joz#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n&T^E~Hye-63PxIHO{V;d!GaZIla80*dIHGEu2Rg1xEA>%xyeqF{3G`VZfsSJERi1x9 z{(#T|t2`mU(hb^$aay#-*=93M)0kaIi14g~C1qs>RLmN@ik&jd4(&4# zn#FwH{=&8CyHWs16YZ3xOO;F0+&pDzr?9lJ_NDELGw%y*bHFLd>zeH}o37$6e4UW6 z$VjyUomu*y9oYp4|8{2yCvjhp0Q7$zm>%7~_uHz`eeViFf4GX!lXnpM_T5=W_u7?< z8QpJpmiETJo-%PQ7Q!-~zHWDxyeXv8V7JMrq9mlxX4Mi4el)bh=mbbf!Sh->ssu(;A z1Khq1Mk+d?qbOAhPb&Q!+xJtZMW1C6&Rt+|xTy)Cu0n<#oivKDaA@q9V*M$NuVm++ zylQryi%#TkCYR-hP0jB-i~oQ2t!442m#5PfP344^|LAp%3b)FmLMv;~|0hF3=8fe= zk94naN=CHs=f#5d#kr>jgZ_4o4F9OjHZq)?XK(oMP|TJYhKG}A{JHb=b@TWLguk?O z^Cs>RN&RUGzwp;83V;6+LeXV}{&WSQe_xxG!vCvwF%(|=dFG=MEu4S-uBOmuJiW5g zryQ?nH918srg`ZoVuGp_PZBhM(-Wk{sbT|KkIx8Le%Zzkr zPJ(91#~0>2iJ(qQ>BdX$rt9Noc|i@elt|~wqqAkw z^g*0$VJ9BMEv!~GvOm@kTCh|6pJ$%p;UcE^S9UyB*(%G&O0PNpcxZmuF+c2>A9hsp vhX0g#!v!36oS8wK@q_UEu;LtiV*iyLR(yAu#Z37%E7kZP1_pOrurmMv`s2S? From cec9ba3863403ca97c7f5966f0cfd4537eaee3ef Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 11:48:21 -0500 Subject: [PATCH 06/18] Update changelog --- packages/core/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 47f2fec1..06733459 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Use named imports. ([#411](https://github.com/OpenZeppelin/contracts-wizard/pull/411)) + ## 0.4.5 (2024-11-18) - Add `stablecoin` and `realWorldAsset` contract types. ([#404](https://github.com/OpenZeppelin/contracts-wizard/pull/404)) From 908f20d7bf517b4b5c28d0db1f58d372045455d2 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 11:50:56 -0500 Subject: [PATCH 07/18] Revert whitespace --- packages/core/src/erc20.ts | 1 - packages/core/src/stablecoin.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/erc20.ts b/packages/core/src/erc20.ts index daf805a4..cdf83045 100644 --- a/packages/core/src/erc20.ts +++ b/packages/core/src/erc20.ts @@ -168,7 +168,6 @@ function addPermit(c: ContractBuilder, name: string) { path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol', }; c.addParent(ERC20Permit, [name]); - c.addOverride(ERC20Permit, functions.nonces); } diff --git a/packages/core/src/stablecoin.ts b/packages/core/src/stablecoin.ts index b9b1fc76..ab4348ae 100644 --- a/packages/core/src/stablecoin.ts +++ b/packages/core/src/stablecoin.ts @@ -255,8 +255,8 @@ function addPermit(c: ContractBuilder, name: string) { path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol', }; c.addParent(ERC20Permit, [name]); - c.addOverride(ERC20Permit, functions.nonces); + } function addVotes(c: ContractBuilder, clockMode: ClockMode) { From 462634db82c5542cb259dd1ac79e47f569d7e49c Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 11:53:01 -0500 Subject: [PATCH 08/18] Rename var --- packages/core/src/print.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/print.ts b/packages/core/src/print.ts index 3cb1f1c8..27d7a7db 100644 --- a/packages/core/src/print.ts +++ b/packages/core/src/print.ts @@ -28,8 +28,8 @@ export function printContract(contract: Contract, opts?: Options): string { ], contract.imports.map(p => { - const parent = helpers.transformImport(p); - return `import {${parent.name}} from "${parent.path}";` + const importContract = helpers.transformImport(p); + return `import {${importContract.name}} from "${importContract.path}";` }), [ From f7b2c6877bca2d34081c1bc81374e61fadd1ba5a Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 14:48:04 -0500 Subject: [PATCH 09/18] Import from same file - WIP --- packages/core/src/contract.ts | 29 ++++------ packages/core/src/erc20.ts | 5 +- packages/core/src/governor.test.ts.md | 72 ++++++++++++------------ packages/core/src/governor.test.ts.snap | Bin 2079 -> 2059 bytes packages/core/src/governor.ts | 12 ++-- packages/core/src/options.ts | 6 +- packages/core/src/stablecoin.ts | 10 +--- 7 files changed, 58 insertions(+), 76 deletions(-) diff --git a/packages/core/src/contract.ts b/packages/core/src/contract.ts index e7142d54..c1ef0749 100644 --- a/packages/core/src/contract.ts +++ b/packages/core/src/contract.ts @@ -5,7 +5,7 @@ export interface Contract { license: string; parents: Parent[]; natspecTags: NatspecTag[]; - imports: ImportContract[]; + imports: ParentContract[]; functions: ContractFunction[]; constructorCode: string[]; constructorArgs: FunctionArgument[]; @@ -16,12 +16,11 @@ export interface Contract { export type Value = string | number | { lit: string } | { note: string, value: Value }; export interface Parent { - contract: ImportContract; + contract: ParentContract; params: Value[]; - importOnly?: boolean; } -export interface ImportContract extends ReferencedContract { +export interface ParentContract extends ReferencedContract { path: string; } @@ -31,7 +30,7 @@ export interface ReferencedContract { } export interface Using { - library: ImportContract; + library: ParentContract; usingFor: string; } @@ -79,7 +78,6 @@ export class ContractBuilder implements Contract { license: string = 'MIT'; upgradeable = false; - readonly using: Using[] = []; readonly natspecTags: NatspecTag[] = []; readonly constructorArgs: FunctionArgument[] = []; @@ -87,6 +85,7 @@ export class ContractBuilder implements Contract { readonly variableSet: Set = new Set(); private parentMap: Map = new Map(); + private importFromMap: Map = new Map(); private functionMap: Map = new Map(); constructor(name: string) { @@ -94,7 +93,7 @@ export class ContractBuilder implements Contract { } get parents(): Parent[] { - return [...this.parentMap.values()].filter(p => !p.importOnly).sort((a, b) => { + return [...this.parentMap.values()].sort((a, b) => { if (a.contract.name === 'Initializable') { return -1; } else if (b.contract.name === 'Initializable') { @@ -105,11 +104,8 @@ export class ContractBuilder implements Contract { }); } - get imports(): ImportContract[] { - return [ - ...[...this.parentMap.values()].map(p => p.contract), - ...this.using.map(u => u.library), - ]; + get imports(): ParentContract[] { + return [...this.importFromMap.entries()].map(([name, path]) => ({ name, path })); } get functions(): ContractFunction[] { @@ -120,16 +116,15 @@ export class ContractBuilder implements Contract { return [...this.variableSet]; } - addParent(contract: ImportContract, params: Value[] = []): boolean { + addParent(contract: ParentContract, params: Value[] = []): boolean { const present = this.parentMap.has(contract.name); this.parentMap.set(contract.name, { contract, params }); + this.addImportFrom(contract.name, contract.path); return !present; } - addImportOnly(contract: ImportContract): boolean { - const present = this.parentMap.has(contract.name); - this.parentMap.set(contract.name, { contract, params: [], importOnly: true }); - return !present; + addImportFrom(importName: string, from: string) { + this.importFromMap.set(importName, from); } addOverride(parent: ReferencedContract, baseFn: BaseFunction, mutability?: FunctionMutability) { diff --git a/packages/core/src/erc20.ts b/packages/core/src/erc20.ts index cdf83045..a7c9205c 100644 --- a/packages/core/src/erc20.ts +++ b/packages/core/src/erc20.ts @@ -184,10 +184,7 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { c.addParent(ERC20Votes); c.addOverride(ERC20Votes, functions._update); - c.addImportOnly({ - name: 'Nonces', - path: '@openzeppelin/contracts/utils/Nonces.sol', - }) + c.addImportFrom('Nonces', '@openzeppelin/contracts/utils/Nonces.sol'); c.addOverride({ name: 'Nonces', }, functions.nonces); diff --git a/packages/core/src/governor.test.ts.md b/packages/core/src/governor.test.ts.md index 6e56da73..74298f0c 100644 --- a/packages/core/src/governor.test.ts.md +++ b/packages/core/src/governor.test.ts.md @@ -14,10 +14,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -113,10 +113,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -208,9 +208,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ @@ -300,9 +300,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ @@ -393,10 +393,10 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -509,10 +509,10 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorStorage} from "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorStorage, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -612,10 +612,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -707,10 +707,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -802,9 +802,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ @@ -895,10 +895,10 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -1010,10 +1010,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -1105,10 +1105,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -1204,10 +1204,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -1299,10 +1299,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {ICompoundTimelock} from "@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol";␊ + import {ICompoundTimelock} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ import {GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockCompound {␊ @@ -1395,10 +1395,10 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -1510,10 +1510,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -1606,10 +1606,10 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ @@ -1721,10 +1721,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ diff --git a/packages/core/src/governor.test.ts.snap b/packages/core/src/governor.test.ts.snap index 9bc66e9ab4ff824c7d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kl4^bwx7&~Y%dI* zXIGdczavUIX#}o?Ye%W*rPF8{Sv$qwHL6OP5Z^Qc180GOd&x8Cc$cVBiRd$t9%x(n zosl6;Ui%CmWZ9aYe1~1G>Y)2vuQpnvg-9V%h;;Ik5hCsLPE0E7rgmz zpRpSSN}(VlcB6n0A;clBxe($^3K6z}ZH7rQYy;b5gB#g4Z+6(`W^)C&0d9aB;0Cw> zZh#x$2DkxkfSZcsY2fqh<;BgrrMMy7V+uQJfI9F7cGQ?UE1c_&8f(~516Ig|1}ne{ zRZ23f04rpJ8`%nGxfS&G8okgkpR13|##fTC*#?R*mjFfBY$Mui!<=kw2U~4ms|^&H z07q=KG2P67d12nlOh%Zu%)D=9%^Of*Q(vVQcHI95dV-!6s>f9rnu8m09W_1N{|B1Q z9?jqz_-3di!#D6vHn?%$|96mHuPnDGb>`+W)Oi8wfI6TKs51<8)=oVXDQ2__Fg6!$bv^*xO%Y3VIKBle-SQNFCT zkrw(=hPU^IN*}m33tWSFV4k6p4D-M|+2BSt&wAE8(Q-m6%L|Ad-`eDHhxS?Q`#uAo zZ&2(*u@AbM5?#%7u`e$2$%YmMs(PsEp{fTaR-TEd>Qx&R5H5sUnaK#@mI?P(Kf>+1 zy!T^9x!<9@2Y>>gDDO>oc`pWXKVTcWi`3rOh!IYkIi~?Tz|K%f26lj*Y;Z$k=YR5t JJcoPm002NT>1zN0 diff --git a/packages/core/src/governor.ts b/packages/core/src/governor.ts index 4591cdfd..d2fb2dd1 100644 --- a/packages/core/src/governor.ts +++ b/packages/core/src/governor.ts @@ -250,11 +250,7 @@ function addCounting(c: ContractBuilder) { function addVotes(c: ContractBuilder) { const tokenArg = '_token'; - c.addImportOnly({ - name: 'IVotes', - path: `@openzeppelin/contracts/governance/utils/IVotes.sol`, - transpiled: false, - }); + c.addImportFrom('IVotes', `@openzeppelin/contracts/governance/extensions/GovernorVotes.sol`); c.addConstructorArgument({ type: { name: 'IVotes', @@ -318,7 +314,7 @@ const timelockModules = { openzeppelin: { timelockType: { name: 'TimelockController', - path: `@openzeppelin/contracts/governance/TimelockController.sol`, + path: `@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol`, }, timelockParent: { name: 'GovernorTimelockControl', @@ -328,7 +324,7 @@ const timelockModules = { compound: { timelockType: { name: 'ICompoundTimelock', - path: `@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol`, + path: `@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol`, transpiled: false, }, timelockParent: { @@ -366,7 +362,7 @@ function addTimelock(c: ContractBuilder, { timelock }: Required const timelockArg = '_timelock'; const { timelockType, timelockParent } = timelockModules[timelock]; - c.addImportOnly(timelockType); + c.addImportFrom(timelockType.name, timelockType.path); c.addConstructorArgument({ type: timelockType, name: timelockArg, diff --git a/packages/core/src/options.ts b/packages/core/src/options.ts index b86fe6c4..0442ebce 100644 --- a/packages/core/src/options.ts +++ b/packages/core/src/options.ts @@ -1,6 +1,6 @@ import path from 'path'; -import type { Contract, ReferencedContract, ImportContract } from './contract'; +import type { Contract, ReferencedContract, ParentContract } from './contract'; import { inferTranspiled } from './infer-transpiled'; const upgradeableName = (n: string) => { @@ -11,7 +11,7 @@ const upgradeableName = (n: string) => { } } -const upgradeableImport = (p: ImportContract): ImportContract => { +const upgradeableImport = (p: ParentContract): ParentContract => { const { dir, ext, name } = path.parse(p.path); // Use path.posix to get forward slashes return { @@ -26,7 +26,7 @@ const upgradeableImport = (p: ImportContract): ImportContract => { }; export interface Options { - transformImport?: (parent: ImportContract) => ImportContract; + transformImport?: (parent: ParentContract) => ParentContract; } export interface Helpers extends Required { diff --git a/packages/core/src/stablecoin.ts b/packages/core/src/stablecoin.ts index ab4348ae..e09fc940 100644 --- a/packages/core/src/stablecoin.ts +++ b/packages/core/src/stablecoin.ts @@ -235,10 +235,7 @@ function addCustodian(c: ContractBuilder, access: Access) { break; } case 'managed': { - c.addImportOnly({ - name: 'AuthorityUtils', - path: `@openzeppelin/contracts/access/manager/AuthorityUtils.sol`, - }); + c.addImportFrom('AuthorityUtils', `@openzeppelin/contracts/access/manager/AuthorityUtils.sol`); const logic = [ `(bool immediate,) = AuthorityUtils.canCallWithDelay(authority(), user, address(this), bytes4(_msgData()[0:4]));`, `return immediate;` @@ -271,10 +268,7 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { c.addParent(ERC20Votes); c.addOverride(ERC20Votes, functions._update); - c.addImportOnly({ - name: 'Nonces', - path: '@openzeppelin/contracts/utils/Nonces.sol', - }) + c.addImportFrom('Nonces', '@openzeppelin/contracts/utils/Nonces.sol'); c.addOverride({ name: 'Nonces', }, functions.nonces); From 874b21f04a1fd45d35d51000cff4e68a2fb5385f Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 14:54:13 -0500 Subject: [PATCH 10/18] Use separate transpilation flag for import name and path --- packages/core/src/governor.test.ts | 5 ++ packages/core/src/governor.test.ts.md | 114 ++++++++++++++++++++++++ packages/core/src/governor.test.ts.snap | Bin 2059 -> 2463 bytes packages/core/src/infer-transpiled.ts | 6 +- packages/core/src/options.ts | 8 +- 5 files changed, 128 insertions(+), 5 deletions(-) diff --git a/packages/core/src/governor.test.ts b/packages/core/src/governor.test.ts index c3d936c7..ee34b0a4 100644 --- a/packages/core/src/governor.test.ts +++ b/packages/core/src/governor.test.ts @@ -131,6 +131,11 @@ testGovernor('governor with timestamp clock mode, non-updatable settings', { settings: false, }); +testGovernor('governor with erc20votes, upgradable', { + votes: 'erc20votes', + upgradeable: 'uups', +}); + testAPIEquivalence('API default'); testAPIEquivalence('API basic', { name: 'CustomGovernor', delay: '2 weeks', period: '2 week' }); diff --git a/packages/core/src/governor.test.ts.md b/packages/core/src/governor.test.ts.md index 74298f0c..ecfdc8be 100644 --- a/packages/core/src/governor.test.ts.md +++ b/packages/core/src/governor.test.ts.md @@ -1805,3 +1805,117 @@ Generated by [AVA](https://avajs.dev). }␊ }␊ ` + +## governor with erc20votes, upgradable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.0.0␊ + pragma solidity ^0.8.22;␊ + ␊ + import {GovernorUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol";␊ + import {GovernorCountingSimpleUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingSimpleUpgradeable.sol";␊ + import {IVotes} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ + import {GovernorVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ + import {GovernorVotesQuorumFractionUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";␊ + import {TimelockControllerUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ + import {GovernorTimelockControlUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyGovernor is Initializable, GovernorUpgradeable, GovernorCountingSimpleUpgradeable, GovernorVotesUpgradeable, GovernorVotesQuorumFractionUpgradeable, GovernorTimelockControlUpgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(IVotes _token, TimelockControllerUpgradeable _timelock, address initialOwner)␊ + initializer public␊ + {␊ + __Governor_init("MyGovernor");␊ + __GovernorCountingSimple_init();␊ + __GovernorVotes_init(_token);␊ + __GovernorVotesQuorumFraction_init(4);␊ + __GovernorTimelockControl_init(_timelock);␊ + __Ownable_init(initialOwner);␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + onlyOwner␊ + override␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function quorum(uint256 blockNumber)␊ + public␊ + view␊ + override(GovernorUpgradeable, GovernorVotesQuorumFractionUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.quorum(blockNumber);␊ + }␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` diff --git a/packages/core/src/governor.test.ts.snap b/packages/core/src/governor.test.ts.snap index 7ec1674c4ee66e8f8447a13ef4b952b41347dffc..da4aaf4d3327b53bd9e403c85745eb789e3d4420 100644 GIT binary patch literal 2463 zcmV;Q31Id?RzVQq(RnM65o1xbg3B;D-96X1aR1=X*Rolbh9i#yxz-TKC@-O5?o8y(~5ktzuVdEY(>(&2wkE?z;NJvfI{5bFRTXHT%NbY|kBFbOq6*``&(8;26xknxIkzFN%`$t1H zJrXh3j9;9vFbe1t_0m_Ga>WE!PIX$W2uLc`Rfc{wS%73BG{F z>Y#S6;YWH|5SROhd4ryov!O!ck%gCOn?znxay z%Brq;*Y0@h!Emusk6NYfym`Bo{(BztvmQj%0CnNNwN zI+k3KR?N8W?jLODc}ae<_sD+dL8o&>9Ea?YYf4|F?^ieVlu9Q2Ww&L{($CCEdX5J7 z=-%N`u@%Q5&n_uB7eOGd8NcW^tB6~uTMdqlhPf@;+!dFjDBS8fm|=i0NLriBl9ZV)8X zBJ<7YV!40}(`uujwDCXiesv01yDw zn864D)dA>(N&xxPW1$Mb;lIEG@Blmj5AQl2Zh#Je1KYFt*(ABLaP%#-ASd_?OY|ZfQqL(|7D5wZ`c_F zOQ_&vBOWY;9-&9*5qfO69^oFiXO<+xJ#dd5+}!T@&X9XP?(P9TfDhmU_y9hD&otL7 zzz6UFd;lN7rzwLG@Tr5(4{G5`Az_uS) zoB}Gb?ZHqJ*o(70b9V9i3-?Sha>}Az?L1{+}Qe_jjiGol9(wB)|&t=Knu{q z9u_Ny76=3afk10A>jZ&7pvDYF5U7qoAKC=+L>P&f`=j{tAB#W#0Dr)rrSj+aQ9dZm z*I`i<$!ZrXGNJZ<&{ z93OYhUK_sK%eUI-9A>X|Q+=rPRqVfk{Wq}x1{T&DzOaVd>aBqZ#x!^mKc=&e7!&oH*RY6reB)PEbM7;Eos8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}V z-PjIV(H#`uZ~XXv(;#6G#U9~B9mkP#0LP!2ihjib95{eu{^^CvQ?(D^xYbf;ZP;cz zJ!-?)Ode~+`VjG>IDZ4@Z{Yk56xK>!Si|`nvj+%jf~X0WF;5r%=$0PCQ>zKC4Y07! z{FPxmd^O`?R0%;y*Mf$xxjDCkM3;v=B_$QPFfm7fVWx?u}1!Fu9 pgSnBrNL`N8B4N1784eHvghom-AOr~M!Ho=|{{hoz7nN}G005N->1_Z2 diff --git a/packages/core/src/infer-transpiled.ts b/packages/core/src/infer-transpiled.ts index 52eeba67..64d64741 100644 --- a/packages/core/src/infer-transpiled.ts +++ b/packages/core/src/infer-transpiled.ts @@ -1,5 +1,9 @@ import type { ReferencedContract } from "./contract"; export function inferTranspiled(c: ReferencedContract): boolean { - return c.transpiled ?? !/^I[A-Z]/.test(c.name); + return c.transpiled ?? inferTranspiledName(c.name); +} + +export function inferTranspiledName(name: string): boolean { + return !/^I[A-Z]/.test(name); } \ No newline at end of file diff --git a/packages/core/src/options.ts b/packages/core/src/options.ts index 0442ebce..f1482953 100644 --- a/packages/core/src/options.ts +++ b/packages/core/src/options.ts @@ -1,10 +1,10 @@ import path from 'path'; import type { Contract, ReferencedContract, ParentContract } from './contract'; -import { inferTranspiled } from './infer-transpiled'; +import { inferTranspiledName } from './infer-transpiled'; const upgradeableName = (n: string) => { - if (n === 'Initializable') { + if (n === 'Initializable' || !inferTranspiledName(n)) { return n; } else { return n.replace(/(Upgradeable)?(?=\.|$)/, 'Upgradeable'); @@ -36,12 +36,12 @@ export interface Helpers extends Required { export function withHelpers(contract: Contract, opts: Options = {}): Helpers { const contractUpgradeable = contract.upgradeable; - const transformName = (n: ReferencedContract) => contractUpgradeable && inferTranspiled(n) ? upgradeableName(n.name) : n.name; + const transformName = (n: ReferencedContract) => contractUpgradeable ? upgradeableName(n.name) : n.name; return { upgradeable: contractUpgradeable, transformName, transformImport: p1 => { - const p2 = contractUpgradeable && inferTranspiled(p1) ? upgradeableImport(p1) : p1; + const p2 = contractUpgradeable ? upgradeableImport(p1) : p1; return opts.transformImport?.(p2) ?? p2; }, }; From f342d53383c7e2bccfc182b14176b775bec8d0b2 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 15:22:03 -0500 Subject: [PATCH 11/18] Combine imports with same path --- packages/core/src/governor.test.ts.md | 114 ++++++++---------------- packages/core/src/governor.test.ts.snap | Bin 2463 -> 2433 bytes packages/core/src/print.ts | 29 ++++-- 3 files changed, 62 insertions(+), 81 deletions(-) diff --git a/packages/core/src/governor.test.ts.md b/packages/core/src/governor.test.ts.md index ecfdc8be..7a47daeb 100644 --- a/packages/core/src/governor.test.ts.md +++ b/packages/core/src/governor.test.ts.md @@ -14,11 +14,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -113,11 +111,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -208,10 +204,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -300,10 +294,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -393,11 +385,9 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -509,11 +499,9 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorStorage} from "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorStorage, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -612,11 +600,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -707,11 +693,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -802,10 +786,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -895,11 +877,9 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1010,11 +990,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1105,11 +1083,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1204,11 +1180,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1299,11 +1273,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {ICompoundTimelock} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ - import {GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ + import {ICompoundTimelock, GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockCompound {␊ constructor(IVotes _token, ICompoundTimelock _timelock)␊ @@ -1395,11 +1367,9 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1510,11 +1480,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1606,11 +1574,9 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1721,11 +1687,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1816,11 +1780,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {GovernorUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol";␊ import {GovernorCountingSimpleUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingSimpleUpgradeable.sol";␊ - import {IVotes} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ - import {GovernorVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ + import {IVotes, GovernorVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ import {GovernorVotesQuorumFractionUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";␊ - import {TimelockControllerUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ - import {GovernorTimelockControlUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ + import {TimelockControllerUpgradeable, GovernorTimelockControlUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ diff --git a/packages/core/src/governor.test.ts.snap b/packages/core/src/governor.test.ts.snap index da4aaf4d3327b53bd9e403c85745eb789e3d4420..d9efb0e44579948b981fd64924a87acf578a82e8 100644 GIT binary patch literal 2433 zcmV-{34ZoLRzVTq5{ed|&kaX+NrGa8+jEaZk z%fqJ~%Oa1sAKHqYdNgh4D5SwRGz_W70`iClO4yE)$7 zC{QdoKW2XD(K+g+uM`a=nb#O_(!g&>=9i!`C6~Nq>2i^l4D;-TtxnF;<^|Q zme814VWH`#%%|}vOZt_29u*^R3&-l2Qm8C5qoYqJUta5ygvp@^BV){dDs)NVtLbs2 zL*z||5JDUtNF^dianVgXoSZ2Bf(AV@9vyO`vfu6}C&wRMefQqTiF@ORld8LE)fGog z!@Cd0ixn*D7R-6`wv+rli-M#Ia>?VMJ*J+0-Mvr3=+t8l2_r#CT%lktC4#C*1d?Zz|rgFAF*{~+Ir zWs#>Bl$>$T<5w&=A2utAovT|CL0?8pP?wxuljCdx+%8!9GU-y?JV~bXuOk1Hic#mL zmJh#PGI}-qqFd{ZUlJul=6=Dsoa5>EC^|2rkc#ch$h>g}rE!JSsJHs)HvlBO1}8kP15) zy(P}|i0!(9O8J++5}*29ToYxBbE;&IWTi((E^RN0=i1Y2MRO-Ow&%rSLm&BUKwK&v z!NR!J-`VnFwh=zM@W~HY~`aSY|;S z_j1W$bYj`ybz2svx#wB!=h6lq7u^Z|EN_O&I%cwSBa^hvZ#$Y@J~7$FiKOCwdN(Ao zgegInpBm_L8|VUb0lENP=2iFo{{D@z%f!Zj6~GE$MN5<%umV`on866FsKSb$mtuuW z9p>Af9EXYzo*Phc^Z}rvfl#q&%D&0s9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ZrXGNJZ<&{ z93OYhUK_sK%eUI-9A>X|Q+=rPRqVfk{Wq}x1{T&DzOaVd>aBqZ#x!^mKc=&e7!&oH*RY6reB)PEbM7;Eos8INH!bQSATPXSi774LP2zhOQ zyf%7~FkKu}ZKDmW24Xc3tAQY7;|Yn?z-EI3`h|WQGZ>-YI{iMJM86X+3;x9t@Sm_O z2%G|^SQgyeWx*8BlVEPna?cWELvP0?;z z-S`ZYi>;;u_UvkT-KlM7tjLzqr&2THlU4tL6?E#DGtJz9y`HxHNQzfIC)O-bj#Wvi zfhX5Id3DApUC*ORIm4BdT6zBb>B)>u6ay($Ge*Ex*n=xXp@KRaR~9LM*GA%{vRwU9 zZh9-?N>#TQ z!TM#!Bfr?~KCt_fM^n|4YhJYDpaEF~N};!>CY7g2S^I9mQAIKPux1~sESScVy`SG+ zs4Zn5=q{ZoYx7kx^Etxl z^>K2PL&~*l-#{3i9rK`A_T7^i&P8i>Pi4xp==$GjnLl9Me_3QUaaZOh dQ;&N!3mv#?bq8nukY~QH^M7Dzm-I*k0RU+Gu~`5B diff --git a/packages/core/src/print.ts b/packages/core/src/print.ts index 27d7a7db..24d39ffe 100644 --- a/packages/core/src/print.ts +++ b/packages/core/src/print.ts @@ -1,6 +1,6 @@ import 'array.prototype.flatmap/auto'; -import type { Contract, Parent, ContractFunction, FunctionArgument, Value, NatspecTag } from './contract'; +import type { Contract, Parent, ContractFunction, FunctionArgument, Value, NatspecTag, ParentContract } from './contract'; import { Options, Helpers, withHelpers } from './options'; import { formatLines, spaceBetween, Lines } from './utils/format-lines'; @@ -27,10 +27,7 @@ export function printContract(contract: Contract, opts?: Options): string { `pragma solidity ^${SOLIDITY_VERSION};`, ], - contract.imports.map(p => { - const importContract = helpers.transformImport(p); - return `import {${importContract.name}} from "${importContract.path}";` - }), + printImports(contract.imports, helpers), [ ...printNatspecTags(contract.natspecTags), @@ -249,3 +246,25 @@ function printArgument(arg: FunctionArgument, { transformName }: Helpers): strin function printNatspecTags(tags: NatspecTag[]): string[] { return tags.map(({ key, value }) => `/// ${key} ${value}`); } + +function printImports(imports: ParentContract[], helpers: Helpers): string[] { + // Combine imports by path + const pathMap = new Map(); + for (const imp of imports) { + const path = imp.path; + if (!pathMap.has(path)) { + pathMap.set(path, []); + } + pathMap.get(path)!.push(imp); + } + + const lines: string[] = []; + for (const [_, contracts] of pathMap) { + const names = contracts.map(c => helpers.transformImport(c)); + if (names.length > 0) { + // All contracts in each group should have the same path + lines.push(`import {${names.map(n => n.name).join(', ')}} from "${names[0]!.path}";`); + } + } + return lines; +} \ No newline at end of file From babc2a576cd4cd0bf948f2147d5da7d8a8411b99 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 15:26:27 -0500 Subject: [PATCH 12/18] Simplify infer transpiled --- packages/core/src/contract.ts | 1 - packages/core/src/governor.ts | 2 -- packages/core/src/infer-transpiled.test.ts | 9 ++------- packages/core/src/infer-transpiled.ts | 8 +------- packages/core/src/options.ts | 4 ++-- packages/core/src/print.ts | 2 +- 6 files changed, 6 insertions(+), 20 deletions(-) diff --git a/packages/core/src/contract.ts b/packages/core/src/contract.ts index c1ef0749..4648feb9 100644 --- a/packages/core/src/contract.ts +++ b/packages/core/src/contract.ts @@ -26,7 +26,6 @@ export interface ParentContract extends ReferencedContract { export interface ReferencedContract { name: string; - transpiled?: boolean; } export interface Using { diff --git a/packages/core/src/governor.ts b/packages/core/src/governor.ts index d2fb2dd1..861a1704 100644 --- a/packages/core/src/governor.ts +++ b/packages/core/src/governor.ts @@ -254,7 +254,6 @@ function addVotes(c: ContractBuilder) { c.addConstructorArgument({ type: { name: 'IVotes', - transpiled: false, }, name: tokenArg, }); @@ -325,7 +324,6 @@ const timelockModules = { timelockType: { name: 'ICompoundTimelock', path: `@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol`, - transpiled: false, }, timelockParent: { name: 'GovernorTimelockCompound', diff --git a/packages/core/src/infer-transpiled.test.ts b/packages/core/src/infer-transpiled.test.ts index c6ead414..85f557ea 100644 --- a/packages/core/src/infer-transpiled.test.ts +++ b/packages/core/src/infer-transpiled.test.ts @@ -2,11 +2,6 @@ import test from 'ava'; import { inferTranspiled } from './infer-transpiled'; test('infer transpiled', t => { - t.true(inferTranspiled({ name: 'Foo' })); - t.true(inferTranspiled({ name: 'Foo', transpiled: true })); - t.false(inferTranspiled({ name: 'Foo', transpiled: false })); - - t.false(inferTranspiled({ name: 'IFoo' })); - t.true(inferTranspiled({ name: 'IFoo', transpiled: true })); - t.false(inferTranspiled({ name: 'IFoo', transpiled: false })); + t.true(inferTranspiled('Foo')); + t.false(inferTranspiled('IFoo')); }); \ No newline at end of file diff --git a/packages/core/src/infer-transpiled.ts b/packages/core/src/infer-transpiled.ts index 64d64741..cc316e77 100644 --- a/packages/core/src/infer-transpiled.ts +++ b/packages/core/src/infer-transpiled.ts @@ -1,9 +1,3 @@ -import type { ReferencedContract } from "./contract"; - -export function inferTranspiled(c: ReferencedContract): boolean { - return c.transpiled ?? inferTranspiledName(c.name); -} - -export function inferTranspiledName(name: string): boolean { +export function inferTranspiled(name: string): boolean { return !/^I[A-Z]/.test(name); } \ No newline at end of file diff --git a/packages/core/src/options.ts b/packages/core/src/options.ts index f1482953..6c319fae 100644 --- a/packages/core/src/options.ts +++ b/packages/core/src/options.ts @@ -1,10 +1,10 @@ import path from 'path'; import type { Contract, ReferencedContract, ParentContract } from './contract'; -import { inferTranspiledName } from './infer-transpiled'; +import { inferTranspiled } from './infer-transpiled'; const upgradeableName = (n: string) => { - if (n === 'Initializable' || !inferTranspiledName(n)) { + if (n === 'Initializable' || !inferTranspiled(n)) { return n; } else { return n.replace(/(Upgradeable)?(?=\.|$)/, 'Upgradeable'); diff --git a/packages/core/src/print.ts b/packages/core/src/print.ts index 24d39ffe..7b95e4b5 100644 --- a/packages/core/src/print.ts +++ b/packages/core/src/print.ts @@ -131,7 +131,7 @@ function sortedFunctions(contract: Contract): SortedFunctions { } function printParentConstructor({ contract, params }: Parent, helpers: Helpers): [] | [string] { - const useTranspiled = helpers.upgradeable && inferTranspiled(contract); + const useTranspiled = helpers.upgradeable && inferTranspiled(contract.name); const fn = useTranspiled ? `__${contract.name}_init` : contract.name; if (useTranspiled || params.length > 0) { return [ From f3fa0d872e89ab703ba5937033e85ca116013d5b Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 15:45:08 -0500 Subject: [PATCH 13/18] Refactor --- packages/core/src/contract.ts | 18 +++++++++--------- packages/core/src/erc20.ts | 5 ++++- packages/core/src/governor.ts | 7 +++++-- packages/core/src/options.ts | 6 +++--- packages/core/src/print.ts | 6 +++--- packages/core/src/stablecoin.ts | 10 ++++++++-- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/packages/core/src/contract.ts b/packages/core/src/contract.ts index 4648feb9..f670b533 100644 --- a/packages/core/src/contract.ts +++ b/packages/core/src/contract.ts @@ -5,7 +5,7 @@ export interface Contract { license: string; parents: Parent[]; natspecTags: NatspecTag[]; - imports: ParentContract[]; + imports: ImportContract[]; functions: ContractFunction[]; constructorCode: string[]; constructorArgs: FunctionArgument[]; @@ -16,11 +16,11 @@ export interface Contract { export type Value = string | number | { lit: string } | { note: string, value: Value }; export interface Parent { - contract: ParentContract; + contract: ImportContract; params: Value[]; } -export interface ParentContract extends ReferencedContract { +export interface ImportContract extends ReferencedContract { path: string; } @@ -29,7 +29,7 @@ export interface ReferencedContract { } export interface Using { - library: ParentContract; + library: ImportContract; usingFor: string; } @@ -103,7 +103,7 @@ export class ContractBuilder implements Contract { }); } - get imports(): ParentContract[] { + get imports(): ImportContract[] { return [...this.importFromMap.entries()].map(([name, path]) => ({ name, path })); } @@ -115,15 +115,15 @@ export class ContractBuilder implements Contract { return [...this.variableSet]; } - addParent(contract: ParentContract, params: Value[] = []): boolean { + addParent(contract: ImportContract, params: Value[] = []): boolean { const present = this.parentMap.has(contract.name); this.parentMap.set(contract.name, { contract, params }); - this.addImportFrom(contract.name, contract.path); + this.addImportFrom(contract); return !present; } - addImportFrom(importName: string, from: string) { - this.importFromMap.set(importName, from); + addImportFrom(contract: ImportContract) { + this.importFromMap.set(contract.name, contract.path); } addOverride(parent: ReferencedContract, baseFn: BaseFunction, mutability?: FunctionMutability) { diff --git a/packages/core/src/erc20.ts b/packages/core/src/erc20.ts index a7c9205c..b46e0185 100644 --- a/packages/core/src/erc20.ts +++ b/packages/core/src/erc20.ts @@ -184,7 +184,10 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { c.addParent(ERC20Votes); c.addOverride(ERC20Votes, functions._update); - c.addImportFrom('Nonces', '@openzeppelin/contracts/utils/Nonces.sol'); + c.addImportFrom({ + name: 'Nonces', + path: '@openzeppelin/contracts/utils/Nonces.sol', + }); c.addOverride({ name: 'Nonces', }, functions.nonces); diff --git a/packages/core/src/governor.ts b/packages/core/src/governor.ts index 861a1704..63339b88 100644 --- a/packages/core/src/governor.ts +++ b/packages/core/src/governor.ts @@ -250,7 +250,10 @@ function addCounting(c: ContractBuilder) { function addVotes(c: ContractBuilder) { const tokenArg = '_token'; - c.addImportFrom('IVotes', `@openzeppelin/contracts/governance/extensions/GovernorVotes.sol`); + c.addImportFrom({ + name: 'IVotes', + path: `@openzeppelin/contracts/governance/extensions/GovernorVotes.sol`, + }); c.addConstructorArgument({ type: { name: 'IVotes', @@ -360,7 +363,7 @@ function addTimelock(c: ContractBuilder, { timelock }: Required const timelockArg = '_timelock'; const { timelockType, timelockParent } = timelockModules[timelock]; - c.addImportFrom(timelockType.name, timelockType.path); + c.addImportFrom(timelockType); c.addConstructorArgument({ type: timelockType, name: timelockArg, diff --git a/packages/core/src/options.ts b/packages/core/src/options.ts index 6c319fae..2c7b5f13 100644 --- a/packages/core/src/options.ts +++ b/packages/core/src/options.ts @@ -1,6 +1,6 @@ import path from 'path'; -import type { Contract, ReferencedContract, ParentContract } from './contract'; +import type { Contract, ReferencedContract, ImportContract } from './contract'; import { inferTranspiled } from './infer-transpiled'; const upgradeableName = (n: string) => { @@ -11,7 +11,7 @@ const upgradeableName = (n: string) => { } } -const upgradeableImport = (p: ParentContract): ParentContract => { +const upgradeableImport = (p: ImportContract): ImportContract => { const { dir, ext, name } = path.parse(p.path); // Use path.posix to get forward slashes return { @@ -26,7 +26,7 @@ const upgradeableImport = (p: ParentContract): ParentContract => { }; export interface Options { - transformImport?: (parent: ParentContract) => ParentContract; + transformImport?: (parent: ImportContract) => ImportContract; } export interface Helpers extends Required { diff --git a/packages/core/src/print.ts b/packages/core/src/print.ts index 7b95e4b5..9af50809 100644 --- a/packages/core/src/print.ts +++ b/packages/core/src/print.ts @@ -1,6 +1,6 @@ import 'array.prototype.flatmap/auto'; -import type { Contract, Parent, ContractFunction, FunctionArgument, Value, NatspecTag, ParentContract } from './contract'; +import type { Contract, Parent, ContractFunction, FunctionArgument, Value, NatspecTag, ImportContract } from './contract'; import { Options, Helpers, withHelpers } from './options'; import { formatLines, spaceBetween, Lines } from './utils/format-lines'; @@ -247,9 +247,9 @@ function printNatspecTags(tags: NatspecTag[]): string[] { return tags.map(({ key, value }) => `/// ${key} ${value}`); } -function printImports(imports: ParentContract[], helpers: Helpers): string[] { +function printImports(imports: ImportContract[], helpers: Helpers): string[] { // Combine imports by path - const pathMap = new Map(); + const pathMap = new Map(); for (const imp of imports) { const path = imp.path; if (!pathMap.has(path)) { diff --git a/packages/core/src/stablecoin.ts b/packages/core/src/stablecoin.ts index e09fc940..adcad9f7 100644 --- a/packages/core/src/stablecoin.ts +++ b/packages/core/src/stablecoin.ts @@ -235,7 +235,10 @@ function addCustodian(c: ContractBuilder, access: Access) { break; } case 'managed': { - c.addImportFrom('AuthorityUtils', `@openzeppelin/contracts/access/manager/AuthorityUtils.sol`); + c.addImportFrom({ + name: 'AuthorityUtils', + path: `@openzeppelin/contracts/access/manager/AuthorityUtils.sol`, + }); const logic = [ `(bool immediate,) = AuthorityUtils.canCallWithDelay(authority(), user, address(this), bytes4(_msgData()[0:4]));`, `return immediate;` @@ -268,7 +271,10 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { c.addParent(ERC20Votes); c.addOverride(ERC20Votes, functions._update); - c.addImportFrom('Nonces', '@openzeppelin/contracts/utils/Nonces.sol'); + c.addImportFrom({ + name: 'Nonces', + path: '@openzeppelin/contracts/utils/Nonces.sol', + }); c.addOverride({ name: 'Nonces', }, functions.nonces); From 1659f5026b71d80ea7037719892704134aae7148 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 19 Nov 2024 16:25:19 -0500 Subject: [PATCH 14/18] Sort imports by name --- packages/core/src/custom.test.ts.md | 2 +- packages/core/src/custom.test.ts.snap | Bin 826 -> 827 bytes packages/core/src/erc1155.test.ts.md | 26 +++---- packages/core/src/erc1155.test.ts.snap | Bin 1788 -> 1784 bytes packages/core/src/erc20.test.ts.md | 32 ++++---- packages/core/src/erc20.test.ts.snap | Bin 1945 -> 1960 bytes packages/core/src/erc721.test.ts.md | 30 ++++---- packages/core/src/erc721.test.ts.snap | Bin 2137 -> 2140 bytes packages/core/src/governor.test.ts.md | 84 ++++++++++----------- packages/core/src/governor.test.ts.snap | Bin 2433 -> 2428 bytes packages/core/src/print.ts | 7 ++ packages/core/src/stablecoin.test.ts.md | 20 ++--- packages/core/src/stablecoin.test.ts.snap | Bin 1659 -> 1670 bytes packages/core/src/zip-foundry.test.ts.md | 10 +-- packages/core/src/zip-foundry.test.ts.snap | Bin 3459 -> 3459 bytes packages/core/src/zip-hardhat.test.ts.md | 4 +- packages/core/src/zip-hardhat.test.ts.snap | Bin 2282 -> 2285 bytes 17 files changed, 111 insertions(+), 104 deletions(-) diff --git a/packages/core/src/custom.test.ts.md b/packages/core/src/custom.test.ts.md index a3291ee1..24d1c542 100644 --- a/packages/core/src/custom.test.ts.md +++ b/packages/core/src/custom.test.ts.md @@ -24,8 +24,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";␊ ␊ contract MyContract is Pausable, Ownable {␊ constructor(address initialOwner) Ownable(initialOwner) {}␊ diff --git a/packages/core/src/custom.test.ts.snap b/packages/core/src/custom.test.ts.snap index 5f5f25e19fd8eb888e75bd01d29daa78bb273ae0..a1cf4e67d979c887d4540d92334ae4a828e1dc5c 100644 GIT binary patch delta 769 zcmV+c1OEKF2D=6_K~_N^Q*L2!b7*gLAa*kf0|4_i@p@9;`9+6|kd$KvRX<`=o4X)K za{7=Y@e6%uaVU{8NPkT%MX|V-v)}ps&U|yO`#mPS&-&XBG}JKcd!aTWpqdk@hr;MD z*S=2-IsLxA_F`@Jm7cG?eD-zCb>aAM|Fn8QJ>(jzO&__TeTr%aTFn#3bzx5gk{H@! z2qS8S(3Z$QqLj!ehdsfKBA(H3{-(B7+j68LgMfe*jQZ4!;eULq_O`aYU3VNWfkJDX zTEW!0a*~vXl7yP{7|tbqR{CXS{j+qBS<^rYWnkJK@mX?L&{raWja?y;PZED_TAFr= z=b_eag05-7HtLy=!=%DxPC`SOc2jiXWMTiPh7`65Nl=(N005rg+NjVoLY0Z{E7Te& zr-l;N9&uEa6n|f~Pp4N-WZw_DXQ<#X;|0qVkYSHe4+Ll92%5y1ecc38k4}mXLcWTN z43#>`CSw%Jfg(Oe#TiAomPE}6pC1%s4GKQQpfuxd(#Z-;S96uQQi;oP!oB5W$pBc` zq@%9u!fvbqJ7SWC(bbS^(#I-cOpNjqGB+`mJT*RzCVwmogi0@? znnFvJV7NfCOQ%*tn-9^@MwIDZoal;ewQQC&*TVjx#Xj~)$V|fzD7OS@pa?fdf?;|8 z-TOx8;H2BwZ#6%3kJ<E zNP=BH^o>|j&A4J)mgoQHufS!sxU$4uT2(Ng_L--B=4qd~w|(X}iO5y?1T1`~ delta 768 zcmV+b1ONQH2D%0^K~_N^Q*L2!b7*gLAa*kf0|3c3jaV+3JC!ON_Wy)g+4jm8cLA{E zdZp}JrirtvXg-lLNPjh!*3jZ!&VJ|j`{vBK?)RARKI$*u&``s$?}gfkfND;p9txvB zUHd*Up-eS?PzB_4m>PW=#Vrl!57ClHC>bl?Y&CS4iZO#G#wkrrpp` zrri`>(}Hc(Gbim4U&aUVJk;7v(20+Q{i7PvP@9n8Vd?+?c!F!ALeB_QCcdvwYoMGO zN?3cuQB_iW*?&HrUOAC{KjfaFg2Rj#ELT8=Jw`ncoQ)%B5@+^x6HGliDLM%GGA=Sy z>LgRfD3k+5e2j`Sif}E7nh`!P6k`bmS0R*U+)X-Jg6V3mGFK{bIZpIrIk`gs7B=aq z>$l`tkod47M^DEe98c8bnOXf*0VWRl|!_ya0dWmH%UJd)87@ zXsHqm7mV!EsnyWtDjM2|GTn<4U9zo~%^l6Pu)k=rk9`s{)9?ezt${R9gqtJ5u)P1~ zZKHE=(rxUwn(w+t?SnU)w%OdXS(J7_I2kOsokeG*rp3h0>X>N7DK5!GT##}t+oc#u yuy>2T5sy?euGp64`TzMVa9J&`EOD2X9hi^%%;P@uxX(P;KJyd9PG&9T5C8yyC4VRY diff --git a/packages/core/src/erc1155.test.ts.md b/packages/core/src/erc1155.test.ts.md index fe69331b..1e1a7a79 100644 --- a/packages/core/src/erc1155.test.ts.md +++ b/packages/core/src/erc1155.test.ts.md @@ -35,8 +35,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ ␊ contract MyToken is ERC1155, AccessControl {␊ bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ @@ -72,8 +72,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ ␊ contract MyToken is ERC1155, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -113,8 +113,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC1155Burnable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Burnable {␊ constructor(address initialOwner)␊ @@ -137,8 +137,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC1155Pausable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Pausable {␊ constructor(address initialOwner)␊ @@ -214,8 +214,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ ␊ contract MyToken is ERC1155, AccessControl {␊ bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ @@ -267,8 +267,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ ␊ contract MyToken is ERC1155, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -305,8 +305,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC1155Supply} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Supply {␊ constructor(address initialOwner)␊ @@ -337,10 +337,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ - import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ contract MyToken is Initializable, ERC1155Upgradeable, AccessControlUpgradeable, ERC1155PausableUpgradeable, ERC1155BurnableUpgradeable {␊ @@ -420,10 +420,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ - import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ @@ -513,10 +513,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ - import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ diff --git a/packages/core/src/erc1155.test.ts.snap b/packages/core/src/erc1155.test.ts.snap index 1b52fa93e3998992b00dec6a09454835631f3128..609422e60bd334f6beea165981e3fefea2aa38ce 100644 GIT binary patch delta 1752 zcmV;}1}FLa4fqW*K~_N^Q*L2!b7*gLAa*kf0|3Bmr4qlVeK8c?{H@DYKcACGO2~U* zZazwpwB%nL9ZQiiB7f2dsm`UvC~1siqf$hz@$T3jvOBY#nXThQLE;DW7x2_RA>MdG z`~k!(NW8-@0qte>?n@HK8;A9a9lpK9`e_3k-$Pns0}$*F(=UE zJu3M3Z!`@G_|>gP3pd`mVSjGkx$*w3m0OAe4r<%amUpp=2!BV*RSgk=I~cKtV6WOJ zC<@r3h6x33>j?C*=z)C`k>|)Xk&X%2qC_yL3JzYZmG77D7fc4b1_YeySi@ofUfeH# zQeIu%C={?^QYOI3PJL@-Wo_*gbQm?j;v;Gza_q@dR4Gpp^birnn=HS}oa&1kzNq~^ zfo&a)69rWjaXhYgvppFFIS%#)4OiPt>S+yyK^Je zC&WnPo*3Gu0Nl}_izxRNqdgFaf3zys%0VI|0yOK@*1=Aru~To=_jh-|r{EB&Dm+|W zdr(}A4K6Ni6o%qhLmg=8qM{j?%n-*RsC5}6qE2;G+}?RyY3?>!mF>OiQ^)jD)IN#B z^MTya5qmaE<3aCyDGF%x5a@qUU8j9pjnvKoWC+k#h%u}o4j6iAVTLr&9)JT6oaMN| zmT5zZSBXHZ165RXmic3V<%OyitcB}=|ML|_egB8lTTBO0AcP@dF~UKyP37g2*r06| zV&$Z9VXG36fXYZXi^35^0z3R-3v z;6v-tYg^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I+6!{z*eLTXbmtj}v8sDKY z0z<-Kgo8@3+_cSpdtiECjBi9{UgYh1a36T@V-d&dAXacd!2tyaTmcT~$rK>4g}8v0 zt+*2SQzC#r@_i*x5Wpo7K(r}z_jHM?;BMGQ;Vwt?r;n?H!R$9wyfdm1h3P=KoKy1v z6Hzy?SB$O`bS&y7Cdf0SPN0SA7CuIX4mpwyTwdQ;ezDiySXqs&w4DS=#a6nvjAS2J z$fB&TFt%(_13itbEa$eUe-$Y)xPj=JkRP~OSD|44lc@0TLcwNH;dA#PwlO&ud;~HT zqeY`HS~DM)gFtai6FBxhg9h@-i-JMIZOD)+c5bI`)^ES9*x8LO9^ssNVsV2ZmB1Nx z_kID>WnIaSupqpcoPh-j=wVgZDJ@VHXGg8si`-ePI1QYc0L@_XG_Ep5nsVM`<}_k? z5u?mti7M=r4Qu{&3qF~2UYpV5ey~spWEihX9Ro^D*p_$)(FV#_Dq2HdsQ}Yn3(e*G-@JI=dxI-$G-yLa^>L^8cEe?!A$7Jc4Sc5?St9d6O z(MEF<)LXM`6IqA|==L3^KSE<9Ps9Vlyx!lAg_gQXTI%B=S}OZn%eOz1G?i9dep~@f z6?|*>e40x6mFz-W722xMR%2+Z!TmCOZ8c9)WZ(}LC`83u6cmAb{PqD`=TKlwr~u~d fFF#D2m8-!oGZl|5D6;P>oPGZfEqmk#G*tiq9UGrh diff --git a/packages/core/src/erc721.test.ts.md b/packages/core/src/erc721.test.ts.md index 4c986927..0e4a6e4a 100644 --- a/packages/core/src/erc721.test.ts.md +++ b/packages/core/src/erc721.test.ts.md @@ -237,8 +237,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, ERC721Burnable {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -334,8 +334,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721, AccessControl {␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ @@ -370,8 +370,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -419,8 +419,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -453,8 +453,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -487,8 +487,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -530,14 +530,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ @@ -603,14 +603,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ @@ -684,12 +684,12 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ diff --git a/packages/core/src/erc721.test.ts.snap b/packages/core/src/erc721.test.ts.snap index fd6cdcf75d0493996322ceb4064c8eff671f2446..130d22e5752dfb28647944c927148056e3e26fbc 100644 GIT binary patch literal 2140 zcmV-i2&4BwRzV^hk^>3P-WM7enCgqLc6?Ibn!N$T$fsprqj+fe!6^XLs!Q5hr%oG*PlM z-($Y-_q}%Zt8T}n`Vs%^Yb3BR5$ZsWb<7F0d5;SI$ybH}1^i&?`Q>X*Uvqz!p1StJ z^`#|E0}uAL-mmOn9TAQy4FeH@yBM)MpxI~@G!1N0%Z37XOaxA_=z(1ukq?n=BNG#_ zNr_-k7aV-FUcFhpS+E&Av>@Qr#0D09@X^ict!k~dQ7B-`rc8jx+xwfZ*VdkZE~6GG zzCmq79tGqyJtU_IdW4APuMK`xIW>zLg+jOpH2W=g6~G+$E5PFd008KeaKRj1P*z$A z9+is0>S7rbo2|EtE8y{y!jnR9V7(6H2sjKY&g>WI%zpU4pP9G3>kwUFN+5F^k8w!;vh$A~d(Ai$7t7~!DA1;gYJSjeKRzY_3ufBY4o*b~C$cQow~3UmVd zRT~p1U{yD%V`$j!a_wD9-@DyAWn^=$wO()SSr2O*-beN3THn6^{_T6D&QCUtH}Bnk zYxCosx>nrqcqHunF(QtI80?rRYv~)SlBHj~v4EDA>1;>Zjztlj3Pd=jgllO!XFF6G zr1wnbVwwh8Jp{VcH0g=!IHAvR02BVj0YeWR%#Z;(eefVS*=pKN9ov8cm7rlT#5oYO z3>-{EZT&UisopTkAbbcN(OZeUGj!|dA0g+`AbnR-p3OnX*ME}neD2tYRYMtF*4b^S5aj3{G$GMr<)E%phX`N8wc0Ik3{3}3uTd;_AaF*2kg?BDEjD*-*F|~5 zm7)uERO<8v;;;H*x&LSwv8=Y!F|i)~d5qD?REFqKY7VtRR=lKKnSgTSFbue$3?3>X z%Cas+l-BaXN0fv8#sgp5=^{!@XY_~?@0o*$;;H8*zEl{Q%5`H66|O7i&tX0s$rj3V zNk|;3&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z-R54q^;sags_;*D`N^u3rd28UilS*&r_S=^dSXBs7Q-15i6Ww+XS7&KVaRWpOc7f! zLrzJ*;~P8tzP+co*mj;>?1rk5Jk6kQVBnncI&@BjwtV@k;$(lybNRC0I{Ijy<-t~tZ=(e}@Ty!y zOBplo9kdwCJODG;1i_7I;yFFU3TPM5E})%zXg`(E7T7^tK*!bGiuhIm_TO@SE204Q zSYXFqZ2F--83p?-v*!B*-;+PMr};1;d{7AzMm_eek%0iG_5c%6vv4qtt@%Y~&Bg=; ziqr^nP|d-Y$TA^Es)D-*hr6G4+lPDmiI($zMd45jJ&d(1=X$bTgt{w2-Q|0I&$fZ* zo-$~mpo67E9ghp&;aSNf+C_P#B>w6J%Qs5~Le)Kb>zqG5{DgpXgYL*|%oVkRjf z-_I;X4GnYs{9sP$>R4ftsq!koQcTq_*Ji{ygj%@527^Wnj@EWgN8c0T~VAh3@dR$QF0evPn zg4aCa&wpyrPloA|LsNpJCY4cok9Pwxe$`889MkB>WhnwC(|$@)H?*qjQ;k+XJ0pb2 z#)nHZBy#&T1koXcPZTvr*~nwj$q5c;ROc<7#=(IpOjhb5z)ig~%~fr7Er{3SHSd+) ztXreEf5ktuoYu%2c-!cW6v3Y7Y6kUh|3|5Qe|o#9ev9h2sD6v;S6}@~0VgL%Pv$f% zEh59_)he;8AY)!pb7x6bzUB^}X3nvw$}>eH3@^bvlR$~35_HjWTsypr;?s^R7?m%9 z)76!7_o3(oie8}T1!nt9`sdnaVB9^#pS`KH1^+GDg4d@lQ0_S{)*NWBa~7>a(JJJ$ zRk+HJU%Q4Ox%RwLO@neiO6!m)oU8UheN?yWDQgGkgUT8N^BC|Zc? PXd(U&>%Cc%KUn|(;baGd diff --git a/packages/core/src/governor.test.ts.md b/packages/core/src/governor.test.ts.md index 7a47daeb..a01112d1 100644 --- a/packages/core/src/governor.test.ts.md +++ b/packages/core/src/governor.test.ts.md @@ -14,9 +14,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -111,9 +111,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -204,8 +204,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -294,8 +294,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -383,11 +383,11 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -499,9 +499,9 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorStorage} from "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorStorage, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -600,9 +600,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -693,9 +693,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -786,8 +786,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -875,11 +875,11 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -990,9 +990,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1083,9 +1083,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1180,9 +1180,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1273,9 +1273,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockCompound, ICompoundTimelock} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {ICompoundTimelock, GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockCompound {␊ constructor(IVotes _token, ICompoundTimelock _timelock)␊ @@ -1365,11 +1365,11 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1480,9 +1480,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1572,11 +1572,11 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1687,9 +1687,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes, GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ - import {TimelockController, GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1780,9 +1780,9 @@ Generated by [AVA](https://avajs.dev). ␊ import {GovernorUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol";␊ import {GovernorCountingSimpleUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingSimpleUpgradeable.sol";␊ - import {IVotes, GovernorVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ + import {GovernorTimelockControlUpgradeable, TimelockControllerUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ + import {GovernorVotesUpgradeable, IVotes} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ import {GovernorVotesQuorumFractionUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";␊ - import {TimelockControllerUpgradeable, GovernorTimelockControlUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ diff --git a/packages/core/src/governor.test.ts.snap b/packages/core/src/governor.test.ts.snap index d9efb0e44579948b981fd64924a87acf578a82e8..07dc72ae0de31a73db04bbd6e8133a9e965c90bc 100644 GIT binary patch delta 2415 zcmV-#36S=I6Z{f?K~_N^Q*L2!b7*gLAa*kf0|0l>23Tv@r@mzIjxKUHtt~MsQYb$T zf`S=AX+|E|iMk()2mk;800003?Va6j+{P8hofbixjcug8O3)UWxCOcnR^n=7DS~wq zz(yOPP2@m!(Wa;ciX2G;lQT4DC|Nd)pwG}JNS~l@kej}LLEofzy({=JyBsdLU)=SQ z>;K+JB8M~QoEZ-PKc3mq_h+Y`aGuG3{F5rCJoLR4_ zLU=Bd+z#Z0Q1b8JyRNP5zuf%p$2Wd*BmTVe?v0=QD7a}^C zm`rGDbg~d-@~T4!A&%fug^{B~*iA!APLy~?d097;6O|pin_L`!boJdkBPZ^RpH8ao zrd3yeoHY&a-WxAgu&7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>0Tn+1Q~)YW4=uCC0+1wmH+Kv8e4sZ5aP8}CUx5C8`r9DU^fLJsn+0IA0Bjb398kk^K-hmQ zVEwWl=_{nKni!|KFWtr?=E~AnI}->q;K9}`lzF>AnMh~>0NV+G?Z>?quaeuz(o4x4 zGy@;idEsV1OJ-%@n{N%-ECA9b01_wzl(A5dK^dS7)4AG|v1d|7EGMM0{g61x@*SVM zbjF0%dj@L!_s&M31`=A}86>pkO=y25i7eUE8XlP|WUi380+=-(%#gWiwu}c;f+-s_ z7{QcPO!;sYrkpv2^&^8T|A+s63gl}i^0goE+ML2lkaQMATDXafcCld`$Y|rp2zUX! zSSZNA3*d$6Ty4Dg)!6@P9rQ0#4Hbpw!ggb#7zc?D|7C#0KR;X}NIXmIq_KaYQ#9#T zG%8xg7rB~dLXG+@PbH9QlS*M^B^DKHo*h?KXHI21Q-LN|w(?3_iQUz06ni#cirF4} zJ#YJ=;IFQ&NHI@ZMkR#?j;@0E*9E<_9fwM3jaO1=<=L|*#|t)*ccf6w6jC(Y9`$c& zr&nHS)fd%7kw53i>XGpf_DFxh-E2~~EQ@^ML{f48A%Cr7CAXqL+Gljjj)^Ewu45#d zN30W<$++%etf-JxkHXoo%ybyen>_^4p~%uz9bE-^#u_ys@VuME zX1As%l@?6=Nsnh3URlcQ==7WirNs+j(ba1#&!3WYe_F(dPQFxOKp0{EZ1#pLBT;2X z>VgaQT3;$!_mF^I9mc)v(?HoKXpgJNz`IVuJ0`u1XC=*k%CNv()Usy}bIzjee { + if (a.name < b.name) return -1; + if (a.name > b.name) return 1; + return 0; + }); + // Combine imports by path const pathMap = new Map(); for (const imp of imports) { diff --git a/packages/core/src/stablecoin.test.ts.md b/packages/core/src/stablecoin.test.ts.md index 20ad0158..da4c4d4d 100644 --- a/packages/core/src/stablecoin.test.ts.md +++ b/packages/core/src/stablecoin.test.ts.md @@ -47,8 +47,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -84,9 +84,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessControl, ERC20Permit {␊ @@ -127,9 +127,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessManaged, ERC20Permit {␊ @@ -169,8 +169,8 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -241,8 +241,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -265,8 +265,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, AccessControl, ERC20Permit {␊ @@ -312,8 +312,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Custodian} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Custodian, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -347,8 +347,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Allowlist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Allowlist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -393,8 +393,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Blocklist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Blocklist.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Blocklist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -555,8 +555,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20FlashMint {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ diff --git a/packages/core/src/stablecoin.test.ts.snap b/packages/core/src/stablecoin.test.ts.snap index bbc71162a2e38b6d0e81c0e160232629952ce6f8..d7bbd19526a90570609e5035851fa5285a0ff5db 100644 GIT binary patch delta 1582 zcmV+}2GRNZ42BIdK~_N^Q*L2!b7*gLAa*kf0|0nM^;2mR%Ch!(J%_SeXU2W;Ia+X3 zfv7EdhQ(TQsY;PDS18?NH)#{6yN6beXTI~^yf+`uJo{Cz>u_sN{`3nfsvPvXL{bZ+ zB3+TO8GpZ-+c)ma{xH*Q!shzYSM^nDA(L2Nv5_g-qbMFjXJxC@Y{DXUJ)&sWK{%jl z7uGyv-=OEALm4b`rUbE+gl``-T8&o86J*CFAh|=d&W~C|s(>k-|fTOj6EdGo=t| zm*PIq>2I1z1S&zdtwE{_9F+h7EY747zNNURRKxp~a=Lf92IbD?R=Jw)JkX>HN5`e( zQWQm*#1Fc@V8O-7K+e9K3FN=U4&;-_&+~*b*0?f>5*u_0dE*gZ=I70=JDI$hy;bPE zS$~iGJXd5RjW>`tvG&@*nX;W&7E0NST8{^*$f+7cy-!O*V%q|x1j?wQ#92FFD5|`X=M|_A9$FUJn|tuEQcm3{SLaJZ5oKeK_>OAZE@jCw(yMq} zWSt77gcCc0Ftx!QtSl`*Z9iY#+HNm(R-S2dYZ;rOr8Uqi+Cp7VlNDLhk%}n1Z8qb5qXcEWVc(r}C%LP^a zF-evgvvP{qIksT}r4rOqXituye2po0V(#3{sQ`>R(tV#{&WmCn>0Wy&pjhmAb4SL( za>eunIXyv+2QHP~F9~#m!E^RVGk;`w^=q+9m)EBTon&+nxr!@y8WNd}qJIYWTdfw{ zgZnMGcMoi|s7oAKsh&)MgOe!$ya%o6n~0)h!H|k_5Xm8LB7V#S^5yI_kZ<_$UDyY- z=1ksGjJVuqYV>1QcMdv5jYk(Wc#{W zM!lc8!WG7pceU8q{C({>>wj)g`s7Ao)Eaz|-Vf+mnC=7$xD!b4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g zII>nhnF0qVQvmn?I@2c+Wyyju73Cn3W1d9(m#S^6p~93`st|U22kaV@EHWB!5QuT9L$fRbrCp z+csguTIf-_r+e!H{p~$4iWGEW3m3W@u`-!m{)QPpyi%MV_lN%7= z9?+#~c^{d&Y!_mqB4dmZ(csCrg?!a-2an-vE5p~1%FWj&v7?vGS0j9__-ec=F<*6V zpOb+}p8~%6Y!c~ouYYpW)g(uG>3W(Alhf5p(RH7z+#2Fv8M6Lf+8W~P;8RBX%U}X8 zBCQ2Rl%H{Cov!LD>d1E3c7j4n^hJ+<=|z{)5kpVIWzd4@cw||T7!%^xd<~A_W9*89 z6vj7EFlY71-BFvPBYS9iWK3v8@v{X@0{A4nCo$jcqnL7G%729^7v4fH+|A*FqAp5B zTra0${!fMqf0w&rKBdB&p@LZ{R&WPOURN7ast(fpvqyQwYJH)m?_({KwI|Lpk~_PU zsb)}9>O0tEc&M5VWvC5lGU8&>rH5!+L}J#!#nrXNFSdJYOUsFso}VIDVrB4-Fxvqa zT`q<>##UW!<2-_~vRc{`*W1X+beU@45V;#XNzQq<==}^H|C>G<9*4)L!6f!5yO6vQ VnVfP);x#;s{vUuG+qm#R0039z3<>}M diff --git a/packages/core/src/zip-foundry.test.ts.md b/packages/core/src/zip-foundry.test.ts.md index 137cc5de..21cd19cf 100644 --- a/packages/core/src/zip-foundry.test.ts.md +++ b/packages/core/src/zip-foundry.test.ts.md @@ -122,14 +122,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ - import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ @@ -330,9 +330,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ - import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ @@ -521,8 +521,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ @@ -853,8 +853,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC1155Upgradeable, OwnableUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ diff --git a/packages/core/src/zip-foundry.test.ts.snap b/packages/core/src/zip-foundry.test.ts.snap index 52265f82a4b318ece87b34b09d40d5d607a59902..5a941ec662850faa8440ef0625e5069a89cc273a 100644 GIT binary patch literal 3459 zcmV-}4Se!JRzV>rB=00000000B+T+MGBw-ukY5et=%L#md;7krX&CWXp(bDTNTr zR`ro4b`ph};qEe;A;%;~^4jpB=%L3Rdg;fZAOAps{sRSyqNnzpbN_{2dMZ$GNY2j8 z&hF~_%cFy|OFq8$`1tt9_amu4wl@RnZSi0H2?;C$^d(~6^dxA7{hivSImTeGRx_X8 ze*0~!W?QvOR_!h8YVCsc&Duq)cIll9Z(h27&5b#8H!*P$*#?`CcWwJRxZg$I7Qk)L z!2)0oFyR6Q0rG9!2G_t&7kk~L?uU1Q>!WR##6e(-E+RGn$m>#2m$e=ZLr8o;r~qvm z6W;-gic`{9RteSvumdr1>ayuGEWniA#yKTEkWE={s3L93I%tF{s(yqrMnGO6u!<1q z3K8)c*WILa%jqD|R-_K^x*a40CY=@+kO}0wS~n;#B?FyVMIw$;K@p>0B2TDJJOQn? zR8lb(Gz{w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0%%V z+OeG{K@;3!ID=SWA(mZ2J0*yoTI2gH;z>AHxLM)o{@XfH$erAWh@uYmOHS_3jykyq z+p_+7!LmN8PVTF`;gsYJ)yaL8pHwIJ)ye%~<%oZ)a>SFJBOckweLhz_R)_b$c{L92 zk4xftvQP0f-CXh}TlNd>2j%;E6CgKAJ31IjTb7*-rP>zn1e75FnKbX{ZU$^kJgz)| zn*qr`7+p+K&b=MkCwVJ(N3lGL1N^~Y51rwUQuFwp+7DcM(#d_UZ@Cls0go{U=f6FH l2j|BGKic6TdP&IL;XhP8Hj#BwINc}c?EeoM%WSuR006W;wn+d0 diff --git a/packages/core/src/zip-hardhat.test.ts.md b/packages/core/src/zip-hardhat.test.ts.md index 29e5004b..2b89bb88 100644 --- a/packages/core/src/zip-hardhat.test.ts.md +++ b/packages/core/src/zip-hardhat.test.ts.md @@ -13,14 +13,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ - import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ diff --git a/packages/core/src/zip-hardhat.test.ts.snap b/packages/core/src/zip-hardhat.test.ts.snap index 8628e95395044f6c5b0946de712aeb914a4f9d47..d90eca646e921c755fb64e85ec9b5a479f614102 100644 GIT binary patch delta 2199 zcmV;I2x#}}5$zE&K~_N^Q*L2!b7*gLAa*kf0|4BKA{XOE3@R=-HFK=W@ad9E$pEvdh8$2_LQPP z{)S$A?V+clx1xVR4=vDRQOt12<#K6BD}TtTSAZ>%eDixBeDmJ#alY<#L+(G7zxq8W zszUe@gx_i7UJ`~>G7`%HSMnEM2LVy!XE%R+6}^M>Pi>)g<9}m>(0zoESU~7E?;`Zi zIzry}5PH9M+fCpaKZEN?&FQ0 zEgfRCse;O!XL&moQ>qztcfrUdbo#7}O! zZMR*I1?fiwOMf2HfT|&W(sqB~b~-EdI*np36h2w=eUQ>DAJ z$iWt6>O~afAXOS3lSIC#2N^~sK8T3EkohS>750z00)P1;&<3D{{3&Pt*{F%4q4ZK& z3sBFV;;rGHR*I>_MokM(yl8uwMXiM=ay5HuytWs{PWyNMHt|UvV~o2)1@fZ~j+1Uk zee8246=4cLUfbV&uye4p{pbN+#ZSTa$~2gF31WO5QKmpN4T}CTemae&$n;Dr#jvVRDqf}=E^y@dISa+Yd#n%UdoEF6~2 zYZl$M^3`Aon-wl!Q4MIKkiAL8TR5Rib#C9mB;pBE(|QVyPv|i~8o(}`Q0IAgZveQ* z!;l|Q*3b1zOax$l2tv>RBo^>hLIni4JH)%TrMM-N50W?_3UaIURv%|$(T774CNR!B z^M95Y3G*A7UZ=Rv#~XXRdCR#elNf}X8Il^H6{iZTBh5^;$*tx`thi~?Fz1(t6po%_ zW>#9#>NQ3Xpc26(cC7bho73mkbZbm%L}u@(Zuvs3mJx;zYFS~$KO!O+5VbEstaH|* zeVkRcI&3_;B@VBg_c$0L&h(b ztw)C-bSGHGjg)URTIRL{r6}vm<=k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G?%(@u)#$!=1))D&Md-;p2!DP1?yRGG?aIZB z?zcNjdt+ZunYb1UVHrwMT6jEuh+hkNx64Gb0YKa9u8rqR@0;Hs1`_T0KbNXT@ z@@bHgmc6}4JLgnUbfg4x(ug|Yv*E0hac<#hqg%M7z!oRZ^Y9%%k%~vl{8?t5TuhiG zJy;}~y%z_?sljn#B9qJp8-Hm(^?F}RRScem0dC(0BNd&{QIsl$CzXDV?fWUyqR+Aj z=Pocf+|&e6S0TfWP8vm6I5c)lvHq0CSF-a@UNt+ z(`k#Qaze|0^twicTjf!ql{M)9lc6E=#`2;^x>qIfpe!5ADSf=+x2PxnlLg4%^vbpAzk{zdf-{G$5dTlGbCYPy?$L7kNj{bfcv zG$%o`+h`4?C)P w!+*-W;Q|gj&dear_(6DnSaA+MvH!{rE519-5MrkMnw4t&51Y401+X&!09AujnE(I) From 438d888b95a54e4cc8a62a80b4c854cb3ccc25e8 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Wed, 20 Nov 2024 08:37:45 -0500 Subject: [PATCH 15/18] Revert to import from different files --- packages/core/src/contract.ts | 18 +- packages/core/src/custom.test.ts.md | 2 +- packages/core/src/custom.test.ts.snap | Bin 827 -> 826 bytes packages/core/src/erc1155.test.ts.md | 26 +-- packages/core/src/erc1155.test.ts.snap | Bin 1784 -> 1788 bytes packages/core/src/erc20.test.ts.md | 32 +-- packages/core/src/erc20.test.ts.snap | Bin 1960 -> 1945 bytes packages/core/src/erc20.ts | 4 +- packages/core/src/erc721.test.ts.md | 30 +-- packages/core/src/erc721.test.ts.snap | Bin 2140 -> 2137 bytes packages/core/src/governor.test.ts.md | 228 +++++++-------------- packages/core/src/governor.test.ts.snap | Bin 2428 -> 2079 bytes packages/core/src/governor.ts | 13 +- packages/core/src/infer-transpiled.test.ts | 9 +- packages/core/src/infer-transpiled.ts | 6 +- packages/core/src/options.ts | 6 +- packages/core/src/print.ts | 38 +--- packages/core/src/stablecoin.test.ts.md | 20 +- packages/core/src/stablecoin.test.ts.snap | Bin 1670 -> 1659 bytes packages/core/src/stablecoin.ts | 6 +- packages/core/src/zip-foundry.test.ts.md | 10 +- packages/core/src/zip-foundry.test.ts.snap | Bin 3459 -> 3459 bytes packages/core/src/zip-hardhat.test.ts.md | 4 +- packages/core/src/zip-hardhat.test.ts.snap | Bin 2285 -> 2282 bytes 24 files changed, 183 insertions(+), 269 deletions(-) diff --git a/packages/core/src/contract.ts b/packages/core/src/contract.ts index f670b533..e7142d54 100644 --- a/packages/core/src/contract.ts +++ b/packages/core/src/contract.ts @@ -18,6 +18,7 @@ export type Value = string | number | { lit: string } | { note: string, value: V export interface Parent { contract: ImportContract; params: Value[]; + importOnly?: boolean; } export interface ImportContract extends ReferencedContract { @@ -26,6 +27,7 @@ export interface ImportContract extends ReferencedContract { export interface ReferencedContract { name: string; + transpiled?: boolean; } export interface Using { @@ -77,6 +79,7 @@ export class ContractBuilder implements Contract { license: string = 'MIT'; upgradeable = false; + readonly using: Using[] = []; readonly natspecTags: NatspecTag[] = []; readonly constructorArgs: FunctionArgument[] = []; @@ -84,7 +87,6 @@ export class ContractBuilder implements Contract { readonly variableSet: Set = new Set(); private parentMap: Map = new Map(); - private importFromMap: Map = new Map(); private functionMap: Map = new Map(); constructor(name: string) { @@ -92,7 +94,7 @@ export class ContractBuilder implements Contract { } get parents(): Parent[] { - return [...this.parentMap.values()].sort((a, b) => { + return [...this.parentMap.values()].filter(p => !p.importOnly).sort((a, b) => { if (a.contract.name === 'Initializable') { return -1; } else if (b.contract.name === 'Initializable') { @@ -104,7 +106,10 @@ export class ContractBuilder implements Contract { } get imports(): ImportContract[] { - return [...this.importFromMap.entries()].map(([name, path]) => ({ name, path })); + return [ + ...[...this.parentMap.values()].map(p => p.contract), + ...this.using.map(u => u.library), + ]; } get functions(): ContractFunction[] { @@ -118,12 +123,13 @@ export class ContractBuilder implements Contract { addParent(contract: ImportContract, params: Value[] = []): boolean { const present = this.parentMap.has(contract.name); this.parentMap.set(contract.name, { contract, params }); - this.addImportFrom(contract); return !present; } - addImportFrom(contract: ImportContract) { - this.importFromMap.set(contract.name, contract.path); + addImportOnly(contract: ImportContract): boolean { + const present = this.parentMap.has(contract.name); + this.parentMap.set(contract.name, { contract, params: [], importOnly: true }); + return !present; } addOverride(parent: ReferencedContract, baseFn: BaseFunction, mutability?: FunctionMutability) { diff --git a/packages/core/src/custom.test.ts.md b/packages/core/src/custom.test.ts.md index 24d1c542..a3291ee1 100644 --- a/packages/core/src/custom.test.ts.md +++ b/packages/core/src/custom.test.ts.md @@ -24,8 +24,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyContract is Pausable, Ownable {␊ constructor(address initialOwner) Ownable(initialOwner) {}␊ diff --git a/packages/core/src/custom.test.ts.snap b/packages/core/src/custom.test.ts.snap index a1cf4e67d979c887d4540d92334ae4a828e1dc5c..5f5f25e19fd8eb888e75bd01d29daa78bb273ae0 100644 GIT binary patch delta 768 zcmV+b1ONQH2D%0^K~_N^Q*L2!b7*gLAa*kf0|3c3jaV+3JC!ON_Wy)g+4jm8cLA{E zdZp}JrirtvXg-lLNPjh!*3jZ!&VJ|j`{vBK?)RARKI$*u&``s$?}gfkfND;p9txvB zUHd*Up-eS?PzB_4m>PW=#Vrl!57ClHC>bl?Y&CS4iZO#G#wkrrpp` zrri`>(}Hc(Gbim4U&aUVJk;7v(20+Q{i7PvP@9n8Vd?+?c!F!ALeB_QCcdvwYoMGO zN?3cuQB_iW*?&HrUOAC{KjfaFg2Rj#ELT8=Jw`ncoQ)%B5@+^x6HGliDLM%GGA=Sy z>LgRfD3k+5e2j`Sif}E7nh`!P6k`bmS0R*U+)X-Jg6V3mGFK{bIZpIrIk`gs7B=aq z>$l`tkod47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 100644 --- a/packages/core/src/erc1155.test.ts.md +++ b/packages/core/src/erc1155.test.ts.md @@ -35,8 +35,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ ␊ contract MyToken is ERC1155, AccessControl {␊ bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ @@ -72,8 +72,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ ␊ contract MyToken is ERC1155, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -113,8 +113,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {ERC1155Burnable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC1155Burnable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Burnable {␊ constructor(address initialOwner)␊ @@ -137,8 +137,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {ERC1155Pausable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC1155Pausable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Pausable {␊ constructor(address initialOwner)␊ @@ -214,8 +214,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ ␊ contract MyToken is ERC1155, AccessControl {␊ bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ @@ -267,8 +267,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ ␊ contract MyToken is ERC1155, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -305,8 +305,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {ERC1155Supply} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC1155Supply} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Supply {␊ constructor(address initialOwner)␊ @@ -337,10 +337,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ - import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ contract MyToken is Initializable, ERC1155Upgradeable, AccessControlUpgradeable, ERC1155PausableUpgradeable, ERC1155BurnableUpgradeable {␊ @@ -420,10 +420,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ - import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ @@ -513,10 +513,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ - import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ diff --git a/packages/core/src/erc1155.test.ts.snap b/packages/core/src/erc1155.test.ts.snap index 609422e60bd334f6beea165981e3fefea2aa38ce..1b52fa93e3998992b00dec6a09454835631f3128 100644 GIT binary patch delta 1756 zcmV<21|#|S4g3ue;LgWhP+zA8e5_B7fQlsm`UvC~1siqf!Lccz0|M*`3+W%+_(DAn^nG3wUau5N|vo z{s7_?B;MhdfcAbHUt&8>wq3tC>zO&{%*;3EeCN#ORi~{}^@zWGjRY1tLT$*giaCKM z?@_^jc%^Ajz^`sRT)OtoHT!e@*0uL;M=?9 zPs;1-n}q^4Ov(f}-K}r0t!-?afexbvSbj)NL{2<;it5W#1U*7T@jCn8Wlr_w%|O&a zpTM?`#)*Qeiaj`2yxyLSg5M7I2Mt>nz#MpLO2F$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/core/src/erc20.ts b/packages/core/src/erc20.ts index b46e0185..cdf83045 100644 --- a/packages/core/src/erc20.ts +++ b/packages/core/src/erc20.ts @@ -184,10 +184,10 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { c.addParent(ERC20Votes); c.addOverride(ERC20Votes, functions._update); - c.addImportFrom({ + c.addImportOnly({ name: 'Nonces', path: '@openzeppelin/contracts/utils/Nonces.sol', - }); + }) c.addOverride({ name: 'Nonces', }, functions.nonces); diff --git a/packages/core/src/erc721.test.ts.md b/packages/core/src/erc721.test.ts.md index 0e4a6e4a..4c986927 100644 --- a/packages/core/src/erc721.test.ts.md +++ b/packages/core/src/erc721.test.ts.md @@ -237,8 +237,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, ERC721Burnable {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -334,8 +334,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ ␊ contract MyToken is ERC721, AccessControl {␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ @@ -370,8 +370,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ ␊ contract MyToken is ERC721, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -419,8 +419,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -453,8 +453,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -487,8 +487,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -530,14 +530,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ @@ -603,14 +603,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ @@ -684,12 +684,12 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ diff --git a/packages/core/src/erc721.test.ts.snap b/packages/core/src/erc721.test.ts.snap index 130d22e5752dfb28647944c927148056e3e26fbc..fd6cdcf75d0493996322ceb4064c8eff671f2446 100644 GIT binary patch literal 2137 zcmV-f2&VTzRzV~aZ zUj1Y`&L4{i00000000B+Tgz`7#~HUQ2ML%Sl6!y-h#V-0`(8Wyb-!m*^Nj!g&q!clBh-T&o0t>m@&Oh6w_jTp6!6z;@2uZ? z^Opa!_QtJuZ?CNx26%F`_eJdhn}~2!Ygvd0+{cJL0PR+%WEfzVIxZBrXCrWd#Q+?- zi2Me*F0wHJyOan9O~JvJ+x5HkyCs*wQwIW0ZERsN1Yh2*->WwoJEanKT*?G^zJI*? zQDf@`=riho^2gLg zTrkfRlvOsON0o9!U9N(1yYp#z13Z6GdQpltY|w)o0gqwLo_(+E+23FHJqyVD9x(-` z1a$q4J2`Gu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vYC;ReJ8ra6(>ua^Me8Umg}4p&&juo6SUmH02cghCkN8kH+O{GkV$&yj>!q9tusU zn>;JZs-aBVk~q<2f_QKC`y0hWh2^3_lw!HU?Zdi3u{v#(AkJ!<2HwyeE~s^fJ_-+l zR~+Kbe=5*ThRKpcQGz5Ul|g!sP6IJM=p{6c)~Ls2i3Kc7`w32MU#qseDqH<*WERE; z?{85o36Ec~ATWaeL=rPgCNztRk7t~$%xfx%J%dR^=ISEAMZGg!sM_pY5USgv^XfORe)H;g_$eM7>^+!}MN*Lz znX6S|mqALsyyi|XnfsdCf10vmUX`bcM(AIHc@zRA;!4m-!?I2PE{eN$SivZL37o91 zq`MD!FOc^Fc`q>DXVNbzn}K2X5TAQmY773kjJ80!Z#P{%qr9Ftq(;melDr|w8FScmdcySpWcvXc}7p diff --git a/packages/core/src/governor.test.ts.md b/packages/core/src/governor.test.ts.md index a01112d1..6e56da73 100644 --- a/packages/core/src/governor.test.ts.md +++ b/packages/core/src/governor.test.ts.md @@ -14,9 +14,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -111,9 +113,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -204,8 +208,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -294,8 +300,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -383,11 +391,13 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -499,9 +509,11 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorStorage} from "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorStorage, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -600,9 +612,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -693,9 +707,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -786,8 +802,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -875,11 +893,13 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -990,9 +1010,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1083,9 +1105,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1180,9 +1204,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1273,9 +1299,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockCompound, ICompoundTimelock} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {ICompoundTimelock} from "@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol";␊ + import {GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockCompound {␊ constructor(IVotes _token, ICompoundTimelock _timelock)␊ @@ -1365,11 +1393,13 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1480,9 +1510,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1572,11 +1604,13 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1687,9 +1721,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {GovernorTimelockControl, TimelockController} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ - import {GovernorVotes, IVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1769,115 +1805,3 @@ Generated by [AVA](https://avajs.dev). }␊ }␊ ` - -## governor with erc20votes, upgradable - -> Snapshot 1 - - `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ - pragma solidity ^0.8.22;␊ - ␊ - import {GovernorUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol";␊ - import {GovernorCountingSimpleUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingSimpleUpgradeable.sol";␊ - import {GovernorTimelockControlUpgradeable, TimelockControllerUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ - import {GovernorVotesUpgradeable, IVotes} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ - import {GovernorVotesQuorumFractionUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";␊ - import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ - ␊ - contract MyGovernor is Initializable, GovernorUpgradeable, GovernorCountingSimpleUpgradeable, GovernorVotesUpgradeable, GovernorVotesQuorumFractionUpgradeable, GovernorTimelockControlUpgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ - /// @custom:oz-upgrades-unsafe-allow constructor␊ - constructor() {␊ - _disableInitializers();␊ - }␊ - ␊ - function initialize(IVotes _token, TimelockControllerUpgradeable _timelock, address initialOwner)␊ - initializer public␊ - {␊ - __Governor_init("MyGovernor");␊ - __GovernorCountingSimple_init();␊ - __GovernorVotes_init(_token);␊ - __GovernorVotesQuorumFraction_init(4);␊ - __GovernorTimelockControl_init(_timelock);␊ - __Ownable_init(initialOwner);␊ - __UUPSUpgradeable_init();␊ - }␊ - ␊ - function votingDelay() public pure override returns (uint256) {␊ - return 50400; // 1 week␊ - }␊ - ␊ - function votingPeriod() public pure override returns (uint256) {␊ - return 50400; // 1 week␊ - }␊ - ␊ - function _authorizeUpgrade(address newImplementation)␊ - internal␊ - onlyOwner␊ - override␊ - {}␊ - ␊ - // The following functions are overrides required by Solidity.␊ - ␊ - function quorum(uint256 blockNumber)␊ - public␊ - view␊ - override(GovernorUpgradeable, GovernorVotesQuorumFractionUpgradeable)␊ - returns (uint256)␊ - {␊ - return super.quorum(blockNumber);␊ - }␊ - ␊ - function state(uint256 proposalId)␊ - public␊ - view␊ - override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ - returns (ProposalState)␊ - {␊ - return super.state(proposalId);␊ - }␊ - ␊ - function proposalNeedsQueuing(uint256 proposalId)␊ - public␊ - view␊ - override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ - returns (bool)␊ - {␊ - return super.proposalNeedsQueuing(proposalId);␊ - }␊ - ␊ - function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ - internal␊ - override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ - returns (uint48)␊ - {␊ - return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ - }␊ - ␊ - function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ - internal␊ - override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ - {␊ - super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ - }␊ - ␊ - function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ - internal␊ - override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ - returns (uint256)␊ - {␊ - return super._cancel(targets, values, calldatas, descriptionHash);␊ - }␊ - ␊ - function _executor()␊ - internal␊ - view␊ - override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ - returns (address)␊ - {␊ - return super._executor();␊ - }␊ - }␊ - ` diff --git a/packages/core/src/governor.test.ts.snap b/packages/core/src/governor.test.ts.snap index 07dc72ae0de31a73db04bbd6e8133a9e965c90bc..9bc66e9ab4ff824c7d4f598ae7d31292b09d5d17 100644 GIT binary patch literal 2079 zcmV+)2;lcYRzVLF~0zydJCK5N0Kplkxn`#p~OOi&-1t}E}iN28t z@gf>I_9PkA_P8_Sq@k(=Cyq!Q0C6iqAkKUm4%|8L87kzL$*#Tjz9;M5{Bvou-kq7} z*;#vjdA#%dVBh8TBl*LxR59h!C*+VHQ{i(#PMA6(f#3m`mP^!;pz?^j4wJqW$Rn=g zx6d8NQr72lbFW-^?Mn3X(yLcqfBD5V!yr5NZ-2J*F|(;J>C(1CeZ>wK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ZAU6Vh0lsVwzTg}8$c+Fj02b}kasUf}MPmjdz@iE) zJ~qL^5q=;d?oNV=PYkH|IiR8@RHPB_kwg8fKD8{UNNWXEte7gYJ7+3ZjP-MKs3Nrs zSOKhfV_1<6xy|H?O5Xq$3kD8kv7#sgEfyV)t!Il$?`p%vmI)Wh^M)tSn;waR*!P$S z^xgp_y9In`pvHUHEdaX(AW8Ce?iTR*KyM7-+Sl2>0R8>+*dWpLGC7LP08qUygvkZpnuRiN7AO-5Ev%AjCjhn|_gcJ4 zZYN7GC3DaWd{pNPH~U#KD+AwrYsh8+kTwC3KpCKng@O#q0A-lY)uxO+lQLpCA(ib1 z#7UO#_`;<#CbZr$P~*S1fEq|>foI;zgjSNsl0B{Ak-0+V3YjZ_S>wSBnX6{YcrYcH zvN3}ZOj*U0_h(_snNwIlHMsJB`0uAkVYL(a+7EbbPGKcTItwB#+(bsZ*f0)cv~gqv zyZ~M-6lCB9@WOPiHeUQ@?0>Zm`j@GOih}ddc4ML#2Z;}UFhJs8AFL51o+NhC*w87u zbSoMaE#r$^O*5fJ{g$T^$aIqmgCuuBnP6Rs$<-!ILJGsunIL8klZq|O&NeHF(ByUs z#vO8|nC-Eb^V$%E;>EQUDdtJbsHD)q(G`!6F6gQ4I8;h&yplpIPo6wFUa*P0BZX?F zkfP!CXeKqr+SEI(AmyviRQ71)9Bz~u4`GiK+|4F+%d*H9P9&A^?~9i@R&p!i(mtbG zc1%QhavdYtJYt==OvZH&V?{$*^(veV%S?yiyxBt#9f~Yn)zKBtGuEhqFfZhD)}H84 zp2THMsy-+wW_D|OQE9=%pY(i&;gzM#j!v(+S6aLf7G1r@^86)P_oqdS=;TWk287|y zW^cGM5>RUzY9>VF>Vcg3;<;pfedt60w?>Y(ZnDjE const timelockArg = '_timelock'; const { timelockType, timelockParent } = timelockModules[timelock]; - c.addImportFrom(timelockType); + c.addImportOnly(timelockType); c.addConstructorArgument({ type: timelockType, name: timelockArg, diff --git a/packages/core/src/infer-transpiled.test.ts b/packages/core/src/infer-transpiled.test.ts index 85f557ea..c6ead414 100644 --- a/packages/core/src/infer-transpiled.test.ts +++ b/packages/core/src/infer-transpiled.test.ts @@ -2,6 +2,11 @@ import test from 'ava'; import { inferTranspiled } from './infer-transpiled'; test('infer transpiled', t => { - t.true(inferTranspiled('Foo')); - t.false(inferTranspiled('IFoo')); + t.true(inferTranspiled({ name: 'Foo' })); + t.true(inferTranspiled({ name: 'Foo', transpiled: true })); + t.false(inferTranspiled({ name: 'Foo', transpiled: false })); + + t.false(inferTranspiled({ name: 'IFoo' })); + t.true(inferTranspiled({ name: 'IFoo', transpiled: true })); + t.false(inferTranspiled({ name: 'IFoo', transpiled: false })); }); \ No newline at end of file diff --git a/packages/core/src/infer-transpiled.ts b/packages/core/src/infer-transpiled.ts index cc316e77..52eeba67 100644 --- a/packages/core/src/infer-transpiled.ts +++ b/packages/core/src/infer-transpiled.ts @@ -1,3 +1,5 @@ -export function inferTranspiled(name: string): boolean { - return !/^I[A-Z]/.test(name); +import type { ReferencedContract } from "./contract"; + +export function inferTranspiled(c: ReferencedContract): boolean { + return c.transpiled ?? !/^I[A-Z]/.test(c.name); } \ No newline at end of file diff --git a/packages/core/src/options.ts b/packages/core/src/options.ts index 2c7b5f13..b86fe6c4 100644 --- a/packages/core/src/options.ts +++ b/packages/core/src/options.ts @@ -4,7 +4,7 @@ import type { Contract, ReferencedContract, ImportContract } from './contract'; import { inferTranspiled } from './infer-transpiled'; const upgradeableName = (n: string) => { - if (n === 'Initializable' || !inferTranspiled(n)) { + if (n === 'Initializable') { return n; } else { return n.replace(/(Upgradeable)?(?=\.|$)/, 'Upgradeable'); @@ -36,12 +36,12 @@ export interface Helpers extends Required { export function withHelpers(contract: Contract, opts: Options = {}): Helpers { const contractUpgradeable = contract.upgradeable; - const transformName = (n: ReferencedContract) => contractUpgradeable ? upgradeableName(n.name) : n.name; + const transformName = (n: ReferencedContract) => contractUpgradeable && inferTranspiled(n) ? upgradeableName(n.name) : n.name; return { upgradeable: contractUpgradeable, transformName, transformImport: p1 => { - const p2 = contractUpgradeable ? upgradeableImport(p1) : p1; + const p2 = contractUpgradeable && inferTranspiled(p1) ? upgradeableImport(p1) : p1; return opts.transformImport?.(p2) ?? p2; }, }; diff --git a/packages/core/src/print.ts b/packages/core/src/print.ts index 267e803f..27d7a7db 100644 --- a/packages/core/src/print.ts +++ b/packages/core/src/print.ts @@ -1,6 +1,6 @@ import 'array.prototype.flatmap/auto'; -import type { Contract, Parent, ContractFunction, FunctionArgument, Value, NatspecTag, ImportContract } from './contract'; +import type { Contract, Parent, ContractFunction, FunctionArgument, Value, NatspecTag } from './contract'; import { Options, Helpers, withHelpers } from './options'; import { formatLines, spaceBetween, Lines } from './utils/format-lines'; @@ -27,7 +27,10 @@ export function printContract(contract: Contract, opts?: Options): string { `pragma solidity ^${SOLIDITY_VERSION};`, ], - printImports(contract.imports, helpers), + contract.imports.map(p => { + const importContract = helpers.transformImport(p); + return `import {${importContract.name}} from "${importContract.path}";` + }), [ ...printNatspecTags(contract.natspecTags), @@ -131,7 +134,7 @@ function sortedFunctions(contract: Contract): SortedFunctions { } function printParentConstructor({ contract, params }: Parent, helpers: Helpers): [] | [string] { - const useTranspiled = helpers.upgradeable && inferTranspiled(contract.name); + const useTranspiled = helpers.upgradeable && inferTranspiled(contract); const fn = useTranspiled ? `__${contract.name}_init` : contract.name; if (useTranspiled || params.length > 0) { return [ @@ -246,32 +249,3 @@ function printArgument(arg: FunctionArgument, { transformName }: Helpers): strin function printNatspecTags(tags: NatspecTag[]): string[] { return tags.map(({ key, value }) => `/// ${key} ${value}`); } - -function printImports(imports: ImportContract[], helpers: Helpers): string[] { - // Sort imports by name - imports.sort((a, b) => { - if (a.name < b.name) return -1; - if (a.name > b.name) return 1; - return 0; - }); - - // Combine imports by path - const pathMap = new Map(); - for (const imp of imports) { - const path = imp.path; - if (!pathMap.has(path)) { - pathMap.set(path, []); - } - pathMap.get(path)!.push(imp); - } - - const lines: string[] = []; - for (const [_, contracts] of pathMap) { - const names = contracts.map(c => helpers.transformImport(c)); - if (names.length > 0) { - // All contracts in each group should have the same path - lines.push(`import {${names.map(n => n.name).join(', ')}} from "${names[0]!.path}";`); - } - } - return lines; -} \ No newline at end of file diff --git a/packages/core/src/stablecoin.test.ts.md b/packages/core/src/stablecoin.test.ts.md index da4c4d4d..20ad0158 100644 --- a/packages/core/src/stablecoin.test.ts.md +++ b/packages/core/src/stablecoin.test.ts.md @@ -47,8 +47,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -84,9 +84,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessControl, ERC20Permit {␊ @@ -127,9 +127,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessManaged, ERC20Permit {␊ @@ -169,8 +169,8 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -241,8 +241,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -265,8 +265,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, AccessControl, ERC20Permit {␊ @@ -312,8 +312,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Custodian} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Custodian, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -347,8 +347,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Allowlist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Allowlist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -393,8 +393,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Blocklist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Blocklist.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Blocklist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -555,8 +555,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20FlashMint {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ diff --git a/packages/core/src/stablecoin.test.ts.snap b/packages/core/src/stablecoin.test.ts.snap index d7bbd19526a90570609e5035851fa5285a0ff5db..bbc71162a2e38b6d0e81c0e160232629952ce6f8 100644 GIT binary patch delta 1571 zcmV+;2Hg3E4f_l-K~_N^Q*L2!b7*gLAa*kf0|4H3TwjCN0qlgARF{%B2N4%~a<8*Z9O1S&zdZ9u9E98~}SEY747zNNUR)x+zxYPxr|0oC5-R<)k)Jkq2NN5_@p zN)$zz#1HzuV8NG@ft-Ce6Ucwd9mpqfKg zN>I}%8mU$wk)Ou8&Czj1{~!3wQj~`|jI}y=e&3-MaOMoPWMq8s*^b)G>t99%e0CNI z(<&pH8Zl(s_iUoj%yEzj z4T!%f-T=VbwWX>p4C>U|f5AnFQyjVx`Xc|l3L(z%{4+jkf3kQkaHT*dI zFb5#vf*0IDnZuGlGc5US%91fG>1s%5@3?bDqGbA9L9S%%%cDzws8D`77cV{y8-KzS ztaqPpE^lmatgSA?0_>q>k-fPG4{O!bg=&4iG8R!b4v6oluI*BmEF-;&&x@>6p_Fi9 zM-ZkqxP!H&<)_`}t6SUMrQXUjZEhoDQ?#^3dZoN;#Kz`xD~D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/src/stablecoin.ts index adcad9f7..ab4348ae 100644 --- a/packages/core/src/stablecoin.ts +++ b/packages/core/src/stablecoin.ts @@ -235,7 +235,7 @@ function addCustodian(c: ContractBuilder, access: Access) { break; } case 'managed': { - c.addImportFrom({ + c.addImportOnly({ name: 'AuthorityUtils', path: `@openzeppelin/contracts/access/manager/AuthorityUtils.sol`, }); @@ -271,10 +271,10 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { c.addParent(ERC20Votes); c.addOverride(ERC20Votes, functions._update); - c.addImportFrom({ + c.addImportOnly({ name: 'Nonces', path: '@openzeppelin/contracts/utils/Nonces.sol', - }); + }) c.addOverride({ name: 'Nonces', }, functions.nonces); diff --git a/packages/core/src/zip-foundry.test.ts.md b/packages/core/src/zip-foundry.test.ts.md index 21cd19cf..137cc5de 100644 --- a/packages/core/src/zip-foundry.test.ts.md +++ b/packages/core/src/zip-foundry.test.ts.md @@ -122,14 +122,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ - import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ @@ -330,9 +330,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ @@ -521,8 +521,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ @@ -853,8 +853,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ - import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ contract MyToken is Initializable, ERC1155Upgradeable, OwnableUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ diff --git a/packages/core/src/zip-foundry.test.ts.snap b/packages/core/src/zip-foundry.test.ts.snap index 5a941ec662850faa8440ef0625e5069a89cc273a..52265f82a4b318ece87b34b09d40d5d607a59902 100644 GIT binary patch literal 3459 zcmV-}4Se!JRzV%4 zzx}pVv#r`WtM-<4v3AD#X6>w1JNM3+H_u(Z#;CI)CbBWv{^)b z2Nn`eabr~_c^^;*5$e=c(`Q7&jNK+VB|cD1d4HrLZN@uzj4Da}7-furyh5;oF?6Nu ziR-Sr!Ppb0gJnA*bwtdXq3Q7;wL79C05c4toKT7&u0Lh(R(y zn~eBCBy3>Ch;3rN#fg-$q;M0K@6F9G-g81MkPUt7hQxz}>6!ro<)EUqNK`4>X zYPA{nFtl2fwUp`OvZoQj((p@c|FDPYBi!rZfKa&0sN~3#BExK$%w;`HpX)Cz&$M}e z^JC`|=h0}9%Q$447$QnB_OYLKAhlGR1XzjYAqeidcUeRw=8j;2F7!C*$wB#`Mq)82 zmxJ=uqDBKD8OI}rC_4y=>5J{>d>=RtQLjg6M`=ph+If zO5W9%w5!{zT_RGJJ`Ncbk|T))AQeQ3mo|w61`i4Bz(U+REMSYsE+8L4k0EZr)0pPsM{Asz5@hnp&|joz#QR7!UsH zjO)V6()`D*`^3Xk;MRhVsU&TJ`E^)aShaf`bwUJ227Es4{K%P|y@hCk#Y!yo zCA2vU^-|gr(sz?`)z$iql-OfbumBHJ>xu%owwNJTF*h}0OlYTbM3*O0)lNWvdZ9vC zM7`J>1(s{Q#uW6TjevOY;-#Ifu)9W+SbWTryhn|K=GC- zZe-PKYOzhtPWR3XcfdN0x>?lq+`_)viu^#-n?`oS2%6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J l2j`~*KicCVdP&IL<3ChAHIa2(I6Wlj?EmLb4B5AU002<4jFJEV diff --git a/packages/core/src/zip-hardhat.test.ts.md b/packages/core/src/zip-hardhat.test.ts.md index 2b89bb88..29e5004b 100644 --- a/packages/core/src/zip-hardhat.test.ts.md +++ b/packages/core/src/zip-hardhat.test.ts.md @@ -13,14 +13,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ - import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ diff --git a/packages/core/src/zip-hardhat.test.ts.snap b/packages/core/src/zip-hardhat.test.ts.snap index d90eca646e921c755fb64e85ec9b5a479f614102..8628e95395044f6c5b0946de712aeb914a4f9d47 100644 GIT binary patch delta 2222 zcmV;f2vPU#5$X{#K~_N^Q*L2!b7*gLAa*kf0|58QO5t2@2wuEYtPdxAgSSWVdM<=$ zuJ_7t&e`aYF2#{DB!34|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F^2c-hE zTMB3Htn+Sqp>DeIlDp~pxLICOLoFrJh4ScpnKXS6XIt2*2XPClRgLVAHG~%I6#wU$ zr+B!GDgKomk5#tH^0CtEKOUMNcFYeu=7$~Cyx~7(-f#(r9p`2c=lmc%KdiU_pE!7B ZhZWx*W)Lw`e$7fX{s)=K47ji}003@DN9h0n From b479a9c9eb1edb5fe574eaa99c009f2ed4db9a53 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Wed, 20 Nov 2024 08:57:42 -0500 Subject: [PATCH 16/18] Sort imports by name, update snapshots --- packages/core/src/custom.test.ts.md | 2 +- packages/core/src/custom.test.ts.snap | Bin 826 -> 827 bytes packages/core/src/erc1155.test.ts.md | 26 +-- packages/core/src/erc1155.test.ts.snap | Bin 1788 -> 1784 bytes packages/core/src/erc20.test.ts.md | 32 ++-- packages/core/src/erc20.test.ts.snap | Bin 1945 -> 1960 bytes packages/core/src/erc721.test.ts.md | 30 ++-- packages/core/src/erc721.test.ts.snap | Bin 2137 -> 2140 bytes packages/core/src/governor.test.ts.md | 194 ++++++++++++++++----- packages/core/src/governor.test.ts.snap | Bin 2079 -> 2462 bytes packages/core/src/print.ts | 24 ++- packages/core/src/stablecoin.test.ts.md | 20 +-- packages/core/src/stablecoin.test.ts.snap | Bin 1659 -> 1670 bytes packages/core/src/zip-foundry.test.ts.md | 10 +- packages/core/src/zip-foundry.test.ts.snap | Bin 3459 -> 3459 bytes packages/core/src/zip-hardhat.test.ts.md | 4 +- packages/core/src/zip-hardhat.test.ts.snap | Bin 2282 -> 2285 bytes 17 files changed, 235 insertions(+), 107 deletions(-) diff --git a/packages/core/src/custom.test.ts.md b/packages/core/src/custom.test.ts.md index a3291ee1..24d1c542 100644 --- a/packages/core/src/custom.test.ts.md +++ b/packages/core/src/custom.test.ts.md @@ -24,8 +24,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";␊ ␊ contract MyContract is Pausable, Ownable {␊ constructor(address initialOwner) Ownable(initialOwner) {}␊ diff --git a/packages/core/src/custom.test.ts.snap b/packages/core/src/custom.test.ts.snap index 5f5f25e19fd8eb888e75bd01d29daa78bb273ae0..a1cf4e67d979c887d4540d92334ae4a828e1dc5c 100644 GIT binary patch delta 769 zcmV+c1OEKF2D=6_K~_N^Q*L2!b7*gLAa*kf0|4_i@p@9;`9+6|kd$KvRX<`=o4X)K za{7=Y@e6%uaVU{8NPkT%MX|V-v)}ps&U|yO`#mPS&-&XBG}JKcd!aTWpqdk@hr;MD z*S=2-IsLxA_F`@Jm7cG?eD-zCb>aAM|Fn8QJ>(jzO&__TeTr%aTFn#3bzx5gk{H@! z2qS8S(3Z$QqLj!ehdsfKBA(H3{-(B7+j68LgMfe*jQZ4!;eULq_O`aYU3VNWfkJDX zTEW!0a*~vXl7yP{7|tbqR{CXS{j+qBS<^rYWnkJK@mX?L&{raWja?y;PZED_TAFr= z=b_eag05-7HtLy=!=%DxPC`SOc2jiXWMTiPh7`65Nl=(N005rg+NjVoLY0Z{E7Te& zr-l;N9&uEa6n|f~Pp4N-WZw_DXQ<#X;|0qVkYSHe4+Ll92%5y1ecc38k4}mXLcWTN z43#>`CSw%Jfg(Oe#TiAomPE}6pC1%s4GKQQpfuxd(#Z-;S96uQQi;oP!oB5W$pBc` zq@%9u!fvbqJ7SWC(bbS^(#I-cOpNjqGB+`mJT*RzCVwmogi0@? znnFvJV7NfCOQ%*tn-9^@MwIDZoal;ewQQC&*TVjx#Xj~)$V|fzD7OS@pa?fdf?;|8 z-TOx8;H2BwZ#6%3kJ<E zNP=BH^o>|j&A4J)mgoQHufS!sxU$4uT2(Ng_L--B=4qd~w|(X}iO5y?1T1`~ delta 768 zcmV+b1ONQH2D%0^K~_N^Q*L2!b7*gLAa*kf0|3c3jaV+3JC!ON_Wy)g+4jm8cLA{E zdZp}JrirtvXg-lLNPjh!*3jZ!&VJ|j`{vBK?)RARKI$*u&``s$?}gfkfND;p9txvB zUHd*Up-eS?PzB_4m>PW=#Vrl!57ClHC>bl?Y&CS4iZO#G#wkrrpp` zrri`>(}Hc(Gbim4U&aUVJk;7v(20+Q{i7PvP@9n8Vd?+?c!F!ALeB_QCcdvwYoMGO zN?3cuQB_iW*?&HrUOAC{KjfaFg2Rj#ELT8=Jw`ncoQ)%B5@+^x6HGliDLM%GGA=Sy z>LgRfD3k+5e2j`Sif}E7nh`!P6k`bmS0R*U+)X-Jg6V3mGFK{bIZpIrIk`gs7B=aq z>$l`tkod47M^DEe98c8bnOXf*0VWRl|!_ya0dWmH%UJd)87@ zXsHqm7mV!EsnyWtDjM2|GTn<4U9zo~%^l6Pu)k=rk9`s{)9?ezt${R9gqtJ5u)P1~ zZKHE=(rxUwn(w+t?SnU)w%OdXS(J7_I2kOsokeG*rp3h0>X>N7DK5!GT##}t+oc#u yuy>2T5sy?euGp64`TzMVa9J&`EOD2X9hi^%%;P@uxX(P;KJyd9PG&9T5C8yyC4VRY diff --git a/packages/core/src/erc1155.test.ts.md b/packages/core/src/erc1155.test.ts.md index fe69331b..1e1a7a79 100644 --- a/packages/core/src/erc1155.test.ts.md +++ b/packages/core/src/erc1155.test.ts.md @@ -35,8 +35,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ ␊ contract MyToken is ERC1155, AccessControl {␊ bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ @@ -72,8 +72,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ ␊ contract MyToken is ERC1155, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -113,8 +113,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC1155Burnable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Burnable {␊ constructor(address initialOwner)␊ @@ -137,8 +137,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC1155Pausable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Pausable {␊ constructor(address initialOwner)␊ @@ -214,8 +214,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ ␊ contract MyToken is ERC1155, AccessControl {␊ bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ @@ -267,8 +267,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ ␊ contract MyToken is ERC1155, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -305,8 +305,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC1155Supply} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC1155, Ownable, ERC1155Supply {␊ constructor(address initialOwner)␊ @@ -337,10 +337,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ - import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ ␊ contract MyToken is Initializable, ERC1155Upgradeable, AccessControlUpgradeable, ERC1155PausableUpgradeable, ERC1155BurnableUpgradeable {␊ @@ -420,10 +420,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ - import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ @@ -513,10 +513,10 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ - import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ diff --git a/packages/core/src/erc1155.test.ts.snap b/packages/core/src/erc1155.test.ts.snap index 1b52fa93e3998992b00dec6a09454835631f3128..609422e60bd334f6beea165981e3fefea2aa38ce 100644 GIT binary patch delta 1752 zcmV;}1}FLa4fqW*K~_N^Q*L2!b7*gLAa*kf0|3Bmr4qlVeK8c?{H@DYKcACGO2~U* zZazwpwB%nL9ZQiiB7f2dsm`UvC~1siqf$hz@$T3jvOBY#nXThQLE;DW7x2_RA>MdG z`~k!(NW8-@0qte>?n@HK8;A9a9lpK9`e_3k-$Pns0}$*F(=UE zJu3M3Z!`@G_|>gP3pd`mVSjGkx$*w3m0OAe4r<%amUpp=2!BV*RSgk=I~cKtV6WOJ zC<@r3h6x33>j?C*=z)C`k>|)Xk&X%2qC_yL3JzYZmG77D7fc4b1_YeySi@ofUfeH# zQeIu%C={?^QYOI3PJL@-Wo_*gbQm?j;v;Gza_q@dR4Gpp^birnn=HS}oa&1kzNq~^ zfo&a)69rWjaXhYgvppFFIS%#)4OiPt>S+yyK^Je zC&WnPo*3Gu0Nl}_izxRNqdgFaf3zys%0VI|0yOK@*1=Aru~To=_jh-|r{EB&Dm+|W zdr(}A4K6Ni6o%qhLmg=8qM{j?%n-*RsC5}6qE2;G+}?RyY3?>!mF>OiQ^)jD)IN#B z^MTya5qmaE<3aCyDGF%x5a@qUU8j9pjnvKoWC+k#h%u}o4j6iAVTLr&9)JT6oaMN| zmT5zZSBXHZ165RXmic3V<%OyitcB}=|ML|_egB8lTTBO0AcP@dF~UKyP37g2*r06| zV&$Z9VXG36fXYZXi^35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qF{aKb>@y?IfN9A~UI+6!{z*eLTXbmtj}v8sDKY z0z<-Kgo8@3+_cSpdtiECjBi9{UgYh1a36T@V-d&dAXacd!2tyaTmcT~$rK>4g}8v0 zt+*2SQzC#r@_i*x5Wpo7K(r}z_jHM?;BMGQ;Vwt?r;n?H!R$9wyfdm1h3P=KoKy1v z6Hzy?SB$O`bS&y7Cdf0SPN0SA7CuIX4mpwyTwdQ;ezDiySXqs&w4DS=#a6nvjAS2J z$fB&TFt%(_13itbEa$eUe-$Y)xPj=JkRP~OSD|44lc@0TLcwNH;dA#PwlO&ud;~HT zqeY`HS~DM)gFtai6FBxhg9h@-i-JMIZOD)+c5bI`)^ES9*x8LO9^ssNVsV2ZmB1Nx z_kID>WnIaSupqpcoPh-j=wVgZDJ@VHXGg8si`-ePI1QYc0L@_XG_Ep5nsVM`<}_k? z5u?mti7M=r4Qu{&3qF~2UYpV5ey~spWEihX9Ro^D*p_$)(FV#_Dq2HdsQ}Yn3(e*G-@JI=dxI-$G-yLa^>L^8cEe?!A$7Jc4Sc5?St9d6O z(MEF<)LXM`6IqA|==L3^KSE<9Ps9Vlyx!lAg_gQXTI%B=S}OZn%eOz1G?i9dep~@f z6?|*>e40x6mFz-W722xMR%2+Z!TmCOZ8c9)WZ(}LC`83u6cmAb{PqD`=TKlwr~u~d fFF#D2m8-!oGZl|5D6;P>oPGZfEqmk#G*tiq9UGrh diff --git a/packages/core/src/erc721.test.ts.md b/packages/core/src/erc721.test.ts.md index 4c986927..0e4a6e4a 100644 --- a/packages/core/src/erc721.test.ts.md +++ b/packages/core/src/erc721.test.ts.md @@ -237,8 +237,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ - import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, ERC721Burnable {␊ constructor() ERC721("MyToken", "MTK") {}␊ @@ -334,8 +334,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721, AccessControl {␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ @@ -370,8 +370,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721, AccessManaged {␊ constructor(address initialAuthority)␊ @@ -419,8 +419,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -453,8 +453,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -487,8 +487,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ @@ -530,14 +530,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ @@ -603,14 +603,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ @@ -684,12 +684,12 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ - import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ - import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ - import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ diff --git a/packages/core/src/erc721.test.ts.snap b/packages/core/src/erc721.test.ts.snap index fd6cdcf75d0493996322ceb4064c8eff671f2446..130d22e5752dfb28647944c927148056e3e26fbc 100644 GIT binary patch literal 2140 zcmV-i2&4BwRzV^hk^>3P-WM7enCgqLc6?Ibn!N$T$fsprqj+fe!6^XLs!Q5hr%oG*PlM z-($Y-_q}%Zt8T}n`Vs%^Yb3BR5$ZsWb<7F0d5;SI$ybH}1^i&?`Q>X*Uvqz!p1StJ z^`#|E0}uAL-mmOn9TAQy4FeH@yBM)MpxI~@G!1N0%Z37XOaxA_=z(1ukq?n=BNG#_ zNr_-k7aV-FUcFhpS+E&Av>@Qr#0D09@X^ict!k~dQ7B-`rc8jx+xwfZ*VdkZE~6GG zzCmq79tGqyJtU_IdW4APuMK`xIW>zLg+jOpH2W=g6~G+$E5PFd008KeaKRj1P*z$A z9+is0>S7rbo2|EtE8y{y!jnR9V7(6H2sjKY&g>WI%zpU4pP9G3>kwUFN+5F^k8w!;vh$A~d(Ai$7t7~!DA1;gYJSjeKRzY_3ufBY4o*b~C$cQow~3UmVd zRT~p1U{yD%V`$j!a_wD9-@DyAWn^=$wO()SSr2O*-beN3THn6^{_T6D&QCUtH}Bnk zYxCosx>nrqcqHunF(QtI80?rRYv~)SlBHj~v4EDA>1;>Zjztlj3Pd=jgllO!XFF6G zr1wnbVwwh8Jp{VcH0g=!IHAvR02BVj0YeWR%#Z;(eefVS*=pKN9ov8cm7rlT#5oYO z3>-{EZT&UisopTkAbbcN(OZeUGj!|dA0g+`AbnR-p3OnX*ME}neD2tYRYMtF*4b^S5aj3{G$GMr<)E%phX`N8wc0Ik3{3}3uTd;_AaF*2kg?BDEjD*-*F|~5 zm7)uERO<8v;;;H*x&LSwv8=Y!F|i)~d5qD?REFqKY7VtRR=lKKnSgTSFbue$3?3>X z%Cas+l-BaXN0fv8#sgp5=^{!@XY_~?@0o*$;;H8*zEl{Q%5`H66|O7i&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ak3>XyBaRrdBDH%|^a z-R54q^;sags_;*D`N^u3rd28UilS*&r_S=^dSXBs7Q-15i6Ww+XS7&KVaRWpOc7f! zLrzJ*;~P8tzP+co*mj;>?1rk5Jk6kQVBnncI&@BjwtV@k;$(lybNRC0I{Ijy<-t~tZ=(e}@Ty!y zOBplo9kdwCJODG;1i_7I;yFFU3TPM5E})%zXg`(E7T7^tK*!bGiuhIm_TO@SE204Q zSYXFqZ2F--83p?-v*!B*-;+PMr};1;d{7AzMm_eek%0iG_5c%6vv4qtt@%Y~&Bg=; ziqr^nP|d-Y$TA^Es)D-*hr6G4+lPDmiI($zMd45jJ&d(1=X$bTgt{w2-Q|0I&$fZ* zo-$~mpo67E9ghp&;aSNf+C_P#B>w6J%Qs5~Le)Kb>zqG5{DgpXgYL*|%oVkRjf z-_I;X4GnYs{9sP$>R4ftsq!koQcTq_*Ji{ygj%@527^Wnj@EWgN8c0T~VAh3@dR$QF0evPn zg4aCa&wpyrPloA|LsNpJCY4cok9Pwxe$`889MkB>WhnwC(|$@)H?*qjQ;k+XJ0pb2 z#)nHZBy#&T1koXcPZTvr*~nwj$q5c;ROc<7#=(IpOjhb5z)ig~%~fr7Er{3SHSd+) ztXreEf5ktuoYu%2c-!cW6v3Y7Y6kUh|3|5Qe|o#9ev9h2sD6v;S6}@~0VgL%Pv$f% zEh59_)he;8AY)!pb7x6bzUB^}X3nvw$}>eH3@^bvlR$~35_HjWTsypr;?s^R7?m%9 z)76!7_o3(oie8}T1!nt9`sdnaVB9^#pS`KH1^+GDg4d@lQ0_S{)*NWBa~7>a(JJJ$ zRk+HJU%Q4Ox%RwLO@neiO6!m)oU8UheN?yWDQgGkgUT8N^BC|Zc? PXd(U&>%Cc%KUn|(;baGd diff --git a/packages/core/src/governor.test.ts.md b/packages/core/src/governor.test.ts.md index 6e56da73..be68eb77 100644 --- a/packages/core/src/governor.test.ts.md +++ b/packages/core/src/governor.test.ts.md @@ -14,11 +14,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -113,11 +113,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -208,10 +208,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -300,10 +300,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -391,13 +391,13 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -509,11 +509,11 @@ Generated by [AVA](https://avajs.dev). import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ import {GovernorStorage} from "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorStorage, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -612,11 +612,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -707,11 +707,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -802,10 +802,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -893,13 +893,13 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1010,11 +1010,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1105,11 +1105,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1204,11 +1204,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1299,11 +1299,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ import {ICompoundTimelock} from "@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol";␊ - import {GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockCompound {␊ constructor(IVotes _token, ICompoundTimelock _timelock)␊ @@ -1393,13 +1393,13 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1510,11 +1510,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1604,13 +1604,13 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ - import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1721,11 +1721,11 @@ Generated by [AVA](https://avajs.dev). ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ - import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ - import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ ␊ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ constructor(IVotes _token, TimelockController _timelock)␊ @@ -1805,3 +1805,117 @@ Generated by [AVA](https://avajs.dev). }␊ }␊ ` + +## governor with erc20votes, upgradable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.0.0␊ + pragma solidity ^0.8.22;␊ + ␊ + import {GovernorUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol";␊ + import {GovernorCountingSimpleUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingSimpleUpgradeable.sol";␊ + import {GovernorTimelockControlUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ + import {GovernorVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ + import {GovernorVotesQuorumFractionUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {TimelockControllerUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/TimelockControllerUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyGovernor is Initializable, GovernorUpgradeable, GovernorCountingSimpleUpgradeable, GovernorVotesUpgradeable, GovernorVotesQuorumFractionUpgradeable, GovernorTimelockControlUpgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(IVotes _token, TimelockControllerUpgradeable _timelock, address initialOwner)␊ + initializer public␊ + {␊ + __Governor_init("MyGovernor");␊ + __GovernorCountingSimple_init();␊ + __GovernorVotes_init(_token);␊ + __GovernorVotesQuorumFraction_init(4);␊ + __GovernorTimelockControl_init(_timelock);␊ + __Ownable_init(initialOwner);␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + onlyOwner␊ + override␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function quorum(uint256 blockNumber)␊ + public␊ + view␊ + override(GovernorUpgradeable, GovernorVotesQuorumFractionUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.quorum(blockNumber);␊ + }␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` diff --git a/packages/core/src/governor.test.ts.snap b/packages/core/src/governor.test.ts.snap index 9bc66e9ab4ff824c7d4f598ae7d31292b09d5d17..0cb4d9b5107c75adae9c2f1bffd6a8768968df72 100644 GIT binary patch literal 2462 zcmV;P31Rj@RzV&~>m9S6fRFtV;kJX$3T~ zQ`toyXatHJNduEJG-oJzZ5U`yIpz?cEqY5)wCK5iO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$;|K7sy~fcX!nMOvqp-jd!$#scr@Qz%5vnl#iaE zvvgCIj;S7tffzSZFpwKYgA_d$eeGhh_jZkS#h;#*Q^Kl4^bwx7&~Y%dI* zXIGdczavUIX#}o?Ye%W*rPF8{Sv$qwHL6OP5Z^Qc180GOd&x8Cc$cVBiRd$t9%x(n zosl6;Ui%CmWZ9aYe1~1G>Y)2vuQpnvg-9V%h;;Ik5hCsLPE0E7rgmz zpRpSSN}(VlcB6n0A;clBxe($^3K6z}ZH7rQYy;b5gB#g4Z+6(`W^)C&0d9aB;0Cw> zZh#x$2DkxkfSZcsY2fqh<;BgrrMMy7V+uQJfI9F7cGQ?UE1c_&8f(~516Ig|1}ne{ zRZ23f04rpJ8`%nGxfS&G8okgkpR13|##fTC*#?R*mjFfBY$Mui!<=kw2U~4ms|^&H z07q=KG2P67d12nlOh%Zu%)D=9%^Of*Q(vVQcHI95dV-!6s>f9rnu8m09W_1N{|B1Q z9?jqz_-3di!#D6vHn?%$|96mHuPnDGb>`+W)Oi8wfI6TKs51<8)=oVXDQ2__Fg6!$bv^*xO%Y3VIKBle-SQNFCT zkrw(=hPU^IN*}m33tWSFV4k6p4D-M|+2BSt&wAE8(Q-m6%L|Ad-`eDHhxS?Q`#uAo zZ&2(*u@AbM5?#%7u`e$2$%YmMs(PsEp{fTaR-TEd>Qx&R5H5sUnaK#@mI?P(Kf>+1 zy!T^9x!<9@2Y>>gDDO>oc`pWXKVTcWi`3rOh!IYkIi~?Tz|K%f26lj*Y;Z$k=YR5t JJcoPm002NT>1zN0 diff --git a/packages/core/src/print.ts b/packages/core/src/print.ts index 27d7a7db..cf184919 100644 --- a/packages/core/src/print.ts +++ b/packages/core/src/print.ts @@ -1,6 +1,6 @@ import 'array.prototype.flatmap/auto'; -import type { Contract, Parent, ContractFunction, FunctionArgument, Value, NatspecTag } from './contract'; +import type { Contract, Parent, ContractFunction, FunctionArgument, Value, NatspecTag, ImportContract } from './contract'; import { Options, Helpers, withHelpers } from './options'; import { formatLines, spaceBetween, Lines } from './utils/format-lines'; @@ -27,10 +27,7 @@ export function printContract(contract: Contract, opts?: Options): string { `pragma solidity ^${SOLIDITY_VERSION};`, ], - contract.imports.map(p => { - const importContract = helpers.transformImport(p); - return `import {${importContract.name}} from "${importContract.path}";` - }), + printImports(contract.imports, helpers), [ ...printNatspecTags(contract.natspecTags), @@ -249,3 +246,20 @@ function printArgument(arg: FunctionArgument, { transformName }: Helpers): strin function printNatspecTags(tags: NatspecTag[]): string[] { return tags.map(({ key, value }) => `/// ${key} ${value}`); } + +function printImports(imports: ImportContract[], helpers: Helpers): string[] { + // Sort imports by name + imports.sort((a, b) => { + if (a.name < b.name) return -1; + if (a.name > b.name) return 1; + return 0; + }); + + const lines: string[] = []; + imports.map(p => { + const importContract = helpers.transformImport(p); + lines.push(`import {${importContract.name}} from "${importContract.path}";`); + }); + + return lines; +} \ No newline at end of file diff --git a/packages/core/src/stablecoin.test.ts.md b/packages/core/src/stablecoin.test.ts.md index 20ad0158..da4c4d4d 100644 --- a/packages/core/src/stablecoin.test.ts.md +++ b/packages/core/src/stablecoin.test.ts.md @@ -47,8 +47,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -84,9 +84,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessControl, ERC20Permit {␊ @@ -127,9 +127,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Pausable, AccessManaged, ERC20Permit {␊ @@ -169,8 +169,8 @@ Generated by [AVA](https://avajs.dev). import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -241,8 +241,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -265,8 +265,8 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ - import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, AccessControl, ERC20Permit {␊ @@ -312,8 +312,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Custodian} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Custodian, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -347,8 +347,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Allowlist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Allowlist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -393,8 +393,8 @@ Generated by [AVA](https://avajs.dev). ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Blocklist} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Blocklist.sol";␊ - import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Blocklist, Ownable, ERC20Permit {␊ constructor(address initialOwner)␊ @@ -555,8 +555,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyStablecoin is ERC20, ERC20Permit, ERC20FlashMint {␊ constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ diff --git a/packages/core/src/stablecoin.test.ts.snap b/packages/core/src/stablecoin.test.ts.snap index bbc71162a2e38b6d0e81c0e160232629952ce6f8..d7bbd19526a90570609e5035851fa5285a0ff5db 100644 GIT binary patch delta 1582 zcmV+}2GRNZ42BIdK~_N^Q*L2!b7*gLAa*kf0|0nM^;2mR%Ch!(J%_SeXU2W;Ia+X3 zfv7EdhQ(TQsY;PDS18?NH)#{6yN6beXTI~^yf+`uJo{Cz>u_sN{`3nfsvPvXL{bZ+ zB3+TO8GpZ-+c)ma{xH*Q!shzYSM^nDA(L2Nv5_g-qbMFjXJxC@Y{DXUJ)&sWK{%jl z7uGyv-=OEALm4b`rUbE+gl``-T8&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p5B zTra0${!fMqf0w&rKBdB&p@LZ{R&WPOURN7ast(fpvqyQwYJH)m?_({KwI|Lpk~_PU zsb)}9>O0tEc&M5VWvC5lGU8&>rH5!+L}J#!#nrXNFSdJYOUsFso}VIDVrB4-Fxvqa zT`q<>##UW!<2-_~vRc{`*W1X+beU@45V;#XNzQq<==}^H|C>G<9*4)L!6f!5yO6vQ VnVfP);x#;s{vUuG+qm#R0039z3<>}M diff --git a/packages/core/src/zip-foundry.test.ts.md b/packages/core/src/zip-foundry.test.ts.md index 137cc5de..21cd19cf 100644 --- a/packages/core/src/zip-foundry.test.ts.md +++ b/packages/core/src/zip-foundry.test.ts.md @@ -122,14 +122,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ - import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ @@ -330,9 +330,9 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ - import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ @@ -521,8 +521,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ @@ -853,8 +853,8 @@ Generated by [AVA](https://avajs.dev). pragma solidity ^0.8.22;␊ ␊ import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ - import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC1155Upgradeable, OwnableUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ diff --git a/packages/core/src/zip-foundry.test.ts.snap b/packages/core/src/zip-foundry.test.ts.snap index 52265f82a4b318ece87b34b09d40d5d607a59902..5a941ec662850faa8440ef0625e5069a89cc273a 100644 GIT binary patch literal 3459 zcmV-}4Se!JRzV>rB=00000000B+T+MGBw-ukY5et=%L#md;7krX&CWXp(bDTNTr zR`ro4b`ph};qEe;A;%;~^4jpB=%L3Rdg;fZAOAps{sRSyqNnzpbN_{2dMZ$GNY2j8 z&hF~_%cFy|OFq8$`1tt9_amu4wl@RnZSi0H2?;C$^d(~6^dxA7{hivSImTeGRx_X8 ze*0~!W?QvOR_!h8YVCsc&Duq)cIll9Z(h27&5b#8H!*P$*#?`CcWwJRxZg$I7Qk)L z!2)0oFyR6Q0rG9!2G_t&7kk~L?uU1Q>!WR##6e(-E+RGn$m>#2m$e=ZLr8o;r~qvm z6W;-gic`{9RteSvumdr1>ayuGEWniA#yKTEkWE={s3L93I%tF{s(yqrMnGO6u!<1q z3K8)c*WILa%jqD|R-_K^x*a40CY=@+kO}0wS~n;#B?FyVMIw$;K@p>0B2TDJJOQn? zR8lb(Gz{wCvwRO02^JUz_&Fw>A`{1P>b4EQb#M=QTX6(_il0N~1A)RQfC2%ApdTV2 zD1h4(`v42Di6kSsjo1#uLL`#HZLqR1H@~#tguedNqR*YsSIkot5a2M30yNMWpa%jI zEI_N(rp!a2)grVdO`nuKjWH62pR)a<2$9Dqico+FxKD{-&=WkvY>>>Q5hBm^mzHPR zyubai^NI6#xX2Y0(rpA{LJ;zipLQU%R2v6Kie@3;%yaM4me<0n9hj#CIdvNa9HnIiF9k4=#_kzy@N?ulbva3OaIDo#bo}#$ z>tHqS>dV^I?X@oEDN7%PlyJeIKpa3BM6s7Pi8%ru=GQ8*LkKqtmN>Z`ZMC^=z7W}=(uqBNq|UwrX}E!QN#W%zV>Hz|>A z)({tl+;l+Et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644 --- a/packages/core/src/zip-hardhat.test.ts.md +++ b/packages/core/src/zip-hardhat.test.ts.md @@ -13,14 +13,14 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.0.0␊ pragma solidity ^0.8.22;␊ ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ - import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ ␊ contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ diff --git a/packages/core/src/zip-hardhat.test.ts.snap b/packages/core/src/zip-hardhat.test.ts.snap index 8628e95395044f6c5b0946de712aeb914a4f9d47..d90eca646e921c755fb64e85ec9b5a479f614102 100644 GIT binary patch delta 2199 zcmV;I2x#}}5$zE&K~_N^Q*L2!b7*gLAa*kf0|4BKA{XOE3@R=-HFK=W@ad9E$pEvdh8$2_LQPP z{)S$A?V+clx1xVR4=vDRQOt12<#K6BD}TtTSAZ>%eDixBeDmJ#alY<#L+(G7zxq8W zszUe@gx_i7UJ`~>G7`%HSMnEM2LVy!XE%R+6}^M>Pi>)g<9}m>(0zoESU~7E?;`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!+*-W;Q|gj&dear_(6DnSaA+MvH!{rE519-5MrkMnw4t&51Y401+X&!09AujnE(I) From d6edcf9628601e754c92e918c62f1008f92063a9 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Wed, 20 Nov 2024 08:59:39 -0500 Subject: [PATCH 17/18] Semicolon --- packages/core/src/erc20.ts | 2 +- packages/core/src/stablecoin.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/erc20.ts b/packages/core/src/erc20.ts index cdf83045..2a5e1afe 100644 --- a/packages/core/src/erc20.ts +++ b/packages/core/src/erc20.ts @@ -187,7 +187,7 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { c.addImportOnly({ name: 'Nonces', path: '@openzeppelin/contracts/utils/Nonces.sol', - }) + }); c.addOverride({ name: 'Nonces', }, functions.nonces); diff --git a/packages/core/src/stablecoin.ts b/packages/core/src/stablecoin.ts index ab4348ae..1f6537e9 100644 --- a/packages/core/src/stablecoin.ts +++ b/packages/core/src/stablecoin.ts @@ -274,7 +274,7 @@ function addVotes(c: ContractBuilder, clockMode: ClockMode) { c.addImportOnly({ name: 'Nonces', path: '@openzeppelin/contracts/utils/Nonces.sol', - }) + }); c.addOverride({ name: 'Nonces', }, functions.nonces); From 703c249032e435c1c4509d3e245c5ff429b523d4 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Wed, 20 Nov 2024 09:21:08 -0500 Subject: [PATCH 18/18] Bump version --- packages/core/CHANGELOG.md | 2 +- packages/core/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 06733459..1d70d94a 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 0.4.6 (2024-11-20) - Use named imports. ([#411](https://github.com/OpenZeppelin/contracts-wizard/pull/411)) diff --git a/packages/core/package.json b/packages/core/package.json index 079494cd..7a04a2e0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@openzeppelin/wizard", - "version": "0.4.5", + "version": "0.4.6", "description": "A boilerplate generator to get started with OpenZeppelin Contracts", "license": "MIT", "repository": "github:OpenZeppelin/contracts-wizard",