@@ -63,7 +63,7 @@ func (crowdsale *Crowdsale) PackConstructor(ifSuccessfulSendTo common.Address, f
63
63
return enc
64
64
}
65
65
66
- // PackAmountRaised is the Go binding used to pack the parameters required for calling
66
+ // PackAmountRaised is the Go binding used to pack the parameters required for calling, will panic for any error.
67
67
// the contract method with ID 0x7b3e5e7b.
68
68
//
69
69
// Solidity: function amountRaised() returns(uint256)
@@ -75,6 +75,14 @@ func (crowdsale *Crowdsale) PackAmountRaised() []byte {
75
75
return enc
76
76
}
77
77
78
+ // PackAmountRaised is the Go binding used to pack the parameters required for calling, return error if it failed to pack.
79
+ // the contract method with ID 0x7b3e5e7b.
80
+ //
81
+ // Solidity: function amountRaised() returns(uint256)
82
+ func (crowdsale *Crowdsale) TryPackAmountRaised() ([]byte, error) {
83
+ return crowdsale.abi.Pack("amountRaised")
84
+ }
85
+
78
86
// UnpackAmountRaised is the Go binding that unpacks the parameters returned
79
87
// from invoking the contract method with ID 0x7b3e5e7b.
80
88
//
@@ -85,10 +93,10 @@ func (crowdsale *Crowdsale) UnpackAmountRaised(data []byte) (*big.Int, error) {
85
93
return new(big.Int), err
86
94
}
87
95
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
88
- return out0, err
96
+ return out0, nil
89
97
}
90
98
91
- // PackBeneficiary is the Go binding used to pack the parameters required for calling
99
+ // PackBeneficiary is the Go binding used to pack the parameters required for calling, will panic for any error.
92
100
// the contract method with ID 0x38af3eed.
93
101
//
94
102
// Solidity: function beneficiary() returns(address)
@@ -100,6 +108,14 @@ func (crowdsale *Crowdsale) PackBeneficiary() []byte {
100
108
return enc
101
109
}
102
110
111
+ // PackBeneficiary is the Go binding used to pack the parameters required for calling, return error if it failed to pack.
112
+ // the contract method with ID 0x38af3eed.
113
+ //
114
+ // Solidity: function beneficiary() returns(address)
115
+ func (crowdsale *Crowdsale) TryPackBeneficiary() ([]byte, error) {
116
+ return crowdsale.abi.Pack("beneficiary")
117
+ }
118
+
103
119
// UnpackBeneficiary is the Go binding that unpacks the parameters returned
104
120
// from invoking the contract method with ID 0x38af3eed.
105
121
//
@@ -110,10 +126,10 @@ func (crowdsale *Crowdsale) UnpackBeneficiary(data []byte) (common.Address, erro
110
126
return *new(common.Address), err
111
127
}
112
128
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
113
- return out0, err
129
+ return out0, nil
114
130
}
115
131
116
- // PackCheckGoalReached is the Go binding used to pack the parameters required for calling
132
+ // PackCheckGoalReached is the Go binding used to pack the parameters required for calling, will panic for any error.
117
133
// the contract method with ID 0x01cb3b20.
118
134
//
119
135
// Solidity: function checkGoalReached() returns()
@@ -125,7 +141,15 @@ func (crowdsale *Crowdsale) PackCheckGoalReached() []byte {
125
141
return enc
126
142
}
127
143
128
- // PackDeadline is the Go binding used to pack the parameters required for calling
144
+ // PackCheckGoalReached is the Go binding used to pack the parameters required for calling, return error if it failed to pack.
145
+ // the contract method with ID 0x01cb3b20.
146
+ //
147
+ // Solidity: function checkGoalReached() returns()
148
+ func (crowdsale *Crowdsale) TryPackCheckGoalReached() ([]byte, error) {
149
+ return crowdsale.abi.Pack("checkGoalReached")
150
+ }
151
+
152
+ // PackDeadline is the Go binding used to pack the parameters required for calling, will panic for any error.
129
153
// the contract method with ID 0x29dcb0cf.
130
154
//
131
155
// Solidity: function deadline() returns(uint256)
@@ -137,6 +161,14 @@ func (crowdsale *Crowdsale) PackDeadline() []byte {
137
161
return enc
138
162
}
139
163
164
+ // PackDeadline is the Go binding used to pack the parameters required for calling, return error if it failed to pack.
165
+ // the contract method with ID 0x29dcb0cf.
166
+ //
167
+ // Solidity: function deadline() returns(uint256)
168
+ func (crowdsale *Crowdsale) TryPackDeadline() ([]byte, error) {
169
+ return crowdsale.abi.Pack("deadline")
170
+ }
171
+
140
172
// UnpackDeadline is the Go binding that unpacks the parameters returned
141
173
// from invoking the contract method with ID 0x29dcb0cf.
142
174
//
@@ -147,10 +179,10 @@ func (crowdsale *Crowdsale) UnpackDeadline(data []byte) (*big.Int, error) {
147
179
return new(big.Int), err
148
180
}
149
181
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
150
- return out0, err
182
+ return out0, nil
151
183
}
152
184
153
- // PackFunders is the Go binding used to pack the parameters required for calling
185
+ // PackFunders is the Go binding used to pack the parameters required for calling, will panic for any error.
154
186
// the contract method with ID 0xdc0d3dff.
155
187
//
156
188
// Solidity: function funders(uint256 ) returns(address addr, uint256 amount)
@@ -162,6 +194,14 @@ func (crowdsale *Crowdsale) PackFunders(arg0 *big.Int) []byte {
162
194
return enc
163
195
}
164
196
197
+ // PackFunders is the Go binding used to pack the parameters required for calling, return error if it failed to pack.
198
+ // the contract method with ID 0xdc0d3dff.
199
+ //
200
+ // Solidity: function funders(uint256 ) returns(address addr, uint256 amount)
201
+ func (crowdsale *Crowdsale) TryPackFunders(arg0 *big.Int) ([]byte, error) {
202
+ return crowdsale.abi.Pack("funders", arg0)
203
+ }
204
+
165
205
// FundersOutput serves as a container for the return parameters of contract
166
206
// method Funders.
167
207
type FundersOutput struct {
@@ -173,19 +213,18 @@ type FundersOutput struct {
173
213
// from invoking the contract method with ID 0xdc0d3dff.
174
214
//
175
215
// Solidity: function funders(uint256 ) returns(address addr, uint256 amount)
176
- func (crowdsale *Crowdsale) UnpackFunders(data []byte) (FundersOutput, error) {
216
+ func (crowdsale *Crowdsale) UnpackFunders(data []byte) (* FundersOutput, error) {
177
217
out, err := crowdsale.abi.Unpack("funders", data)
178
- outstruct := new(FundersOutput)
179
218
if err != nil {
180
- return *outstruct , err
219
+ return nil , err
181
220
}
221
+ outstruct := new(FundersOutput)
182
222
outstruct.Addr = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
183
223
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
184
- return *outstruct, err
185
-
224
+ return outstruct, nil
186
225
}
187
226
188
- // PackFundingGoal is the Go binding used to pack the parameters required for calling
227
+ // PackFundingGoal is the Go binding used to pack the parameters required for calling, will panic for any error.
189
228
// the contract method with ID 0x7a3a0e84.
190
229
//
191
230
// Solidity: function fundingGoal() returns(uint256)
@@ -197,6 +236,14 @@ func (crowdsale *Crowdsale) PackFundingGoal() []byte {
197
236
return enc
198
237
}
199
238
239
+ // PackFundingGoal is the Go binding used to pack the parameters required for calling, return error if it failed to pack.
240
+ // the contract method with ID 0x7a3a0e84.
241
+ //
242
+ // Solidity: function fundingGoal() returns(uint256)
243
+ func (crowdsale *Crowdsale) TryPackFundingGoal() ([]byte, error) {
244
+ return crowdsale.abi.Pack("fundingGoal")
245
+ }
246
+
200
247
// UnpackFundingGoal is the Go binding that unpacks the parameters returned
201
248
// from invoking the contract method with ID 0x7a3a0e84.
202
249
//
@@ -207,10 +254,10 @@ func (crowdsale *Crowdsale) UnpackFundingGoal(data []byte) (*big.Int, error) {
207
254
return new(big.Int), err
208
255
}
209
256
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
210
- return out0, err
257
+ return out0, nil
211
258
}
212
259
213
- // PackPrice is the Go binding used to pack the parameters required for calling
260
+ // PackPrice is the Go binding used to pack the parameters required for calling, will panic for any error.
214
261
// the contract method with ID 0xa035b1fe.
215
262
//
216
263
// Solidity: function price() returns(uint256)
@@ -222,6 +269,14 @@ func (crowdsale *Crowdsale) PackPrice() []byte {
222
269
return enc
223
270
}
224
271
272
+ // PackPrice is the Go binding used to pack the parameters required for calling, return error if it failed to pack.
273
+ // the contract method with ID 0xa035b1fe.
274
+ //
275
+ // Solidity: function price() returns(uint256)
276
+ func (crowdsale *Crowdsale) TryPackPrice() ([]byte, error) {
277
+ return crowdsale.abi.Pack("price")
278
+ }
279
+
225
280
// UnpackPrice is the Go binding that unpacks the parameters returned
226
281
// from invoking the contract method with ID 0xa035b1fe.
227
282
//
@@ -232,10 +287,10 @@ func (crowdsale *Crowdsale) UnpackPrice(data []byte) (*big.Int, error) {
232
287
return new(big.Int), err
233
288
}
234
289
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
235
- return out0, err
290
+ return out0, nil
236
291
}
237
292
238
- // PackTokenReward is the Go binding used to pack the parameters required for calling
293
+ // PackTokenReward is the Go binding used to pack the parameters required for calling, will panic for any error.
239
294
// the contract method with ID 0x6e66f6e9.
240
295
//
241
296
// Solidity: function tokenReward() returns(address)
@@ -247,6 +302,14 @@ func (crowdsale *Crowdsale) PackTokenReward() []byte {
247
302
return enc
248
303
}
249
304
305
+ // PackTokenReward is the Go binding used to pack the parameters required for calling, return error if it failed to pack.
306
+ // the contract method with ID 0x6e66f6e9.
307
+ //
308
+ // Solidity: function tokenReward() returns(address)
309
+ func (crowdsale *Crowdsale) TryPackTokenReward() ([]byte, error) {
310
+ return crowdsale.abi.Pack("tokenReward")
311
+ }
312
+
250
313
// UnpackTokenReward is the Go binding that unpacks the parameters returned
251
314
// from invoking the contract method with ID 0x6e66f6e9.
252
315
//
@@ -257,7 +320,7 @@ func (crowdsale *Crowdsale) UnpackTokenReward(data []byte) (common.Address, erro
257
320
return *new(common.Address), err
258
321
}
259
322
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
260
- return out0, err
323
+ return out0, nil
261
324
}
262
325
263
326
// CrowdsaleFundTransfer represents a FundTransfer event raised by the Crowdsale contract.
0 commit comments