File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { Job , Processor , Worker } from "bullmq" ;
2
+ import { BigNumber } from "ethers" ;
3
+ import { getContractAddress } from "ethers/lib/utils" ;
2
4
import superjson from "superjson" ;
3
5
import { toSerializableTransaction } from "thirdweb" ;
4
6
import { stringify } from "thirdweb/utils" ;
@@ -131,6 +133,18 @@ const _handleQueuedTransaction = async (
131
133
populatedTransaction ,
132
134
) ;
133
135
136
+ // Get the contract deployed Address when using deploy-published extension.
137
+ let deployedContractAddress : string | undefined ;
138
+ if (
139
+ queuedTransaction . extension === "deploy-published" &&
140
+ queuedTransaction . functionName === "deploy"
141
+ ) {
142
+ deployedContractAddress = getContractAddress ( {
143
+ from : queuedTransaction . from ,
144
+ nonce : BigNumber . from ( populatedTransaction . nonce ! ) ,
145
+ } ) ;
146
+ }
147
+
134
148
return {
135
149
...queuedTransaction ,
136
150
status : "sent" ,
@@ -144,6 +158,7 @@ const _handleQueuedTransaction = async (
144
158
gasPrice : populatedTransaction . gasPrice ,
145
159
maxFeePerGas : populatedTransaction . maxFeePerGas ,
146
160
maxPriorityFeePerGas : populatedTransaction . maxPriorityFeePerGas ,
161
+ deployedContractAddress,
147
162
} ;
148
163
} ;
149
164
You can’t perform that action at this time.
0 commit comments