1
1
const testCases = < String , String > {
2
- '''
2
+ r '''
3
3
[
4
4
{
5
5
"inputs": [
@@ -35,7 +35,7 @@ const testCases = <String, String>{
35
35
"stateMutability": "pure",
36
36
"type": "function"
37
37
}
38
- ]''' : '''
38
+ ]''' : r '''
39
39
// Generated code, do not modify. Run `build_runner build` to re-generate!
40
40
// @dart=2.12
41
41
import 'package:web3dart/web3dart.dart' as _i1;
@@ -76,7 +76,7 @@ class Retrieve3 {
76
76
final bool var3;
77
77
}
78
78
''' ,
79
- '''
79
+ r '''
80
80
[
81
81
{
82
82
"inputs": [],
@@ -127,7 +127,7 @@ class Retrieve3 {
127
127
"stateMutability": "nonpayable",
128
128
"type": "function"
129
129
}
130
- ]''' : '''
130
+ ]''' : r '''
131
131
// Generated code, do not modify. Run `build_runner build` to re-generate!
132
132
// @dart=2.12
133
133
import 'package:web3dart/web3dart.dart' as _i1;
@@ -188,7 +188,56 @@ class GiveMeHello {
188
188
final BigInt num2;
189
189
}
190
190
''' ,
191
- '''
191
+ r'''
192
+ [
193
+ {
194
+ "inputs": [
195
+ {
196
+ "internalType": "address",
197
+ "name": "",
198
+ "type": "address"
199
+ }
200
+ ],
201
+ "name": "userTotalAmount",
202
+ "outputs": [
203
+ {
204
+ "internalType": "uint256",
205
+ "name": "",
206
+ "type": "uint256"
207
+ }
208
+ ],
209
+ "stateMutability": "view",
210
+ "type": "function"
211
+ }
212
+ ]''' : r'''
213
+ // Generated code, do not modify. Run `build_runner build` to re-generate!
214
+ // @dart=2.12
215
+ import 'package:web3dart/web3dart.dart' as _i1;
216
+
217
+ final _contractAbi = _i1.ContractAbi.fromJson(
218
+ '[{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userTotalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]',
219
+ 'Contract');
220
+
221
+ class Contract extends _i1.GeneratedContract {
222
+ Contract(
223
+ {required _i1.EthereumAddress address,
224
+ required _i1.Web3Client client,
225
+ int? chainId})
226
+ : super(_i1.DeployedContract(_contractAbi, address), client, chainId);
227
+
228
+ /// The optional [atBlock] parameter can be used to view historical data. When
229
+ /// set, the function will be evaluated in the specified block. By default, the
230
+ /// latest on-chain block will be used.
231
+ Future<BigInt> userTotalAmount(_i1.EthereumAddress $param0,
232
+ {_i1.BlockNum? atBlock}) async {
233
+ final function = self.function('userTotalAmount');
234
+ final params = [$param0];
235
+ final response = await read(function, params, atBlock);
236
+ return (response[0] as BigInt);
237
+ }
238
+ }
239
+ ''' ,
240
+ r'''
192
241
[
193
242
{
194
243
"payable": true,
@@ -199,7 +248,7 @@ class GiveMeHello {
199
248
"stateMutability":"payable",
200
249
"type":"receive"
201
250
}
202
- ]''' : '''
251
+ ]''' : r '''
203
252
// Generated code, do not modify. Run `build_runner build` to re-generate!
204
253
// @dart=2.12
205
254
import 'package:web3dart/web3dart.dart' as _i1;
@@ -216,7 +265,7 @@ class Contract extends _i1.GeneratedContract {
216
265
: super(_i1.DeployedContract(_contractAbi, address), client, chainId);
217
266
}
218
267
''' ,
219
- '''
268
+ r '''
220
269
[
221
270
{
222
271
"inputs": [],
@@ -231,7 +280,7 @@ class Contract extends _i1.GeneratedContract {
231
280
"stateMutability": "view",
232
281
"type": "function"
233
282
}
234
- ]''' : '''
283
+ ]''' : r '''
235
284
// Generated code, do not modify. Run `build_runner build` to re-generate!
236
285
// @dart=2.12
237
286
import 'package:web3dart/web3dart.dart' as _i1;
@@ -264,15 +313,15 @@ class Contract extends _i1.GeneratedContract {
264
313
}
265
314
}
266
315
''' ,
267
- '''
316
+ r '''
268
317
{
269
318
"abi": [],
270
319
"devdoc": {
271
320
"kind": "dev",
272
321
"methods": {},
273
322
"version": 1
274
323
}
275
- }''' : '''
324
+ }''' : r '''
276
325
// Generated code, do not modify. Run `build_runner build` to re-generate!
277
326
// @dart=2.12
278
327
import 'package:web3dart/web3dart.dart' as _i1;
0 commit comments