@zoralabs/protocol-sdk 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +8 -0
- package/package.json +12 -3
- package/{tsup.config.js → tsup.config.ts} +2 -1
- package/src/anvil.ts +0 -111
package/.turbo/turbo-build.log
CHANGED
|
@@ -3,14 +3,14 @@ $ tsup
|
|
|
3
3
|
[34mCLI[39m Building entry: src/index.ts
|
|
4
4
|
[34mCLI[39m Using tsconfig: tsconfig.build.json
|
|
5
5
|
[34mCLI[39m tsup v7.3.0
|
|
6
|
-
[34mCLI[39m Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-sdk/tsup.config.
|
|
6
|
+
[34mCLI[39m Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-sdk/tsup.config.ts
|
|
7
7
|
[34mCLI[39m Target: es2021
|
|
8
8
|
[34mCLI[39m Cleaning output folder
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[32mCJS[39m [1mdist/index.cjs [22m[32m50.17 KB[39m
|
|
12
12
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m97.10 KB[39m
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 72ms
|
|
14
14
|
[32mESM[39m [1mdist/index.js [22m[32m46.25 KB[39m
|
|
15
15
|
[32mESM[39m [1mdist/index.js.map [22m[32m97.16 KB[39m
|
|
16
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 72ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @zoralabs/protocol-sdk
|
|
2
2
|
|
|
3
|
+
## 0.5.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 52b16aa: Publishing package in format that supports commonjs imports by specifying exports
|
|
8
|
+
- Updated dependencies [52b16aa]
|
|
9
|
+
- @zoralabs/protocol-deployments@0.1.2
|
|
10
|
+
|
|
3
11
|
## 0.5.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoralabs/protocol-sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"repository": "https://github.com/ourzora/zora-protocol",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
6
|
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.cjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
9
18
|
"scripts": {
|
|
10
19
|
"build": "tsup",
|
|
11
20
|
"prepack": "yarn build",
|
|
@@ -7,5 +7,6 @@ export default defineConfig({
|
|
|
7
7
|
tsconfig: "tsconfig.build.json",
|
|
8
8
|
dts: false,
|
|
9
9
|
format: ["cjs", "esm"],
|
|
10
|
-
onSuccess:
|
|
10
|
+
onSuccess:
|
|
11
|
+
"tsc --project tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap",
|
|
11
12
|
});
|
package/src/anvil.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
import { join } from "path";
|
|
3
|
-
import { test } from "vitest";
|
|
4
|
-
import {
|
|
5
|
-
Chain,
|
|
6
|
-
PublicClient,
|
|
7
|
-
TestClient,
|
|
8
|
-
WalletClient,
|
|
9
|
-
createPublicClient,
|
|
10
|
-
createTestClient,
|
|
11
|
-
createWalletClient,
|
|
12
|
-
http,
|
|
13
|
-
} from "viem";
|
|
14
|
-
import { foundry, zora } from "viem/chains";
|
|
15
|
-
|
|
16
|
-
export interface AnvilViemClientsTest {
|
|
17
|
-
viemClients: {
|
|
18
|
-
walletClient: WalletClient;
|
|
19
|
-
publicClient: PublicClient;
|
|
20
|
-
testClient: TestClient;
|
|
21
|
-
chain: Chain;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async function waitForAnvilInit(anvil: any) {
|
|
26
|
-
return new Promise((resolve) => {
|
|
27
|
-
anvil.stdout.once("data", () => {
|
|
28
|
-
resolve(true);
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type AnvilTestForkSettings = {
|
|
34
|
-
forkUrl: string;
|
|
35
|
-
forkBlockNumber: number;
|
|
36
|
-
anvilChainId?: number;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const makeAnvilTest = ({
|
|
40
|
-
forkUrl,
|
|
41
|
-
forkBlockNumber,
|
|
42
|
-
anvilChainId = 31337,
|
|
43
|
-
}: AnvilTestForkSettings) =>
|
|
44
|
-
test.extend<AnvilViemClientsTest>({
|
|
45
|
-
viemClients: async ({ task }, use) => {
|
|
46
|
-
console.log("setting up clients for ", task.name);
|
|
47
|
-
const port = Math.floor(Math.random() * 2000) + 4000;
|
|
48
|
-
const anvil = spawn(
|
|
49
|
-
"anvil",
|
|
50
|
-
[
|
|
51
|
-
"--port",
|
|
52
|
-
`${port}`,
|
|
53
|
-
"--fork-url",
|
|
54
|
-
forkUrl,
|
|
55
|
-
"--fork-block-number",
|
|
56
|
-
`${forkBlockNumber}`,
|
|
57
|
-
"--chain-id",
|
|
58
|
-
anvilChainId.toString(),
|
|
59
|
-
],
|
|
60
|
-
{
|
|
61
|
-
cwd: join(__dirname, ".."),
|
|
62
|
-
killSignal: "SIGINT",
|
|
63
|
-
},
|
|
64
|
-
);
|
|
65
|
-
const anvilHost = `http://0.0.0.0:${port}`;
|
|
66
|
-
await waitForAnvilInit(anvil);
|
|
67
|
-
|
|
68
|
-
const chain: Chain = {
|
|
69
|
-
...foundry,
|
|
70
|
-
id: anvilChainId,
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const walletClient = createWalletClient({
|
|
74
|
-
chain,
|
|
75
|
-
transport: http(anvilHost),
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const testClient = createTestClient({
|
|
79
|
-
chain,
|
|
80
|
-
mode: "anvil",
|
|
81
|
-
transport: http(anvilHost),
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
const publicClient = createPublicClient({
|
|
85
|
-
chain,
|
|
86
|
-
transport: http(anvilHost),
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
await use({
|
|
90
|
-
publicClient,
|
|
91
|
-
walletClient,
|
|
92
|
-
testClient,
|
|
93
|
-
chain,
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// clean up function, called once after all tests run
|
|
97
|
-
anvil.kill("SIGINT");
|
|
98
|
-
},
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
export const forkUrls = {
|
|
102
|
-
zoraMainnet: "https://rpc.zora.co/",
|
|
103
|
-
zoraGoerli: "https://testnet.rpc.zora.co",
|
|
104
|
-
zoraSepolia: "https://sepolia.rpc.zora.energy",
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export const anvilTest = makeAnvilTest({
|
|
108
|
-
forkUrl: forkUrls.zoraMainnet,
|
|
109
|
-
forkBlockNumber: 7866332,
|
|
110
|
-
anvilChainId: zora.id,
|
|
111
|
-
});
|