Skip to content

Commit

Permalink
parcel refactor, explicit type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Dec 20, 2023
1 parent 81d2301 commit fdf1ef1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/base/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
UpdateWhitelistInput,
OpitonalArray,
} from '../contracts/types';
import {Base} from './base';
import type {Base} from './base';

export class Admin<M extends ContractMode = ContractMode> {
constructor(private readonly base: Base<M>) {}
Expand Down
2 changes: 1 addition & 1 deletion src/base/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Warp, Contract, ArWallet, CustomSignature} from 'warp-contracts';
import {Warp, Contract, ArWallet, type CustomSignature} from 'warp-contracts';
import {SnarkjsExtension} from 'warp-contracts-plugin-snarkjs';
import {EthersExtension} from 'warp-contracts-plugin-ethers';
import type {ContractInputGeneric, ContractMode, ContractState} from '../contracts/types/contract';
Expand Down
2 changes: 1 addition & 1 deletion src/bin/evolve.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {JWKInterface, Warp} from 'warp-contracts';
import type {JWKInterface, Warp} from 'warp-contracts';
import {ArweaveSigner} from 'warp-contracts-plugin-deploy';

/** Evolve an existing contract with a new source code. */
Expand Down
3 changes: 2 additions & 1 deletion src/bin/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {readFileSync} from 'fs';
import {JWKInterface, Warp, WarpFactory} from 'warp-contracts';
import type {JWKInterface, Warp} from 'warp-contracts';
import {WarpFactory} from 'warp-contracts';
import {DeployPlugin} from 'warp-contracts-plugin-deploy';
import {prepareState as prepareStateWithWarp} from './deploy';
import {ContractState} from '../contracts/types';
Expand Down
1 change: 1 addition & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ The tests are as follows:
- `crud` tests for basic CRUD functionality, such as checking for existing keys, not removing an already removed key and such.
- `htx` tests use a custom contract where assume Bundlr usage and instead of values themselves, we store `valueHash.txid` as values.
- `multi` tests using a single Warp instance with multiple contracts, and multiple HollowDB instances.
- `null` tests null values, which are not allowed due to ambiguity between a null value and non-existent value.
2 changes: 1 addition & 1 deletion tests/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {LoggerFactory, Warp, WarpFactory} from 'warp-contracts';
import {DeployPlugin} from 'warp-contracts-plugin-deploy';
import {Redis} from 'ioredis';
import {overrideCache} from '../utils/cache';
import {Wallet} from 'warp-contracts/lib/types/contract/testing/Testing';
import type {Wallet} from 'warp-contracts/lib/types/contract/testing/Testing';

/**
* Setup Warp instance for a test, connected to Arlocal at the provided port.
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {Warp, JWKInterface} from 'warp-contracts';
import {randomBytes} from 'crypto';
import {Warp, JWKInterface} from 'warp-contracts';
import {readFileSync} from 'fs';
import {deploy} from '../../src/bin/deploy';
import {computeKey} from 'hollowdb-prover';
import {deploy} from '../../src/bin/deploy';
import {ContractState} from '../../src/contracts/types';

/** Add funds to any wallet. */
Expand Down

0 comments on commit fdf1ef1

Please sign in to comment.