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:
Pavel Rubin 2018-04-03 02:58:03 +03:00 committed by GitHub
parent 4df0835f2b
commit 76609bf377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}
}
}