Skip to content

Commit b9402aa

Browse files
committed
wip
1 parent b1c3297 commit b9402aa

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

crypto/utils/abi_decoder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def decode_number(bytes_data, offset, signed):
109109
@classmethod
110110
def decode_string(cls, bytes_data, offset):
111111
data_offset = cls.read_uint(bytes_data, offset)
112-
string_offset = offset + data_offset
112+
string_offset = data_offset
113113
length = cls.read_uint(bytes_data, string_offset)
114114
string_data = bytes_data[string_offset+32:string_offset+32+length]
115115
value = string_data.decode('utf-8')
@@ -118,7 +118,7 @@ def decode_string(cls, bytes_data, offset):
118118

119119
def decode_dynamic_bytes(self, bytes_data, offset):
120120
data_offset = self.read_uint(bytes_data, offset)
121-
bytes_offset = offset + data_offset
121+
bytes_offset = data_offset
122122
length = self.read_uint(bytes_data, bytes_offset)
123123
bytes_data_value = bytes_data[bytes_offset+32:bytes_offset+32+length]
124124
value = '0x' + bytes_data_value.hex()

tests/fixtures/transactions/validator-registration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"data": {
3-
"value": 250000000000000000000,
3+
"value": "250000000000000000000",
44
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
55
"gasPrice": 5000000000,
66
"gasLimit": 200000,

0 commit comments

Comments
 (0)