Skip to content

Commit 3aa4a55

Browse files
committed
V6.5.0
- Fix solidity abi fixed-size arrays encoding/decoding - Add more abi serialization test.
1 parent 411c1eb commit 3aa4a55

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 6.4.0
1+
## 6.5.0
22

33
- Fix solidity abi fixed-size arrays encoding/decoding
44
- Add more abi serialization test.

lib/solidity/contract/fragments.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,22 +167,16 @@ class AbiFunctionFragment implements AbiBaseFragment {
167167

168168
/// Decodes the input parameters of the function from the encoded input bytes.
169169
List<dynamic> decodeInput(List<int> encodedParams) {
170-
bool hasSelector = false;
171170
List<int> encodeBytes = List.from(encodedParams);
172171
if (encodeBytes.length > ABIConst.selectorLength) {
173172
final encodeSelector = encodeBytes.sublist(0, ABIConst.selectorLength);
174173
if (BytesUtils.bytesEqual(encodeSelector, selector)) {
175174
encodeBytes = encodeBytes.sublist(ABIConst.selectorLength);
176-
hasSelector = true;
177175
}
178176
}
179177
final abi =
180178
AbiParameter(name: '', type: 'tuple', components: List.from(inputs))
181179
.decode(encodeBytes);
182-
assert(() {
183-
if (hasSelector) return abi.consumed + 4 == encodedParams.length;
184-
return abi.consumed == encodedParams.length;
185-
}(), "ai");
186180
return abi.result;
187181
}
188182
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: on_chain
22
description: Streamline Ethereum, Tron, Solana, sui, aptos and Cardano operations. Effortlessly create transactions, interact with smart contracts, sign, and send transactions.
3-
version: 6.4.0
3+
version: 6.5.0
44
homepage: "https://github.com/mrtnetwork/on_chain"
55
repository: "https://github.com/mrtnetwork/on_chain"
66

0 commit comments

Comments
 (0)