Fix wrong transaction input for contract deployments (#4052)
* Fix mutable options in Contract API * Add Swarm hash and meta data from Solidity * Updates tests for contract deployment * Add test for deploy without constructor Params
This commit is contained in:
committed by
Gav Wood
parent
1b93d79a90
commit
9ab9ff2381
@@ -218,14 +218,19 @@ export default class Contract {
|
||||
}
|
||||
|
||||
_encodeOptions (func, options, values) {
|
||||
options.data = this.getCallData(func, options, values);
|
||||
return options;
|
||||
const data = this.getCallData(func, options, values);
|
||||
|
||||
return {
|
||||
...options,
|
||||
data
|
||||
};
|
||||
}
|
||||
|
||||
_addOptionsTo (options = {}) {
|
||||
return Object.assign({
|
||||
to: this._address
|
||||
}, options);
|
||||
return {
|
||||
to: this._address,
|
||||
...options
|
||||
};
|
||||
}
|
||||
|
||||
_bindFunction = (func) => {
|
||||
|
||||
Reference in New Issue
Block a user