I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

alexg

Forum Replies Created

Viewing 15 posts - 151 through 165 (of 2,207 total)
  • Author
    Posts
  • in reply to: Crowdfunding #11611
    alexg
    Keymaster

    Hello,

    I would first look to see if there is an existing solution for this. If not, I’d develop one myself.

    with regards

    in reply to: Incorrect amount display 10 instead 1000 #11589
    alexg
    Keymaster

    Great to hear that you fixed it!

    in reply to: Giving coins to users programmatically #11579
    alexg
    Keymaster

    Sounds great.

    If I understand correctly, you want to create a coin adapter. Coin adapters conenct wallets to the plugin.

    A coin adapter is a PHP object that notifies the plugin about incoming deposits in the wallet, and sends withdrawal requests to the wallet.

    Unfortunately, the current coin adapters needed to be refactored. In the upcoming wallets6 release, they will be replaced with wallet adapters, a similar but different class. So, if you create a coin adapter now, it won’t work in wallets6 without modification. But the change was necessary, in order to decouple wallets from currencies, and to make it easier to declare adapter settings.

    TL;DR You can look at the provided coin adapters to see how to implement a concrete subclass of Dashed_Slug_Wallets_Coin_Adapter. It will require some, but not much, modification to work for wallets6, the upcoming major release. I can help you with this, ask me any questions.

    with regards

    in reply to: Giving coins to users programmatically #11568
    alexg
    Keymaster

    Hello,

    Glad you figured the issue out.

    The admin’s user_id is not 0, it should be 1 by default.

    I think WordPress starts counting from 1 because in MySQL, the primary keys for users, posts, etc are defined as AUTO_INCREMENT columns, and AUTO_INCREMENT columns start from 1.

    In fact, if you are certain that the user_id of the admin is 0, you may be facing bigger problems, caused by improperly exporting and reimporting a database via phpMyAdmin. I have blogged about it here. Are you able to create new posts? If not, you may be ecountering this issue.

    Hope this helps.

    in reply to: adding custom token #11553
    alexg
    Keymaster

    Yes, the other coin adapters are for connecting to full node wallets. Don’t use the block.io adapter, the CoinPayments adapter is better in every way. I have added a warning about this on the website. You can see the complete list of existing coin adapters.

    Coin adapters will soon be retired in favor of wallet adapters: Since I started the plugin it has become apparent that currencies need to be decoupled from wallets. Therefore, with the upcoming release, new wallet adapters will replace the old coin adapters. See attached image to get an idea of what I’m building.

    There will be wallet adapters for CoinPayments, Bitcoin-like wallets, Monero-like wallets, and TurtleCoin-like wallets. The fiat coin adapter will be merged into the parent plugin.

    The code and documentation will be a lot better, so hopefully independent developers will choose to build wallet adapters for other types of wallets. I, for one, will focus my efforts on Ethereum and ERC-20, which should then be easily translatable to BSC chain and friends. The difficulty (and the reason I’m not currently using the Infura API as many have suggested) is that funds must be collected in one wallet, to allow for off-chain transactions.

    Other plugins have connectivity with remote custodial services, or with non-custodial wallets. I plan to expand this plugin towards admins who are interested in a custodial solution, backed with their own full node wallet. But the CoinPayments platform will continue to be supported, as it has been a success and many people use it.

    In wallets6 you will be able to define custom tokens via the WordPress admin screens, just like any other currency. Custom tokens will simply be currencies that are not connected to a wallet (i.e. no wallet adapter).

    Hope this makes sense. Let me know if you have more questions about adapters. But please open a new thread if your new questions are not related to your original question about creating custom tokens.

    with regards

    Attachments:
    You must be logged in to view attached files.
    in reply to: Giving coins to users programmatically #11543
    alexg
    Keymaster

    I’ve tried to add as many user requests into the upcoming release, prioritizing those that help with usability, and that are feasible on my part within a realistic time frame.

    The release is delayed primarily due to the difficulties of managing gas fees on the CoinPayments platform. Just yesterday late at night I ran some successful live tests of my gas-distributing algo on the Ethereum blockchain. Now I just need to try to adapt this to BC Chain (BEP2) and BSC Chain (BEP20). I will have to leave Solana and Tron for a later time after the release, but at least the CoinPayments adapter is now able to be extended towards new blockchains with fees that require gas to deposit…

    Thank you for your kind words on behalf of the entire dashed-slug team! :p

    in reply to: Incorrect amount display 10 instead 1000 #11541
    alexg
    Keymaster

    Hello,

    All cryptocurrency amounts on all blockchains are stored as integers to avoid rounding errors associated with floats. They are only converted to floats for displaying to the user. Doing this requires a knowledge of how the currencies are denominated (i.e. how many decimals are used). Bitcoin on layer 1 has 8 decimals, Monero has 12 decimals, Ethereum has 18, every coin can be different.

    How are you hooking to the wallets_cryptonote_coins filter? You should change the fields: amount pattern and decimals to reflect the details of your coin.

    with regards

    in reply to: Giving coins to users programmatically #11537
    alexg
    Keymaster

    OK I understand your point.

    You could try and insert a fake “deposit” row for your admin user to the transactions table. For example, assuming your DB table prefix is wp_, and assuming you are not on multisite, you could do something like the following in your MySQL console:

    INSERT INTO wp_wallets_txs (
        category,
        tags,
        account,
        address,
        txid,
        symbol,
        amount,
        created_time,
        updated_time,
        status
    )
    
    VALUES (
    	'deposit',
    	'foo bar', -- you can use any tags here to help you keep track of your deposits
    	1, -- assume this is your admin account's user_id
    	'', -- address is not neeed
    	UUID(), -- the txid value needs to be unique
    	'LETS',
    	100000, -- money printer goes brrr
    	current_time(),
    	current_time(),
    	'done'
    );

    But that’s probably not the easiest way.

    The easiest way would be to use the Airdrop extension. You can perform an airdrop of a fixed amount of any coin to a user role. If you are the only administrator and you do an airdrop on the administrators role, then your admin user will receive one “deposit”. You can then proceed to distribute these coins.

    Install the Airdrop extension, then go to ToolsAirdrop to perform an immediate airdrop.

    Hope this helps. Let me know if you face any problems doing this.

    with regards

    P.S. In the upcoming release I have addressed this, and it will be very easy to create/edit transactions in the local ledger via the admin screens. You’ll see!

    in reply to: Monero Coin Adapter used with other coin #11533
    alexg
    Keymaster

    Hello,

    Thanks for letting us know. These params can be confusing!

    with regards

    in reply to: adding custom token #11526
    alexg
    Keymaster

    Hello,

    What string did you enter in the input box?

    The accepted pattern is ^\s*[a-zA-Z_][a-zA-Z0-9_]*\s*,\s*[a-zA-Z]+(\s*,\s*[a-zA-Z_][a-zA-Z0-9_]*\s*,\s*[a-zA-Z]+\s*)*$. You can test your string against this pattern at: https://www.regextester.com/

    This means that you are allowed to enter a name, followed by a comma and a ticker symbol, followed by more names and ticker symbols.

    A name can have letters numbers and the underscore symbol. Same goes for the ticker.

    So, if you want to introduce two coins, FooCoin and BarCoin, with tickers FOO and BAR respectively, you’d enter:

    FooCoin,FOO,BarCoin,BAR

    (In the upcoming wallets6 release it will be easy to create currencies via the admin editor, so this will become much easier.)

    with regards

    in reply to: Giving coins to users programmatically #11524
    alexg
    Keymaster

    Hello,

    Thanks for sharing your plans. I’m not sure you’re using the word encryption correctly. I am not using any encryption in the plugins, as it’s not relevant. If you are referring to JSON-API calls, these are secured by TLS against eavesdropping, man-in-the-middle and replay attacks, but that’s got nothing to do with the plugin code.

    I also didn’t understand whether you will make your work available to others or whether it’s for use in your site only. In any case, I wish you the best of luck with your project!

    Giving coins is not related to coin adapters. To modify the ledger, use the wallets_api_move action as discussed above. This will let you transfer any type of coins from the admin account, whether they were introduced using the fiat adapter or not.

    with regards

    in reply to: Error when I activate airdrop/fiat plugin #11512
    alexg
    Keymaster

    Thank you.

    This is a common issue with TGMPA, I have seen it before.

    Some themes do not load TGMPA correctly because they assume that no other plugin is using that same library.

    Simply delete the file wp-content/plugins/wallets-airdrop/includes/third-party/TGM-Plugin-Activation/class-tgm-plugin-activation.php

    This should resolve the problem.

    Ideally you should notify the theme developer about this. All themes and plugins must check if TGMPA is defined before attempting to redefine it. Unfortunately some themes do not include the latest version of TGMPA that does this extra check.

    with regards

    in reply to: Did you retire the Block.io Adapter? #11507
    alexg
    Keymaster

    Hello,

    I have moved the block.io adapter to the wastedump, where old extensions go to die.

    There were complaints about block.io from some users and in fact some people were saying that block.io is a scam site. I don’t know if these are true or not. But my implementation was somewhat slow and buggy, and the CoinPayments adapter is superior in every way (is faster and offers more coins). This is why I stopped working on the block.io adapter and am not advertising it any more.

    If you are using it without issues, you can continue using it.

    with regards

    in reply to: Error when I activate airdrop/fiat plugin #11506
    alexg
    Keymaster

    Hello,

    Can you please show me the entire error so I can help?

    You should have received an email from your site, with a PHP error message and a stack trace.

    Alternatively, the error should also be in your PHP error log.

    with regards

    in reply to: Giving coins to users programmatically #11492
    alexg
    Keymaster

    Hello,

    You should not manipulate the wp_wallets_txs table directly for a number of reasons. Mainly, the table is going to be removed in the next major version 6.0.0 of the plugin. You are quite right that the table is kinda weird; in fact, in the past I have ranted about how bad this is, and I’m looking forward to get rid of it!

    Instead, to create a transfer, you can use the wallets_api_move action from the PHP API:

    https://wallets-phpdoc.dashed-slug.net/classes/Dashed_Slug_Wallets_PHP_API.html#method_api_move_action. This PHP API will be preserved in future versions of the plugin.

    A gaming service is a very interesting application. If I may ask, are you developing this for use on your site only, or is it something that you plan to publish/sell somewhere?

    with regards

    https://mail.zoho.com/zm/#mail/folder/inbox/p/1645276382613100001

    Hello,

    Yes this is a typical problem. Hopefully there will not be any such issues once the WP-REST API becomes available. In the meantime, look into your cashing plugin and see if you can disable

Viewing 15 posts - 151 through 165 (of 2,207 total)