ERROR
$contract2->at($contractAddress)->call('getID', "123456789012", function ($err, $result) use ($contract2)
If integer value is passed and method returns string, it treated as smart contract error.
WORKING
$contract2->at($contractAddress)->call('getID', "a123456789012", function ($err, $result) use ($contract2)
If string is passed and returns string, it is working properly.
Only number as input is not supported.
$testAbi1 = '[
{
"inputs": [
{
"internalType": "string",
"name": "title",
"type": "string"
}
],
"name": "getID",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
}]';
$contract2 = new Contract($URL, $testAbi1);
ERROR
$contract2->at($contractAddress)->call('getID', "123456789012", function ($err, $result) use ($contract2)
If integer value is passed and method returns string, it treated as smart contract error.
WORKING
$contract2->at($contractAddress)->call('getID', "a123456789012", function ($err, $result) use ($contract2)
If string is passed and returns string, it is working properly.
Only number as input is not supported.