From 0b1beecea71a5bbcc0672bde1b289b0f9041a140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BA=A7n=20Tho=E1=BA=A1i?= Date: Mon, 27 May 2024 00:35:59 +0700 Subject: [PATCH 1/2] add download metadata.json file before run script --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d431974..489dd40 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,11 @@ The methods for generating signature are described below: > https://www.python.org/downloads/ -2. Install dependencies +2. Download the metadata.json file + + > curl https://fluence-dao.s3.eu-west-1.amazonaws.com/metadata.json > metadata.json + +3. Install dependencies > `./install.sh` @@ -48,7 +52,7 @@ The methods for generating signature are described below: > `pip3 install -r python/requirements.txt` -3. Run the script +4. Run the script > `python3 python/proof.py` From 9c8708f957a874b1d0418ef28ff5c2da853a7485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BA=A7n=20Tho=E1=BA=A1i?= Date: Mon, 27 May 2024 02:03:30 +0700 Subject: [PATCH 2/2] add auto download metadata.json file --- python/proof.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/proof.py b/python/proof.py index e00ee61..c40080f 100644 --- a/python/proof.py +++ b/python/proof.py @@ -136,6 +136,10 @@ def get_merkle_proof(metadata, tempETHAccount): def main(): metadataPath = "metadata.json" + if not os.pathh.exists(metadataPath): + os.system( + "curl https://fluence-dao.s3.eu-west-1.amazonaws.com/metadata.json > metadata.json" + ) metadata = parse_metadata(metadataPath) print('''