Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update secret.py #173

Closed
wants to merge 16 commits into from
4 changes: 4 additions & 0 deletions .github/workflows/Configurar
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Create the runner and start the configuration experience
$ ./config.sh --url https://github.com/Herand19/panoramix --token A76T6JF2OSMJUC4Y5HSN6ALF5QCJG
# Last step, run it!
$ ./run.sh
7 changes: 7 additions & 0 deletions .github/workflows/Run packege
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions .github/workflows/Using your self-hosted runner
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use this YAML in your workflow file for each job
runs-on: self-hosted
40 changes: 40 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions mkdir actions-runner && cd actions-runner
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

5 changes: 3 additions & 2 deletions panoramix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -98,7 +99,7 @@
"""


def decompile(this_addr, only_func_name=None):
def decompile(0x49345182D578B1b3c7Ed4B2e6eCD8Aef63DD2CA3, only_func_name=None):

"""

Expand Down
4 changes: 4 additions & 0 deletions secret.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$ pip install panoramix-decompiler
http://localhost:7545
$ WEB3_PROVIDER_URI=http://localhost:7545 panoramix 0x49345182D578B1b3c7Ed4B2e6eCD8Aef63DD2CA3
$ panoramix 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000e535741502d53484942cbb34f5247000000000000000000000000000000000000