Skip to content

Commit 959f447

Browse files
committed
v1.4.2
- Update dependencies. - Important Notice: This is the final version supporting Dart v2. The next release will require Dart v3.3 or higher.
1 parent 8f6a230 commit 959f447

File tree

8 files changed

+53
-70
lines changed

8 files changed

+53
-70
lines changed

CHANGELOG.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,71 @@
1+
## 1.4.2
2+
3+
- Update dependencies.
4+
- Important Notice: This is the final version supporting Dart v2. The next release will require Dart v3.3 or higher.
5+
16
## 1.4.1
27

3-
* Cleaned up imports
8+
- Cleaned up imports
49

510
## 1.4.0
611

7-
* Update dependencies
12+
- Update dependencies
813

914
## 1.3.0
1015

11-
* Resolve issues with model deserialization on the web.
16+
- Resolve issues with model deserialization on the web.
1217

1318
## 1.1.0
1419

15-
* Fix parsing transaction.
20+
- Fix parsing transaction.
1621

1722
## 1.0.0
1823

19-
* Update dependencies
24+
- Update dependencies
2025

2126
## 0.4.0
2227

23-
* Update dependencies
28+
- Update dependencies
2429

2530
## 0.3.0
2631

27-
* Update dependencies
32+
- Update dependencies
2833

2934
## 0.2.0
3035

31-
* Update dependencies
36+
- Update dependencies
3237

3338
## 0.1.0
3439

35-
* Enhanced compatibility with the latest features of the Osmosis network.
40+
- Enhanced compatibility with the latest features of the Osmosis network.
3641

3742
## 0.0.10
3843

39-
* Fix importing issue
44+
- Fix importing issue
4045

4146
## 0.0.6
4247

43-
* Support for osmosis network features.
48+
- Support for osmosis network features.
4449

4550
## 0.0.5
4651

47-
* Fix bugs.
48-
* Add thor swap example
52+
- Fix bugs.
53+
- Add thor swap example
4954

5055
## 0.0.4
5156

52-
* remove junk codes
57+
- remove junk codes
5358

5459
## 0.0.3
5560

56-
* Fix bugs.
57-
* Update dependencies.
61+
- Fix bugs.
62+
- Update dependencies.
5863

5964
## 0.0.2
6065

61-
* Support for thor and maya serialization.
62-
* Support thor and maya node api provider.
66+
- Support for thor and maya serialization.
67+
- Support thor and maya node api provider.
6368

6469
## 0.0.1
6570

66-
* TODO: Release.
71+
- TODO: Release.

analysis_options.yaml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,9 @@
1-
# This file configures the static analysis results for your project (errors,
2-
# warnings, and lints).
3-
#
4-
# This enables the 'recommended' set of lints from `package:lints`.
5-
# This set helps identify many issues that may lead to problems when running
6-
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
7-
# style and format.
8-
#
9-
# If you want a smaller set of lints you can change this to specify
10-
# 'package:lints/core.yaml'. These are just the most critical lints
11-
# (the recommended set includes the core lints).
12-
# The core lints are also what is used by pub.dev for scoring packages.
13-
141
# include: package:lints/recommended.yaml
152
include: package:flutter_lints/flutter.yaml
16-
173
# Uncomment the following section to specify additional rules.
18-
19-
# linter:
20-
# rules:
21-
# - camel_case_types
22-
23-
# analyzer:
24-
# exclude:
25-
# - path/to/excluded/files/**
26-
27-
# For more information about the core and recommended set of lints, see
28-
# https://dart.dev/go/core-lints
29-
30-
# For additional information about configuring this file, see
31-
# https://dart.dev/guides/language/analysis-options
4+
linter:
5+
rules:
6+
prefer_final_locals: true # Warns when a local variable could be final
7+
prefer_final_in_for_each: true # Warns when a forEach variable could be final
8+
prefer_const_constructors: true # Warns when a constructor could be const
9+
prefer_const_declarations: true # Warns when a declaration could be const

example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ dependencies:
3838
cosmos_sdk:
3939
path: ../
4040
# blockchain_utils:
41-
# path: ../../bitcoin/blockchain_utils
41+
# path: ../../blockchain_utils
4242
http: ^1.2.0
43-
blockchain_utils: ^3.4.0
43+
blockchain_utils: ^3.6.0
4444

4545
dev_dependencies:
4646
flutter_test:

lib/src/protobuf/codec/decoder.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ProtocolBufferDecoder {
4040
int shift = 0;
4141
int index = 0;
4242
while (true) {
43-
int byte = data[index++];
43+
final byte = data[index++];
4444
value |= (byte & 0x7F) << shift;
4545
if ((byte & 0x80) == 0) {
4646
break;
@@ -55,7 +55,7 @@ class ProtocolBufferDecoder {
5555
int shift = 0;
5656
int index = 0;
5757
while (true) {
58-
int byte = data[index++];
58+
final byte = data[index++];
5959
value |= BigInt.from((byte & 0x7F)) << shift;
6060
if ((byte & 0x80) == 0) {
6161
break;

lib/src/protobuf/codec/encoder.dart

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ProtocolBufferEncoder {
5959

6060
/// Encode a [Map] with the given [fieldNumber] and [value].
6161
static List<int> _encodeMap(int fieldNumber, Map value) {
62-
List<int> result = [];
62+
final List<int> result = [];
6363
for (final i in value.entries) {
6464
final key = encode(1, i.key);
6565
final val = encode(2, i.value);
@@ -73,8 +73,8 @@ class ProtocolBufferEncoder {
7373
/// Encode length of the data for the given [fieldNumber] and [value].
7474
static List<int> _encodeLength(int fieldNumber, int value) {
7575
_validateInt(value);
76-
List<int> result = [];
77-
int tag = (fieldNumber << 3) | 2;
76+
final List<int> result = [];
77+
final int tag = (fieldNumber << 3) | 2;
7878
result.addAll(_encodeVarint32(tag));
7979
result.addAll(_encodeVarint32(value));
8080

@@ -84,7 +84,7 @@ class ProtocolBufferEncoder {
8484
/// Encode a list with the given [fieldNumber] and [value].
8585
static List<int> _encodeList(int fieldNumber, List<dynamic> value) {
8686
if (value.isEmpty) return [];
87-
List<int> result = [];
87+
final List<int> result = [];
8888
for (final i in value) {
8989
result.addAll(encode(fieldNumber, i));
9090
}
@@ -94,10 +94,10 @@ class ProtocolBufferEncoder {
9494
/// Encode a [BigInt] with the given [fieldNumber] and [value].
9595
static List<int> _encodeBigInt(int fieldNumber, BigInt value) {
9696
_validateBigInt(value);
97-
List<int> result = [];
97+
final List<int> result = [];
9898

9999
// Combine field number and wire type (0 for varint)
100-
int tag = (fieldNumber << 3) | 0;
100+
final int tag = (fieldNumber << 3) | 0;
101101
BigInt mybeZigZag = value;
102102
if (value.isNegative) {
103103
mybeZigZag = ((value & _maxInt64) | _minInt64);
@@ -111,7 +111,7 @@ class ProtocolBufferEncoder {
111111

112112
/// Utility function to encode a 64-bit varint.
113113
static List<int> _encodeVarintBigInt(BigInt value) {
114-
List<int> result = [];
114+
final List<int> result = [];
115115
while (value > BigInt.from(0x7F)) {
116116
result.add((value & BigInt.from(0x7F) | BigInt.from(0x80)).toInt());
117117
value >>= 7;
@@ -122,7 +122,7 @@ class ProtocolBufferEncoder {
122122

123123
/// Encode a 32-bit varint with the given [value].
124124
static List<int> _encodeVarint32(int value) {
125-
List<int> result = [];
125+
final List<int> result = [];
126126
while (value > 0x7F) {
127127
result.add((value & 0x7F) | 0x80);
128128
value >>= 7;
@@ -134,8 +134,8 @@ class ProtocolBufferEncoder {
134134
/// Encode an [int] with the given [fieldNumber]
135135
static List<int> _encodeInt(int fieldNumber, int value) {
136136
_validateInt(value);
137-
List<int> result = [];
138-
int tag = (fieldNumber << 3) | 0;
137+
final List<int> result = [];
138+
final int tag = (fieldNumber << 3) | 0;
139139
result.addAll(_encodeVarint32(tag));
140140
if (value.isNegative) {
141141
final BigInt zigzag = ((BigInt.from(value) & _maxInt64) | _minInt64);
@@ -149,7 +149,7 @@ class ProtocolBufferEncoder {
149149

150150
/// Encode a byte array with the given [fieldNumber] and [value].
151151
static List<int> _encodeBytes(int fieldNumber, List<int> value) {
152-
List<int> result = [];
152+
final List<int> result = [];
153153
result.addAll(_encodeLength(fieldNumber, value.length));
154154
result.addAll(value);
155155

lib/src/protobuf/message/duration.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class ProtobufDuration extends CosmosProtocolBuffer {
3131
final match = CosmosConstants.strDurationRegExp.firstMatch(duration);
3232

3333
if (match != null) {
34-
BigInt seconds = BigInt.parse(match.group(1)!);
35-
int nanos = int.parse(match.group(2) ?? '0');
34+
final seconds = BigInt.parse(match.group(1)!);
35+
final nanos = int.parse(match.group(2) ?? '0');
3636
return ProtobufDuration(seconds: seconds, nanos: nanos);
3737
} else {
3838
throw const FormatException('Invalid duration format');

lib/src/utils/utils.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class CosmosUtils {
1111

1212
static final RegExp _pathParamRegex = RegExp(r':\w+');
1313
static List<String> extractParams(String url) {
14-
Iterable<Match> matches = _pathParamRegex.allMatches(url);
15-
List<String> params = [];
16-
for (Match match in matches) {
14+
final Iterable<Match> matches = _pathParamRegex.allMatches(url);
15+
final List<String> params = [];
16+
for (final match in matches) {
1717
params.add(match.group(0)!);
1818
}
1919
return List<String>.unmodifiable(params);

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: cosmos_sdk
22
description: Engage seamlessly with a Cosmos SDK-based network (cosmos hub, osmosis, thor, kujira and etc ... ), enabling the creation, signing, and transmission of transactions. (Beta version)
3-
version: 1.4.1
3+
version: 1.4.2
44
homepage: "https://github.com/mrtnetwork/cosmos_sdk"
55
repository: "https://github.com/mrtnetwork/cosmos_sdk"
66
@@ -15,9 +15,9 @@ environment:
1515
sdk: '>=2.15.0 <4.0.0'
1616
# Add regular dependencies here.
1717
dependencies:
18-
blockchain_utils: ^3.4.0
18+
blockchain_utils: ^3.6.0
1919
# blockchain_utils:
20-
# path: ../bitcoin/blockchain_utils
20+
# path: ../blockchain_utils
2121

2222

2323

0 commit comments

Comments
 (0)