Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1405 from ethereum/sendRawTransaction
Browse files Browse the repository at this point in the history
added sendRawTransaction
  • Loading branch information
yann300 authored Jan 23, 2020
2 parents cf9417e + 15b06fc commit 30d61a1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions remix-lib/src/universalDapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,20 @@ module.exports = class UniversalDApp {
})
}

/**
* call the current given contract
*
* @param {String} to - address of the contract to call.
* @param {String} data - data to send with the transaction ( return of txFormat.buildData(...) ).
* @param {Function} callback - callback.
*/
sendRawTransaction (to, data, confirmationCb, continueCb, promptCb, callback) {
this.runTx({to, data, useCall: false}, confirmationCb, continueCb, promptCb, (error, txResult) => {
// see universaldapp.js line 660 => 700 to check possible values of txResult (error case)
callback(error, txResult)
})
}

context () {
return (this.executionContext.isVM() ? 'memory' : 'blockchain')
}
Expand Down

0 comments on commit 30d61a1

Please sign in to comment.