I was trying to use web3.php library to make call to Infura, because it provide all the needed signature functions and data hashing functions.
But … I discovered that web3.php make a call to contract using sendTransaction, and Infura is not supporting this method…
So I still have the need to make a call from PHP 7 to a function that modifies status and passing params.
I am absolutely surprised that there are no examples
Actually, I cannot create a nodejs server to use a gateway using web3js and there are no infos about how to prepare data for funcitons calls in php
Hi @realtebo, good question. I just looked at that library. Are you using your Infura API endpoint in the ‘Using provider’ part of that repository? Such as
$web3 = new Web3(new HttpProvider(new HttpRequestManager('https://mainnet.infura.io/v3/YOUR-PROJECT-ID', 0.1)));
I haven’t tested that ^ I’m not sure if the library works with Infura in that way. Other web3 provider libraries do work with Infura exactly like that.
Also, there is https://github.com/web3p/ethereum-tx which might be used to craft the data used in sendRawTransaction.
Edit: please look at this example here: https://github.com/sc0Vu/web3.php/issues/84