Auto select call or transact depending on constness.

pull/272/merge
Gav Wood 10 years ago
parent 7869294a26
commit fb34c6c7b9
  1. 4
      dist/ethereum.js
  2. 2
      dist/ethereum.js.map
  3. 2
      dist/ethereum.min.js
  4. 4
      lib/contract.js

4
dist/ethereum.js vendored

@ -500,11 +500,11 @@ var contract = function (address, desc) {
options.to = address; options.to = address;
options.data = signature + parsed; options.data = signature + parsed;
var isTransact = result._isTransact; var isTransact = result._isTransact === true || (result._isTransact !== false && !method.constant);
// reset // reset
result._options = {}; result._options = {};
result._isTransact = false; result._isTransact = null;
if (isTransact) { if (isTransact) {
// it's used byt natspec.js // it's used byt natspec.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -89,11 +89,11 @@ var contract = function (address, desc) {
options.to = address; options.to = address;
options.data = signature + parsed; options.data = signature + parsed;
var isTransact = result._isTransact; var isTransact = result._isTransact === true || (result._isTransact !== false && !method.constant);
// reset // reset
result._options = {}; result._options = {};
result._isTransact = false; result._isTransact = null;
if (isTransact) { if (isTransact) {
// it's used byt natspec.js // it's used byt natspec.js

Loading…
Cancel
Save