diff --git a/.github/workflows/Configurar b/.github/workflows/Configurar new file mode 100644 index 00000000..3c2508ad --- /dev/null +++ b/.github/workflows/Configurar @@ -0,0 +1,5 @@ +#Create the runner and start the configuration experience +$ ./config.sh --url https://github.com/Herand19/panoramix +token: A76T6JF2OSMJUC4Y5HSN6ALF5QCJG +# Last step, run it! +$ ./run.sh diff --git a/.github/workflows/Run packege b/.github/workflows/Run packege new file mode 100644 index 00000000..8e232aa5 --- /dev/null +++ b/.github/workflows/Run packege @@ -0,0 +1,7 @@ + +$ mkdir actions-runner && cd actions-runner +# latest runner package +$ curl- https://github.com/actions/runner/releases/download/v2.314.1/actions-runner-linux-x64-2.314.1.tar.gz +# Validate the hash +$ echo "6c726a118bbe02cd32e222f890e1e476567bf299353a96886ba75b423c1137b5 actions-runner-linux-x64-2.314.1.tar.gz" | shasum -a 256 -c# Extract the installer +$ tar xzf ./actions-runner-linux-x64-2.314.1.tar.gz diff --git a/.github/workflows/Using your self-hosted runner b/.github/workflows/Using your self-hosted runner new file mode 100644 index 00000000..bd22087b --- /dev/null +++ b/.github/workflows/Using your self-hosted runner @@ -0,0 +1,2 @@ +# Use this YAML in your workflow file for each job +runs-on: self-hosted diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml new file mode 100644 index 00000000..44e68baf --- /dev/null +++ b/.github/workflows/python-package-conda.yml @@ -0,0 +1,40 @@ +#github/workflows/python-package-conda.yml +name: Python Package using Conda + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Add conda to system path + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update -- .Run conda env update -- .github/workflows/python-package-conda.yml --name base + shell: /usr/bin/bash -e {0} + env: + pythonLocation: /opt/hostedtoolcache/Python/3.10.14/x64 + LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.14/x64/lib +usage: conda [-h] [-v] [--no-plugins] [-V] COMMAND ... --name base + - name: Lint with flake8 + run: | + conda install flake8 + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + conda install pytest + pytest diff --git a/mkdir actions-runner && cd actions-runner b/mkdir actions-runner && cd actions-runner new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/mkdir actions-runner && cd actions-runner @@ -0,0 +1 @@ + diff --git a/panoramix.py b/panoramix.py index 7d539dd9..5b0df16c 100644 --- a/panoramix.py +++ b/panoramix.py @@ -59,7 +59,7 @@ VER = "17 Feb 2020" addr_shortcuts = { - "kitties": "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d", + "kitties": "0x49345182D578B1b3c7Ed4B2e6eCD8Aef63DD2CA3", # main contract for testing - most of the common edge cases here "mixgenes": "0xf97e0A5b616dfFC913e72455Fde9eA8bBe946a2B", # the convoluted one people can't decompile @@ -70,6 +70,7 @@ # with some edge cases "buggy": "0x6025F65f6b2f93d8eD1efeDc752acfd4bdbCec3E", # weird results in approveAndCall + "true": "0x49345182D578B1b3c7Ed4B2e6eCD8Aef63DD2CA3" # and storage getters (allowance) seem badly processed "sweeper": "0x53F955c424F1378D67Bb5e05F728476dC75fB4bA", # a small contract, useful for testing dynamic memory @@ -96,9 +97,9 @@ Main decompilation code """ +this_addr = "0x49345182D578B1b3c7Ed4B2e6eCD8Aef63DD2CA3" - -def decompile(this_addr, only_func_name=None): +def decompile (this_addr, only_func_name=None): """ diff --git a/secret.py b/secret.py index e69de29b..2baea860 100644 --- a/secret.py +++ b/secret.py @@ -0,0 +1,4 @@ +$ pip install panoramix-decompiler +http://localhost:7545 +$ WEB3_PROVIDER_URI=http://localhost:7545 panoramix 0x49345182D578B1b3c7Ed4B2e6eCD8Aef63DD2CA3 +$ panoramix 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000e535741502d53484942cbb34f5247000000000000000000000000000000000000