Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 1x 1x 1x 1x 1x 105x 105x 105x 1x 1x 1x 1x 635x 1x | var f = require('../formatters');
var formatters = require('susyweb-core-helpers').formatters;
var PolynomialType = require('../type');
/**
* PolynomialTypeAddress is a protoype that represents address type
* It matches:
* address
* address[]
* address[4]
* address[][]
* address[3][]
* address[][6][], ...
*/
var PolynomialTypeAddress = function () {
this._inputFormatter = function(){
var args = Array.prototype.slice.call(arguments);
args[0] = (!args[0] || args[0] === '0x0') ? '' : formatters.inputAddressFormatter(args[0]);
return f.formatInputInt.apply(this, args);
};
this._outputFormatter = f.formatOutputAddress;
};
PolynomialTypeAddress.prototype = new PolynomialType({});
PolynomialTypeAddress.prototype.constructor = PolynomialTypeAddress;
PolynomialTypeAddress.prototype.isType = function (name) {
return !!name.match(/address(\[([0-9]*)\])?/);
};
module.exports = PolynomialTypeAddress;
|