Git Product home page Git Product logo

cat-admin-tool's Introduction

CAT Admin Tool

Install

Ubuntu/MacOSs

git clone https://github.com/Chia-Network/CAT-admin-tool.git
cd CAT-admin-tool
python3 -m venv venv
. ./venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
pip install .
pip install chia-dev-tools --no-deps
pip install pytest

(If you're on an M1 Mac, make sure you are running an ARM64 native python virtual environment)

Windows Powershell

git clone https://github.com/Chia-Network/CAT-admin-tool.git
cd CAT-admin-tool
py -m venv venv
./venv/Scripts/activate
python -m pip install --upgrade pip setuptools wheel
pip install .
pip install chia-dev-tools --no-deps
pip install pytest

Lastly this requires a synced, running light wallet

Verify the installation was successful

cats --help
cdv --help

Examples can be found in the CAT Creation Tutorial

cat-admin-tool's People

Contributors

altendky avatar brandth22 avatar calebcurry avatar cameroncooper avatar chiaautomation avatar cmmarslender avatar danieljperry avatar dependabot[bot] avatar emlowe avatar freddiecoleman avatar geoffwalmsley avatar greimela avatar hiveproject2021 avatar hoffmang9 avatar joeharrison714 avatar quexington avatar wallentx avatar wizicer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cat-admin-tool's Issues

TypeError: cannot unpack non-iterable int object - Using 1.6.1-rc5 for the version in the tool

File "/Users/pmaslana/CAT-admin-tool/venv/bin/cats", line 8, in
sys.exit(main())
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/cats/cats.py", line 310, in main
cli()
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/cats/cats.py", line 243, in cli
signed_tx = asyncio.get_event_loop().run_until_complete(
File "/usr/local/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/cats/cats.py", line 51, in get_signed_tx
wallet_client_f, _ = await get_wallet(wallet_client, fingerprint)
TypeError: cannot unpack non-iterable int object

How to solve this, help!

(venv) PS C:\Users\Administrator\CAT-admin-tool> cats -l .\reference_tails\genesis_by_coin_id.clsp.hex --solution '()' --send-to xch1mm9xhf3hw6s2dnzh0wl348r5ahhzf378psvydvt0d8vucrq83eaqnr5698 -a 100000000 -f 4152196155 --as-bytes --select-coin
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\Administrator\CAT-admin-tool\venv\Scripts\cats.exe_main
.py", line 7, in
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\cats\cats.py", line 297, in main
cli()
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\cats\cats.py", line 230, in cli
signed_tx = asyncio.get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\cats\cats.py", line 40, in get_signed_tx
async with get_context_manager(fingerprint) as client_etc:
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 204, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\cats\cats.py", line 35, in get_context_manager
async with get_any_service_client("wallet", wallet_rpc_port, fingerprint=fingerprint) as args:
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 204, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\CAT-admin-tool\venv\Lib\site-packages\chia\cmds\cmds_util.py", line 101, in get_any_service_client
raise ValueError(f"Invalid client type requested: {client_type.name}")
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'name'. Did you mean: 'ne'?

unwind_the_bag loops endlessly awaiting a coin.

While running unwind_the_bag with the appropriate Eve Coin ID, Tail Hash, and supplying the bag targets csv file, along with an unwind fee and wallet id, it simply loops endlessly, waiting for a particular coin that never seems to exist:

Batched the bag into 1 batches
0.0% of the way through batches
Creating coin with 30 targets
Unwinding entire secured bag
Getting unwind for <redacted>
1 spends required to unwind the bag to <redacted>
1 spends to <redacted>
1 total spends required with 100 fees
About to iterate 1 times for depth 0
Waiting for unspent coin <redacted>
Unspent coin <redacted> does not exist
Waiting for unspent coin <redacted>
Unspent coin <redacted> does not exist
Waiting for unspent coin <redacted>
Unspent coin <redacted> does not exist
...
...
...
Waiting for unspent coin <redacted>
Unspent coin <redacted> does not exist

I'd like to reissue my CATs, but every step of the way, these tools don't seem to work. I hope you know why it might be looping, and how to fix it....and that you're paying attention to the github issues.

Connection Error

Good Evening
I've Installed chia blockchain (1.7.0) gui and cat-admin-tool. The GUI launches successfully and the CAT admin to works when i type cats --help and the developer tools have installed correctly. I do get a connection error:
Connection error. Check if full node rpc is running at 8555
I did check config file and full node rpc says 8555 so that doesn't seem to be the issue.
Any thoughts on a potential solution will be appreciated.
Thanks
Drew

Dependency Mismatch with Chia Dev Tools

We have mismatched dependencies between the cat admin tool (requires chia v2.1) and chia dev tools (requires chia v2.0).
This in addition to mismatched install instructions between the docs and github repo make it very confusing to follow the guide and examples.

What needs to be done:

  • Update chia dev tools dependencies to align with cat admin tool (https://github.com/Chia-Network/chia-dev-tools/blob/main/setup.py#L16)
  • Update github instructions to include the installation of cdv tools and pytest (pip install chia-dev-tools --no-deps & pip install pytest)
  • Update the linux doc instructions to include the installation of cdv tools and pytest (pip install chia-dev-tools --no-deps & pip install pytest)

I am able to perform updates 2 and 3 but figure someone from engineering might want to make update number 1 so tests can be performed properly

run "cdv --help" error.

(venv) bogon:CAT-admin-tool mac$ cdv --help
Traceback (most recent call last):
File "/Users/mac/Documents/pro_chia/chia_cat/CAT-admin-tool/venv/bin/cdv", line 5, in
from cdv.cmds.cli import main
File "/Users/mac/Documents/pro_chia/chia_cat/CAT-admin-tool/venv/lib/python3.9/site-packages/cdv/cmds/cli.py", line 14, in
from cdv.cmds import (
File "/Users/mac/Documents/pro_chia/chia_cat/CAT-admin-tool/venv/lib/python3.9/site-packages/cdv/cmds/chia_inspect.py", line 17, in
from chia.consensus.cost_calculator import calculate_cost_of_program, NPCResult
ImportError: cannot import name 'calculate_cost_of_program' from 'chia.consensus.cost_calculator' (/Users/mac/Documents/pro_chia/chia_cat/CAT-admin-tool/venv/lib/python3.9/site-packages/chia/consensus/cost_calculator.py)

I try these on Mac and Linux, both got same error.

Installation ends with error

Collecting chiavdf==1.0.3
Using cached chiavdf-1.0.3.tar.gz (635 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools_distutils\dist.py:275: UserWarning: Unknown distribution option: 'build_requires'
warnings.warn(msg)
running egg_info
writing chiavdf.egg-info\PKG-INFO
writing dependency_links to chiavdf.egg-info\dependency_links.txt
writing top-level names to chiavdf.egg-info\top_level.txt
listing git files failed - pretending there aren't any
reading manifest file 'chiavdf.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "C:\Users\famsquad\CAT-admin-tool\venv\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 363, in
main()
File "C:\Users\famsquad\CAT-admin-tool\venv\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\famsquad\CAT-admin-tool\venv\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\build_meta.py", line 161, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in get_build_requires
self.run_setup()
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\build_meta.py", line 157, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 247, in
setup(
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools_init
.py", line 155, in setup
return distutils.core.setup(**attrs)
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools_distutils\core.py", line 148, in setup
return run_commands(dist)
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 295, in run
self.find_sources()
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 302, in find_sources
mm.run()
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 537, in run
self.add_defaults()
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 581, in add_defaults
self.read_manifest()
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\command\sdist.py", line 195, in read_manifest
self.filelist.append(line)
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 479, in append
path = convert_path(item)
File "C:\Users\famsquad\AppData\Local\Temp\pip-build-env-4xw3v8zx\overlay\Lib\site-packages\setuptools_distutils\util.py", line 130, in convert_path
raise ValueError("path '%s' cannot end with '/'" % pathname)
ValueError: path './' cannot end with '/'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[question] cat inner puzzle

I am currently investigating the creation of cats and would like to write my own inner puzzle.
I have seen the cat_v2.clsp and noticed that it requires a INNER_PUZZLE to curry in. I cannot find a inner puzzle reference anywhere though. Neither in the documentation, the chia github repo nor in this repo.

I would like to ask how this is handled and if you have a reference for the default inner_puzzle as a starting point

cant install CAT-admin-tool

ERROR: Could not find a version that satisfies the requirement clvm-rs==0.1.15 (from chia-blockchain) (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.4, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.1.14, 0.1.16)
ERROR: No matching distribution found for clvm-rs==0.1.15

TypeError: cannot unpack non-iterable int object - Using 1.6.1-rc5 for the version in the tool

File "/Users/pmaslana/CAT-admin-tool/venv/bin/cats", line 8, in
sys.exit(main())
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/cats/cats.py", line 310, in main
cli()
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/cats/cats.py", line 243, in cli
signed_tx = asyncio.get_event_loop().run_until_complete(
File "/usr/local/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/Users/pmaslana/CAT-admin-tool/venv/lib/python3.9/site-packages/cats/cats.py", line 51, in get_signed_tx
wallet_client_f, _ = await get_wallet(wallet_client, fingerprint)
TypeError: cannot unpack non-iterable int object

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.