@gitmyabi/multisendcallonly 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/multisendcallonly
2
+
3
+ Auto-generated TypeScript type bindings for **MultiSendCallOnly**
4
+
5
+ - **Build ID**: `etherscan-multisendcallonly-40a2accb-1786055904810`
6
+ - **Build Number**: 1
7
+ - **Commit**: `d52aef5`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/multisendcallonly@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/multisendcallonly';
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/multisendcallonly';
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/multisendcallonly';
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,124 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * MultiSendCallOnly_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const MultiSendCallOnly_jsonAbi: readonly [{
8
+ readonly inputs: readonly [{
9
+ readonly internalType: "bytes";
10
+ readonly name: "transactions";
11
+ readonly type: "bytes";
12
+ }];
13
+ readonly name: "multiSend";
14
+ readonly outputs: readonly [];
15
+ readonly stateMutability: "payable";
16
+ readonly type: "function";
17
+ }];
18
+ /**
19
+ * Type-safe ABI for MultiSendCallOnly_json
20
+ */
21
+ export type MultiSendCallOnly_jsonAbi = typeof MultiSendCallOnly_jsonAbi;
22
+ /**
23
+ * Contract instance type for MultiSendCallOnly_json
24
+ */
25
+ export type MultiSendCallOnly_jsonContract = any;
26
+ /**
27
+ * MultiSendCallOnly_json Contract Class
28
+ *
29
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * import { createPublicClient, createWalletClient, http } from 'viem';
34
+ * import { mainnet } from 'viem/chains';
35
+ * import { MultiSendCallOnly_json } from 'MultiSendCallOnly_json';
36
+ *
37
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
38
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
39
+ *
40
+ * const contract = new MultiSendCallOnly_json('0x...', { publicClient, walletClient });
41
+ *
42
+ * // Read functions
43
+ * const result = await contract.balanceOf('0x...');
44
+ *
45
+ * // Write functions
46
+ * const hash = await contract.transfer('0x...', 1000n);
47
+ *
48
+ * // Simulate transactions (dry-run)
49
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
50
+ * console.log('Gas estimate:', simulation.request.gas);
51
+ *
52
+ * // Watch events
53
+ * const unwatch = contract.watch.Transfer((event) => {
54
+ * console.log('Transfer event:', event);
55
+ * });
56
+ * ```
57
+ */
58
+ export declare class MultiSendCallOnly_json {
59
+ private contract;
60
+ private contractAddress;
61
+ private publicClient;
62
+ constructor(address: Address, clients: {
63
+ publicClient: PublicClient;
64
+ walletClient?: WalletClient;
65
+ });
66
+ /**
67
+ * Get the contract address
68
+ */
69
+ get address(): Address;
70
+ /**
71
+ * Get the underlying viem contract instance
72
+ */
73
+ getContract(): MultiSendCallOnly_jsonContract;
74
+ /**
75
+ * multiSend
76
+ * payable
77
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
78
+ */
79
+ multiSend(transactions: `0x${string}`, options?: {
80
+ accessList?: import('viem').AccessList;
81
+ authorizationList?: import('viem').AuthorizationList;
82
+ chain?: import('viem').Chain | null;
83
+ dataSuffix?: `0x${string}`;
84
+ gas?: bigint;
85
+ gasPrice?: bigint;
86
+ maxFeePerGas?: bigint;
87
+ maxPriorityFeePerGas?: bigint;
88
+ nonce?: number;
89
+ value?: bigint;
90
+ }): Promise<`0x${string}`>;
91
+ /**
92
+ * Simulate contract write operations (dry-run without sending transaction)
93
+ *
94
+ * @example
95
+ * const result = await contract.simulate.transfer('0x...', 1000n);
96
+ * console.log('Gas estimate:', result.request.gas);
97
+ * console.log('Would succeed:', result.result);
98
+ */
99
+ get simulate(): {
100
+ /**
101
+ * Simulate multiSend
102
+ * Returns gas estimate and result without sending transaction
103
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
104
+ */
105
+ multiSend(transactions: `0x${string}`, options?: {
106
+ accessList?: import("viem").AccessList;
107
+ authorizationList?: import("viem").AuthorizationList;
108
+ chain?: import("viem").Chain | null;
109
+ dataSuffix?: `0x${string}`;
110
+ gas?: bigint;
111
+ gasPrice?: bigint;
112
+ maxFeePerGas?: bigint;
113
+ maxPriorityFeePerGas?: bigint;
114
+ nonce?: number;
115
+ value?: bigint;
116
+ }): Promise<void>;
117
+ };
118
+ /**
119
+ * Watch contract events
120
+ *
121
+ * Note: This contract has no events, so watch returns an empty object.
122
+ */
123
+ get watch(): {};
124
+ }
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MultiSendCallOnly_json = exports.MultiSendCallOnly_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * MultiSendCallOnly_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.MultiSendCallOnly_jsonAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "bytes",
15
+ "name": "transactions",
16
+ "type": "bytes"
17
+ }
18
+ ],
19
+ "name": "multiSend",
20
+ "outputs": [],
21
+ "stateMutability": "payable",
22
+ "type": "function"
23
+ }
24
+ ];
25
+ /**
26
+ * MultiSendCallOnly_json Contract Class
27
+ *
28
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * import { createPublicClient, createWalletClient, http } from 'viem';
33
+ * import { mainnet } from 'viem/chains';
34
+ * import { MultiSendCallOnly_json } from 'MultiSendCallOnly_json';
35
+ *
36
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
37
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
38
+ *
39
+ * const contract = new MultiSendCallOnly_json('0x...', { publicClient, walletClient });
40
+ *
41
+ * // Read functions
42
+ * const result = await contract.balanceOf('0x...');
43
+ *
44
+ * // Write functions
45
+ * const hash = await contract.transfer('0x...', 1000n);
46
+ *
47
+ * // Simulate transactions (dry-run)
48
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
49
+ * console.log('Gas estimate:', simulation.request.gas);
50
+ *
51
+ * // Watch events
52
+ * const unwatch = contract.watch.Transfer((event) => {
53
+ * console.log('Transfer event:', event);
54
+ * });
55
+ * ```
56
+ */
57
+ class MultiSendCallOnly_json {
58
+ constructor(address, clients) {
59
+ this.contractAddress = address;
60
+ this.publicClient = clients.publicClient;
61
+ this.contract = (0, viem_1.getContract)({
62
+ address,
63
+ abi: exports.MultiSendCallOnly_jsonAbi,
64
+ client: {
65
+ public: clients.publicClient,
66
+ wallet: clients.walletClient,
67
+ },
68
+ });
69
+ }
70
+ /**
71
+ * Get the contract address
72
+ */
73
+ get address() {
74
+ return this.contractAddress;
75
+ }
76
+ /**
77
+ * Get the underlying viem contract instance
78
+ */
79
+ getContract() {
80
+ return this.contract;
81
+ }
82
+ // No read functions
83
+ /**
84
+ * multiSend
85
+ * payable
86
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
87
+ */
88
+ async multiSend(transactions, options) {
89
+ if (!this.contract.write) {
90
+ throw new Error('Wallet client is required for write operations');
91
+ }
92
+ return this.contract.write.multiSend([transactions], options);
93
+ }
94
+ /**
95
+ * Simulate contract write operations (dry-run without sending transaction)
96
+ *
97
+ * @example
98
+ * const result = await contract.simulate.transfer('0x...', 1000n);
99
+ * console.log('Gas estimate:', result.request.gas);
100
+ * console.log('Would succeed:', result.result);
101
+ */
102
+ get simulate() {
103
+ const contract = this.contract;
104
+ if (!contract.simulate) {
105
+ throw new Error('Public client is required for simulation');
106
+ }
107
+ return {
108
+ /**
109
+ * Simulate multiSend
110
+ * Returns gas estimate and result without sending transaction
111
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
112
+ */
113
+ async multiSend(transactions, options) {
114
+ return contract.simulate.multiSend([transactions], options);
115
+ }
116
+ };
117
+ }
118
+ /**
119
+ * Watch contract events
120
+ *
121
+ * Note: This contract has no events, so watch returns an empty object.
122
+ */
123
+ get watch() {
124
+ return {};
125
+ }
126
+ }
127
+ exports.MultiSendCallOnly_json = MultiSendCallOnly_json;
@@ -0,0 +1,178 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * MultiSendCallOnly_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const MultiSendCallOnly_jsonAbi = [
10
+ {
11
+ "inputs": [
12
+ {
13
+ "internalType": "bytes",
14
+ "name": "transactions",
15
+ "type": "bytes"
16
+ }
17
+ ],
18
+ "name": "multiSend",
19
+ "outputs": [],
20
+ "stateMutability": "payable",
21
+ "type": "function"
22
+ }
23
+ ] as const satisfies Abi;
24
+
25
+ /**
26
+ * Type-safe ABI for MultiSendCallOnly_json
27
+ */
28
+ export type MultiSendCallOnly_jsonAbi = typeof MultiSendCallOnly_jsonAbi;
29
+
30
+ /**
31
+ * Contract instance type for MultiSendCallOnly_json
32
+ */
33
+ // Use any for contract type to avoid complex viem type issues
34
+ // The runtime behavior is type-safe through viem's ABI typing
35
+ export type MultiSendCallOnly_jsonContract = any;
36
+
37
+ /**
38
+ * MultiSendCallOnly_json Contract Class
39
+ *
40
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * import { createPublicClient, createWalletClient, http } from 'viem';
45
+ * import { mainnet } from 'viem/chains';
46
+ * import { MultiSendCallOnly_json } from 'MultiSendCallOnly_json';
47
+ *
48
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
49
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
50
+ *
51
+ * const contract = new MultiSendCallOnly_json('0x...', { publicClient, walletClient });
52
+ *
53
+ * // Read functions
54
+ * const result = await contract.balanceOf('0x...');
55
+ *
56
+ * // Write functions
57
+ * const hash = await contract.transfer('0x...', 1000n);
58
+ *
59
+ * // Simulate transactions (dry-run)
60
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
61
+ * console.log('Gas estimate:', simulation.request.gas);
62
+ *
63
+ * // Watch events
64
+ * const unwatch = contract.watch.Transfer((event) => {
65
+ * console.log('Transfer event:', event);
66
+ * });
67
+ * ```
68
+ */
69
+ export class MultiSendCallOnly_json {
70
+ private contract: MultiSendCallOnly_jsonContract;
71
+ private contractAddress: Address;
72
+ private publicClient: PublicClient;
73
+
74
+ constructor(
75
+ address: Address,
76
+ clients: {
77
+ publicClient: PublicClient;
78
+ walletClient?: WalletClient;
79
+ }
80
+ ) {
81
+ this.contractAddress = address;
82
+ this.publicClient = clients.publicClient;
83
+ this.contract = getContract({
84
+ address,
85
+ abi: MultiSendCallOnly_jsonAbi,
86
+ client: {
87
+ public: clients.publicClient,
88
+ wallet: clients.walletClient,
89
+ },
90
+ });
91
+ }
92
+
93
+ /**
94
+ * Get the contract address
95
+ */
96
+ get address(): Address {
97
+ return this.contractAddress;
98
+ }
99
+
100
+ /**
101
+ * Get the underlying viem contract instance
102
+ */
103
+ getContract(): MultiSendCallOnly_jsonContract {
104
+ return this.contract;
105
+ }
106
+
107
+ // No read functions
108
+
109
+ /**
110
+ * multiSend
111
+ * payable
112
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
113
+ */
114
+ async multiSend(transactions: `0x${string}`, options?: {
115
+ accessList?: import('viem').AccessList;
116
+ authorizationList?: import('viem').AuthorizationList;
117
+ chain?: import('viem').Chain | null;
118
+ dataSuffix?: `0x${string}`;
119
+ gas?: bigint;
120
+ gasPrice?: bigint;
121
+ maxFeePerGas?: bigint;
122
+ maxPriorityFeePerGas?: bigint;
123
+ nonce?: number;
124
+ value?: bigint;
125
+ }): Promise<`0x${string}`> {
126
+ if (!this.contract.write) {
127
+ throw new Error('Wallet client is required for write operations');
128
+ }
129
+ return this.contract.write.multiSend([transactions] as const, options) as Promise<`0x${string}`>;
130
+ }
131
+
132
+
133
+
134
+ /**
135
+ * Simulate contract write operations (dry-run without sending transaction)
136
+ *
137
+ * @example
138
+ * const result = await contract.simulate.transfer('0x...', 1000n);
139
+ * console.log('Gas estimate:', result.request.gas);
140
+ * console.log('Would succeed:', result.result);
141
+ */
142
+ get simulate() {
143
+ const contract = this.contract;
144
+ if (!contract.simulate) {
145
+ throw new Error('Public client is required for simulation');
146
+ }
147
+ return {
148
+ /**
149
+ * Simulate multiSend
150
+ * Returns gas estimate and result without sending transaction
151
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
152
+ */
153
+ async multiSend(transactions: `0x${string}`, options?: {
154
+ accessList?: import('viem').AccessList;
155
+ authorizationList?: import('viem').AuthorizationList;
156
+ chain?: import('viem').Chain | null;
157
+ dataSuffix?: `0x${string}`;
158
+ gas?: bigint;
159
+ gasPrice?: bigint;
160
+ maxFeePerGas?: bigint;
161
+ maxPriorityFeePerGas?: bigint;
162
+ nonce?: number;
163
+ value?: bigint;
164
+ }): Promise<void> {
165
+ return contract.simulate.multiSend([transactions] as const, options) as Promise<void>;
166
+ }
167
+ };
168
+ }
169
+
170
+ /**
171
+ * Watch contract events
172
+ *
173
+ * Note: This contract has no events, so watch returns an empty object.
174
+ */
175
+ get watch() {
176
+ return {};
177
+ }
178
+ }
@@ -0,0 +1,2 @@
1
+ export { MultiSendCallOnly_jsonAbi, MultiSendCallOnly_json } from './MultiSendCallOnly_json';
2
+ export type { MultiSendCallOnly_jsonAbi as MultiSendCallOnly_jsonAbiType, MultiSendCallOnly_jsonContract } from './MultiSendCallOnly_json';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MultiSendCallOnly_json = exports.MultiSendCallOnly_jsonAbi = void 0;
4
+ // Auto-generated exports for all contracts
5
+ var MultiSendCallOnly_json_1 = require("./MultiSendCallOnly_json");
6
+ Object.defineProperty(exports, "MultiSendCallOnly_jsonAbi", { enumerable: true, get: function () { return MultiSendCallOnly_json_1.MultiSendCallOnly_jsonAbi; } });
7
+ Object.defineProperty(exports, "MultiSendCallOnly_json", { enumerable: true, get: function () { return MultiSendCallOnly_json_1.MultiSendCallOnly_json; } });
@@ -0,0 +1,3 @@
1
+ // Auto-generated exports for all contracts
2
+ export { MultiSendCallOnly_jsonAbi, MultiSendCallOnly_json } from './MultiSendCallOnly_json';
3
+ export type { MultiSendCallOnly_jsonAbi as MultiSendCallOnly_jsonAbiType, MultiSendCallOnly_jsonContract } from './MultiSendCallOnly_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/multisendcallonly",
3
+ "version": "1.0.0",
4
+ "description": "Auto-generated TypeScript type bindings for MultiSendCallOnly (build etherscan-multisendcallonly-40a2accb-1786055904810, commit d52aef5, 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/multisendcallonly"
40
+ },
41
+ "branch": "etherscan",
42
+ "shortHash": "d52aef5"
43
+ }