How to use the web3-core-method.EstimateGasMethodModel function in web3-core-method

To help you get started, we’ve selected a few web3-core-method examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethereum / web3.js / packages / web3-eth-contract / src / models / EstimateGasOfContractMethodModel.js View on Github external
but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see .
 */
/**
 * @file EstimateGasOfContractMethodModel.js
 * @author Samuel Furter 
 * @date 2018
 */

"use strict";

var EstimateGasMethodModel = require('web3-core-method').EstimateGasMethodModel;

/**
 * @param {AbstractMethodModel} contractMethodModel
 * @param {Utils} utils
 * @param {Object} formatters
 * @param {MethodEncoder} methodEncoder
 *
 * @constructor
 */
function EstimateGasOfContractMethodModel(contractMethodModel, utils, formatters, methodEncoder) {
    EstimateGasMethodModel.call(this, utils, formatters);
    this.contractMethodParameters = contractMethodModel.contractMethodParameters;
    this.abiItem = contractMethodModel.abiItem;
    this.signature = contractMethodModel.signature;
    this.methodEncoder = methodEncoder;
}