mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-23 05:38:52 +00:00
add new blockchain event
This commit is contained in:
parent
974d492428
commit
f0746a8d8b
@ -183,7 +183,7 @@ class Blockchain {
|
||||
const self = this;
|
||||
|
||||
this.events.setCommandHandler("blockchain:defaultAccount:get", function(cb) {
|
||||
cb(self.defaultAccount);
|
||||
cb(self.defaultAccount());
|
||||
});
|
||||
|
||||
this.events.setCommandHandler("blockchain:defaultAccount:set", function(account, cb) {
|
||||
@ -199,6 +199,9 @@ class Blockchain {
|
||||
self.getGasPrice(cb);
|
||||
});
|
||||
|
||||
this.events.setCommandHandler("blockchain:contract:create", function(params, cb) {
|
||||
cb(self.ContractObject(params));
|
||||
});
|
||||
}
|
||||
|
||||
defaultAccount() {
|
||||
@ -226,7 +229,7 @@ class Blockchain {
|
||||
}
|
||||
|
||||
ContractObject(params) {
|
||||
return new this.web3.eth.Contract(params.abi);
|
||||
return new this.web3.eth.Contract(params.abi, params.address);
|
||||
}
|
||||
|
||||
deployContractObject(contractObject, params) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user