Remove to
parameter in publishing contract transaction
If sending empty `to` parameter, the error `Invalid params: expected a hex-encoded hash with 0x prefix.` is raised by Parity node.
This commit is contained in:
parent
4df0835f2b
commit
76609bf377
@ -397,7 +397,6 @@ class Contract
|
||||
if (count($arguments) > 0) {
|
||||
$transaction = $arguments[0];
|
||||
}
|
||||
$transaction['to'] = '';
|
||||
$transaction['data'] = '0x' . $this->bytecode . Utils::stripZero($data);
|
||||
|
||||
$this->eth->sendTransaction($transaction, function ($err, $transaction) use ($callback){
|
||||
@ -622,4 +621,4 @@ class Contract
|
||||
return $functionData;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user