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!

Reply To: Giving coins to users programmatically

dashed-slug.net Forums General discussion Giving coins to users programmatically 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!