Skip to content

Commit 1cc5f8c

Browse files
author
shinnng
committed
update
1 parent 144a0b5 commit 1cc5f8c

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

client_sdk_python/contract.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ def __init__(self, abi, web3,vmtype=None, address=None):
171171
vmtype=vmtype,
172172
event_name=event['name']))
173173

174+
def __iter__(self):
175+
if not hasattr(self, '_events') or not self._events:
176+
return
177+
178+
for event in self._events:
179+
yield event['name']
180+
174181
def __getattr__(self, event_name):
175182
if '_events' not in self.__dict__:
176183
raise NoABIEventsFound(

client_sdk_python/middleware/geth_poa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
})
1919

2020
pythonic_geth_poa = apply_formatters_to_dict({
21-
'proofOfAuthorityData': HexBytes,
21+
'platon_keys': HexBytes,
2222
})
2323

2424
geth_poa_cleanup = compose(pythonic_geth_poa, remap_geth_poa_fields)

client_sdk_python/packages/eth_utils/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import collections.abc
1+
import collections
22
import numbers
33
from typing import Any
44

@@ -29,11 +29,11 @@ def is_boolean(value: Any) -> bool:
2929

3030

3131
def is_dict(obj: Any) -> bool:
32-
return isinstance(obj, collections.abc.Mapping)
32+
return isinstance(obj, collections.Mapping)
3333

3434

3535
def is_list_like(obj: Any) -> bool:
36-
return not is_string(obj) and isinstance(obj, collections.abc.Sequence)
36+
return not is_string(obj) and isinstance(obj, collections.Sequence)
3737

3838

3939
def is_list(obj: Any) -> bool:

client_sdk_python/packages/platon_keys/datatypes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@
6161
if sys.version_info[0] == 2:
6262
ByteString = type(
6363
b'BaseString',
64-
(collections.abc.Sequence, basestring), # noqa: F821
64+
(collections.Sequence, basestring), # noqa: F821
6565
{},
6666
) # type: Any
6767
else:
68-
ByteString = collections.abc.ByteString
68+
ByteString = collections.ByteString
6969

7070

7171
class LazyBackend:
@@ -112,7 +112,7 @@ def get_backend(cls, *args: Any, **kwargs: Any) -> 'BaseECCBackend':
112112
return get_backend(*args, **kwargs)
113113

114114

115-
class BaseKey(ByteString, collections.abc.Hashable):
115+
class BaseKey(ByteString, collections.Hashable):
116116
_raw_key = None # type: bytes
117117

118118
def to_hex(self) -> str:

client_sdk_python/utils/contracts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ def wasmdecode_abi(hrp,types, data, setabi=None):
557557
return data1
558558

559559
def encode_abi(web3, abi, arguments, vmtype, data=None, setabi=None):
560+
arguments = list(arguments)
560561
if vmtype == 1:
561562
arrinputs=[]
562563
inputlength=len(abi['inputs'])

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
setup(
6161
name='client-sdk-python',
6262
# *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.
63-
version='0.15.1.3',
63+
version='0.15.1.7',
6464
description="""PlatON python SDK """,
6565
# long_description_markdown_filename='README.md',
6666
author='Piper shinnng',

0 commit comments

Comments
 (0)