dev
dart 85 lines 2.36 KB
Raw
1 class Erc20TokenInfoMoralis {
2 String? address;
3 String? addressLabel;
4 String? name;
5 String? symbol;
6 String? decimals;
7 String? logo;
8 String? logoHash;
9 String? thumbnail;
10 String? totalSupply;
11 String? totalSupplyFormatted;
12 String? fullyDilutedValuation;
13 String? blockNumber;
14 int? validated;
15 String? createdAt;
16 bool? possibleSpam;
17 bool? verifiedContract;
18 Links? links;
19 int? securityScore;
20
21 Erc20TokenInfoMoralis({
22 this.address,
23 this.addressLabel,
24 this.name,
25 this.symbol,
26 this.decimals,
27 this.logo,
28 this.logoHash,
29 this.thumbnail,
30 this.totalSupply,
31 this.totalSupplyFormatted,
32 this.fullyDilutedValuation,
33 this.blockNumber,
34 this.validated,
35 this.createdAt,
36 this.possibleSpam,
37 this.verifiedContract,
38 this.links,
39 this.securityScore,
40 });
41
42 Erc20TokenInfoMoralis.fromJson(Map<String, dynamic> json) {
43 address = json['address'] as String?;
44 addressLabel = json['address_label'] as String?;
45 name = json['name'] as String?;
46 symbol = json['symbol'] as String?;
47 decimals = json['decimals'] as String?;
48 logo = json['logo'] as String?;
49 logoHash = json['logo_hash'] as String?;
50 thumbnail = json['thumbnail'] as String?;
51 totalSupply = json['total_supply'] as String?;
52 totalSupplyFormatted = json['total_supply_formatted'] as String?;
53 fullyDilutedValuation = json['fully_diluted_valuation'] as String?;
54 blockNumber = json['block_number'] as String?;
55 validated = json['validated'] as int?;
56 createdAt = json['created_at'] as String?;
57 possibleSpam = json['possible_spam'] as bool?;
58 verifiedContract = json['verified_contract'] as bool;
59 links =
60 json['links'] != null ? new Links.fromJson(json['links'] as Map<String, dynamic>) : null;
61 securityScore = json['security_score'] as int?;
62 }
63 }
64
65 class Links {
66 String? twitter;
67 String? website;
68 String? facebook;
69 String? reddit;
70 String? github;
71 String? linkedin;
72 String? telegram;
73
74 Links({this.twitter, this.website, this.facebook, this.reddit});
75
76 Links.fromJson(Map<String, dynamic> json) {
77 twitter = json['twitter'] as String?;
78 website = json['website'] as String?;
79 facebook = json['facebook'] as String?;
80 reddit = json['reddit'] as String?;
81 github = json['github'] as String?;
82 linkedin = json['linkedin'] as String?;
83 telegram = json['telegram'] as String?;
84 }
85 }