@@ -38,7 +38,8 @@ const claimManager = new ethers.Contract(
38
38
) as ClaimManagerV1 ;
39
39
40
40
const BountyCreatedFilter = openQ . filters . BountyCreated ( ) ;
41
-
41
+ const PayoutScheduleUpdatedFilter = openQ . filters . PayoutScheduleSet ( ) ;
42
+ const FundingGoalSetFilter = openQ . filters . FundingGoalSet ( ) ;
42
43
const SupportingDocumentsCompleteSetFilter =
43
44
openQ . filters . SupportingDocumentsCompleteSet ( ) ;
44
45
const TokenDepositReceivedFilter =
@@ -90,6 +91,72 @@ async function main() {
90
91
}
91
92
}
92
93
) ;
94
+ openQ . on (
95
+ FundingGoalSetFilter ,
96
+ async (
97
+ bountyAddress ,
98
+ fundingGoalTokenAddress ,
99
+ fundingGoalVolume ,
100
+ bountyType ,
101
+ data ,
102
+ version
103
+ ) => {
104
+ const headers = {
105
+ Authorization : process . env . OPENQ_API_SECRET ,
106
+ } ;
107
+
108
+ try {
109
+ const result = await axios . post (
110
+ `${ process . env . OPENQ_BOUNTY_ACTIONS_AUTOTASK_URL } ` ,
111
+
112
+ eventGenerator ( "FundingGoalSet" , {
113
+ bountyAddress,
114
+ fundingGoalTokenAddress,
115
+ fundingGoalVolume,
116
+ bountyType,
117
+ data,
118
+ version
119
+ } ) ,
120
+ { headers : headers as AxiosRequestHeaders }
121
+ ) ;
122
+ } catch ( error : any ) {
123
+ console . error ( error . response ) ;
124
+ }
125
+ }
126
+ ) ;
127
+ openQ . on (
128
+ PayoutScheduleUpdatedFilter ,
129
+ async (
130
+ bountyAddress ,
131
+ payoutTokenAddress ,
132
+ payoutSchedule ,
133
+ bountyType ,
134
+ data ,
135
+ version
136
+ ) => {
137
+ const headers = {
138
+ Authorization : process . env . OPENQ_API_SECRET ,
139
+ } ;
140
+
141
+ try {
142
+ const result = await axios . post (
143
+ `${ process . env . OPENQ_BOUNTY_ACTIONS_AUTOTASK_URL } ` ,
144
+
145
+ eventGenerator ( "PayoutScheduleUpdated" , {
146
+ bountyAddress,
147
+ payoutTokenAddress,
148
+ payoutSchedule,
149
+ bountyType,
150
+ data,
151
+ version,
152
+ } ) ,
153
+ { headers : headers as AxiosRequestHeaders }
154
+ ) ;
155
+ } catch ( error : any ) {
156
+ console . error ( error . response ) ;
157
+ }
158
+ }
159
+ ) ;
93
160
openQ . on (
94
161
SupportingDocumentsCompleteSetFilter ,
95
162
async ( bountyAddress , bountyType , data , version ) => {
@@ -110,7 +177,7 @@ async function main() {
110
177
{ headers : headers as AxiosRequestHeaders }
111
178
) ;
112
179
} catch ( error : any ) {
113
- console . log ( error , "early" )
180
+ console . log ( error , "early" ) ;
114
181
console . error ( error . response ) ;
115
182
}
116
183
}
0 commit comments