File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
packages/sdk/src/deployments/lib Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ yarn-error.log*
6
6
node_modules /
7
7
8
8
# Yarn
9
- .yarn /*
9
+ .yarn /
10
10
! .yarn /patches
11
11
! .yarn /releases
12
12
! .yarn /plugins
@@ -42,4 +42,4 @@ tx-*.log
42
42
addresses-fork.json
43
43
44
44
# Keys
45
- .keystore
45
+ .keystore
Original file line number Diff line number Diff line change @@ -103,10 +103,18 @@ export const deployContractAndSave: DeployAddressBookFunction = async (
103
103
args : args ,
104
104
} )
105
105
106
+ const constructorArgs = args . map ( ( e ) => {
107
+ if ( Array . isArray ( e ) ) {
108
+ return e . map ( ( e ) => e . toString ( ) )
109
+ } else {
110
+ return e . toString ( )
111
+ }
112
+ } )
113
+
106
114
// Save address entry
107
115
addressBook . setEntry ( name , {
108
116
address : deployResult . contract . address ,
109
- constructorArgs : args . length === 0 ? undefined : args . map ( ( e ) => e . toString ( ) ) ,
117
+ constructorArgs : constructorArgs ,
110
118
creationCodeHash : deployResult . creationCodeHash ,
111
119
runtimeCodeHash : deployResult . runtimeCodeHash ,
112
120
txHash : deployResult . txHash ,
Original file line number Diff line number Diff line change @@ -14,9 +14,11 @@ export type AddressBookJson<
14
14
ContractName extends string = string ,
15
15
> = Record < ChainId , Record < ContractName , AddressBookEntry > >
16
16
17
+ export type ConstructorArg = string | Array < string >
18
+
17
19
export type AddressBookEntry = {
18
20
address : string
19
- constructorArgs ?: Array < string >
21
+ constructorArgs ?: Array < ConstructorArg >
20
22
initArgs ?: Array < string >
21
23
proxy ?: boolean
22
24
implementation ?: AddressBookEntry
You can’t perform that action at this time.
0 commit comments