{"id":21270061,"url":"https://github.com/kornrunner/php-ethereum-token","last_synced_at":"2025-07-11T05:31:41.049Z","repository":{"id":56037270,"uuid":"238798209","full_name":"kornrunner/php-ethereum-token","owner":"kornrunner","description":"PHP Ethereum Token Utils","archived":false,"fork":false,"pushed_at":"2023-09-16T18:30:51.000Z","size":91,"stargazers_count":11,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-08T16:05:06.872Z","etag":null,"topics":["erc20","eth","ethereum","php-ethereum","raw","token","transaction"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kornrunner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-06T22:30:53.000Z","updated_at":"2024-10-21T06:31:50.000Z","dependencies_parsed_at":"2022-08-15T12:00:19.879Z","dependency_job_id":null,"html_url":"https://github.com/kornrunner/php-ethereum-token","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-ethereum-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-ethereum-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-ethereum-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-ethereum-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kornrunner","download_url":"https://codeload.github.com/kornrunner/php-ethereum-token/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225693737,"owners_count":17509227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erc20","eth","ethereum","php-ethereum","raw","token","transaction"],"created_at":"2024-11-21T08:14:47.704Z","updated_at":"2024-11-21T08:14:48.375Z","avatar_url":"https://github.com/kornrunner.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-ethereum-token [![Tests](https://github.com/kornrunner/php-ethereum-token/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/kornrunner/php-ethereum-token/actions/workflows/tests.yml) [![Coverage Status](https://coveralls.io/repos/github/kornrunner/php-ethereum-token/badge.svg?branch=master)](https://coveralls.io/github/kornrunner/php-ethereum-token?branch=master) [![Latest Stable Version](https://poser.pugx.org/kornrunner/ethereum-token/v/stable)](https://packagist.org/packages/kornrunner/ethereum-token)\n\nPHP Ethereum Token Utils\n\n## Installation\n\n```sh\n$ composer require kornrunner/ethereum-token\n```\n\n## Usage\n\nTo prepare a offline transaction, using `kornrunner/ethereum-offline-raw-tx`\n\n```php\nuse kornrunner\\Ethereum\\Token;\nuse kornrunner\\Ethereum\\Transaction;\n\n$nonce    = '04';\n$gasPrice = '03f5476a00';\n$gasLimit = '027f4b';\n$to       = '1a8c8adfbe1c59e8b58cc0d515f07b7225f51c72';\n\n$privateKey = 'b2f2698dd7343fa5afc96626dee139cb92e58e5d04e855f4c712727bf198e898';\n\n$token = new Token;\n$usdt  = new Token\\USDT;\n\n$amount = 20;\n$hexAmount = $token-\u003ehexAmount($usdt, $amount);\n// 0x1312d00\n\n$data = $token-\u003egetTransferData($to, $hexAmount);\n// 0xa9059cbb0000000000000000000000001a8c8adfbe1c59e8b58cc0d515f07b7225f51c720000000000000000000000000000000000000000000000000000000001312d00\n\n$transaction = new Transaction($nonce, $gasPrice, $gasLimit, $usdt::ADDRESS, '', $data);\n$transaction-\u003egetRaw($privateKey);\n// f8a9048503f5476a0083027f4b94dac17f958d2ee523a2206206994597c13d831ec7b844a9059cbb0000000000000000000000001a8c8adfbe1c59e8b58cc0d515f07b7225f51c720000000000000000000000000000000000000000000000000000000001312d00801ba03e141ea4233ec00bb3a80d7fea5f774b736772851b7bad18453d0f3c6097c42e9fa6eb47b6bead6a76d7db12809e2c916df999d7b99b613fcaa135abd8a0078e\n```\n\n## Crypto\n\n[![Ethereum](https://user-images.githubusercontent.com/725986/61891022-0d0c7f00-af09-11e9-829f-096c039bbbfa.png) 0x9c7b7a00972121fb843af7af74526d7eb585b171][Ethereum]\n\n[Ethereum]: https://etherscan.io/address/0x9c7b7a00972121fb843af7af74526d7eb585b171 \"Donate with Ethereum\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornrunner%2Fphp-ethereum-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkornrunner%2Fphp-ethereum-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornrunner%2Fphp-ethereum-token/lists"}