web3p / web3.php

A php interface for interacting with the Ethereum blockchain and ecosystem. Native ABI parsing and smart contract interactions.
MIT License
1.16k stars 543 forks source link

Wrong type of eth_sendTransaction method argument 0. #273

Open jayvs6341 opened 2 years ago

jayvs6341 commented 2 years ago

I have a ERC20 smart contract deployed on Testnet.

While calling "transfer" function, also given in the example of this project,I am getting following error.

Wrong type of eth_sendTransaction method argument 0.

Code :-

$contract->at($contractAddress)->send('transfer', $toAccount, 16, [ 'from' => $fromAccountPrivateKey, 'gas' => '0x200b20' ], function ($err, $result) use ($contract, $fromAccount, $toAccount) {

            });
sc0Vu commented 2 years ago

Hi @jayvs6341

The function call depends on your abi, can you paste here (only the abi of transfer function)?