Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
pull_request:
branches: [ master ]

env:
OPENSSL_CONF: ${{ github.workspace }}/openssl.cnf

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7.17, 3.8.17, 3.9.17, 3.11.4]
python-version: [3.10.14, 3.11.9, 3.12.4]

steps:
- name: Checkout
Expand All @@ -24,6 +27,12 @@ jobs:
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: upgrade openssl
run: |
sudo apt-get update
sudo apt-get install openssl
openssl version -a
echo "openssl_conf = $OPENSSL_CONF"
- name: Test with pytest
run: |
python3 -m pytest -vv -s
23 changes: 23 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
eth-hash = ">=0.5.2"
pytest = ">=6.2.0"
pytest-cov = "*"
ecdsa = ">=0.16.1"
eth-keys = ">=0.3.3"
mnemonic = ">=0.19"
eth-keyfile = ">=0.5.1"
rlp = ">=1.2.0"
eth-abi = ">=2.1.1"
voluptuous = ">=0.12.0"
twine = "*"
retro-bip-utils = "*"

[dev-packages]

[requires]
python_version = "3.12"
771 changes: 771 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions openssl.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
openssl_conf = openssl_init

[openssl_init]
providers = provider_sect

[provider_sect]
default = default_sect
legacy = legacy_sect

[default_sect]
activate = 1

[legacy_sect]
activate = 1
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
eth-hash==0.5.2
eth-hash>=0.5.2
pytest>=6.2.0
pytest-cov
ecdsa==0.16.1
eth-keys==0.3.3
mnemonic==0.19
retro-bip-utils==1.0.5
eth-keyfile==0.5.1
rlp==1.2.0
eth-abi==2.1.1
voluptuous==0.12.0
ecdsa>=0.16.1
eth-keys>=0.3.3
mnemonic>=0.19
retro-bip-utils>=1.0.5
eth-keyfile>=0.5.1
rlp>=1.2.0
eth-abi>=2.1.1
voluptuous>=0.12.0
wheel
twine
4 changes: 2 additions & 2 deletions thor_devkit/abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ class Coder():
@staticmethod
def encode_list(types: List[str], values) -> bytes:
''' Encode a sequence of values, into a single bytes '''
return eth_abi.encode_abi(types, values)
return eth_abi.encode(types, values)

@staticmethod
def decode_list(types: List[str], data: bytes) -> List:
''' Decode the data, back to a (,,,) tuple '''
return list(eth_abi.decode_abi(types, data))
return list(eth_abi.decode(types, data))

@staticmethod
def encode_single(t: str, value) -> bytes:
Expand Down
2 changes: 1 addition & 1 deletion thor_devkit/rlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def __init__(self, max_bytes: int = None):
Max bytes in the encoded result. (not enough then prepend 0)
'''
self.max_bytes = max_bytes
super().__init__(l=max_bytes)
super().__init__(length=max_bytes)

def serialize(self, obj: Union[str, int]) -> bytes:
'''
Expand Down