Skip to content

Commit 325fccd

Browse files
authored
Merge pull request #64 from firstbatchxyz/erhant/parcel-rfk
Parcel refactor
2 parents 22b6c2b + fdf1ef1 commit 325fccd

File tree

10 files changed

+21
-28
lines changed

10 files changed

+21
-28
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ tmp.ts
2323

2424
# Test stuff
2525
coverage
26+
27+
.vscode

.vscode/settings.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,19 @@
2323
"targets": {
2424
"cjs": {
2525
"outputFormat": "commonjs",
26-
"isLibrary": true,
27-
"context": "node"
26+
"isLibrary": false,
27+
"context": "node",
28+
"scopeHoist": false,
29+
"includeNodeModules": false,
30+
"optimize": false
2831
},
2932
"mjs": {
3033
"outputFormat": "esmodule",
31-
"isLibrary": true,
32-
"context": "node"
34+
"isLibrary": false,
35+
"context": "node",
36+
"scopeHoist": false,
37+
"includeNodeModules": false,
38+
"optimize": false
3339
}
3440
},
3541
"engines": {

src/base/admin.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type {
77
UpdateWhitelistInput,
88
OpitonalArray,
99
} from '../contracts/types';
10-
import {Base} from './base';
10+
import type {Base} from './base';
1111

1212
export class Admin<M extends ContractMode = ContractMode> {
1313
constructor(private readonly base: Base<M>) {}
@@ -25,9 +25,6 @@ export class Admin<M extends ContractMode = ContractMode> {
2525
});
2626
}
2727

28-
// TODO: transfer ownership
29-
// remove yourself from whitelists and such
30-
3128
/**
3229
* Changes the whitelist for the selected list.
3330
* @param users an array of user addresses

src/base/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Warp, Contract, ArWallet, CustomSignature} from 'warp-contracts';
1+
import {Warp, Contract, ArWallet, type CustomSignature} from 'warp-contracts';
22
import {SnarkjsExtension} from 'warp-contracts-plugin-snarkjs';
33
import {EthersExtension} from 'warp-contracts-plugin-ethers';
44
import type {ContractInputGeneric, ContractMode, ContractState} from '../contracts/types/contract';

src/bin/evolve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {JWKInterface, Warp} from 'warp-contracts';
1+
import type {JWKInterface, Warp} from 'warp-contracts';
22
import {ArweaveSigner} from 'warp-contracts-plugin-deploy';
33

44
/** Evolve an existing contract with a new source code. */

src/bin/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {readFileSync} from 'fs';
2-
import {JWKInterface, Warp, WarpFactory} from 'warp-contracts';
2+
import type {JWKInterface, Warp} from 'warp-contracts';
3+
import {WarpFactory} from 'warp-contracts';
34
import {DeployPlugin} from 'warp-contracts-plugin-deploy';
45
import {prepareState as prepareStateWithWarp} from './deploy';
56
import {ContractState} from '../contracts/types';

tests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ The tests are as follows:
88
- `crud` tests for basic CRUD functionality, such as checking for existing keys, not removing an already removed key and such.
99
- `htx` tests use a custom contract where assume Bundlr usage and instead of values themselves, we store `valueHash.txid` as values.
1010
- `multi` tests using a single Warp instance with multiple contracts, and multiple HollowDB instances.
11+
- `null` tests null values, which are not allowed due to ambiguity between a null value and non-existent value.

tests/hooks/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {LoggerFactory, Warp, WarpFactory} from 'warp-contracts';
33
import {DeployPlugin} from 'warp-contracts-plugin-deploy';
44
import {Redis} from 'ioredis';
55
import {overrideCache} from '../utils/cache';
6-
import {Wallet} from 'warp-contracts/lib/types/contract/testing/Testing';
6+
import type {Wallet} from 'warp-contracts/lib/types/contract/testing/Testing';
77

88
/**
99
* Setup Warp instance for a test, connected to Arlocal at the provided port.

tests/utils/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import type {Warp, JWKInterface} from 'warp-contracts';
12
import {randomBytes} from 'crypto';
2-
import {Warp, JWKInterface} from 'warp-contracts';
33
import {readFileSync} from 'fs';
4-
import {deploy} from '../../src/bin/deploy';
54
import {computeKey} from 'hollowdb-prover';
5+
import {deploy} from '../../src/bin/deploy';
66
import {ContractState} from '../../src/contracts/types';
77

88
/** Add funds to any wallet. */

0 commit comments

Comments
 (0)