@rocketh/deploy 0.10.12 → 0.11.2
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 +1 -1
- package/dist/index.d.ts +8 -309
- package/dist/index.d.ts.map +1 -0
- package/dist/{esm/index.js → index.js} +22 -146
- package/dist/index.js.map +1 -0
- package/package.json +14 -14
- package/dist/esm/index.d.ts +0 -38
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/index.cjs +0 -351
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs +0 -349
- package/dist/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# rocketh
|
|
1
|
+
# @rocketh/deploy
|
package/dist/index.d.ts
CHANGED
|
@@ -1,316 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface Register {
|
|
5
|
-
}
|
|
6
|
-
type ResolvedRegister = {
|
|
7
|
-
/**
|
|
8
|
-
* TypeScript type to use for `address` values
|
|
9
|
-
* @default `0x${string}`
|
|
10
|
-
*/
|
|
11
|
-
addressType: Register extends {
|
|
12
|
-
addressType: infer type;
|
|
13
|
-
} ? type : Register extends {
|
|
14
|
-
AddressType: infer type;
|
|
15
|
-
} ? type : DefaultRegister['addressType'];
|
|
16
|
-
/**
|
|
17
|
-
* TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48`
|
|
18
|
-
* @default bigint
|
|
19
|
-
*/
|
|
20
|
-
bigIntType: Register extends {
|
|
21
|
-
bigIntType: infer type;
|
|
22
|
-
} ? type : Register extends {
|
|
23
|
-
BigIntType: infer type;
|
|
24
|
-
} ? type : DefaultRegister['bigIntType'];
|
|
25
|
-
/**
|
|
26
|
-
* TypeScript type to use for `bytes` values
|
|
27
|
-
* @default { inputs: `0x${string}`; outputs: `0x${string}`; }
|
|
28
|
-
*/
|
|
29
|
-
bytesType: Register extends {
|
|
30
|
-
bytesType: infer type extends {
|
|
31
|
-
inputs: unknown;
|
|
32
|
-
outputs: unknown;
|
|
33
|
-
};
|
|
34
|
-
} ? type : Register extends {
|
|
35
|
-
BytesType: infer type extends {
|
|
36
|
-
inputs: unknown;
|
|
37
|
-
outputs: unknown;
|
|
38
|
-
};
|
|
39
|
-
} ? type : DefaultRegister['bytesType'];
|
|
40
|
-
/**
|
|
41
|
-
* TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48`
|
|
42
|
-
* @default number
|
|
43
|
-
*/
|
|
44
|
-
intType: Register extends {
|
|
45
|
-
intType: infer type;
|
|
46
|
-
} ? type : Register extends {
|
|
47
|
-
IntType: infer type;
|
|
48
|
-
} ? type : DefaultRegister['intType'];
|
|
49
|
-
/**
|
|
50
|
-
* Maximum depth for nested array types (e.g. string[][])
|
|
51
|
-
*
|
|
52
|
-
* Note: You probably only want to set this to a specific number if parsed types are returning as `unknown`
|
|
53
|
-
* and you want to figure out why. If you set this, you should probably also reduce `FixedArrayMaxLength`.
|
|
54
|
-
*
|
|
55
|
-
* @default false
|
|
56
|
-
*/
|
|
57
|
-
arrayMaxDepth: Register extends {
|
|
58
|
-
arrayMaxDepth: infer type extends number | false;
|
|
59
|
-
} ? type : Register extends {
|
|
60
|
-
ArrayMaxDepth: infer type extends number | false;
|
|
61
|
-
} ? type : DefaultRegister['arrayMaxDepth'];
|
|
62
|
-
/**
|
|
63
|
-
* Lower bound for fixed array length
|
|
64
|
-
* @default 1
|
|
65
|
-
*/
|
|
66
|
-
fixedArrayMinLength: Register extends {
|
|
67
|
-
fixedArrayMinLength: infer type extends number;
|
|
68
|
-
} ? type : Register extends {
|
|
69
|
-
FixedArrayMinLength: infer type extends number;
|
|
70
|
-
} ? type : DefaultRegister['fixedArrayMinLength'];
|
|
71
|
-
/**
|
|
72
|
-
* Upper bound for fixed array length
|
|
73
|
-
* @default 99
|
|
74
|
-
*/
|
|
75
|
-
fixedArrayMaxLength: Register extends {
|
|
76
|
-
fixedArrayMaxLength: infer type extends number;
|
|
77
|
-
} ? type : Register extends {
|
|
78
|
-
FixedArrayMaxLength: infer type extends number;
|
|
79
|
-
} ? type : DefaultRegister['fixedArrayMaxLength'];
|
|
80
|
-
/**
|
|
81
|
-
* When set, validates {@link AbiParameter}'s `type` against {@link AbiType}
|
|
82
|
-
*
|
|
83
|
-
* Note: You probably only want to set this to `true` if parsed types are returning as `unknown`
|
|
84
|
-
* and you want to figure out why.
|
|
85
|
-
*
|
|
86
|
-
* @default false
|
|
87
|
-
*/
|
|
88
|
-
strictAbiType: Register extends {
|
|
89
|
-
strictAbiType: infer type extends boolean;
|
|
90
|
-
} ? type : Register extends {
|
|
91
|
-
StrictAbiType: infer type extends boolean;
|
|
92
|
-
} ? type : DefaultRegister['strictAbiType'];
|
|
93
|
-
/** @deprecated Use `addressType` instead */
|
|
94
|
-
AddressType: ResolvedRegister['addressType'];
|
|
95
|
-
/** @deprecated Use `addressType` instead */
|
|
96
|
-
BigIntType: ResolvedRegister['bigIntType'];
|
|
97
|
-
/** @deprecated Use `bytesType` instead */
|
|
98
|
-
BytesType: ResolvedRegister['bytesType'];
|
|
99
|
-
/** @deprecated Use `intType` instead */
|
|
100
|
-
IntType: ResolvedRegister['intType'];
|
|
101
|
-
/** @deprecated Use `arrayMaxDepth` instead */
|
|
102
|
-
ArrayMaxDepth: ResolvedRegister['arrayMaxDepth'];
|
|
103
|
-
/** @deprecated Use `fixedArrayMinLength` instead */
|
|
104
|
-
FixedArrayMinLength: ResolvedRegister['fixedArrayMinLength'];
|
|
105
|
-
/** @deprecated Use `fixedArrayMaxLength` instead */
|
|
106
|
-
FixedArrayMaxLength: ResolvedRegister['fixedArrayMaxLength'];
|
|
107
|
-
/** @deprecated Use `strictAbiType` instead */
|
|
108
|
-
StrictAbiType: ResolvedRegister['strictAbiType'];
|
|
109
|
-
};
|
|
110
|
-
type DefaultRegister = {
|
|
111
|
-
/** Maximum depth for nested array types (e.g. string[][]) */
|
|
112
|
-
arrayMaxDepth: false;
|
|
113
|
-
/** Lower bound for fixed array length */
|
|
114
|
-
fixedArrayMinLength: 1;
|
|
115
|
-
/** Upper bound for fixed array length */
|
|
116
|
-
fixedArrayMaxLength: 99;
|
|
117
|
-
/** TypeScript type to use for `address` values */
|
|
118
|
-
addressType: `0x${string}`;
|
|
119
|
-
/** TypeScript type to use for `bytes` values */
|
|
120
|
-
bytesType: {
|
|
121
|
-
/** TypeScript type to use for `bytes` input values */
|
|
122
|
-
inputs: `0x${string}`;
|
|
123
|
-
/** TypeScript type to use for `bytes` output values */
|
|
124
|
-
outputs: `0x${string}`;
|
|
125
|
-
};
|
|
126
|
-
/** TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48` */
|
|
127
|
-
bigIntType: bigint;
|
|
128
|
-
/** TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48` */
|
|
129
|
-
intType: number;
|
|
130
|
-
/** When set, validates {@link AbiParameter}'s `type` against {@link AbiType} */
|
|
131
|
-
strictAbiType: false;
|
|
132
|
-
/** @deprecated Use `arrayMaxDepth` instead */
|
|
133
|
-
ArrayMaxDepth: DefaultRegister['arrayMaxDepth'];
|
|
134
|
-
/** @deprecated Use `fixedArrayMinLength` instead */
|
|
135
|
-
FixedArrayMinLength: DefaultRegister['fixedArrayMinLength'];
|
|
136
|
-
/** @deprecated Use `fixedArrayMaxLength` instead */
|
|
137
|
-
FixedArrayMaxLength: DefaultRegister['fixedArrayMaxLength'];
|
|
138
|
-
/** @deprecated Use `addressType` instead */
|
|
139
|
-
AddressType: DefaultRegister['addressType'];
|
|
140
|
-
/** @deprecated Use `bytesType` instead */
|
|
141
|
-
BytesType: {
|
|
142
|
-
inputs: DefaultRegister['bytesType']['inputs'];
|
|
143
|
-
outputs: DefaultRegister['bytesType']['outputs'];
|
|
144
|
-
};
|
|
145
|
-
/** @deprecated Use `bigIntType` instead */
|
|
146
|
-
BigIntType: DefaultRegister['bigIntType'];
|
|
147
|
-
/** @deprecated Use `intType` instead */
|
|
148
|
-
IntType: DefaultRegister['intType'];
|
|
149
|
-
/** @deprecated Use `strictAbiType` instead */
|
|
150
|
-
StrictAbiType: DefaultRegister['strictAbiType'];
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Combines members of an intersection into a readable type.
|
|
155
|
-
*
|
|
156
|
-
* @link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg
|
|
157
|
-
* @example
|
|
158
|
-
* type Result = Pretty<{ a: string } | { b: string } | { c: number, d: bigint }>
|
|
159
|
-
* // ^? type Result = { a: string; b: string; c: number; d: bigint }
|
|
160
|
-
*/
|
|
161
|
-
type Pretty<type> = {
|
|
162
|
-
[key in keyof type]: type[key];
|
|
163
|
-
} & unknown;
|
|
164
|
-
/**
|
|
165
|
-
* Creates range between two positive numbers using [tail recursion](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#tail-recursion-elimination-on-conditional-types).
|
|
166
|
-
*
|
|
167
|
-
* @param start - Number to start range
|
|
168
|
-
* @param stop - Number to end range
|
|
169
|
-
* @returns Array with inclusive range from {@link start} to {@link stop}
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* type Result = Range<1, 3>
|
|
173
|
-
* // ^? type Result = [1, 2, 3]
|
|
174
|
-
*/
|
|
175
|
-
type Range<start extends number, stop extends number, result extends number[] = [], padding extends 0[] = [], current extends number = [...padding, ...result]['length'] & number> = current extends stop ? current extends start ? [current] : result extends [] ? [] : [...result, current] : current extends start ? Range<start, stop, [current], padding> : result extends [] ? Range<start, stop, [], [...padding, 0]> : Range<start, stop, [...result, current], padding>;
|
|
176
|
-
|
|
177
|
-
type MBytes = '' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32;
|
|
178
|
-
type MBits = '' | 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 | 160 | 168 | 176 | 184 | 192 | 200 | 208 | 216 | 224 | 232 | 240 | 248 | 256;
|
|
179
|
-
type SolidityAddress = 'address';
|
|
180
|
-
type SolidityBool = 'bool';
|
|
181
|
-
type SolidityBytes = `bytes${MBytes}`;
|
|
182
|
-
type SolidityFunction = 'function';
|
|
183
|
-
type SolidityString = 'string';
|
|
184
|
-
type SolidityTuple = 'tuple';
|
|
185
|
-
type SolidityInt = `${'u' | ''}int${MBits}`;
|
|
186
|
-
type SolidityFixedArrayRange = Range<ResolvedRegister['fixedArrayMinLength'], ResolvedRegister['fixedArrayMaxLength']>[number];
|
|
187
|
-
/**
|
|
188
|
-
* Recursively build arrays up to maximum depth
|
|
189
|
-
* or use a more broad type when maximum depth is switched "off"
|
|
190
|
-
*/
|
|
191
|
-
type _BuildArrayTypes<T extends string, Depth extends readonly number[] = []> = ResolvedRegister['arrayMaxDepth'] extends false ? `${T}[${string}]` : Depth['length'] extends ResolvedRegister['arrayMaxDepth'] ? T : T extends `${any}[${SolidityFixedArrayRange | ''}]` ? _BuildArrayTypes<T | `${T}[${SolidityFixedArrayRange | ''}]`, [
|
|
192
|
-
...Depth,
|
|
193
|
-
1
|
|
194
|
-
]> : _BuildArrayTypes<`${T}[${SolidityFixedArrayRange | ''}]`, [...Depth, 1]>;
|
|
195
|
-
type SolidityArrayWithoutTuple = _BuildArrayTypes<SolidityAddress | SolidityBool | SolidityBytes | SolidityFunction | SolidityInt | SolidityString>;
|
|
196
|
-
type SolidityArrayWithTuple = _BuildArrayTypes<SolidityTuple>;
|
|
197
|
-
type SolidityArray = SolidityArrayWithoutTuple | SolidityArrayWithTuple;
|
|
198
|
-
type AbiType = SolidityArray | SolidityAddress | SolidityBool | SolidityBytes | SolidityFunction | SolidityInt | SolidityString | SolidityTuple;
|
|
199
|
-
type ResolvedAbiType = ResolvedRegister['strictAbiType'] extends true ? AbiType : string;
|
|
200
|
-
type AbiInternalType = ResolvedAbiType | `address ${string}` | `contract ${string}` | `enum ${string}` | `struct ${string}`;
|
|
201
|
-
type AbiParameter = Pretty<{
|
|
202
|
-
type: ResolvedAbiType;
|
|
203
|
-
name?: string | undefined;
|
|
204
|
-
/** Representation used by Solidity compiler */
|
|
205
|
-
internalType?: AbiInternalType | undefined;
|
|
206
|
-
} & ({
|
|
207
|
-
type: Exclude<ResolvedAbiType, SolidityTuple | SolidityArrayWithTuple>;
|
|
208
|
-
} | {
|
|
209
|
-
type: SolidityTuple | SolidityArrayWithTuple;
|
|
210
|
-
components: readonly AbiParameter[];
|
|
211
|
-
})>;
|
|
212
|
-
type AbiEventParameter = AbiParameter & {
|
|
213
|
-
indexed?: boolean | undefined;
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* State mutability for {@link AbiFunction}
|
|
217
|
-
*
|
|
218
|
-
* @see https://docs.soliditylang.org/en/latest/contracts.html#state-mutability
|
|
219
|
-
*/
|
|
220
|
-
type AbiStateMutability = 'pure' | 'view' | 'nonpayable' | 'payable';
|
|
221
|
-
/** ABI ["function"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */
|
|
222
|
-
type AbiFunction = {
|
|
223
|
-
type: 'function';
|
|
224
|
-
/**
|
|
225
|
-
* @deprecated use `pure` or `view` from {@link AbiStateMutability} instead
|
|
226
|
-
* @see https://github.com/ethereum/solidity/issues/992
|
|
227
|
-
*/
|
|
228
|
-
constant?: boolean | undefined;
|
|
229
|
-
/**
|
|
230
|
-
* @deprecated Vyper used to provide gas estimates
|
|
231
|
-
* @see https://github.com/vyperlang/vyper/issues/2151
|
|
232
|
-
*/
|
|
233
|
-
gas?: number | undefined;
|
|
234
|
-
inputs: readonly AbiParameter[];
|
|
235
|
-
name: string;
|
|
236
|
-
outputs: readonly AbiParameter[];
|
|
237
|
-
/**
|
|
238
|
-
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
|
|
239
|
-
* @see https://github.com/ethereum/solidity/issues/992
|
|
240
|
-
*/
|
|
241
|
-
payable?: boolean | undefined;
|
|
242
|
-
stateMutability: AbiStateMutability;
|
|
243
|
-
};
|
|
244
|
-
/** ABI ["constructor"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */
|
|
245
|
-
type AbiConstructor = {
|
|
246
|
-
type: 'constructor';
|
|
247
|
-
inputs: readonly AbiParameter[];
|
|
248
|
-
/**
|
|
249
|
-
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
|
|
250
|
-
* @see https://github.com/ethereum/solidity/issues/992
|
|
251
|
-
*/
|
|
252
|
-
payable?: boolean | undefined;
|
|
253
|
-
stateMutability: Extract<AbiStateMutability, 'payable' | 'nonpayable'>;
|
|
254
|
-
};
|
|
255
|
-
/** ABI ["fallback"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */
|
|
256
|
-
type AbiFallback = {
|
|
257
|
-
type: 'fallback';
|
|
258
|
-
inputs?: readonly [] | undefined;
|
|
259
|
-
/**
|
|
260
|
-
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
|
|
261
|
-
* @see https://github.com/ethereum/solidity/issues/992
|
|
262
|
-
*/
|
|
263
|
-
payable?: boolean | undefined;
|
|
264
|
-
stateMutability: Extract<AbiStateMutability, 'payable' | 'nonpayable'>;
|
|
265
|
-
};
|
|
266
|
-
/** ABI ["receive"](https://docs.soliditylang.org/en/latest/contracts.html#receive-ether-function) type */
|
|
267
|
-
type AbiReceive = {
|
|
268
|
-
type: 'receive';
|
|
269
|
-
stateMutability: Extract<AbiStateMutability, 'payable'>;
|
|
270
|
-
};
|
|
271
|
-
/** ABI ["event"](https://docs.soliditylang.org/en/latest/abi-spec.html#events) type */
|
|
272
|
-
type AbiEvent = {
|
|
273
|
-
type: 'event';
|
|
274
|
-
anonymous?: boolean | undefined;
|
|
275
|
-
inputs: readonly AbiEventParameter[];
|
|
276
|
-
name: string;
|
|
277
|
-
};
|
|
278
|
-
/** ABI ["error"](https://docs.soliditylang.org/en/latest/abi-spec.html#errors) type */
|
|
279
|
-
type AbiError = {
|
|
280
|
-
type: 'error';
|
|
281
|
-
inputs: readonly AbiParameter[];
|
|
282
|
-
name: string;
|
|
283
|
-
};
|
|
284
|
-
/**
|
|
285
|
-
* Contract [ABI Specification](https://docs.soliditylang.org/en/latest/abi-spec.html#json)
|
|
286
|
-
*/
|
|
287
|
-
type Abi = readonly (AbiConstructor | AbiError | AbiEvent | AbiFallback | AbiFunction | AbiReceive)[];
|
|
288
|
-
|
|
289
|
-
type EIP1193DATA = `0x${string}`;
|
|
290
|
-
|
|
1
|
+
import { Abi } from 'abitype';
|
|
2
|
+
import type { DeploymentConstruction, Deployment } from 'rocketh';
|
|
3
|
+
import { Address, Chain } from 'viem';
|
|
291
4
|
declare module 'rocketh' {
|
|
292
5
|
interface Environment {
|
|
293
6
|
deploy: DeployFunction;
|
|
294
|
-
execute: ExecuteFunction;
|
|
295
|
-
read: ReadFunction;
|
|
296
|
-
executeByName: ExecuteFunctionByName;
|
|
297
|
-
readByName: ReadFunctionByName;
|
|
298
7
|
}
|
|
299
8
|
}
|
|
300
|
-
type
|
|
301
|
-
|
|
302
|
-
}>;
|
|
303
|
-
type ExecuteFunction = <TAbi extends Abi, TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName> = ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>>(deployment: Deployment<TAbi>, args: ExecutionArgs<TAbi, TFunctionName, TArgs>) => Promise<EIP1193DATA>;
|
|
304
|
-
type ExecuteFunctionByName = <TAbi extends Abi, TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName> = ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>>(name: string, args: ExecutionArgs<TAbi, TFunctionName, TArgs>) => Promise<EIP1193DATA>;
|
|
305
|
-
type ReadFunction = <TAbi extends Abi, TFunctionName extends ContractFunctionName<TAbi, 'pure' | 'view'>, TArgs extends ContractFunctionArgs<TAbi, 'pure' | 'view', TFunctionName> = ContractFunctionArgs<TAbi, 'pure' | 'view', TFunctionName>>(deployment: Deployment<TAbi>, args: ReadingArgs<TAbi, TFunctionName, TArgs>) => Promise<DecodeFunctionResultReturnType<TAbi, TFunctionName>>;
|
|
306
|
-
type ReadFunctionByName = <TAbi extends Abi, TFunctionName extends ContractFunctionName<TAbi, 'pure' | 'view'>, TArgs extends ContractFunctionArgs<TAbi, 'pure' | 'view', TFunctionName> = ContractFunctionArgs<TAbi, 'pure' | 'view', TFunctionName>>(name: string, args: ReadingArgs<TAbi, TFunctionName, TArgs>) => Promise<DecodeFunctionResultReturnType<TAbi, TFunctionName>>;
|
|
307
|
-
type ExecutionArgs<TAbi extends Abi, TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName> = ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>> = Omit<WriteContractParameters<TAbi, TFunctionName, TArgs>, 'address' | 'abi' | 'account' | 'nonce' | 'chain'> & {
|
|
308
|
-
account: string;
|
|
309
|
-
};
|
|
310
|
-
type ReadingArgs<TAbi extends Abi, TFunctionName extends ContractFunctionName<TAbi, 'pure' | 'view'>, TArgs extends ContractFunctionArgs<TAbi, 'pure' | 'view', TFunctionName> = ContractFunctionArgs<TAbi, 'pure' | 'view', TFunctionName>> = Omit<ReadContractParameters<TAbi, TFunctionName, TArgs>, 'address' | 'abi' | 'account' | 'nonce'> & {
|
|
311
|
-
account?: string;
|
|
9
|
+
export type DeployResult<TAbi extends Abi> = Deployment<TAbi> & {
|
|
10
|
+
newlyDeployed: boolean;
|
|
312
11
|
};
|
|
313
|
-
type
|
|
12
|
+
export type DeployFunction = <TAbi extends Abi, TChain extends Chain = Chain>(name: string, args: DeploymentConstruction<TAbi>, options?: DeployOptions) => Promise<DeployResult<TAbi>>;
|
|
13
|
+
export type DeployOptions = {
|
|
314
14
|
linkedData?: any;
|
|
315
15
|
deterministic?: boolean | `0x${string}`;
|
|
316
16
|
libraries?: {
|
|
@@ -321,5 +21,4 @@ type DeployOptions = {
|
|
|
321
21
|
} | {
|
|
322
22
|
alwaysOverride?: boolean;
|
|
323
23
|
});
|
|
324
|
-
|
|
325
|
-
export type { DeployFunction, DeployOptions, ExecuteFunction, ExecuteFunctionByName, ExecutionArgs, ReadFunction, ReadFunctionByName, ReadingArgs };
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,SAAS,CAAC;AAE5B,OAAO,KAAK,EAEX,sBAAsB,EACtB,UAAU,EAKV,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAC,OAAO,EAAE,KAAK,EAA0B,MAAM,MAAM,CAAC;AAM7D,OAAO,QAAQ,SAAS,CAAC;IACxB,UAAU,WAAW;QACpB,MAAM,EAAE,cAAc,CAAC;KACvB;CACD;AAED,MAAM,MAAM,YAAY,CAAC,IAAI,SAAS,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG;IAAC,aAAa,EAAE,OAAO,CAAA;CAAC,CAAC;AAEzF,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,SAAS,GAAG,EAAE,MAAM,SAAS,KAAK,GAAG,KAAK,EAC3E,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,sBAAsB,CAAC,IAAI,CAAC,EAClC,OAAO,CAAC,EAAE,aAAa,KACnB,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAEjC,MAAM,MAAM,aAAa,GAAG;IAC3B,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;IACxC,SAAS,CAAC,EAAE;QAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAAC;CACtC,GAAG,CACD;IACA,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAC/B,GACD;IACA,cAAc,CAAC,EAAE,OAAO,CAAC;CACxB,CACH,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { extendEnvironment } from 'rocketh';
|
|
2
|
-
import {
|
|
2
|
+
import { encodePacked, keccak256 } from 'viem';
|
|
3
3
|
import { encodeDeployData } from 'viem';
|
|
4
4
|
import { logs } from 'named-logs';
|
|
5
|
-
const logger = logs('rocketh
|
|
5
|
+
const logger = logs('@rocketh/deploy');
|
|
6
6
|
async function broadcastTransaction(env, signer, params) {
|
|
7
7
|
if (signer.type === 'wallet' || signer.type === 'remote') {
|
|
8
8
|
return signer.signer.request({
|
|
9
9
|
method: 'eth_sendTransaction',
|
|
10
|
-
params,
|
|
10
|
+
params: params, // TODO fix eip-1193 ?,
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
@@ -70,143 +70,18 @@ function linkLibraries(artifact, libraries) {
|
|
|
70
70
|
return bytecode;
|
|
71
71
|
}
|
|
72
72
|
extendEnvironment((env) => {
|
|
73
|
-
async function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (account.startsWith('0x')) {
|
|
77
|
-
address = account;
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
if (env.namedAccounts) {
|
|
81
|
-
address = env.namedAccounts[account];
|
|
82
|
-
if (!address) {
|
|
83
|
-
throw new Error(`no address for ${account}`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new Error(`no accounts setup, cannot get address for ${account}`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
const artifactToUse = deployment;
|
|
91
|
-
const abi = artifactToUse.abi;
|
|
92
|
-
const calldata = encodeFunctionData({
|
|
93
|
-
abi,
|
|
94
|
-
functionName: viemArgs.functionName,
|
|
95
|
-
args: viemArgs.args,
|
|
96
|
-
});
|
|
97
|
-
const signer = env.addressSigners[address];
|
|
98
|
-
const txParam = {
|
|
99
|
-
to: deployment.address,
|
|
100
|
-
type: '0x2',
|
|
101
|
-
from: address,
|
|
102
|
-
chainId: `0x${env.network.chain.id.toString(16)}`,
|
|
103
|
-
data: calldata,
|
|
104
|
-
gas: viemArgs.gas && `0x${viemArgs.gas.toString(16)}`,
|
|
105
|
-
// gasPrice: viemArgs.gasPrice && `0x${viemArgs.gasPrice.toString(16)}` as `0x${string}`,
|
|
106
|
-
maxFeePerGas: viemArgs.maxFeePerGas && `0x${viemArgs.maxFeePerGas.toString(16)}`,
|
|
107
|
-
maxPriorityFeePerGas: viemArgs.maxPriorityFeePerGas && `0x${viemArgs.maxPriorityFeePerGas.toString(16)}`,
|
|
108
|
-
// nonce: viemArgs.nonce && (`0x${viemArgs.nonce.toString(16)}` as `0x${string}`),
|
|
109
|
-
};
|
|
110
|
-
if (viemArgs.value) {
|
|
111
|
-
txParam.value = `0x${viemArgs.value?.toString(16)}`;
|
|
112
|
-
}
|
|
113
|
-
let txHash;
|
|
114
|
-
if (signer.type === 'wallet' || signer.type === 'remote') {
|
|
115
|
-
txHash = await signer.signer.request({
|
|
116
|
-
method: 'eth_sendTransaction',
|
|
117
|
-
params: [txParam],
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
const rawTx = await signer.signer.request({
|
|
122
|
-
method: 'eth_signTransaction',
|
|
123
|
-
params: [txParam],
|
|
124
|
-
});
|
|
125
|
-
txHash = await env.network.provider.request({
|
|
126
|
-
method: 'eth_sendRawTransaction',
|
|
127
|
-
params: [rawTx],
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
const pendingExecution = {
|
|
131
|
-
type: 'execution',
|
|
132
|
-
transaction: { hash: txHash, origin: address },
|
|
133
|
-
// description, // TODO
|
|
134
|
-
// TODO we should have the nonce, except for wallet like metamask where it is not usre you get the nonce you start with
|
|
135
|
-
};
|
|
136
|
-
await env.savePendingExecution(pendingExecution);
|
|
137
|
-
return txHash;
|
|
138
|
-
}
|
|
139
|
-
async function executeByName(name, args) {
|
|
140
|
-
const deployment = env.getOrNull(name);
|
|
141
|
-
if (!deployment) {
|
|
142
|
-
throw new Error(`no deployment named ${name}`);
|
|
143
|
-
}
|
|
144
|
-
return execute(deployment, args);
|
|
145
|
-
}
|
|
146
|
-
async function read(deployment, args) {
|
|
147
|
-
const { account, ...viemArgs } = args;
|
|
148
|
-
let address;
|
|
149
|
-
if (account) {
|
|
150
|
-
if (account.startsWith('0x')) {
|
|
151
|
-
address = account;
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
if (env.namedAccounts) {
|
|
155
|
-
address = env.namedAccounts[account];
|
|
156
|
-
if (!address) {
|
|
157
|
-
throw new Error(`no address for ${account}`);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
throw new Error(`no accounts setup, cannot get address for ${account}`);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
const artifactToUse = deployment;
|
|
166
|
-
const abi = artifactToUse.abi;
|
|
167
|
-
const calldata = encodeFunctionData({
|
|
168
|
-
abi,
|
|
169
|
-
functionName: viemArgs.functionName,
|
|
170
|
-
args: viemArgs.args,
|
|
171
|
-
});
|
|
172
|
-
const result = (await env.network.provider.request({
|
|
173
|
-
method: 'eth_call',
|
|
174
|
-
params: [
|
|
175
|
-
{
|
|
176
|
-
to: deployment.address,
|
|
177
|
-
type: '0x2',
|
|
178
|
-
from: address,
|
|
179
|
-
chainId: `0x${env.network.chain.id.toString(16)}`,
|
|
180
|
-
data: calldata,
|
|
181
|
-
// value: `0x${viemArgs.value?.toString(16)}` as `0x${string}`,
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
}));
|
|
185
|
-
const parsed = decodeFunctionResult({
|
|
186
|
-
abi,
|
|
187
|
-
functionName: viemArgs.functionName,
|
|
188
|
-
data: result,
|
|
189
|
-
args: viemArgs.args,
|
|
190
|
-
});
|
|
191
|
-
return parsed;
|
|
192
|
-
}
|
|
193
|
-
async function readByName(name, args) {
|
|
194
|
-
const deployment = env.getOrNull(name);
|
|
195
|
-
if (!deployment) {
|
|
196
|
-
throw new Error(`no deployment named ${name}`);
|
|
197
|
-
}
|
|
198
|
-
return read(deployment, args);
|
|
199
|
-
}
|
|
200
|
-
async function deploy(name, args, options) {
|
|
73
|
+
async function deploy(name, // '' allow to not save it
|
|
74
|
+
args, options) {
|
|
75
|
+
const nameToDisplay = name || '<no name>';
|
|
201
76
|
const skipIfAlreadyDeployed = options && 'skipIfAlreadyDeployed' in options && options.skipIfAlreadyDeployed;
|
|
202
77
|
const allwaysOverride = options && 'allwaysOverride' in options && options.allwaysOverride;
|
|
203
78
|
if (allwaysOverride && skipIfAlreadyDeployed) {
|
|
204
79
|
throw new Error(`conflicting options: "allwaysOverride" and "skipIfAlreadyDeployed"`);
|
|
205
80
|
}
|
|
206
|
-
const existingDeployment = env.getOrNull(name);
|
|
81
|
+
const existingDeployment = name && env.getOrNull(name);
|
|
207
82
|
if (existingDeployment && skipIfAlreadyDeployed) {
|
|
208
|
-
logger.info(`deployment for ${
|
|
209
|
-
return { ...existingDeployment,
|
|
83
|
+
logger.info(`deployment for ${nameToDisplay} at ${existingDeployment.address}, skipIfAlreadyDeployed: true => we skip`);
|
|
84
|
+
return { ...existingDeployment, newlyDeployed: false };
|
|
210
85
|
}
|
|
211
86
|
const { account, artifact, ...viemArgs } = args;
|
|
212
87
|
let address;
|
|
@@ -237,7 +112,7 @@ extendEnvironment((env) => {
|
|
|
237
112
|
const calldata = encodeDeployData(argsToUse); // TODO any
|
|
238
113
|
const argsData = `0x${calldata.replace(bytecode, '')}`;
|
|
239
114
|
if (existingDeployment) {
|
|
240
|
-
logger.info(`existing deployment for ${
|
|
115
|
+
logger.info(`existing deployment for ${nameToDisplay} at ${existingDeployment.address}`);
|
|
241
116
|
}
|
|
242
117
|
if (existingDeployment && !allwaysOverride) {
|
|
243
118
|
const previousBytecode = existingDeployment.bytecode;
|
|
@@ -249,7 +124,7 @@ extendEnvironment((env) => {
|
|
|
249
124
|
const previousBytecodeWithoutCBOR = previousBytecode.slice(0, -cborLength * 2);
|
|
250
125
|
const newBytecodeWithoutCBOR = bytecode.slice(0, -cborLength * 2);
|
|
251
126
|
if (previousBytecodeWithoutCBOR === newBytecodeWithoutCBOR && previousArgsData === argsData) {
|
|
252
|
-
return { ...existingDeployment,
|
|
127
|
+
return { ...existingDeployment, newlyDeployed: false };
|
|
253
128
|
}
|
|
254
129
|
else {
|
|
255
130
|
// logger.info(`-------------- WITHOUT CBOR---------------------`);
|
|
@@ -343,11 +218,16 @@ extendEnvironment((env) => {
|
|
|
343
218
|
});
|
|
344
219
|
if (codeAlreadyDeployed !== '0x') {
|
|
345
220
|
env.showMessage(`contract was already deterministically deployed at ${expectedAddress}`);
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
221
|
+
if (name) {
|
|
222
|
+
const deployment = await env.save(name, {
|
|
223
|
+
address: expectedAddress,
|
|
224
|
+
...partialDeployment,
|
|
225
|
+
}, { doNotCountAsNewDeployment: true });
|
|
226
|
+
return { ...deployment, newlyDeployed: false };
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
return { address: expectedAddress, ...partialDeployment, newlyDeployed: false };
|
|
230
|
+
}
|
|
351
231
|
}
|
|
352
232
|
params[0].data = (salt + (bytecode.slice(2) || ''));
|
|
353
233
|
params[0].to = deterministicFactoryAddress;
|
|
@@ -362,13 +242,9 @@ extendEnvironment((env) => {
|
|
|
362
242
|
// TODO we should have the nonce, except for wallet like metamask where it is not usre you get the nonce you start with
|
|
363
243
|
};
|
|
364
244
|
const deployment = await env.savePendingDeployment(pendingDeployment);
|
|
365
|
-
return { ...deployment,
|
|
245
|
+
return { ...deployment, newlyDeployed: true };
|
|
366
246
|
}
|
|
367
247
|
env.deploy = deploy;
|
|
368
|
-
env.execute = execute;
|
|
369
|
-
env.executeByName = executeByName;
|
|
370
|
-
env.read = read;
|
|
371
|
-
env.readByName = readByName;
|
|
372
248
|
return env;
|
|
373
249
|
});
|
|
374
250
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAiB,YAAY,EAAE,SAAS,EAAC,MAAM,MAAM,CAAC;AAC7D,OAAO,EAAC,gBAAgB,EAAC,MAAM,MAAM,CAAC;AACtC,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAEhC,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,CAAC;AA6BvC,KAAK,UAAU,oBAAoB,CAClC,GAAgB,EAChB,MAAc,EACd,MAAgC;IAEhC,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC1D,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,qBAAqB;YAC7B,MAAM,EAAE,MAAa,EAAE,uBAAuB;SAC9C,CAAC,CAAC;IACJ,CAAC;SAAM,CAAC;QACP,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;YACzC,MAAM,EAAE,qBAAqB;YAC7B,MAAM;SACN,CAAC,CAAC;QAEH,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;YACnC,MAAM,EAAE,wBAAwB;YAChC,MAAM,EAAE,CAAC,KAAK,CAAC;SACf,CAAC,CAAC;IACJ,CAAC;A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,EACJ;wBACC,OAAO,EAAE,eAAe;wBACxB,GAAG,iBAAiB;qBACpB,EACD,EAAC,yBAAyB,EAAE,IAAI,EAAC,CACjC,CAAC;oBACF,OAAO,EAAC,GAAI,UAA+B,EAAE,aAAa,EAAE,KAAK,EAAC,CAAC;gBACpE,CAAC;qBAAM,CAAC;oBACP,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,GAAG,iBAAiB,EAAE,aAAa,EAAE,KAAK,EAAC,CAAC;gBAC/E,CAAC;YACF,CAAC;YAED,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAkB,CAAC;YACrE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,2BAA2B,CAAC;QAC5C,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAE/D,MAAM,iBAAiB,GAA4B;YAClD,IAAI,EAAE,YAAY;YAClB,eAAe;YACf,iBAAiB;YACjB,WAAW,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAC;YAC5C,IAAI;YACJ,uHAAuH;SACvH,CAAC;QACF,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;QACtE,OAAO,EAAC,GAAI,UAA+B,EAAE,aAAa,EAAE,IAAI,EAAC,CAAC;IACnE,CAAC;IAED,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC;IACpB,OAAO,GAAG,CAAC;AACZ,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocketh/deploy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "provide deploy function for rocketh",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"main": "dist/
|
|
10
|
-
"module": "dist/
|
|
11
|
-
"types": "dist/
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"module": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
12
|
".": {
|
|
13
13
|
"import": {
|
|
14
|
-
"types": "./dist/
|
|
15
|
-
"default": "./dist/
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"abitype": "^1.0.
|
|
22
|
+
"abitype": "^1.0.8",
|
|
23
23
|
"as-soon": "^0.0.11",
|
|
24
|
-
"eip-1193": "^0.
|
|
25
|
-
"rimraf": "^
|
|
26
|
-
"typescript": "^5.
|
|
27
|
-
"rocketh": "0.
|
|
24
|
+
"eip-1193": "^0.6.2",
|
|
25
|
+
"rimraf": "^6.0.1",
|
|
26
|
+
"typescript": "^5.8.2",
|
|
27
|
+
"rocketh": "0.11.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"rocketh": "0.
|
|
30
|
+
"rocketh": "0.11.2"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"named-logs": "^0.2
|
|
34
|
-
"viem": "^2.
|
|
33
|
+
"named-logs": "^0.3.2",
|
|
34
|
+
"viem": "^2.23.10"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsc --project tsconfig.json",
|