@gitmyabi/lunodepositforwarder 0.0.0-stage → 1.0.0

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/README.md CHANGED
@@ -1,3 +1,108 @@
1
- # Temporary Holding Version
1
+ # @gitmyabi/lunodepositforwarder
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Auto-generated TypeScript type bindings for **LunoDepositForwarder**
4
+
5
+ - **Build ID**: `etherscan-lunodepositforwarder-b27c88ad-1792169103123`
6
+ - **Build Number**: 1
7
+ - **Commit**: `d00f619`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/lunodepositforwarder@1.0.0
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ### Class-based API (TypeChain-like)
21
+
22
+ ```typescript
23
+ import { createPublicClient, createWalletClient, http } from 'viem';
24
+ import { mainnet } from 'viem/chains';
25
+ import { YourContract } from '@gitmyabi/lunodepositforwarder';
26
+
27
+ const publicClient = createPublicClient({ chain: mainnet, transport: http() });
28
+ const walletClient = createWalletClient({ chain: mainnet, transport: http() });
29
+
30
+ // Create contract instance
31
+ const contract = new YourContract('0x...', { publicClient, walletClient });
32
+
33
+ // Read functions - call directly like TypeChain!
34
+ const result = await contract.yourMethod(param1, param2);
35
+
36
+ // Write functions - also call directly!
37
+ const hash = await contract.transfer('0x...', 1000n);
38
+ ```
39
+
40
+ ### With viem directly
41
+
42
+ ```typescript
43
+ import { createPublicClient, http } from 'viem';
44
+ import { mainnet } from 'viem/chains';
45
+ import { YourContractAbi } from '@gitmyabi/lunodepositforwarder';
46
+
47
+ const client = createPublicClient({
48
+ chain: mainnet,
49
+ transport: http(),
50
+ });
51
+
52
+ // Fully typed contract read
53
+ const result = await client.readContract({
54
+ address: '0x...',
55
+ abi: YourContractAbi,
56
+ functionName: 'yourMethod',
57
+ args: [param1, param2],
58
+ });
59
+
60
+ // Fully typed contract write
61
+ const hash = await client.writeContract({
62
+ address: '0x...',
63
+ abi: YourContractAbi,
64
+ functionName: 'yourMethod',
65
+ args: [param1, param2],
66
+ });
67
+ ```
68
+
69
+ ### With wagmi
70
+
71
+ ```typescript
72
+ import { useReadContract, useWriteContract } from 'wagmi';
73
+ import { YourContractAbi } from '@gitmyabi/lunodepositforwarder';
74
+
75
+ function MyComponent() {
76
+ const { data } = useReadContract({
77
+ address: '0x...',
78
+ abi: YourContractAbi,
79
+ functionName: 'yourMethod',
80
+ args: [param1, param2],
81
+ });
82
+
83
+ const { writeContract } = useWriteContract();
84
+
85
+ const handleWrite = () => {
86
+ writeContract({
87
+ address: '0x...',
88
+ abi: YourContractAbi,
89
+ functionName: 'yourMethod',
90
+ args: [param1, param2],
91
+ });
92
+ };
93
+
94
+ return <button onClick={handleWrite}>Call Contract</button>;
95
+ }
96
+ ```
97
+
98
+ ## Type Safety
99
+
100
+ This package provides full TypeScript type safety for all contract methods, events, and parameters using viem's type system. All ABIs are exported as `const` assertions for maximum type inference.
101
+
102
+ ## Generated Contracts
103
+
104
+ This package includes type bindings for 1 contract(s) generated from ABI artifacts.
105
+
106
+ ## License
107
+
108
+ MIT
@@ -0,0 +1,123 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * LunoDepositForwarder_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const LunoDepositForwarder_jsonAbi: readonly [{
8
+ readonly payable: true;
9
+ readonly stateMutability: "payable";
10
+ readonly type: "fallback";
11
+ }, {
12
+ readonly anonymous: false;
13
+ readonly inputs: readonly [{
14
+ readonly indexed: true;
15
+ readonly name: "destination";
16
+ readonly type: "address";
17
+ }, {
18
+ readonly indexed: false;
19
+ readonly name: "depositAddress";
20
+ readonly type: "address";
21
+ }, {
22
+ readonly indexed: false;
23
+ readonly name: "sender";
24
+ readonly type: "address";
25
+ }, {
26
+ readonly indexed: false;
27
+ readonly name: "amount";
28
+ readonly type: "uint256";
29
+ }];
30
+ readonly name: "LogForwarded";
31
+ readonly type: "event";
32
+ }];
33
+ /**
34
+ * Type-safe ABI for LunoDepositForwarder_json
35
+ */
36
+ export type LunoDepositForwarder_jsonAbi = typeof LunoDepositForwarder_jsonAbi;
37
+ /**
38
+ * Contract instance type for LunoDepositForwarder_json
39
+ */
40
+ export type LunoDepositForwarder_jsonContract = any;
41
+ /**
42
+ * LunoDepositForwarder_json Contract Class
43
+ *
44
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * import { createPublicClient, createWalletClient, http } from 'viem';
49
+ * import { mainnet } from 'viem/chains';
50
+ * import { LunoDepositForwarder_json } from 'LunoDepositForwarder_json';
51
+ *
52
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
53
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
54
+ *
55
+ * const contract = new LunoDepositForwarder_json('0x...', { publicClient, walletClient });
56
+ *
57
+ * // Read functions
58
+ * const result = await contract.balanceOf('0x...');
59
+ *
60
+ * // Write functions
61
+ * const hash = await contract.transfer('0x...', 1000n);
62
+ *
63
+ * // Simulate transactions (dry-run)
64
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
65
+ * console.log('Gas estimate:', simulation.request.gas);
66
+ *
67
+ * // Watch events
68
+ * const unwatch = contract.watch.Transfer((event) => {
69
+ * console.log('Transfer event:', event);
70
+ * });
71
+ * ```
72
+ */
73
+ export declare class LunoDepositForwarder_json {
74
+ private contract;
75
+ private contractAddress;
76
+ private publicClient;
77
+ constructor(address: Address, clients: {
78
+ publicClient: PublicClient;
79
+ walletClient?: WalletClient;
80
+ });
81
+ /**
82
+ * Get the contract address
83
+ */
84
+ get address(): Address;
85
+ /**
86
+ * Get the underlying viem contract instance
87
+ */
88
+ getContract(): LunoDepositForwarder_jsonContract;
89
+ /**
90
+ * Simulate contract write operations (dry-run without sending transaction)
91
+ *
92
+ * Note: This contract has no write functions, so simulate returns an empty object.
93
+ */
94
+ get simulate(): {};
95
+ /**
96
+ * Watch contract events
97
+ *
98
+ * @example
99
+ * // Watch all Transfer events
100
+ * const unwatch = contract.watch.Transfer((event) => {
101
+ * console.log('Transfer:', event);
102
+ * });
103
+ *
104
+ * // Stop watching
105
+ * unwatch();
106
+ */
107
+ get watch(): {
108
+ /**
109
+ * Watch LogForwarded events
110
+ * @param callback Function to call when event is emitted
111
+ * @param filter Optional filter for indexed parameters
112
+ * @returns Unwatch function to stop listening
113
+ */
114
+ LogForwarded: (callback: (event: {
115
+ destination: `0x${string}`;
116
+ depositAddress: `0x${string}`;
117
+ sender: `0x${string}`;
118
+ amount: bigint;
119
+ }) => void, filter?: {
120
+ destination: `0x${string}`;
121
+ }) => () => void;
122
+ };
123
+ }
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LunoDepositForwarder_json = exports.LunoDepositForwarder_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * LunoDepositForwarder_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.LunoDepositForwarder_jsonAbi = [
11
+ {
12
+ "payable": true,
13
+ "stateMutability": "payable",
14
+ "type": "fallback"
15
+ },
16
+ {
17
+ "anonymous": false,
18
+ "inputs": [
19
+ {
20
+ "indexed": true,
21
+ "name": "destination",
22
+ "type": "address"
23
+ },
24
+ {
25
+ "indexed": false,
26
+ "name": "depositAddress",
27
+ "type": "address"
28
+ },
29
+ {
30
+ "indexed": false,
31
+ "name": "sender",
32
+ "type": "address"
33
+ },
34
+ {
35
+ "indexed": false,
36
+ "name": "amount",
37
+ "type": "uint256"
38
+ }
39
+ ],
40
+ "name": "LogForwarded",
41
+ "type": "event"
42
+ }
43
+ ];
44
+ /**
45
+ * LunoDepositForwarder_json Contract Class
46
+ *
47
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * import { createPublicClient, createWalletClient, http } from 'viem';
52
+ * import { mainnet } from 'viem/chains';
53
+ * import { LunoDepositForwarder_json } from 'LunoDepositForwarder_json';
54
+ *
55
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
56
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
57
+ *
58
+ * const contract = new LunoDepositForwarder_json('0x...', { publicClient, walletClient });
59
+ *
60
+ * // Read functions
61
+ * const result = await contract.balanceOf('0x...');
62
+ *
63
+ * // Write functions
64
+ * const hash = await contract.transfer('0x...', 1000n);
65
+ *
66
+ * // Simulate transactions (dry-run)
67
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
68
+ * console.log('Gas estimate:', simulation.request.gas);
69
+ *
70
+ * // Watch events
71
+ * const unwatch = contract.watch.Transfer((event) => {
72
+ * console.log('Transfer event:', event);
73
+ * });
74
+ * ```
75
+ */
76
+ class LunoDepositForwarder_json {
77
+ constructor(address, clients) {
78
+ this.contractAddress = address;
79
+ this.publicClient = clients.publicClient;
80
+ this.contract = (0, viem_1.getContract)({
81
+ address,
82
+ abi: exports.LunoDepositForwarder_jsonAbi,
83
+ client: {
84
+ public: clients.publicClient,
85
+ wallet: clients.walletClient,
86
+ },
87
+ });
88
+ }
89
+ /**
90
+ * Get the contract address
91
+ */
92
+ get address() {
93
+ return this.contractAddress;
94
+ }
95
+ /**
96
+ * Get the underlying viem contract instance
97
+ */
98
+ getContract() {
99
+ return this.contract;
100
+ }
101
+ // No read functions
102
+ // No write functions
103
+ /**
104
+ * Simulate contract write operations (dry-run without sending transaction)
105
+ *
106
+ * Note: This contract has no write functions, so simulate returns an empty object.
107
+ */
108
+ get simulate() {
109
+ return {};
110
+ }
111
+ /**
112
+ * Watch contract events
113
+ *
114
+ * @example
115
+ * // Watch all Transfer events
116
+ * const unwatch = contract.watch.Transfer((event) => {
117
+ * console.log('Transfer:', event);
118
+ * });
119
+ *
120
+ * // Stop watching
121
+ * unwatch();
122
+ */
123
+ get watch() {
124
+ return {
125
+ /**
126
+ * Watch LogForwarded events
127
+ * @param callback Function to call when event is emitted
128
+ * @param filter Optional filter for indexed parameters
129
+ * @returns Unwatch function to stop listening
130
+ */
131
+ LogForwarded: (callback, filter) => {
132
+ return this.publicClient.watchContractEvent({
133
+ address: this.contractAddress,
134
+ abi: exports.LunoDepositForwarder_jsonAbi,
135
+ eventName: 'LogForwarded',
136
+ args: filter,
137
+ onLogs: (logs) => {
138
+ logs.forEach((log) => {
139
+ callback(log.args);
140
+ });
141
+ },
142
+ });
143
+ }
144
+ };
145
+ }
146
+ }
147
+ exports.LunoDepositForwarder_json = LunoDepositForwarder_json;
@@ -0,0 +1,176 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * LunoDepositForwarder_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const LunoDepositForwarder_jsonAbi = [
10
+ {
11
+ "payable": true,
12
+ "stateMutability": "payable",
13
+ "type": "fallback"
14
+ },
15
+ {
16
+ "anonymous": false,
17
+ "inputs": [
18
+ {
19
+ "indexed": true,
20
+ "name": "destination",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "indexed": false,
25
+ "name": "depositAddress",
26
+ "type": "address"
27
+ },
28
+ {
29
+ "indexed": false,
30
+ "name": "sender",
31
+ "type": "address"
32
+ },
33
+ {
34
+ "indexed": false,
35
+ "name": "amount",
36
+ "type": "uint256"
37
+ }
38
+ ],
39
+ "name": "LogForwarded",
40
+ "type": "event"
41
+ }
42
+ ] as const satisfies Abi;
43
+
44
+ /**
45
+ * Type-safe ABI for LunoDepositForwarder_json
46
+ */
47
+ export type LunoDepositForwarder_jsonAbi = typeof LunoDepositForwarder_jsonAbi;
48
+
49
+ /**
50
+ * Contract instance type for LunoDepositForwarder_json
51
+ */
52
+ // Use any for contract type to avoid complex viem type issues
53
+ // The runtime behavior is type-safe through viem's ABI typing
54
+ export type LunoDepositForwarder_jsonContract = any;
55
+
56
+ /**
57
+ * LunoDepositForwarder_json Contract Class
58
+ *
59
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * import { createPublicClient, createWalletClient, http } from 'viem';
64
+ * import { mainnet } from 'viem/chains';
65
+ * import { LunoDepositForwarder_json } from 'LunoDepositForwarder_json';
66
+ *
67
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
68
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
69
+ *
70
+ * const contract = new LunoDepositForwarder_json('0x...', { publicClient, walletClient });
71
+ *
72
+ * // Read functions
73
+ * const result = await contract.balanceOf('0x...');
74
+ *
75
+ * // Write functions
76
+ * const hash = await contract.transfer('0x...', 1000n);
77
+ *
78
+ * // Simulate transactions (dry-run)
79
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
80
+ * console.log('Gas estimate:', simulation.request.gas);
81
+ *
82
+ * // Watch events
83
+ * const unwatch = contract.watch.Transfer((event) => {
84
+ * console.log('Transfer event:', event);
85
+ * });
86
+ * ```
87
+ */
88
+ export class LunoDepositForwarder_json {
89
+ private contract: LunoDepositForwarder_jsonContract;
90
+ private contractAddress: Address;
91
+ private publicClient: PublicClient;
92
+
93
+ constructor(
94
+ address: Address,
95
+ clients: {
96
+ publicClient: PublicClient;
97
+ walletClient?: WalletClient;
98
+ }
99
+ ) {
100
+ this.contractAddress = address;
101
+ this.publicClient = clients.publicClient;
102
+ this.contract = getContract({
103
+ address,
104
+ abi: LunoDepositForwarder_jsonAbi,
105
+ client: {
106
+ public: clients.publicClient,
107
+ wallet: clients.walletClient,
108
+ },
109
+ });
110
+ }
111
+
112
+ /**
113
+ * Get the contract address
114
+ */
115
+ get address(): Address {
116
+ return this.contractAddress;
117
+ }
118
+
119
+ /**
120
+ * Get the underlying viem contract instance
121
+ */
122
+ getContract(): LunoDepositForwarder_jsonContract {
123
+ return this.contract;
124
+ }
125
+
126
+ // No read functions
127
+
128
+ // No write functions
129
+
130
+
131
+
132
+ /**
133
+ * Simulate contract write operations (dry-run without sending transaction)
134
+ *
135
+ * Note: This contract has no write functions, so simulate returns an empty object.
136
+ */
137
+ get simulate() {
138
+ return {};
139
+ }
140
+
141
+ /**
142
+ * Watch contract events
143
+ *
144
+ * @example
145
+ * // Watch all Transfer events
146
+ * const unwatch = contract.watch.Transfer((event) => {
147
+ * console.log('Transfer:', event);
148
+ * });
149
+ *
150
+ * // Stop watching
151
+ * unwatch();
152
+ */
153
+ get watch() {
154
+ return {
155
+ /**
156
+ * Watch LogForwarded events
157
+ * @param callback Function to call when event is emitted
158
+ * @param filter Optional filter for indexed parameters
159
+ * @returns Unwatch function to stop listening
160
+ */
161
+ LogForwarded: (callback: (event: { destination: `0x${string}`; depositAddress: `0x${string}`; sender: `0x${string}`; amount: bigint }) => void, filter?: { destination: `0x${string}` }) => {
162
+ return this.publicClient.watchContractEvent({
163
+ address: this.contractAddress,
164
+ abi: LunoDepositForwarder_jsonAbi,
165
+ eventName: 'LogForwarded',
166
+ args: filter,
167
+ onLogs: (logs: any[]) => {
168
+ logs.forEach((log: any) => {
169
+ callback(log.args as any);
170
+ });
171
+ },
172
+ }) as () => void;
173
+ }
174
+ };
175
+ }
176
+ }
@@ -0,0 +1,2 @@
1
+ export { LunoDepositForwarder_jsonAbi, LunoDepositForwarder_json } from './LunoDepositForwarder_json';
2
+ export type { LunoDepositForwarder_jsonAbi as LunoDepositForwarder_jsonAbiType, LunoDepositForwarder_jsonContract } from './LunoDepositForwarder_json';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LunoDepositForwarder_json = exports.LunoDepositForwarder_jsonAbi = void 0;
4
+ // Auto-generated exports for all contracts
5
+ var LunoDepositForwarder_json_1 = require("./LunoDepositForwarder_json");
6
+ Object.defineProperty(exports, "LunoDepositForwarder_jsonAbi", { enumerable: true, get: function () { return LunoDepositForwarder_json_1.LunoDepositForwarder_jsonAbi; } });
7
+ Object.defineProperty(exports, "LunoDepositForwarder_json", { enumerable: true, get: function () { return LunoDepositForwarder_json_1.LunoDepositForwarder_json; } });
@@ -0,0 +1,3 @@
1
+ // Auto-generated exports for all contracts
2
+ export { LunoDepositForwarder_jsonAbi, LunoDepositForwarder_json } from './LunoDepositForwarder_json';
3
+ export type { LunoDepositForwarder_jsonAbi as LunoDepositForwarder_jsonAbiType, LunoDepositForwarder_jsonContract } from './LunoDepositForwarder_json';
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './contracts';
package/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // Auto-generated TypeScript type bindings
3
+ // This file exports all generated contract types
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./contracts"), exports);
package/package.json CHANGED
@@ -1,6 +1,43 @@
1
1
  {
2
2
  "name": "@gitmyabi/lunodepositforwarder",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "Auto-generated TypeScript type bindings for LunoDepositForwarder (build etherscan-lunodepositforwarder-b27c88ad-1792169103123, commit d00f619, branch etherscan)",
5
+ "main": "./index.js",
6
+ "types": "./index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./index.js",
10
+ "require": "./index.js",
11
+ "types": "./index.d.ts"
12
+ },
13
+ "./contracts": {
14
+ "import": "./contracts/index.js",
15
+ "require": "./contracts/index.js",
16
+ "types": "./contracts/index.d.ts"
17
+ }
18
+ },
19
+ "files": [
20
+ "index.js",
21
+ "index.d.ts",
22
+ "contracts"
23
+ ],
24
+ "keywords": [
25
+ "ethereum",
26
+ "smart-contracts",
27
+ "viem",
28
+ "wagmi",
29
+ "typescript",
30
+ "abi",
31
+ "ethers-v6"
32
+ ],
33
+ "license": "MIT",
34
+ "dependencies": {
35
+ "viem": "^2.0.0"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/etherscan/lunodepositforwarder"
40
+ },
41
+ "branch": "etherscan",
42
+ "shortHash": "d00f619"
6
43
  }