Send tokens using PHP

Overview

Waiting vs Not Waiting

The $transactionCount obtained by calling getTransactionCount() is only accurate if ALL the previously submitted transactions have been mined. There's some code that waits for the transaction to be mined. If the wait is removed or bypassed then it will be necessary to manually count how many transactions were submitted and manually increment $transactionCount.

Search for information on the ethereum nonce to better understand the importance of the transaction count.

Requirements

  1. Manually install PHP 7.x (one of the packages doesn't support 8.x yet).
  2. Uncomment extension=gmp in your php.ini file.
  3. Manually install php composer from https://getcomposer.org/.

Inital Setup

If this is the first time you've cloned this repository then run

  1. Run command composer install
  2. Create .env file from .env.example file

Running

php public/sendTokens.php 0xB3F0c9d503104163537Dd741D502117BBf6aF8f1 2 500000000000000000

Debugging

  1. Follow instructions at https://xdebug.org/wizard
    • On Windows, if not specified make sure to rename the DLL to exactly php_xdebug.dll.
  2. Add zend_extension = xdebug
  3. Start your debugger
  4. Run command php -dxdebug.mode=debug -dxdebug.start_with_request=yes public/sendTokens.php 0xB3F0c9d503104163537Dd741D502117BBf6aF8f1 2 500000000000000000
Comments
  • This problem occurs in batch transfer tokens

    This problem occurs in batch transfer tokens

    Hello, this prompt appears when I use batch transfer tokens. Every transaction will not succeed. Maybe the last transaction will succeed.

    Error prompt

    transaction error: insufficient funds for gas * price + value

    opened by yunwow 7
  • estimateGas error: execution reverted

    estimateGas error: execution reverted

    This error occurred when I used BSC chain to send BNB tokens. Have you ever met? There are no problems with other chains

    estimateGas error: execution reverted

    opened by yunwow 3
  • execution reverted when running php

    execution reverted when running php

    hi @benrobot , I found you comment on this issue. and I decide to clone your project and run it. when I run it, some message "execution reverted" appear. can you assist me regarding this messages. thankyou image

    edit : I realized, I dont deployed your contract(ABI file) to my address, can you provide sol .sol file so I can deploy it by myself.

    opened by alvinChristianto 2
  • Sobre el número de transferencias

    Sobre el número de transferencias

    I see the example of transferring 2.5 tokens is like this. If I transfer 10.098, how can I write it? I tried to add 0 to 19 later, but still failed. He will transfer 1.0098 tokens

    echo "Example to send 2.5 tokens: php sendTokens.php 0xB3F0c9d503104163537Dd741D502117BBf6aF8f1 2 500000000000000000" . PHP_EOL;

    opened by yunwow 3
  • How to set the price flexibly?

    How to set the price flexibly?

    On Web3 php_ send_ tokens_ For example, there is a variable "$factortomultipliygasestimate" in this project. When I trade the BSC chain, I am always troubled by the size of this value. The situation is as follows:

    Example 1: if my BSC chain wallet has a BNB worth $25, I can only set it at 150000 - 200000. If it exceeds that, the transaction will fail. And get an error prompt "insufficient funds for gas * price + value"

    Example 2: if my BSC chain wallet has a BNB worth $1000, I must set it above 250000, otherwise I will fail again. And get a new error prompt "replacement transaction underpriced"

    How can I handle the correct setting of this "price" variable. Sincerely ask you!

    opened by yunwow 3
Owner
Benjamin Roedell
Benjamin Roedell
Manage your Sanctum tokens inside of Filament. ✨

:package_description This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. Installation You can i

Ryan Chandler 2 Feb 14, 2022
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers

Magento 2 SMTP Extension - Gmail, G Suite, Amazon SES, Office 365, Mailgun, SendGrid, Mandrill and other SMTP servers. For Magento 2.0.x, 2.1.x, 2.2.x

MagePal :: Magento Extensions 303 Oct 7, 2022
Package to send customer specific prices to Magento from a Laravel application using a configurable source.

Laravel Magento Customer Prices This package provides a way to add customer specific prices to Magento from a Laravel app. By default, it uses the Mag

JustBetter 14 Nov 4, 2022
Package to send prices to Magento from a Laravel application using a configurable source.

Laravel Magento Prices Package to send prices to Magento from a Laravel application using a configurable source. Features The idea is that we want to

JustBetter 15 Nov 4, 2022
It allows frontend developer to send ajax requests and return a custom information from the server without a php developer help

[Magento 1 Extension] It allows frontend developer to send ajax requests and return a custom information from the server without a php developer help (without any php code).

Vladimir Fishchenko 62 Apr 1, 2022
Make WhatsApp ChatBot and use WhatsApp API to send the WhatsApp messages in php .

Ultramsg.com WhatsApp Bot using WhatsApp API and ultramsg Demo WhatsApp API ChatBot using Ultramsg API with php. Chatbot tasks: The output of the comm

Ultramsg 33 Nov 19, 2022
⚡️ A WordPress plugin to quickly send a 404 for missing static files

Static 404 A WordPress plugin to quickly send a 404 for missing static files. Quickly output a 404 for static files that aren't found, rather than loa

Brad Parbs 26 Oct 6, 2022
A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet.

GitLabBundle A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet. Installation First clone it to your Kimai installatio

LibreCode coop 9 Nov 14, 2022
> Create e-wallet, send money, withdraw and check balance all via USSD protocol

Mobile Money USSD solution Create e-wallet, send money, withdraw and check balance all via USSD protocol Create e-wallet Step 1 Step 2 Step 3 Step 4 S

Emmanuel HAKORIMANA 1 Nov 3, 2021
Send your laravel apps to the moon with web3 enabled 🚀

Laravel Web3 ?? ?? Laravel Web3 helps you to kickstart your web3 apps. No more headache with handling wallet changing address and sync with laravel ba

Ricardo Sawir 15 Oct 29, 2022
UpDown is an uptime monitor, We send out notifications when something's wrong.

About UpDown Updown is an uptime monitor, We send out notifications when something's wrong. Be the first to know that your website is down! Reliable m

Hussam Adil 4 May 8, 2022
An easy code to send messages on a discord text channel with webhook.

Status Webhook-Discord An easy code to send messages on a discord text channel with webhook. Don't forget to check the latest version of Webhook-Disco

Victor 1 Dec 3, 2021
This is an implementation of PSR specification. It allows you to send and consume message with Redis store as a broker.

This is an implementation of PSR specification. It allows you to send and consume message with Redis store as a broker.

Enqueue 35 Nov 4, 2022
Simple loader to send request and read response from address.

Simple loader to send request and read response from address. Uses cURL extension. Composer package.

null 2 May 17, 2022
A fully-managed real-time messaging service that allows you to send and receive messages between independent applications.

A fully-managed real-time messaging service that allows you to send and receive messages between independent applications.

Google APIs 58 Dec 23, 2022
Ask your friends to send you an anonymous message without knowing them

Ask your friends to send you an anonymous message without knowing them. ????????

Siavash 1 Apr 16, 2022
↪️🔔 Send notification action for Nextcloud Flow

Nextcloud Flow Notifications ?? Notification action for Nextcloud Flow ?? Configure your flow ?? Receive notifications ?? Development setup ☁ Clone th

Nextcloud 13 Dec 2, 2022
Container Open Inventory ID send bug fix PocketMine-MP plugin

ContainerOpenFixed Container Open Inventory ID send bug fix PocketMine-MP plugin Example use skh6075\containeropenfixed\IWindowType; use pocketmine\ne

avas 2 May 20, 2022
Laravel & MySQL, jQuery, Ajax, Bootstrap. Also, it's include email send function without any API.

Rewards-Dacor Laravel & MySQL, jQuery, Ajax, Bootstrap. Also, it's include email send function without any API. [Live site link] ( https://rewardsdaco

Professional Developer 13 Dec 26, 2022