2023-03-23 18:19:51 +00:00
|
|
|
/// address : "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
|
|
|
|
/// blockNumber : 16484149
|
|
|
|
/// logIndex : 61
|
|
|
|
/// topics : ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000003a5cc8689d1b0cef2c317bc5c0ad6ce88b27d597","0x000000000000000000000000c5e81fc2401b8104966637d5334cbce92f01dbf7"]
|
|
|
|
/// data : "0x0000000000000000000000000000000000000000000000002dac1c4be587d800"
|
|
|
|
/// articulatedLog : {"name":"Transfer","inputs":{"_amount":"3291036540000000000","_from":"0x3a5cc8689d1b0cef2c317bc5c0ad6ce88b27d597","_to":"0xc5e81fc2401b8104966637d5334cbce92f01dbf7"}}
|
|
|
|
/// compressedLog : "{name:Transfer|inputs:{_amount:3291036540000000000|_from:0x3a5cc8689d1b0cef2c317bc5c0ad6ce88b27d597|_to:0xc5e81fc2401b8104966637d5334cbce92f01dbf7}}"
|
|
|
|
/// transactionHash : "0x5b59559a77fa5f1c70528d41f4fa2e5fa5a00b21fc2f3bc26b208b3062e46333"
|
|
|
|
/// transactionIndex : 25
|
2023-03-02 21:07:25 +00:00
|
|
|
|
2023-03-23 18:19:51 +00:00
|
|
|
class EthTokenTxDto {
|
|
|
|
EthTokenTxDto({
|
|
|
|
required this.address,
|
|
|
|
required this.blockNumber,
|
|
|
|
required this.logIndex,
|
|
|
|
required this.topics,
|
|
|
|
required this.data,
|
|
|
|
required this.articulatedLog,
|
|
|
|
required this.compressedLog,
|
|
|
|
required this.transactionHash,
|
|
|
|
required this.transactionIndex,
|
|
|
|
});
|
|
|
|
|
2023-03-24 16:11:18 +00:00
|
|
|
EthTokenTxDto.fromMap(Map<String, dynamic> map)
|
|
|
|
: address = map['address'] as String,
|
|
|
|
blockNumber = map['blockNumber'] as int,
|
|
|
|
logIndex = map['logIndex'] as int,
|
|
|
|
topics = List<String>.from(map['topics'] as List),
|
|
|
|
data = map['data'] as String,
|
|
|
|
articulatedLog = map['articulatedLog'] == null
|
|
|
|
? null
|
|
|
|
: ArticulatedLog.fromMap(
|
|
|
|
Map<String, dynamic>.from(
|
|
|
|
map['articulatedLog'] as Map,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
compressedLog = map['compressedLog'] as String,
|
|
|
|
transactionHash = map['transactionHash'] as String,
|
|
|
|
transactionIndex = map['transactionIndex'] as int;
|
2023-03-23 18:19:51 +00:00
|
|
|
|
|
|
|
final String address;
|
2023-03-02 21:07:25 +00:00
|
|
|
final int blockNumber;
|
|
|
|
final int logIndex;
|
2023-03-23 18:19:51 +00:00
|
|
|
final List<String> topics;
|
|
|
|
final String data;
|
2023-03-24 16:11:18 +00:00
|
|
|
final ArticulatedLog? articulatedLog;
|
2023-03-23 18:19:51 +00:00
|
|
|
final String compressedLog;
|
|
|
|
final String transactionHash;
|
2023-03-02 21:07:25 +00:00
|
|
|
final int transactionIndex;
|
2023-03-24 16:11:18 +00:00
|
|
|
|
2023-03-23 18:19:51 +00:00
|
|
|
EthTokenTxDto copyWith({
|
|
|
|
String? address,
|
|
|
|
int? blockNumber,
|
|
|
|
int? logIndex,
|
|
|
|
List<String>? topics,
|
|
|
|
String? data,
|
|
|
|
ArticulatedLog? articulatedLog,
|
|
|
|
String? compressedLog,
|
|
|
|
String? transactionHash,
|
|
|
|
int? transactionIndex,
|
|
|
|
}) =>
|
|
|
|
EthTokenTxDto(
|
|
|
|
address: address ?? this.address,
|
|
|
|
blockNumber: blockNumber ?? this.blockNumber,
|
|
|
|
logIndex: logIndex ?? this.logIndex,
|
|
|
|
topics: topics ?? this.topics,
|
|
|
|
data: data ?? this.data,
|
|
|
|
articulatedLog: articulatedLog ?? this.articulatedLog,
|
|
|
|
compressedLog: compressedLog ?? this.compressedLog,
|
|
|
|
transactionHash: transactionHash ?? this.transactionHash,
|
|
|
|
transactionIndex: transactionIndex ?? this.transactionIndex,
|
|
|
|
);
|
2023-03-24 16:11:18 +00:00
|
|
|
|
|
|
|
Map<String, dynamic> toMap() {
|
2023-03-23 18:19:51 +00:00
|
|
|
final map = <String, dynamic>{};
|
|
|
|
map['address'] = address;
|
|
|
|
map['blockNumber'] = blockNumber;
|
|
|
|
map['logIndex'] = logIndex;
|
|
|
|
map['topics'] = topics;
|
|
|
|
map['data'] = data;
|
2023-03-24 16:11:18 +00:00
|
|
|
map['articulatedLog'] = articulatedLog?.toMap();
|
2023-03-23 18:19:51 +00:00
|
|
|
map['compressedLog'] = compressedLog;
|
|
|
|
map['transactionHash'] = transactionHash;
|
|
|
|
map['transactionIndex'] = transactionIndex;
|
|
|
|
return map;
|
|
|
|
}
|
2023-03-24 16:11:18 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() {
|
|
|
|
return toMap().toString();
|
|
|
|
}
|
2023-03-23 18:19:51 +00:00
|
|
|
}
|
2023-03-02 21:07:25 +00:00
|
|
|
|
2023-03-23 18:19:51 +00:00
|
|
|
/// name : "Transfer"
|
|
|
|
/// inputs : {"_amount":"3291036540000000000","_from":"0x3a5cc8689d1b0cef2c317bc5c0ad6ce88b27d597","_to":"0xc5e81fc2401b8104966637d5334cbce92f01dbf7"}
|
|
|
|
|
|
|
|
class ArticulatedLog {
|
|
|
|
ArticulatedLog({
|
|
|
|
required this.name,
|
|
|
|
required this.inputs,
|
|
|
|
});
|
|
|
|
|
2023-03-24 16:11:18 +00:00
|
|
|
ArticulatedLog.fromMap(Map<String, dynamic> map)
|
|
|
|
: name = map['name'] as String,
|
|
|
|
inputs = Inputs.fromMap(
|
|
|
|
Map<String, dynamic>.from(
|
|
|
|
map['inputs'] as Map,
|
|
|
|
),
|
|
|
|
);
|
2023-03-23 18:19:51 +00:00
|
|
|
|
|
|
|
final String name;
|
|
|
|
final Inputs inputs;
|
|
|
|
|
|
|
|
ArticulatedLog copyWith({
|
|
|
|
String? name,
|
|
|
|
Inputs? inputs,
|
|
|
|
}) =>
|
|
|
|
ArticulatedLog(
|
|
|
|
name: name ?? this.name,
|
|
|
|
inputs: inputs ?? this.inputs,
|
|
|
|
);
|
|
|
|
|
2023-03-24 16:11:18 +00:00
|
|
|
Map<String, dynamic> toMap() {
|
2023-03-23 18:19:51 +00:00
|
|
|
final map = <String, dynamic>{};
|
|
|
|
map['name'] = name;
|
2023-03-24 16:11:18 +00:00
|
|
|
map['inputs'] = inputs.toMap();
|
2023-03-23 18:19:51 +00:00
|
|
|
return map;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// _amount : "3291036540000000000"
|
|
|
|
/// _from : "0x3a5cc8689d1b0cef2c317bc5c0ad6ce88b27d597"
|
|
|
|
/// _to : "0xc5e81fc2401b8104966637d5334cbce92f01dbf7"
|
|
|
|
///
|
|
|
|
class Inputs {
|
|
|
|
Inputs({
|
|
|
|
required this.amount,
|
2023-03-02 21:07:25 +00:00
|
|
|
required this.from,
|
|
|
|
required this.to,
|
|
|
|
});
|
|
|
|
|
2023-03-24 16:11:18 +00:00
|
|
|
Inputs.fromMap(Map<String, dynamic> map)
|
|
|
|
: amount = map['_amount'] as String,
|
|
|
|
from = map['_from'] as String,
|
|
|
|
to = map['_to'] as String;
|
2023-03-23 18:19:51 +00:00
|
|
|
|
|
|
|
final String amount;
|
|
|
|
final String from;
|
|
|
|
final String to;
|
|
|
|
|
|
|
|
Inputs copyWith({
|
|
|
|
String? amount,
|
|
|
|
String? from,
|
|
|
|
String? to,
|
|
|
|
}) =>
|
|
|
|
Inputs(
|
|
|
|
amount: amount ?? this.amount,
|
|
|
|
from: from ?? this.from,
|
|
|
|
to: to ?? this.to,
|
2023-03-02 21:07:25 +00:00
|
|
|
);
|
2023-03-23 18:19:51 +00:00
|
|
|
|
2023-03-24 16:11:18 +00:00
|
|
|
Map<String, dynamic> toMap() {
|
2023-03-23 18:19:51 +00:00
|
|
|
final map = <String, dynamic>{};
|
|
|
|
map['_amount'] = amount;
|
|
|
|
map['_from'] = from;
|
|
|
|
map['_to'] = to;
|
|
|
|
return map;
|
2023-03-02 21:07:25 +00:00
|
|
|
}
|
|
|
|
}
|