Questions tagged [web3.php]

A php interface for interacting with the Ethereum blockchain and ecosystem. Native ABI parsing and smart contract interactions.

Filter by
Sorted by
Tagged with
2 votes
1 answer
81 views

Why there is no private key in sending transaction code in Web3.php?

I want to use Web3.php so that I send contract transaction to Ethereum blockchain. I use the following code: $web3 = new Web3('... node address ...'); $contract = new Contract($web3->provider, $...
Alireza Zojaji's user avatar
1 vote
0 answers
21 views

Problem in calling an Ethereum contract method using Web3.php

I am using Web3.php to read an ERC20 token balance of a wallet from its contract. use Web3\Web3; use Web3\Contract; use Web3\Utils; $web3 = new Web3('https://node.surnet.org:8545'); $contractAbi = ...
Alireza Zojaji's user avatar
0 votes
0 answers
76 views

how can I get a Block hash before sending?

I'm using tron-api for trx transactions. The obtained raw_data is as follows: [ "visible" => false "txID" => "...
pan's user avatar
  • 1
1 vote
1 answer
158 views

Transfer Token BSC Always Return Error

I use web3 php to connnect to BSC and it is work, unless one things that is to send BEP20 token to others wallet. I created some function like Get Balance of BNB, get Balance of BEP20 also transfer ...
Cloud Mining's user avatar
0 votes
1 answer
156 views

BSC always return insufficient funds for gas * price + value

I want to send a transaction in BSC network. I already set this params for sending Array ( [nonce] => 0 [address] => 0xb7a2565fa170b8b5b2bf5035665f169066a5c7fb [toaddress] => ...
Cloud Mining's user avatar
0 votes
1 answer
617 views

e is not a constructor - WalletConnectProvider model not working

Metamask is working perfectly. BinanceChainWallet is working perfectly. WalletConnectProvider (model: QR - desktop/mobile wallet support), not working when I click on Wallet-Connect model on the front-...
AMHF's user avatar
  • 1
1 vote
0 answers
534 views

How to get the latest block of a contract with web3.php?

I need to get the latest block because 'latest' as toBlock doesn't work. I tried the code below with $toBlock = 'latest' $this->eth->getLogs([ 'fromBlock' => (is_int($fromBlock)) ? '0x' . ...
Vincent's user avatar
  • 123
0 votes
0 answers
90 views

Is it possible to scan for security vulnerability of Smart Contract in PHP

I am trying to use https://github.com/digitaldonkey/ethereum-php to build an api tool for scanning smart contracts for vulnerbilities. Ref link: https://ethereum-php.org/dev/ My doubt it is possible ...
Abinaya Sethuraman's user avatar
0 votes
1 answer
616 views

Calling a function unsing Web3 - External or Public

I have this function in the smart contract: function _mint(address account, uint256 amount) external onlyOwner { require(account != address(0), "ERC20: mint to the zero address"); ...
Vincent's user avatar
  • 123
0 votes
0 answers
219 views

Sending XRP tokens from a smart contract to a wallet

I'm trying to use a PHP library (Web3.php) to achieve a transaction of XRP tokens from a simple smart contract to a wallet. use Web3\Web3; use Web3\Providers\HttpProvider; use Web3\RequestManagers\...
Vincent's user avatar
  • 123
1 vote
1 answer
146 views

Transaction never appear on Rinkeby

I've signed a transaction with my private key and then used the sendRawTransaction function to send the transaction on the network, I got the Transaction Hash, but when I use that transaction has in ...
Vipul Prajapati's user avatar
3 votes
1 answer
2k views

How to send USDT using Web3.php

i am trying to send USDT using the ERC20 address . But not able to do. Can anyone please guide me how to do ..Here is the steps Step 1: use Web3\Contract; $contractAddress = 'ERC-20 contract deployed ...
Ram Chaudharay's user avatar
2 votes
3 answers
3k views

How can I transfer tokens of my ERC20 automatically from the server?

I deployed an ERC20 contract. I want to send tokens to other addresses without my manual sign. How can I transfer tokens from my wallet automatically from the server? (via php for example) Thanks.
JTCon's user avatar
  • 703
0 votes
1 answer
90 views

Can we use both centralized and decentralized approach for developing DAPP?

I saw a dapp using Decentralized approach for the buying and selling ERC20 Tokens ..But there's no proof of using the functions defined in smart contract in the web3js library.How is that possible ?.....
developer base's user avatar
1 vote
1 answer
553 views

Why does some of the DAPP uses PHP and how would they do so?

I always wonder how come many DAPPS uses PHP extension at the end of the filename and how did they do so ?? There is slighlty possibility that they are using the Web3PHP library to interact with the ...
developer base's user avatar
0 votes
1 answer
2k views

How to estimate gasLimit of ERC20 contracts in web3.php project?

I am using web3.php project in my Ethereum based project. A part of this project is sending ERC20 tokens, and in this regard, I need to estimate gas limit of transaction. For this purpose, I found the ...
Mohammad Saberi's user avatar
0 votes
0 answers
1k views

Web3 library to use with Laravel [duplicate]

Is there some library like web3.js or ethers.js but in PHP to use with Laravel? (Which code is hopefully maintained) Or is PHP just the strongest choice possible I want to work with web3?
Agilulfo's user avatar
1 vote
1 answer
2k views

web3.php - How to call a contract function that mutates states?

I'm creating web3 instance $web3 = new Web3( new HttpProvider( new HttpRequestManager( config('infura....
realtebo's user avatar
  • 333
0 votes
1 answer
419 views

Erc-20 Token Send Transaction

I want some Information about Erc-20 Transactions. I want to transfer Erc-20Token from first wallet to a second wallet, I have Privet Key, But I want to transfer with Api, So How can I transfer the ...
user56799's user avatar
1 vote
1 answer
2k views

Generate wallet public and private key using Web3.php

I am using this to get public key: https://github.com/sc0Vu/web3.php#assign-value-to-outside-scopefrom-callback-scope-to-outside-scope I am in need of to get the public and private key using PHP ...
Kamran Jabbar's user avatar
2 votes
2 answers
2k views

How to connect with public Ethereum Blockchain on a backend/web server?

In the backend of a Web application I have to communicate with the public Ethereum Blockchain. On local development machine, I run ganache as testrpc and connect with such a line of code: web3 = new ...
delete's user avatar
  • 327
1 vote
1 answer
270 views

My web3.php installation question

How can I install web3.php? Can I use shared hosting to run it or I must use vps, if I use vps I must use root to install web3.php? Thanks.
Louis's user avatar
  • 1,155