@gitmyabi/instaaccountv2 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 ADDED
@@ -0,0 +1,108 @@
1
+ # @gitmyabi/instaaccountv2
2
+
3
+ Auto-generated TypeScript type bindings for **InstaAccountV2**
4
+
5
+ - **Build ID**: `etherscan-instaaccountv2-a9b250b2-1789506217464`
6
+ - **Build Number**: 1
7
+ - **Commit**: `cd94731`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/instaaccountv2@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/instaaccountv2';
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/instaaccountv2';
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/instaaccountv2';
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,105 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * InstaAccountV2_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const InstaAccountV2_jsonAbi: readonly [{
8
+ readonly inputs: readonly [{
9
+ readonly internalType: "address";
10
+ readonly name: "_implementations";
11
+ readonly type: "address";
12
+ }];
13
+ readonly stateMutability: "nonpayable";
14
+ readonly type: "constructor";
15
+ }, {
16
+ readonly stateMutability: "payable";
17
+ readonly type: "fallback";
18
+ }, {
19
+ readonly inputs: readonly [];
20
+ readonly name: "implementations";
21
+ readonly outputs: readonly [{
22
+ readonly internalType: "contract AccountImplementations";
23
+ readonly name: "";
24
+ readonly type: "address";
25
+ }];
26
+ readonly stateMutability: "view";
27
+ readonly type: "function";
28
+ }, {
29
+ readonly stateMutability: "payable";
30
+ readonly type: "receive";
31
+ }];
32
+ /**
33
+ * Type-safe ABI for InstaAccountV2_json
34
+ */
35
+ export type InstaAccountV2_jsonAbi = typeof InstaAccountV2_jsonAbi;
36
+ /**
37
+ * Contract instance type for InstaAccountV2_json
38
+ */
39
+ export type InstaAccountV2_jsonContract = any;
40
+ /**
41
+ * InstaAccountV2_json Contract Class
42
+ *
43
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * import { createPublicClient, createWalletClient, http } from 'viem';
48
+ * import { mainnet } from 'viem/chains';
49
+ * import { InstaAccountV2_json } from 'InstaAccountV2_json';
50
+ *
51
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
52
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
53
+ *
54
+ * const contract = new InstaAccountV2_json('0x...', { publicClient, walletClient });
55
+ *
56
+ * // Read functions
57
+ * const result = await contract.balanceOf('0x...');
58
+ *
59
+ * // Write functions
60
+ * const hash = await contract.transfer('0x...', 1000n);
61
+ *
62
+ * // Simulate transactions (dry-run)
63
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
64
+ * console.log('Gas estimate:', simulation.request.gas);
65
+ *
66
+ * // Watch events
67
+ * const unwatch = contract.watch.Transfer((event) => {
68
+ * console.log('Transfer event:', event);
69
+ * });
70
+ * ```
71
+ */
72
+ export declare class InstaAccountV2_json {
73
+ private contract;
74
+ private contractAddress;
75
+ private publicClient;
76
+ constructor(address: Address, clients: {
77
+ publicClient: PublicClient;
78
+ walletClient?: WalletClient;
79
+ });
80
+ /**
81
+ * Get the contract address
82
+ */
83
+ get address(): Address;
84
+ /**
85
+ * Get the underlying viem contract instance
86
+ */
87
+ getContract(): InstaAccountV2_jsonContract;
88
+ /**
89
+ * implementations
90
+ * view
91
+ */
92
+ implementations(): Promise<`0x${string}`>;
93
+ /**
94
+ * Simulate contract write operations (dry-run without sending transaction)
95
+ *
96
+ * Note: This contract has no write functions, so simulate returns an empty object.
97
+ */
98
+ get simulate(): {};
99
+ /**
100
+ * Watch contract events
101
+ *
102
+ * Note: This contract has no events, so watch returns an empty object.
103
+ */
104
+ get watch(): {};
105
+ }
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstaAccountV2_json = exports.InstaAccountV2_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * InstaAccountV2_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.InstaAccountV2_jsonAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "address",
15
+ "name": "_implementations",
16
+ "type": "address"
17
+ }
18
+ ],
19
+ "stateMutability": "nonpayable",
20
+ "type": "constructor"
21
+ },
22
+ {
23
+ "stateMutability": "payable",
24
+ "type": "fallback"
25
+ },
26
+ {
27
+ "inputs": [],
28
+ "name": "implementations",
29
+ "outputs": [
30
+ {
31
+ "internalType": "contract AccountImplementations",
32
+ "name": "",
33
+ "type": "address"
34
+ }
35
+ ],
36
+ "stateMutability": "view",
37
+ "type": "function"
38
+ },
39
+ {
40
+ "stateMutability": "payable",
41
+ "type": "receive"
42
+ }
43
+ ];
44
+ /**
45
+ * InstaAccountV2_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 { InstaAccountV2_json } from 'InstaAccountV2_json';
54
+ *
55
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
56
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
57
+ *
58
+ * const contract = new InstaAccountV2_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 InstaAccountV2_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.InstaAccountV2_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
+ /**
102
+ * implementations
103
+ * view
104
+ */
105
+ async implementations() {
106
+ return this.contract.read.implementations();
107
+ }
108
+ // No write functions
109
+ /**
110
+ * Simulate contract write operations (dry-run without sending transaction)
111
+ *
112
+ * Note: This contract has no write functions, so simulate returns an empty object.
113
+ */
114
+ get simulate() {
115
+ return {};
116
+ }
117
+ /**
118
+ * Watch contract events
119
+ *
120
+ * Note: This contract has no events, so watch returns an empty object.
121
+ */
122
+ get watch() {
123
+ return {};
124
+ }
125
+ }
126
+ exports.InstaAccountV2_json = InstaAccountV2_json;
@@ -0,0 +1,155 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * InstaAccountV2_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const InstaAccountV2_jsonAbi = [
10
+ {
11
+ "inputs": [
12
+ {
13
+ "internalType": "address",
14
+ "name": "_implementations",
15
+ "type": "address"
16
+ }
17
+ ],
18
+ "stateMutability": "nonpayable",
19
+ "type": "constructor"
20
+ },
21
+ {
22
+ "stateMutability": "payable",
23
+ "type": "fallback"
24
+ },
25
+ {
26
+ "inputs": [],
27
+ "name": "implementations",
28
+ "outputs": [
29
+ {
30
+ "internalType": "contract AccountImplementations",
31
+ "name": "",
32
+ "type": "address"
33
+ }
34
+ ],
35
+ "stateMutability": "view",
36
+ "type": "function"
37
+ },
38
+ {
39
+ "stateMutability": "payable",
40
+ "type": "receive"
41
+ }
42
+ ] as const satisfies Abi;
43
+
44
+ /**
45
+ * Type-safe ABI for InstaAccountV2_json
46
+ */
47
+ export type InstaAccountV2_jsonAbi = typeof InstaAccountV2_jsonAbi;
48
+
49
+ /**
50
+ * Contract instance type for InstaAccountV2_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 InstaAccountV2_jsonContract = any;
55
+
56
+ /**
57
+ * InstaAccountV2_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 { InstaAccountV2_json } from 'InstaAccountV2_json';
66
+ *
67
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
68
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
69
+ *
70
+ * const contract = new InstaAccountV2_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 InstaAccountV2_json {
89
+ private contract: InstaAccountV2_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: InstaAccountV2_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(): InstaAccountV2_jsonContract {
123
+ return this.contract;
124
+ }
125
+
126
+ /**
127
+ * implementations
128
+ * view
129
+ */
130
+ async implementations(): Promise<`0x${string}`> {
131
+ return this.contract.read.implementations() as Promise<`0x${string}`>;
132
+ }
133
+
134
+ // No write functions
135
+
136
+
137
+
138
+ /**
139
+ * Simulate contract write operations (dry-run without sending transaction)
140
+ *
141
+ * Note: This contract has no write functions, so simulate returns an empty object.
142
+ */
143
+ get simulate() {
144
+ return {};
145
+ }
146
+
147
+ /**
148
+ * Watch contract events
149
+ *
150
+ * Note: This contract has no events, so watch returns an empty object.
151
+ */
152
+ get watch() {
153
+ return {};
154
+ }
155
+ }
@@ -0,0 +1,2 @@
1
+ export { InstaAccountV2_jsonAbi, InstaAccountV2_json } from './InstaAccountV2_json';
2
+ export type { InstaAccountV2_jsonAbi as InstaAccountV2_jsonAbiType, InstaAccountV2_jsonContract } from './InstaAccountV2_json';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstaAccountV2_json = exports.InstaAccountV2_jsonAbi = void 0;
4
+ // Auto-generated exports for all contracts
5
+ var InstaAccountV2_json_1 = require("./InstaAccountV2_json");
6
+ Object.defineProperty(exports, "InstaAccountV2_jsonAbi", { enumerable: true, get: function () { return InstaAccountV2_json_1.InstaAccountV2_jsonAbi; } });
7
+ Object.defineProperty(exports, "InstaAccountV2_json", { enumerable: true, get: function () { return InstaAccountV2_json_1.InstaAccountV2_json; } });
@@ -0,0 +1,3 @@
1
+ // Auto-generated exports for all contracts
2
+ export { InstaAccountV2_jsonAbi, InstaAccountV2_json } from './InstaAccountV2_json';
3
+ export type { InstaAccountV2_jsonAbi as InstaAccountV2_jsonAbiType, InstaAccountV2_jsonContract } from './InstaAccountV2_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 ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@gitmyabi/instaaccountv2",
3
+ "version": "1.0.0",
4
+ "description": "Auto-generated TypeScript type bindings for InstaAccountV2 (build etherscan-instaaccountv2-a9b250b2-1789506217464, commit cd94731, 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/instaaccountv2"
40
+ },
41
+ "branch": "etherscan",
42
+ "shortHash": "cd94731"
43
+ }