14 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
82
views
Ethers.js can call fetchMarketItems() fine, but PHP (web3p/web3.php) fails to decode the tuple[] return — how do I read struct[] results?
I have an NFT marketplace contract running on a local Hardhat node. The function below returns an array of structs:
struct MarketItem {
uint256 tokenId;
address payable seller;
address ...
1
vote
0
answers
123
views
Why do I get "Error sending transaction: unmarshal transaction failed" when using the Web3PHP library?
I'm encountering an issue while trying to send a transaction using the Web3PHP library. Here is the error am getting:
An error occurred: Error sending transaction: unmarshal transaction failed
This ...
0
votes
1
answer
261
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://...');
$contractAbi = file_get_contents(&...
2
votes
1
answer
2k
views
WEB3.PHP Contract Call
I am using this PHP library https://github.com/web3p/web3.php to make the requests to smart contracts on BSC.
$web3 = new Web3('https://bsc-dataseed.binance.org');
$contract = new Contract($web3->...
1
vote
0
answers
288
views
Get past transactions on a contract using web3.php
I am using web3.php script and need to get minted NFT IDs from a contract.
Solution I think about is to read past contract "transfer" events and get tokenId from its data.
but couldn't find ...
mhmd's user avatar
- 1,023
1
vote
0
answers
1k
views
PHP get estimate GAS using web3 php
I have been stuck for a couple of days while sending money using web3 PHP. Everything is working fine, and others are getting transferred to address successfully. But I am having some issues while ...
0
votes
0
answers
3k
views
PHP web3 ERC20 token function call
I have a Smart Contract that represent ERC20 token. I already deployed the smart contract on Binance Testnet using HardHat.
I have a deployed Smart Contract address as well.
I have integrated Web3 ...
2
votes
1
answer
1k
views
trying to store data on external ipfs node via http api , ipfs.infura.io refusing my connection
I'm trying to store data to ipfs via PHP, I use curl to communicate with API , it works fine on my local node, but I want to use an external node from infura.io
but for some reason, ipfs.infura.io is ...
0
votes
1
answer
999
views
Connect web3 php to ropsten test network
I successfully connect ganache blockchain to web3 php, this is some source code in laravel controller :
public function DecetralizeID(){
$contractABI = //[{*some abi*}]
$contract = new Contract('http:...
0
votes
1
answer
139
views
How to get completed, failed, pending status after erc20token transfer
I have a function in node.js to transfer erc20tokens using api like this:
app.post('/sendtokens', async(req, res) =>{
console.log(req.body)
let privateKey = req.body.privateKey;
let ...
0
votes
0
answers
476
views
First parameter must either be an object or the name of an existing class on Web3 on PHP
I am creating an ERC Token selling website. When a user signs up on the website, there should be generated an eth wallet automatically for that user and to store in db. After that when ever the user ...
3
votes
2
answers
6k
views
Verifying Ethereum (Web3) signed message in PHP
How can i verify Ethereum signed messase with PHP?
Message is signed using web3.personal.sign function in Web3.js and signature is then sent to server. How can I verify it with PHP?
Are there some ...
0
votes
1
answer
999
views
(MAC) PHP Fatal error: Uncaught Error: Class 'Web3\Web3' not found
I'm new to PHP, and I was trying to run
$exampleBase.php from web3.php on mac
but it keeps showing error :
PHP Fatal error: Uncaught Error: Class 'Web3\Web3' not found in /Users/hsnl/Desktop/code/...
1
vote
1
answer
2k
views
PHP array in callback smart contract web3.php
I try to read out a smart contract with web3.php, which works fine now, but I always only can read out a function, that returns a single value. When I call a function that returns for example a uint8 ...