mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 19:48:13 +00:00
add deprecated transact
This commit is contained in:
parent
181f1093e6
commit
5ea5be2489
10
dist/ethereum.js
vendored
10
dist/ethereum.js
vendored
@ -315,11 +315,19 @@ var addFunctionRelatedPropertiesToContract = function (contract) {
|
||||
return contract;
|
||||
};
|
||||
|
||||
|
||||
contract.sendTransaction = function (options) {
|
||||
contract._isTransaction = true;
|
||||
contract._options = options;
|
||||
return contract;
|
||||
};
|
||||
// DEPRECATED
|
||||
contract.transact = function (options) {
|
||||
|
||||
console.warn('myContract.transact() is deprecated please use myContract.sendTransaction() instead.');
|
||||
|
||||
return contract.sendTransaction(options);
|
||||
};
|
||||
|
||||
contract._options = {};
|
||||
['gas', 'gasPrice', 'value', 'from'].forEach(function(p) {
|
||||
@ -469,7 +477,7 @@ var contract = function (abi) {
|
||||
if(Object.prototype.toString.call(abi) === '[object Array]' && arguments.length === 1) {
|
||||
return Contract.bind(this, abi);
|
||||
|
||||
// depreacted: auto initiate contract
|
||||
// deprecated: auto initiate contract
|
||||
} else {
|
||||
|
||||
console.warn('Initiating a contract like this is deprecated please use var MyContract = eth.contract(abi); new MyContract(address); instead.');
|
||||
|
4
dist/ethereum.js.map
vendored
4
dist/ethereum.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethereum.min.js
vendored
2
dist/ethereum.min.js
vendored
File diff suppressed because one or more lines are too long
@ -43,11 +43,19 @@ var addFunctionRelatedPropertiesToContract = function (contract) {
|
||||
return contract;
|
||||
};
|
||||
|
||||
|
||||
contract.sendTransaction = function (options) {
|
||||
contract._isTransaction = true;
|
||||
contract._options = options;
|
||||
return contract;
|
||||
};
|
||||
// DEPRECATED
|
||||
contract.transact = function (options) {
|
||||
|
||||
console.warn('myContract.transact() is deprecated please use myContract.sendTransaction() instead.');
|
||||
|
||||
return contract.sendTransaction(options);
|
||||
};
|
||||
|
||||
contract._options = {};
|
||||
['gas', 'gasPrice', 'value', 'from'].forEach(function(p) {
|
||||
@ -197,7 +205,7 @@ var contract = function (abi) {
|
||||
if(Object.prototype.toString.call(abi) === '[object Array]' && arguments.length === 1) {
|
||||
return Contract.bind(this, abi);
|
||||
|
||||
// depreacted: auto initiate contract
|
||||
// deprecated: auto initiate contract
|
||||
} else {
|
||||
|
||||
console.warn('Initiating a contract like this is deprecated please use var MyContract = eth.contract(abi); new MyContract(address); instead.');
|
||||
|
Loading…
x
Reference in New Issue
Block a user