Skip to content

Commit 9558dc0

Browse files
brunomenezestuler
authored andcommitted
refactor(wallet): Replace @cartesi/rollups and wagmi/cli deps with @cartesi/viem library
1 parent 9dce604 commit 9558dc0

File tree

10 files changed

+675
-6583
lines changed

10 files changed

+675
-6583
lines changed

.changeset/shaggy-zebras-reply.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@deroll/wallet": major
3+
---
4+
5+
Remove @cartesi/rollups and wagmi/cli dependency and replace with @cartesi/viem lib.

packages/wallet/__tests__/deposit.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import {
99
} from "viem";
1010
import { describe, expect, test } from "vitest";
1111

12-
import { createWallet } from "../src";
1312
import {
1413
erc1155BatchPortalAddress,
1514
erc1155SinglePortalAddress,
1615
erc20PortalAddress,
1716
erc721PortalAddress,
1817
etherPortalAddress,
19-
} from "../src/rollups";
18+
} from "@cartesi/viem/abi";
19+
import { createWallet } from "../src";
2020

2121
describe("deposit", () => {
2222
test("ETH", async () => {

packages/wallet/__tests__/parser.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ import {
88
} from "viem";
99
import { describe, expect, test } from "vitest";
1010

11+
import {
12+
erc1155BatchPortalAddress,
13+
erc1155SinglePortalAddress,
14+
erc20PortalAddress,
15+
erc721PortalAddress,
16+
etherPortalAddress,
17+
} from "@cartesi/viem/abi";
1118
import {
1219
isERC1155BatchDeposit,
1320
isERC1155SingleDeposit,
@@ -20,13 +27,6 @@ import {
2027
parseERC721Deposit,
2128
parseEtherDeposit,
2229
} from "../src";
23-
import {
24-
erc1155BatchPortalAddress,
25-
erc1155SinglePortalAddress,
26-
erc20PortalAddress,
27-
erc721PortalAddress,
28-
etherPortalAddress,
29-
} from "../src/rollups";
3030

3131
describe("parser", () => {
3232
test("isEtherDeposit", () => {

packages/wallet/__tests__/transfer.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import {
88
} from "viem";
99
import { describe, expect, test } from "vitest";
1010

11-
import { createWallet } from "../src";
1211
import {
1312
erc1155BatchPortalAddress,
1413
erc1155SinglePortalAddress,
1514
erc20PortalAddress,
1615
erc721PortalAddress,
1716
etherPortalAddress,
18-
} from "../src/rollups";
17+
} from "@cartesi/viem/abi";
18+
import { createWallet } from "../src";
1919

2020
describe("transfer", () => {
2121
test("ETH without balance", () => {

packages/wallet/__tests__/withdraw.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import {
1111
} from "viem";
1212
import { describe, expect, test } from "vitest";
1313

14-
import { createWallet } from "../src";
15-
import { erc1155Abi } from "../src/abi";
1614
import {
1715
erc1155BatchPortalAddress,
1816
erc1155SinglePortalAddress,
1917
erc20PortalAddress,
2018
erc721PortalAddress,
2119
etherPortalAddress,
22-
} from "../src/rollups";
20+
} from "@cartesi/viem/abi";
21+
import { createWallet } from "../src";
22+
import { erc1155Abi } from "../src/abi";
2323

2424
describe("withdraw", () => {
2525
test("ETH with no balance", () => {

packages/wallet/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,21 @@
1010
"dist/**"
1111
],
1212
"scripts": {
13-
"build": "run-s codegen compile",
13+
"build": "tsup",
1414
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
15-
"codegen": "wagmi generate",
16-
"compile": "tsup",
1715
"dev": "tsup --watch",
1816
"prepack": "run-s build",
1917
"test": "vitest"
2018
},
2119
"dependencies": {
20+
"@cartesi/viem": "2.0.0-alpha.4",
2221
"@deroll/core": "workspace:*",
2322
"viem": "^2.21.34"
2423
},
2524
"devDependencies": {
26-
"@cartesi/rollups": "2.0.0-rc.12",
2725
"@deroll/tsconfig": "workspace:*",
28-
"@sunodo/wagmi-plugin-hardhat-deploy": "^0.3",
2926
"@vitest/coverage-istanbul": "^2.1.3",
3027
"@vitest/ui": "^2.1.3",
31-
"@wagmi/cli": "^2.1.16",
32-
"abitype": "^1.0.6",
3328
"npm-run-all": "^4.1.5",
3429
"tsup": "^8.3.0",
3530
"typescript": "^5.6.3",

packages/wallet/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ import {
1515
zeroHash,
1616
} from "viem";
1717

18-
import { WalletApp, WalletAppImpl } from "./wallet";
1918
import {
2019
erc1155BatchPortalAddress,
2120
erc1155SinglePortalAddress,
2221
erc20PortalAddress,
2322
erc721PortalAddress,
2423
etherPortalAddress,
25-
} from "./rollups";
24+
} from "@cartesi/viem/abi";
2625
import { erc1155Abi } from "./abi";
26+
import { WalletApp, WalletAppImpl } from "./wallet";
2727

2828
export type { WalletApp } from "./wallet";
2929

packages/wallet/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "@deroll/tsconfig/base.json",
33
"compilerOptions": {
4-
"resolveJsonModule": true
4+
"resolveJsonModule": true,
5+
"moduleResolution": "bundler"
56
},
67
"include": ["."],
78
"exclude": ["dist", "build", "node_modules"]

packages/wallet/wagmi.config.ts

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

0 commit comments

Comments
 (0)