remove test file for upgradable contracts

pull/2924/head
Aniket-Engg 2 years ago
parent 4770818c69
commit 0d53155ea0
  1. 2
      libs/remix-ws-templates/src/templates/ozerc1155/index.ts
  2. 12
      libs/remix-ws-templates/src/templates/ozerc20/index.ts
  3. 12
      libs/remix-ws-templates/src/templates/ozerc721/index.ts

@ -10,7 +10,7 @@ export default async (opts) => {
// @ts-ignore
'scripts/ethers-lib.ts': (await import('!!raw-loader!./scripts/ethers-lib.ts')).default,
// @ts-ignore
'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default,
'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default
}
// If no options is selected, opts.upgradeable will be undefined
// We do not show test file for upgradeable contract

@ -1,7 +1,7 @@
import { erc20 } from '@openzeppelin/wizard';
export default async (opts) => {
return {
const filesObj = {
'contracts/MyToken.sol': erc20.print({ ...erc20.defaults, upgradeable: opts.upgradeable}),
// @ts-ignore
'scripts/deploy_with_ethers.ts': (await import('!!raw-loader!./scripts/deploy_with_ethers.ts')).default,
@ -10,8 +10,12 @@ export default async (opts) => {
// @ts-ignore
'scripts/ethers-lib.ts': (await import('!!raw-loader!./scripts/ethers-lib.ts')).default,
// @ts-ignore
'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default,
// @ts-ignore
'tests/MyToken_test.sol': (await import('raw-loader!./tests/MyToken_test.sol')).default
'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default
}
// If no options is selected, opts.upgradeable will be undefined
// We do not show test file for upgradeable contract
// @ts-ignore
if (opts.upgradeable === undefined || !opts.upgradeable) filesObj['tests/MyToken_test.sol'] = (await import('raw-loader!./tests/MyToken_test.sol')).default
return filesObj
}

@ -1,7 +1,7 @@
import { erc721 } from '@openzeppelin/wizard';
export default async (opts) => {
return {
const filesObj = {
'contracts/MyToken.sol': erc721.print({ ...erc721.defaults, upgradeable: opts.upgradeable}),
// @ts-ignore
'scripts/deploy_with_ethers.ts': (await import('!!raw-loader!./scripts/deploy_with_ethers.ts')).default,
@ -10,8 +10,12 @@ export default async (opts) => {
// @ts-ignore
'scripts/ethers-lib.ts': (await import('!!raw-loader!./scripts/ethers-lib.ts')).default,
// @ts-ignore
'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default,
// @ts-ignore
'tests/MyToken_test.sol': (await import('raw-loader!./tests/MyToken_test.sol')).default
'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default
}
// If no options is selected, opts.upgradeable will be undefined
// We do not show test file for upgradeable contract
// @ts-ignore
if (opts.upgradeable === undefined || !opts.upgradeable) filesObj['tests/MyToken_test.sol'] = (await import('raw-loader!./tests/MyToken_test.sol')).default
return filesObj
}
Loading…
Cancel
Save