@gitmyabi-stg/ens--resolver-contracts 0.0.1

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 ADDED
@@ -0,0 +1,108 @@
1
+ # @gitmyabi-stg/ens--resolver-contracts
2
+
3
+ Auto-generated TypeScript type bindings for **Resolver Contracts**
4
+
5
+ - **Build ID**: `bulk-ens-resolver-contracts-1776270020991`
6
+ - **Build Number**: 1
7
+ - **Commit**: `29939ad`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 2
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi-stg/ens--resolver-contracts@0.0.1
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-stg/ens--resolver-contracts';
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-stg/ens--resolver-contracts';
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-stg/ens--resolver-contracts';
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 2 contract(s) generated from ABI artifacts.
105
+
106
+ ## License
107
+
108
+ MIT