Giter Club home page Giter Club logo

django-cc's People

Contributors

acerix avatar gitter-badger avatar kcyeu avatar limpbrains avatar mrs83 avatar

Stargazers

 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  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  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  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

django-cc's Issues

refill_address_queue key error

Hi, I am receiving the following error when i start my celery worker
KeyError: 'wallet.tasks.refill_addresses_queue'
I have my broker running, as well as bitcoind, and have an instance of my currency model within my database.
Do i require the django-celery backend in order to save the results of the task to the DB?
thanks

Improve documentation

  • talk about advantages and disadvantages: you need to run a full node, can't calculate fee in advance
  • how configure celery. Run tasks periodically vs on events. How to bunch withdraw tx's
  • how to get list wallet transactions
  • how to transfer funds from wallet to wallet

Generation of new address

Hi,
First off thanks for great library.
Quick question, after I initially import my address from my bitcoind wallet.dat file using the refill_address_queue
What happens when I require say another 100 address? Are they automatically generated or do I need to run a script to ensure that fresh address are being generated periodically by bitcoind.
Finally from what I understand btc address are a one use thing therefore each time a confirmed transaction hits the wallet i should generate a new address for the wallet and update the wallet model with the new address?
Thanks again

cant start celery

hello.

can you please help me, i cant start celery worker. i did make Currency model in python, but celery gives me error:

(venv) kamba@kubuThink:~/www/escrow$ celery worker -A tst.cel.app
Error:
Unable to load celery application.
The module tst was not found.

Use celery as a python function, not at the command line?

How to use the celery worker -A tst.cel.app and celery call cc.tasks.refill_addresses_queue celery commands as a python function, except for the command line?

Included in the following commands
celery call cc.tasks.process_withdraw_transactions
cc.tasks.query_transactions

import celery

def celery(self):
    a = celery call cc.tasks.process_withdraw_transactions
    return a

As an example; I would do it like this?

Missing documentation?

Hello,

your Project seems intressting to me but i dont know how to use it?

Can you please create a documentation where we have some examples in place. I currently dont understand how to create Wallets for my users or how to get things setup Witz the current doc.

Thanks

Support for shielded transactions

@limpbrains see you're still active on this project, and I was hoping to use it for a zcash fork that only uses z_ operations.

Wanted to know if you were working on adding such functionality. I've forked it and have started trying to update things on my end, but I was wondering if you might have time to talk with me to clear up some questions I have.

I've added a boolean to the currency model for 'shielded_transactions', and have been able to get refill_address_queue working:

@shared_task()
def refill_addresses_queue():
    for currency in Currency.objects.all():
        coin = AuthServiceProxy(currency.api_url)
        count = Address.objects.filter(currency=currency, active=True, wallet=None).count()

        if count < settings.CC_ADDRESS_QUEUE:
            for i in range(count, settings.CC_ADDRESS_QUEUE):
                try:
                    if currency.shielded_transactions:
                        Address.objects.create(address=coin.z_getnewaddress(settings.CC_ACCOUNT), currency=currency)
                    else:
                        Address.objects.create(address=coin.getnewaddress(settings.CC_ACCOUNT), currency=currency)
                except (socket_error, CannotSendRequest) :
                    pass

Wanted to pick your brain if you're game...

start ui error

1.linux ui
ml@ubuntu:~/django-cc/testproject$ python3 manage.py runserver 0.0.0.0:8332
Performing system checks...

System check identified no issues (0 silenced).
March 30, 2019 - 08:13:27
Django version 2.1.7, using settings 'testproject.settings'
Starting development server at http://0.0.0.0:8332/
Quit the server with CONTROL-C.
Invalid HTTP_HOST header: '0.0.0.0:8332'. You may need to add '0.0.0.0' to ALLOWED_HOSTS.
Bad Request: /
[30/Mar/2019 08:13:36] "GET / HTTP/1.1" 400 65136
Invalid HTTP_HOST header: '0.0.0.0:8332'. You may need to add '0.0.0.0' to ALLOWED_HOSTS.
Bad Request: /favicon.ico
[30/Mar/2019 08:13:38] "GET /favicon.ico HTTP/1.1" 400 65118
Not Found: /
[30/Mar/2019 08:14:03] "GET / HTTP/1.1" 404 2030
Not Found: /favicon.ico
[30/Mar/2019 08:14:07] "GET /favicon.ico HTTP/1.1" 404 2081
Not Found: /
[30/Mar/2019 08:14:17] "GET / HTTP/1.1" 404 2030
Not Found: /
[30/Mar/2019 08:14:25] "GET / HTTP/1.1" 404 2030
2.
Page not found (404)
Request Method: GET
Request URL: http://localhost:8332/

Using the URLconf defined in testproject.urls, Django tried these URL patterns, in this order:

admin/
^cc/

The empty path didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

How i insert this address on a view

celery call -b redis:localhost:6379/0 cc.task.refill_addresses_queue

i want to create a address for user how i cant insert this celery task on view
i mean call task always return a address how i insert this on view? only call without write it manually

When adding a new currency, what should "last_block" be?

I'm trying to add my cryptocurrency, Zeal, and it is not working (wallet.get_address() for a newly created wallet is None). I think my magicbyte and dust values are correct. I think it's the last_block that is throwing things off. Also, my api_url is my full node. Is that alright?

My coin is a Litecoin 0.8.7.5 fork.

Thread or process safety issues

Is it safe to update the balance? If different threads or processes update the balance of a wallet at the same time, will there be any problems?

Multisig transactions

Hi!
If i wanted to use multisig would I need to tweak the models myself or is it something that is already implemented?
Thanks

What’s currency?

Hello mate.
Tell me pls, what kind of currencies do you support?
Bitcoin = BTC
BitcoinCash = BCH or BCC
Litecoin = LTC
Dash = DASH
Dogecoin = DOGE
Is this correct? What else?
Thank you for support.

How to do the deposit transaction

Hi, I'm just integrating this repo with my django app, i' m able to do the withdraw transaction. but i don't know how to do the deposit transaction with celery . please help me out also please put the deposit transaction example in readme @limpbrains

Negative balance

Hi!
Just another quick question,
Currently when withdrawing the account balance will go into negative, I'm assuming this is due to blockchain transaction fee.
To prevent this from happening do you think only allowing a user to withdraw at most 98% of there funds at a time is a suitable approach?
Thanks

should Wallet model methods be atomic?

Hi, I'm interested in using this codebase for a project. One thing I was wondering about is why, for example, Wallet.withdraw_to_address doesn't wrap everything in a transaction. It seems there could be various race conditions between the time when the model is first fetched from database, and when .save() is called.

I am a bit new to django as well, though, is there some reason why locking would not be necessary?

running celery tasks as celery beat task

Hi again,
Just a quick question,
I am currently running refill_address_queue
Process_withdraw_transaction and query_transaction as a celery beat task configured in settings and am calling it directly from cc.tasks is this the correct way to have it configured or should I be doing it differently?
Thanks!

monero support

hi there,
Nice project.
Have you tested with monero?
How do you derive the magic byte values for crypto (sorry couldn't find a definitive answer from google)
Thanks!

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.