// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma enum-naming
// tslint:disable:whitespace no-unbound-method no-trailing-whitespace
// tslint:disable:no-unused-variable
import {
    AwaitTransactionSuccessOpts,
    EncoderOverrides,
    ContractFunctionObj,
    ContractTxFunctionObj,
    SendTransactionOpts,
    BaseContract,
    PromiseWithTransactionHash,
    methodAbiToFunctionSignature,
    linkLibrariesInBytecode,
} from '@0x/base-contract';
import { schemas } from '@0x/json-schemas';
import {
    BlockParam,
    BlockParamLiteral,
    BlockRange,
    CallData,
    ContractAbi,
    ContractArtifact,
    DecodedLogArgs,
    MethodAbi,
    TransactionReceiptWithDecodedLogs,
    TxData,
    TxDataPayable,
    TxAccessListWithGas,
    SupportedProvider,
} from 'ethereum-types';
import { AbiEncoder, BigNumber, classUtils, EncodingRules, hexUtils, logUtils, providerUtils } from '@0x/utils';
import { EventCallback, IndexedFilterValues, SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { assert } from '@0x/assert';
import * as ethers from 'ethers';
// tslint:enable:no-unused-variable

/* istanbul ignore next */
// tslint:disable:array-type
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class DevUtilsContract extends BaseContract {
    /**
     * @ignore
     */
    public static deployedBytecode =
        '0x608060405234801561001057600080fd5b50600436106102775760003560e01c8063a5cd62ba11610160578063d186037f116100d8578063e4e6e7da1161008c578063ee18599711610071578063ee185997146105d8578063ef3bb097146105e0578063ff84e7cc146105e857610277565b8063e4e6e7da14610595578063e77286eb146105b657610277565b8063d3d862d1116100bd578063d3d862d114610540578063d469502814610553578063e25cabf71461057357610277565b8063d186037f1461051a578063d36379051461052d57610277565b8063bbb2dcf61161012f578063c82037ef11610114578063c82037ef146104dc578063ca49f47c146104e4578063d001c5dc1461050757610277565b8063bbb2dcf6146104b2578063c26cfecd146104d457610277565b8063a5cd62ba14610464578063a6627e9f14610484578063a7530f1214610497578063b43cffe11461049f57610277565b80637982653e116101f35780639baf2705116101c25780639eadc835116101a75780639eadc8351461041a578063a070cac81461043e578063a0901e511461045157610277565b80639baf2705146103fd5780639cd016051461041257610277565b80637982653e1461039657806379c9c426146103b65780637d727512146103c95780638f4ce479146103dc57610277565b80634dfdac201161024a57806363eb39921161022f57806363eb39921461033d5780636f83188e14610350578063750bdb301461037357610277565b80634dfdac20146102fd578063590aa8751461031d57610277565b806304a5618a1461027c5780630d7b7d76146102a75780632322cf76146102c857806346eb65cb146102e8575b600080fd5b61028f61028a3660046142ab565b6105f0565b60405161029e93929190614d24565b60405180910390f35b6102ba6102b5366004613d6f565b610689565b60405161029e929190614f2d565b6102db6102d6366004613d6f565b6106ab565b60405161029e9190614c01565b6102fb6102f63660046142ab565b6106d3565b005b61031061030b366004613c8a565b610757565b60405161029e9190614b59565b61033061032b366004613c6e565b6107da565b60405161029e9190614d84565b61033061034b366004613db3565b610889565b61036361035e3660046142ab565b61093c565b60405161029e9493929190614e19565b6103866103813660046142ab565b6109dc565b60405161029e9493929190614c42565b6103a96103a4366004614481565b610a6e565b60405161029e9190614e05565b6102db6103c4366004614589565b610b20565b6102db6103d7366004613d6f565b610ba1565b6103ef6103ea3660046142ab565b611497565b60405161029e929190614c1f565b61040561152a565b60405161029e9190614888565b610405611539565b61042d6104283660046142ab565b611548565b60405161029e959493929190614c7e565b6102db61044c366004614530565b6115ed565b61031061045f366004613e35565b61166e565b610477610472366004613f03565b6116e7565b60405161029e9190614a71565b610330610492366004613e0a565b6117a1565b610405611851565b6103306104ad366004613cd8565b611860565b6104c56104c03660046142ab565b611916565b60405161029e93929190614d4f565b6102db6119a6565b6104056119ac565b6104f76104f23660046142ab565b6119bb565b60405161029e9493929190614ce1565b610310610515366004613c8a565b611a4d565b6102db610528366004613d6f565b611abb565b6103a961053b366004614481565b612446565b61033061054e366004613fde565b6124a8565b6105666105613660046142ab565b6124fd565b60405161029e9190614c0a565b610586610581366004613f87565b6125a0565b60405161029e93929190614abe565b6105a86105a3366004613c8a565b6126d8565b60405161029e929190614bdc565b6105c96105c43660046144d9565b6126f1565b60405161029e93929190614ea6565b610405612960565b61040561296f565b61040561297e565b600080600073__$808f8f452496495931fd70b932e88106d9$__6304a5618a856040518263ffffffff1660e01b815260040161062c9190614d84565b60606040518083038186803b15801561064457600080fd5b505af4158015610658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061067c9190810190614201565b9250925092509193909250565b6000806106968484610ba1565b91506106a28484611abb565b90509250929050565b60008060006106ba8585610689565b915091506106c8828261298d565b925050505b92915050565b6040517f46eb65cb00000000000000000000000000000000000000000000000000000000815273__$808f8f452496495931fd70b932e88106d9$__906346eb65cb90610723908490600401614d84565b60006040518083038186803b15801561073b57600080fd5b505af415801561074f573d6000803e3d6000fd5b505050505b50565b606060008251905080604051908082528060200260200182016040528015610789578160200160208202803883390190505b50915060005b8181146107d2576107b3858583815181106107a657fe5b6020026020010151611abb565b8382815181106107bf57fe5b602090810291909101015260010161078f565b505092915050565b6040517f590aa87500000000000000000000000000000000000000000000000000000000815260609073__$808f8f452496495931fd70b932e88106d9$__9063590aa8759061082d908590600401614888565b60006040518083038186803b15801561084557600080fd5b505af4158015610859573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261088191908101906142de565b90505b919050565b6040517f63eb399200000000000000000000000000000000000000000000000000000000815260609073__$808f8f452496495931fd70b932e88106d9$__906363eb3992906108e0908790879087906004016149f1565b60006040518083038186803b1580156108f857600080fd5b505af415801561090c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261093491908101906142de565b949350505050565b60608060608073__$f3880127484c626d9b3a095208b13cbf1b$__636f83188e866040518263ffffffff1660e01b81526004016109799190614d84565b60006040518083038186803b15801561099157600080fd5b505af41580156109a5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109cd919081019061434c565b93509350935093509193509193565b6000806000606073__$808f8f452496495931fd70b932e88106d9$__63750bdb30866040518263ffffffff1660e01b8152600401610a1a9190614d84565b60006040518083038186803b158015610a3257600080fd5b505af4158015610a46573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109cd9190810190614085565b600080546040517f9caa023b00000000000000000000000000000000000000000000000000000000815273__$988eef118a938b5a4e7336ebab0aae599b$__91639caa023b91610ad0916001600160a01b031690889088908890600401614a23565b60206040518083038186803b158015610ae857600080fd5b505af4158015610afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610934919081019061432d565b600061093484610b9c6040518060400160405280600b81526020017f30782050726f746f636f6c0000000000000000000000000000000000000000008152506040518060400160405280600581526020017f332e302e3000000000000000000000000000000000000000000000000000000081525087876129a3565b6129fa565b600080610bb4838263ffffffff612a0e16565b90506001600160e01b031981167ff47261b0000000000000000000000000000000000000000000000000000000001415610c0f576000610bfb84601063ffffffff612a4716565b9050610c078186612a7a565b925050611490565b6001600160e01b031981167f02571792000000000000000000000000000000000000000000000000000000001415610e285760008073__$808f8f452496495931fd70b932e88106d9$__6304a5618a866040518263ffffffff1660e01b8152600401610c7b9190614d84565b60606040518083038186803b158015610c9357600080fd5b505af4158015610ca7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ccb9190810190614201565b6040519194509250606091507f6352211e0000000000000000000000000000000000000000000000000000000090610d07908490602401614c01565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060846001600160a01b031683604051610d82919061486c565b600060405180830381855afa9150503d8060008114610dbd576040519150601f19603f3d011682016040523d82523d6000602084013e610dc2565b606091505b50915091506000828015610dd7575081516020145b610de2576000610df3565b610df382600c63ffffffff612a4716565b9050896001600160a01b0316816001600160a01b031614610e15576000610e18565b60015b60ff169750505050505050611490565b6001600160e01b031981167fa7cb5fb70000000000000000000000000000000000000000000000000000000014156110c457600060608073__$808f8f452496495931fd70b932e88106d9$__639eadc835876040518263ffffffff1660e01b8152600401610e969190614d84565b60006040518083038186803b158015610eae57600080fd5b505af4158015610ec2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eea91908101906140ef565b5081519296509094509250905060005b8181146110ba57828181518110610f0d57fe5b602002602001015160001415610f22576110b2565b83516060907efdd58e00000000000000000000000000000000000000000000000000000000908b90879085908110610f5657fe5b6020026020010151604051602401610f6f929190614a58565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060876001600160a01b031683604051610fea919061486c565b600060405180830381855afa9150503d8060008114611025576040519150601f19603f3d011682016040523d82523d6000602084013e61102a565b606091505b5091509150600082801561103f575081516020145b61104a57600061105b565b61105b82600063ffffffff612b7216565b9050600087868151811061106b57fe5b6020026020010151828161107b57fe5b049050806110975760009b5050505050505050505050506106cd565b8b8110806110a357508b155b156110ac57809b505b50505050505b600101610efa565b5050505050611490565b6001600160e01b031981167fc339d10a0000000000000000000000000000000000000000000000000000000014156111f7576040516060907fa85e59e4000000000000000000000000000000000000000000000000000000009061113390869060009081908190602401614d97565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b03199094169390931790925260045491519092506000916001600160a01b03169061119a90849061486c565b600060405180830381855afa9150503d80600081146111d5576040519150601f19603f3d011682016040523d82523d6000602084013e6111da565b606091505b50509050806111ea5760006111ee565b6000195b93505050611490565b6001600160e01b031981167fdc1600f30000000000000000000000000000000000000000000000000000000014156113205760008073__$808f8f452496495931fd70b932e88106d9$__63750bdb30866040518263ffffffff1660e01b81526004016112639190614d84565b60006040518083038186803b15801561127b57600080fd5b505af415801561128f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112b79190810190614085565b5092509250506112c5612b7e565b6001600160a01b0316826001600160a01b03161480156112f257506005546001600160a01b038281169116145b1561131957600061130a611304612b96565b88612a7a565b905061131581612bae565b9450505b5050611490565b6001600160e01b031981167f94cfcdd70000000000000000000000000000000000000000000000000000000014156114905760608073__$808f8f452496495931fd70b932e88106d9$__63bbb2dcf6866040518263ffffffff1660e01b815260040161138c9190614d84565b60006040518083038186803b1580156113a457600080fd5b505af41580156113b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113e09190810190614241565b80519194509250905060005b81811461148b578381815181106113ff57fe5b60200260200101516000141561141457611483565b60006114338985848151811061142657fe5b6020026020010151610ba1565b9050600085838151811061144357fe5b6020026020010151828161145357fe5b0490508061146b5760009750505050505050506106cd565b87811080611477575087155b15611480578097505b50505b6001016113ec565b505050505b5092915050565b60008073__$808f8f452496495931fd70b932e88106d9$__638f4ce479846040518263ffffffff1660e01b81526004016114d19190614d84565b604080518083038186803b1580156114e857600080fd5b505af41580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611520919081019061404e565b915091505b915091565b6004546001600160a01b031681565b6000546001600160a01b031681565b600080606080606073__$808f8f452496495931fd70b932e88106d9$__639eadc835876040518263ffffffff1660e01b81526004016115879190614d84565b60006040518083038186803b15801561159f57600080fd5b505af41580156115b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115db91908101906140ef565b939a9299509097509550909350915050565b6000610934846116696040518060400160405280600b81526020017f30782050726f746f636f6c0000000000000000000000000000000000000000008152506040518060400160405280600581526020017f332e302e3000000000000000000000000000000000000000000000000000000081525087876129a3565b612dac565b606080825160405190808252806020026020018201604052801561169c578160200160208202803883390190505b50905060005b83518114611490578381815181106116b657fe5b60200260200101516001600160a01b0316318282815181106116d457fe5b60209081029190910101526001016116a2565b6000546040517f02cffc4500000000000000000000000000000000000000000000000000000000815260609173__$988eef118a938b5a4e7336ebab0aae599b$__916302cffc459161174d916001600160a01b03909116908890889088906004016148d9565b60006040518083038186803b15801561176557600080fd5b505af4158015611779573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109349190810190613e68565b6040517fa6627e9f00000000000000000000000000000000000000000000000000000000815260609073__$808f8f452496495931fd70b932e88106d9$__9063a6627e9f906117f69086908690600401614a58565b60006040518083038186803b15801561180e57600080fd5b505af4158015611822573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261184a91908101906142de565b9392505050565b6006546001600160a01b031681565b6040517fb43cffe100000000000000000000000000000000000000000000000000000000815260609073__$808f8f452496495931fd70b932e88106d9$__9063b43cffe1906118b990889088908890889060040161499f565b60006040518083038186803b1580156118d157600080fd5b505af41580156118e5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261190d91908101906142de565b95945050505050565b600060608073__$808f8f452496495931fd70b932e88106d9$__63bbb2dcf6856040518263ffffffff1660e01b81526004016119529190614d84565b60006040518083038186803b15801561196a57600080fd5b505af415801561197e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261067c9190810190614241565b60075481565b6005546001600160a01b031681565b6000806060600073__$808f8f452496495931fd70b932e88106d9$__63ca49f47c866040518263ffffffff1660e01b81526004016119f99190614d84565b60006040518083038186803b158015611a1157600080fd5b505af4158015611a25573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109cd9190810190614199565b606060008251905080604051908082528060200260200182016040528015611a7f578160200160208202803883390190505b50915060005b8181146107d257611a9c8585838151811061142657fe5b838281518110611aa857fe5b6020908102919091010152600101611a85565b600080611ace838263ffffffff612a0e16565b90506001600160e01b031981167f94cfcdd7000000000000000000000000000000000000000000000000000000001415611c395760608073__$808f8f452496495931fd70b932e88106d9$__63bbb2dcf6866040518263ffffffff1660e01b8152600401611b3c9190614d84565b60006040518083038186803b158015611b5457600080fd5b505af4158015611b68573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b909190810190614241565b80519194509250905060005b818114611c2e57838181518110611baf57fe5b602002602001015160001415611bc457611c26565b6000611bd6898584815181106107a657fe5b90506000858381518110611be657fe5b60200260200101518281611bf657fe5b04905080611c0e5760009750505050505050506106cd565b87811080611c1a575087155b15611c23578097505b50505b600101611b9c565b506106cd9350505050565b6001600160e01b031981167ff47261b0000000000000000000000000000000000000000000000000000000001415611c9a576000611c7e84601063ffffffff612a4716565b600154909150610c0790829087906001600160a01b0316612dbb565b6001600160e01b031981167f02571792000000000000000000000000000000000000000000000000000000001415611fea5760008073__$808f8f452496495931fd70b932e88106d9$__6304a5618a866040518263ffffffff1660e01b8152600401611d069190614d84565b60606040518083038186803b158015611d1e57600080fd5b505af4158015611d32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611d569190810190614201565b600254604051929550909350606092507fe985e9c50000000000000000000000000000000000000000000000000000000091611da2918a916001600160a01b039091169060240161489c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060846001600160a01b031683604051611e1d919061486c565b600060405180830381855afa9150503d8060008114611e58576040519150601f19603f3d011682016040523d82523d6000602084013e611e5d565b606091505b5091509150811580611e7157508051602014155b80611e8d5750611e8881600063ffffffff612b7216565b600114155b15611fdb576040516060907f081812fc0000000000000000000000000000000000000000000000000000000090611ec8908790602401614c01565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050856001600160a01b031681604051611f3f919061486c565b600060405180830381855afa9150503d8060008114611f7a576040519150601f19603f3d011682016040523d82523d6000602084013e611f7f565b606091505b509093509150828015611f93575081516020145b8015611fc257506002546001600160a01b0316611fb783600c63ffffffff612a4716565b6001600160a01b0316145b611fcd576000611fd0565b60015b60ff169750506110ba565b60001996505050505050611490565b6001600160e01b031981167fa7cb5fb7000000000000000000000000000000000000000000000000000000001415612211576040517f9eadc83500000000000000000000000000000000000000000000000000000000815260009073__$808f8f452496495931fd70b932e88106d9$__90639eadc8359061206f908790600401614d84565b60006040518083038186803b15801561208757600080fd5b505af415801561209b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120c391908101906140ef565b5050600354604051929450606093507fe985e9c5000000000000000000000000000000000000000000000000000000009261210d925089916001600160a01b03169060240161489c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060836001600160a01b031683604051612188919061486c565b600060405180830381855afa9150503d80600081146121c3576040519150601f19603f3d011682016040523d82523d6000602084013e6121c8565b606091505b50915091508180156121db575080516020145b80156121f757506121f381600063ffffffff612b7216565b6001145b612202576000612206565b6000195b955050505050611490565b6001600160e01b031981167fc339d10a00000000000000000000000000000000000000000000000000000000141561224d576000199150611490565b6001600160e01b031981167fdc1600f30000000000000000000000000000000000000000000000000000000014156114905760008073__$808f8f452496495931fd70b932e88106d9$__63750bdb30866040518263ffffffff1660e01b81526004016122b99190614d84565b60006040518083038186803b1580156122d157600080fd5b505af41580156122e5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261230d9190810190614085565b50925092505061231b612b7e565b6001600160a01b0316826001600160a01b031614801561234857506005546001600160a01b038281169116145b1561239257600061236d61235a612b96565b60055489906001600160a01b0316612dbb565b905060001981146123865761238181612bae565b61238a565b6000195b94505061243d565b6006546001600160a01b038281169116141561243d5773__$1fa048dff19b08eb02dfb6ebf13779c5bf$__630e70a03387836123cc612ec5565b6040518463ffffffff1660e01b81526004016123ea939291906148b6565b60206040518083038186803b15801561240257600080fd5b505af4158015612416573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061243a9190810190614641565b93505b50505092915050565b600080546040517f8dccde0400000000000000000000000000000000000000000000000000000000815273__$988eef118a938b5a4e7336ebab0aae599b$__91638dccde0491610ad0916001600160a01b031690889088908890600401614a23565b6040517fd3d862d100000000000000000000000000000000000000000000000000000000815260609073__$808f8f452496495931fd70b932e88106d9$__9063d3d862d1906117f69086908690600401614b6c565b6040517fd469502800000000000000000000000000000000000000000000000000000000815260009073__$808f8f452496495931fd70b932e88106d9$[encoded data, 6852 characters]$808f8f452496495931fd70b932e88106d9$__9163750bdb30916132c291600401614d84565b60006040518083038186803b1580156132da57600080fd5b505af41580156132ee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526133169190810190614085565b506006549093506001600160a01b038085169116141591506133e290505773__$1fa048dff19b08eb02dfb6ebf13779c5bf$__63d12a796086613357612ec5565b6040518363ffffffff1660e01b8152600401613374929190614edd565b60206040518083038186803b15801561338c57600080fd5b505af41580156133a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506133c49190810190614641565b6133d78660000151876101400151611abb565b935093505050611525565b505b6133f78460000151856101400151610ba1565b61340a8560000151866101400151611abb565b9250925050915091565b606063e946c1bb60e01b8484846040516024016130c693929190614dd5565b600082613442575060006106cd565b8282028284828161344f57fe5b041461184a5761184a612a2f60018686613414565b60008161347a5761347a612a2f60038585613414565b600082848161348557fe5b04949350505050565b6000602082518161349b57fe5b066004146134ab57506000610884565b60006134bd838263ffffffff612a0e16565b90506001600160e01b031981167f94cfcdd700000000000000000000000000000000000000000000000000000000146134fa576001915050610884565b6040517fbbb2dcf600000000000000000000000000000000000000000000000000000000815260609073__$808f8f452496495931fd70b932e88106d9$[encoded data, 13848 characters]';
    public static contractName = 'DevUtils';
    private readonly _methodABIIndex: { [name: string]: number } = {};
    public static async deployFrom0xArtifactAsync(
        artifact: ContractArtifact | SimpleContractArtifact,
        supportedProvider: SupportedProvider,
        txDefaults: Partial<TxData>,
        logDecodeDependencies: { [contractName: string]: ContractArtifact | SimpleContractArtifact },
        exchange_: string,
        chaiBridge_: string,
        dydxBridge_: string,
    ): Promise<DevUtilsContract> {
        assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema);
        if (artifact.compilerOutput === undefined) {
            throw new Error('Compiler output not found in the artifact file');
        }
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
        const bytecode = artifact.compilerOutput.evm.bytecode.object;
        const abi = artifact.compilerOutput.abi;
        const logDecodeDependenciesAbiOnly: { [contractName: string]: ContractAbi } = {};
        if (Object.keys(logDecodeDependencies) !== undefined) {
            for (const key of Object.keys(logDecodeDependencies)) {
                logDecodeDependenciesAbiOnly[key] = logDecodeDependencies[key].compilerOutput.abi;
            }
        }
        return DevUtilsContract.deployAsync(
            bytecode,
            abi,
            provider,
            txDefaults,
            logDecodeDependenciesAbiOnly,
            exchange_,
            chaiBridge_,
            dydxBridge_,
        );
    }

    public static async deployWithLibrariesFrom0xArtifactAsync(
        artifact: ContractArtifact,
        libraryArtifacts: { [libraryName: string]: ContractArtifact },
        supportedProvider: SupportedProvider,
        txDefaults: Partial<TxData>,
        logDecodeDependencies: { [contractName: string]: ContractArtifact | SimpleContractArtifact },
        exchange_: string,
        chaiBridge_: string,
        dydxBridge_: string,
    ): Promise<DevUtilsContract> {
        assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema);
        if (artifact.compilerOutput === undefined) {
            throw new Error('Compiler output not found in the artifact file');
        }
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
        const abi = artifact.compilerOutput.abi;
        const logDecodeDependenciesAbiOnly: { [contractName: string]: ContractAbi } = {};
        if (Object.keys(logDecodeDependencies) !== undefined) {
            for (const key of Object.keys(logDecodeDependencies)) {
                logDecodeDependenciesAbiOnly[key] = logDecodeDependencies[key].compilerOutput.abi;
            }
        }
        const libraryAddresses = await DevUtilsContract._deployLibrariesAsync(
            artifact,
            libraryArtifacts,
            new Web3Wrapper(provider),
            txDefaults,
        );
        const bytecode = linkLibrariesInBytecode(artifact, libraryAddresses);
        return DevUtilsContract.deployAsync(
            bytecode,
            abi,
            provider,
            txDefaults,
            logDecodeDependenciesAbiOnly,
            exchange_,
            chaiBridge_,
            dydxBridge_,
        );
    }

    public static async deployAsync(
        bytecode: string,
        abi: ContractAbi,
        supportedProvider: SupportedProvider,
        txDefaults: Partial<TxData>,
        logDecodeDependencies: { [contractName: string]: ContractAbi },
        exchange_: string,
        chaiBridge_: string,
        dydxBridge_: string,
    ): Promise<DevUtilsContract> {
        assert.isHexString('bytecode', bytecode);
        assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema);
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
        const constructorAbi = BaseContract._lookupConstructorAbi(abi);
        [exchange_, chaiBridge_, dydxBridge_] = BaseContract._formatABIDataItemList(
            constructorAbi.inputs,
            [exchange_, chaiBridge_, dydxBridge_],
            BaseContract._bigNumberToString,
        );
        const iface = new ethers.utils.Interface(abi);
        const deployInfo = iface.deployFunction;
        const txData = deployInfo.encode(bytecode, [exchange_, chaiBridge_, dydxBridge_]);
        const web3Wrapper = new Web3Wrapper(provider);
        const txDataWithDefaults = await BaseContract._applyDefaultsToContractTxDataAsync(
            {
                data: txData,
                ...txDefaults,
            },
            web3Wrapper.estimateGasAsync.bind(web3Wrapper),
        );
        const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
        logUtils.log(`transactionHash: ${txHash}`);
        const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
        logUtils.log(`DevUtils successfully deployed at ${txReceipt.contractAddress}`);
        const contractInstance = new DevUtilsContract(
            txReceipt.contractAddress as string,
            provider,
            txDefaults,
            logDecodeDependencies,
        );
        contractInstance.constructorArgs = [exchange_, chaiBridge_, dydxBridge_];
        return contractInstance;
    }

    /**
     * @returns      The contract ABI
     */
    public static ABI(): ContractAbi {
        const abi = [
            {
                inputs: [
                    {
                        name: 'exchange_',
                        type: 'address',
                    },
                    {
                        name: 'chaiBridge_',
                        type: 'address',
                    },
                    {
                        name: 'dydxBridge_',
                        type: 'address',
                    },
                ],
                outputs: [],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'constructor',
            },
            {
                constant: true,
                inputs: [],
                name: 'EIP712_EXCHANGE_DOMAIN_HASH',
                outputs: [
                    {
                        name: '',
                        type: 'bytes32',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
            {
                constant: true,
                inputs: [],
                name: 'chaiBridgeAddress',
                outputs: [
                    {
                        name: '',
                        type: 'address',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'decodeAssetProxyId',
                outputs: [
                    {
                        name: 'assetProxyId',
                        type: 'bytes4',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'decodeERC1155AssetData',
                outputs: [
                    {
                        name: 'assetProxyId',
                        type: 'bytes4',
                    },
                    {
                        name: 'tokenAddress',
                        type: 'address',
                    },
                    {
                        name: 'tokenIds',
                        type: 'uint256[]',
                    },
                    {
                        name: 'tokenValues',
                        type: 'uint256[]',
                    },
                    {
                        name: 'callbackData',
                        type: 'bytes',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'decodeERC20AssetData',
                outputs: [
                    {
                        name: 'assetProxyId',
                        type: 'bytes4',
                    },
                    {
                        name: 'tokenAddress',
                        type: 'address',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'decodeERC20BridgeAssetData',
                outputs: [
                    {
                        name: 'assetProxyId',
                        type: 'bytes4',
                    },
                    {
                        name: 'tokenAddress',
                        type: 'address',
                    },
                    {
                        name: 'bridgeAddress',
                        type: 'address',
                    },
                    {
                        name: 'bridgeData',
                        type: 'bytes',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'decodeERC721AssetData',
                outputs: [
                    {
                        name: 'assetProxyId',
                        type: 'bytes4',
                    },
                    {
                        name: 'tokenAddress',
                        type: 'address',
                    },
                    {
                        name: 'tokenId',
                        type: 'uint256',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'decodeMultiAssetData',
                outputs: [
                    {
                        name: 'assetProxyId',
                        type: 'bytes4',
                    },
                    {
                        name: 'amounts',
                        type: 'uint256[]',
                    },
                    {
                        name: 'nestedAssetData',
                        type: 'bytes[]',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'decodeStaticCallAssetData',
                outputs: [
                    {
                        name: 'assetProxyId',
                        type: 'bytes4',
                    },
                    {
                        name: 'staticCallTargetAddress',
                        type: 'address',
                    },
                    {
                        name: 'staticCallData',
                        type: 'bytes',
                    },
                    {
                        name: 'expectedReturnDataHash',
                        type: 'bytes32',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'transactionData',
                        type: 'bytes',
                    },
                ],
                name: 'decodeZeroExTransactionData',
                outputs: [
                    {
                        name: 'functionName',
                        type: 'string',
                    },
                    {
                        name: 'orders',
                        type: 'tuple[]',
                        components: [
                            {
                                name: 'makerAddress',
                                type: 'address',
                            },
                            {
                                name: 'takerAddress',
                                type: 'address',
                            },
                            {
                                name: 'feeRecipientAddress',
                                type: 'address',
                            },
                            {
                                name: 'senderAddress',
                                type: 'address',
                            },
                            {
                                name: 'makerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'takerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'makerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'takerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'expirationTimeSeconds',
                                type: 'uint256',
                            },
                            {
                                name: 'salt',
                                type: 'uint256',
                            },
                            {
                                name: 'makerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'makerFeeAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerFeeAssetData',
                                type: 'bytes',
                            },
                        ],
                    },
                    {
                        name: 'takerAssetFillAmounts',
                        type: 'uint256[]',
                    },
                    {
                        name: 'signatures',
                        type: 'bytes[]',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [],
                name: 'dydxBridgeAddress',
                outputs: [
                    {
                        name: '',
                        type: 'address',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'tokenAddress',
                        type: 'address',
                    },
                    {
                        name: 'tokenIds',
                        type: 'uint256[]',
                    },
                    {
                        name: 'tokenValues',
                        type: 'uint256[]',
                    },
                    {
                        name: 'callbackData',
                        type: 'bytes',
                    },
                ],
                name: 'encodeERC1155AssetData',
                outputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'tokenAddress',
                        type: 'address',
                    },
                ],
                name: 'encodeERC20AssetData',
                outputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'tokenAddress',
                        type: 'address',
                    },
                    {
                        name: 'tokenId',
                        type: 'uint256',
                    },
                ],
                name: 'encodeERC721AssetData',
                outputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'amounts',
                        type: 'uint256[]',
                    },
                    {
                        name: 'nestedAssetData',
                        type: 'bytes[]',
                    },
                ],
                name: 'encodeMultiAssetData',
                outputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'staticCallTargetAddress',
                        type: 'address',
                    },
                    {
                        name: 'staticCallData',
                        type: 'bytes',
                    },
                    {
                        name: 'expectedReturnDataHash',
                        type: 'bytes32',
                    },
                ],
                name: 'encodeStaticCallAssetData',
                outputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [],
                name: 'erc1155ProxyAddress',
                outputs: [
                    {
                        name: '',
                        type: 'address',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
            {
                constant: true,
                inputs: [],
                name: 'erc20ProxyAddress',
                outputs: [
                    {
                        name: '',
                        type: 'address',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
            {
                constant: true,
                inputs: [],
                name: 'erc721ProxyAddress',
                outputs: [
                    {
                        name: '',
                        type: 'address',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
            {
                constant: true,
                inputs: [],
                name: 'exchangeAddress',
                outputs: [
                    {
                        name: '',
                        type: 'address',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'ownerAddress',
                        type: 'address',
                    },
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'getAssetProxyAllowance',
                outputs: [
                    {
                        name: 'allowance',
                        type: 'uint256',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'ownerAddress',
                        type: 'address',
                    },
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'getBalance',
                outputs: [
                    {
                        name: 'balance',
                        type: 'uint256',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'ownerAddress',
                        type: 'address',
                    },
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'getBalanceAndAssetProxyAllowance',
                outputs: [
                    {
                        name: 'balance',
                        type: 'uint256',
                    },
                    {
                        name: 'allowance',
                        type: 'uint256',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'ownerAddress',
                        type: 'address',
                    },
                    {
                        name: 'assetData',
                        type: 'bytes[]',
                    },
                ],
                name: 'getBatchAssetProxyAllowances',
                outputs: [
                    {
                        name: 'allowances',
                        type: 'uint256[]',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'ownerAddress',
                        type: 'address',
                    },
                    {
                        name: 'assetData',
                        type: 'bytes[]',
                    },
                ],
                name: 'getBatchBalances',
                outputs: [
                    {
                        name: 'balances',
                        type: 'uint256[]',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'ownerAddress',
                        type: 'address',
                    },
                    {
                        name: 'assetData',
                        type: 'bytes[]',
                    },
                ],
                name: 'getBatchBalancesAndAssetProxyAllowances',
                outputs: [
                    {
                        name: 'balances',
                        type: 'uint256[]',
                    },
                    {
                        name: 'allowances',
                        type: 'uint256[]',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'addresses',
                        type: 'address[]',
                    },
                ],
                name: 'getEthBalances',
                outputs: [
                    {
                        name: '',
                        type: 'uint256[]',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'order',
                        type: 'tuple',
                        components: [
                            {
                                name: 'makerAddress',
                                type: 'address',
                            },
                            {
                                name: 'takerAddress',
                                type: 'address',
                            },
                            {
                                name: 'feeRecipientAddress',
                                type: 'address',
                            },
                            {
                                name: 'senderAddress',
                                type: 'address',
                            },
                            {
                                name: 'makerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'takerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'makerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'takerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'expirationTimeSeconds',
                                type: 'uint256',
                            },
                            {
                                name: 'salt',
                                type: 'uint256',
                            },
                            {
                                name: 'makerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'makerFeeAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerFeeAssetData',
                                type: 'bytes',
                            },
                        ],
                    },
                    {
                        name: 'chainId',
                        type: 'uint256',
                    },
                    {
                        name: 'exchange',
                        type: 'address',
                    },
                ],
                name: 'getOrderHash',
                outputs: [
                    {
                        name: 'orderHash',
                        type: 'bytes32',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'order',
                        type: 'tuple',
                        components: [
                            {
                                name: 'makerAddress',
                                type: 'address',
                            },
                            {
                                name: 'takerAddress',
                                type: 'address',
                            },
                            {
                                name: 'feeRecipientAddress',
                                type: 'address',
                            },
                            {
                                name: 'senderAddress',
                                type: 'address',
                            },
                            {
                                name: 'makerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'takerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'makerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'takerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'expirationTimeSeconds',
                                type: 'uint256',
                            },
                            {
                                name: 'salt',
                                type: 'uint256',
                            },
                            {
                                name: 'makerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'makerFeeAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerFeeAssetData',
                                type: 'bytes',
                            },
                        ],
                    },
                    {
                        name: 'signature',
                        type: 'bytes',
                    },
                ],
                name: 'getOrderRelevantState',
                outputs: [
                    {
                        name: 'orderInfo',
                        type: 'tuple',
                        components: [
                            {
                                name: 'orderStatus',
                                type: 'uint8',
                            },
                            {
                                name: 'orderHash',
                                type: 'bytes32',
                            },
                            {
                                name: 'orderTakerAssetFilledAmount',
                                type: 'uint256',
                            },
                        ],
                    },
                    {
                        name: 'fillableTakerAssetAmount',
                        type: 'uint256',
                    },
                    {
                        name: 'isValidSignature',
                        type: 'bool',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'orders',
                        type: 'tuple[]',
                        components: [
                            {
                                name: 'makerAddress',
                                type: 'address',
                            },
                            {
                                name: 'takerAddress',
                                type: 'address',
                            },
                            {
                                name: 'feeRecipientAddress',
                                type: 'address',
                            },
                            {
                                name: 'senderAddress',
                                type: 'address',
                            },
                            {
                                name: 'makerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'takerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'makerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'takerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'expirationTimeSeconds',
                                type: 'uint256',
                            },
                            {
                                name: 'salt',
                                type: 'uint256',
                            },
                            {
                                name: 'makerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'makerFeeAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerFeeAssetData',
                                type: 'bytes',
                            },
                        ],
                    },
                    {
                        name: 'signatures',
                        type: 'bytes[]',
                    },
                ],
                name: 'getOrderRelevantStates',
                outputs: [
                    {
                        name: 'ordersInfo',
                        type: 'tuple[]',
                        components: [
                            {
                                name: 'orderStatus',
                                type: 'uint8',
                            },
                            {
                                name: 'orderHash',
                                type: 'bytes32',
                            },
                            {
                                name: 'orderTakerAssetFilledAmount',
                                type: 'uint256',
                            },
                        ],
                    },
                    {
                        name: 'fillableTakerAssetAmounts',
                        type: 'uint256[]',
                    },
                    {
                        name: 'isValidSignature',
                        type: 'bool[]',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'order',
                        type: 'tuple',
                        components: [
                            {
                                name: 'makerAddress',
                                type: 'address',
                            },
                            {
                                name: 'takerAddress',
                                type: 'address',
                            },
                            {
                                name: 'feeRecipientAddress',
                                type: 'address',
                            },
                            {
                                name: 'senderAddress',
                                type: 'address',
                            },
                            {
                                name: 'makerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'takerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'makerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'takerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'expirationTimeSeconds',
                                type: 'uint256',
                            },
                            {
                                name: 'salt',
                                type: 'uint256',
                            },
                            {
                                name: 'makerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'makerFeeAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerFeeAssetData',
                                type: 'bytes',
                            },
                        ],
                    },
                    {
                        name: 'takerAddress',
                        type: 'address',
                    },
                    {
                        name: 'takerAssetFillAmount',
                        type: 'uint256',
                    },
                ],
                name: 'getSimulatedOrderMakerTransferResults',
                outputs: [
                    {
                        name: 'orderTransferResults',
                        type: 'uint8',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'order',
                        type: 'tuple',
                        components: [
                            {
                                name: 'makerAddress',
                                type: 'address',
                            },
                            {
                                name: 'takerAddress',
                                type: 'address',
                            },
                            {
                                name: 'feeRecipientAddress',
                                type: 'address',
                            },
                            {
                                name: 'senderAddress',
                                type: 'address',
                            },
                            {
                                name: 'makerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'takerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'makerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'takerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'expirationTimeSeconds',
                                type: 'uint256',
                            },
                            {
                                name: 'salt',
                                type: 'uint256',
                            },
                            {
                                name: 'makerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'makerFeeAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerFeeAssetData',
                                type: 'bytes',
                            },
                        ],
                    },
                    {
                        name: 'takerAddress',
                        type: 'address',
                    },
                    {
                        name: 'takerAssetFillAmount',
                        type: 'uint256',
                    },
                ],
                name: 'getSimulatedOrderTransferResults',
                outputs: [
                    {
                        name: 'orderTransferResults',
                        type: 'uint8',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'orders',
                        type: 'tuple[]',
                        components: [
                            {
                                name: 'makerAddress',
                                type: 'address',
                            },
                            {
                                name: 'takerAddress',
                                type: 'address',
                            },
                            {
                                name: 'feeRecipientAddress',
                                type: 'address',
                            },
                            {
                                name: 'senderAddress',
                                type: 'address',
                            },
                            {
                                name: 'makerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'takerAssetAmount',
                                type: 'uint256',
                            },
                            {
                                name: 'makerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'takerFee',
                                type: 'uint256',
                            },
                            {
                                name: 'expirationTimeSeconds',
                                type: 'uint256',
                            },
                            {
                                name: 'salt',
                                type: 'uint256',
                            },
                            {
                                name: 'makerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'makerFeeAssetData',
                                type: 'bytes',
                            },
                            {
                                name: 'takerFeeAssetData',
                                type: 'bytes',
                            },
                        ],
                    },
                    {
                        name: 'takerAddresses',
                        type: 'address[]',
                    },
                    {
                        name: 'takerAssetFillAmounts',
                        type: 'uint256[]',
                    },
                ],
                name: 'getSimulatedOrdersTransferResults',
                outputs: [
                    {
                        name: 'orderTransferResults',
                        type: 'uint8[]',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'transaction',
                        type: 'tuple',
                        components: [
                            {
                                name: 'salt',
                                type: 'uint256',
                            },
                            {
                                name: 'expirationTimeSeconds',
                                type: 'uint256',
                            },
                            {
                                name: 'gasPrice',
                                type: 'uint256',
                            },
                            {
                                name: 'signerAddress',
                                type: 'address',
                            },
                            {
                                name: 'data',
                                type: 'bytes',
                            },
                        ],
                    },
                    {
                        name: 'chainId',
                        type: 'uint256',
                    },
                    {
                        name: 'exchange',
                        type: 'address',
                    },
                ],
                name: 'getTransactionHash',
                outputs: [
                    {
                        name: 'transactionHash',
                        type: 'bytes32',
                    },
                ],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: false,
                inputs: [
                    {
                        name: 'ownerAddress',
                        type: 'address',
                    },
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'getTransferableAssetAmount',
                outputs: [
                    {
                        name: 'transferableAssetAmount',
                        type: 'uint256',
                    },
                ],
                payable: false,
                stateMutability: 'nonpayable',
                type: 'function',
            },
            {
                constant: true,
                inputs: [
                    {
                        name: 'assetData',
                        type: 'bytes',
                    },
                ],
                name: 'revertIfInvalidAssetData',
                outputs: [],
                payable: false,
                stateMutability: 'pure',
                type: 'function',
            },
            {
                constant: true,
                inputs: [],
                name: 'staticCallProxyAddress',
                outputs: [
                    {
                        name: '',
                        type: 'address',
                    },
                ],
                payable: false,
                stateMutability: 'view',
                type: 'function',
            },
        ] as ContractAbi;
        return abi;
    }

    protected static async _deployLibrariesAsync(
        artifact: ContractArtifact,
        libraryArtifacts: { [libraryName: string]: ContractArtifact },
        web3Wrapper: Web3Wrapper,
        txDefaults: Partial<TxData>,
        libraryAddresses: { [libraryName: string]: string } = {},
    ): Promise<{ [libraryName: string]: string }> {
        const links = artifact.compilerOutput.evm.bytecode.linkReferences || {};
        // Go through all linked libraries, recursively deploying them if necessary.
        for (const link of Object.values(links)) {
            for (const libraryName of Object.keys(link)) {
                if (!libraryAddresses[libraryName]) {
                    // Library not yet deployed.
                    const libraryArtifact = libraryArtifacts[libraryName];
                    if (!libraryArtifact) {
                        throw new Error(`Missing artifact for linked library "${libraryName}"`);
                    }
                    // Deploy any dependent libraries used by this library.
                    await DevUtilsContract._deployLibrariesAsync(
                        libraryArtifact,
                        libraryArtifacts,
                        web3Wrapper,
                        txDefaults,
                        libraryAddresses,
                    );
                    // Deploy this library.
                    const linkedLibraryBytecode = linkLibrariesInBytecode(libraryArtifact, libraryAddresses);
                    const txDataWithDefaults = await BaseContract._applyDefaultsToContractTxDataAsync(
                        {
                            data: linkedLibraryBytecode,
                            ...txDefaults,
                        },
                        web3Wrapper.estimateGasAsync.bind(web3Wrapper),
                    );
                    const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
                    logUtils.log(`transactionHash: ${txHash}`);
                    const { contractAddress } = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
                    logUtils.log(`${libraryArtifact.contractName} successfully deployed at ${contractAddress}`);
                    libraryAddresses[libraryArtifact.contractName] = contractAddress as string;
                }
            }
        }
        return libraryAddresses;
    }

    public getFunctionSignature(methodName: string): string {
        const index = this._methodABIIndex[methodName];
        const methodAbi = DevUtilsContract.ABI()[index] as MethodAbi; // tslint:disable-line:no-unnecessary-type-assertion
        const functionSignature = methodAbiToFunctionSignature(methodAbi);
        return functionSignature;
    }

    public getABIDecodedTransactionData<T>(methodName: string, callData: string): T {
        const functionSignature = this.getFunctionSignature(methodName);
        const self = (this as any) as DevUtilsContract;
        const abiEncoder = self._lookupAbiEncoder(functionSignature);
        const abiDecodedCallData = abiEncoder.strictDecode<T>(callData);
        return abiDecodedCallData;
    }

    public getABIDecodedReturnData<T>(methodName: string, callData: string): T {
        if (this._encoderOverrides.decodeOutput) {
            return this._encoderOverrides.decodeOutput(methodName, callData);
        }
        const functionSignature = this.getFunctionSignature(methodName);
        const self = (this as any) as DevUtilsContract;
        const abiEncoder = self._lookupAbiEncoder(functionSignature);
        const abiDecodedCallData = abiEncoder.strictDecodeReturnValue<T>(callData);
        return abiDecodedCallData;
    }

    public getSelector(methodName: string): string {
        const functionSignature = this.getFunctionSignature(methodName);
        const self = (this as any) as DevUtilsContract;
        const abiEncoder = self._lookupAbiEncoder(functionSignature);
        return abiEncoder.getSelector();
    }

    public EIP712_EXCHANGE_DOMAIN_HASH(): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        const functionSignature = 'EIP712_EXCHANGE_DOMAIN_HASH()';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, []);
            },
        };
    }
    public chaiBridgeAddress(): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        const functionSignature = 'chaiBridgeAddress()';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, []);
            },
        };
    }
    /**
     * Decode AssetProxy identifier
     * @param assetData AssetProxy-compliant asset data describing an ERC-20, ERC-
     *     721, ERC1155, or MultiAsset asset.
     * @returns The AssetProxy identifier
     */
    public decodeAssetProxyId(assetData: string): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('assetData', assetData);
        const functionSignature = 'decodeAssetProxyId(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [assetData]);
            },
        };
    }
    /**
     * Decode ERC-1155 asset data from the format described in the AssetProxy contract specification.
     * @param assetData AssetProxy-compliant asset data describing an ERC-1155 set
     *     of assets.
     * @returns The ERC-1155 AssetProxy identifier, the address of the ERC-1155 contract hosting the assets, an array of the identifiers of the assets to be traded, an array of asset amounts to be traded, and callback data.  Each element of the arrays corresponds to the same-indexed element of the other array.  Return values specified as &#x60;memory&#x60; are returned as pointers to locations within the memory of the input parameter &#x60;assetData&#x60;.
     */
    public decodeERC1155AssetData(
        assetData: string,
    ): ContractFunctionObj<[string, string, BigNumber[], BigNumber[], string]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('assetData', assetData);
        const functionSignature = 'decodeERC1155AssetData(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<[string, string, BigNumber[], BigNumber[], string]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<[string, string, BigNumber[], BigNumber[], string]>(
                    rawCallResult,
                );
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [assetData]);
            },
        };
    }
    /**
     * Decode ERC-20 asset data from the format described in the AssetProxy contract specification.
     * @param assetData AssetProxy-compliant asset data describing an ERC-20 asset.
     * @returns The AssetProxy identifier, and the address of the ERC-20 contract hosting this asset.
     */
    public decodeERC20AssetData(assetData: string): ContractFunctionObj<[string, string]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('assetData', assetData);
        const functionSignature = 'decodeERC20AssetData(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<[string, string]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<[string, string]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [assetData]);
            },
        };
    }
    /**
     * Decode ERC20Bridge asset data from the format described in the AssetProxy contract specification.
     * @param assetData AssetProxy-compliant asset data describing an ERC20Bridge
     *     asset
     * @returns The ERC20BridgeProxy identifier, the address of the ERC20 token to transfer, the address of the bridge contract, and extra data to be passed to the bridge contract.
     */
    public decodeERC20BridgeAssetData(assetData: string): ContractFunctionObj<[string, string, string, string]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('assetData', assetData);
        const functionSignature = 'decodeERC20BridgeAssetData(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<[string, string, string, string]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<[string, string, string, string]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [assetData]);
            },
        };
    }
    /**
     * Decode ERC-721 asset data from the format described in the AssetProxy contract specification.
     * @param assetData AssetProxy-compliant asset data describing an ERC-721
     *     asset.
     * @returns The ERC-721 AssetProxy identifier, the address of the ERC-721 contract hosting this asset, and the identifier of the specific asset to be traded.
     */
    public decodeERC721AssetData(assetData: string): ContractFunctionObj<[string, string, BigNumber]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('assetData', assetData);
        const functionSignature = 'decodeERC721AssetData(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<[string, string, BigNumber]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<[string, string, BigNumber]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [assetData]);
            },
        };
    }
    /**
     * Decode multi-asset data from the format described in the AssetProxy contract specification.
     * @param assetData AssetProxy-compliant data describing a multi-asset basket.
     * @returns The Multi-Asset AssetProxy identifier, an array of the amounts of the assets to be traded, and an array of the AssetProxy-compliant data describing each asset to be traded.  Each element of the arrays corresponds to the same-indexed element of the other array.
     */
    public decodeMultiAssetData(assetData: string): ContractFunctionObj<[string, BigNumber[], string[]]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('assetData', assetData);
        const functionSignature = 'decodeMultiAssetData(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<[string, BigNumber[], string[]]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<[string, BigNumber[], string[]]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [assetData]);
            },
        };
    }
    /**
     * Decode StaticCall asset data from the format described in the AssetProxy contract specification.
     * @param assetData AssetProxy-compliant asset data describing a StaticCall
     *     asset
     * @returns The StaticCall AssetProxy identifier, the target address of the StaticCAll, the data to be passed to the target address, and the expected Keccak-256 hash of the static call return data.
     */
    public decodeStaticCallAssetData(assetData: string): ContractFunctionObj<[string, string, string, string]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('assetData', assetData);
        const functionSignature = 'decodeStaticCallAssetData(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<[string, string, string, string]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<[string, string, string, string]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [assetData]);
            },
        };
    }
    /**
     * Decodes the call data for an Exchange contract method call.
     * @param transactionData ABI-encoded calldata for an Exchange     contract
     *     method call.
     * @returns The name of the function called, and the parameters it was     given.  For single-order fills and cancels, the arrays will have     just one element.
     */
    public decodeZeroExTransactionData(
        transactionData: string,
    ): ContractFunctionObj<
        [
            string,
            Array<{
                makerAddress: string;
                takerAddress: string;
                feeRecipientAddress: string;
                senderAddress: string;
                makerAssetAmount: BigNumber;
                takerAssetAmount: BigNumber;
                makerFee: BigNumber;
                takerFee: BigNumber;
                expirationTimeSeconds: BigNumber;
                salt: BigNumber;
                makerAssetData: string;
                takerAssetData: string;
                makerFeeAssetData: string;
                takerFeeAssetData: string;
            }>,
            BigNumber[],
            string[],
        ]
    > {
        const self = (this as any) as DevUtilsContract;
        assert.isString('transactionData', transactionData);
        const functionSignature = 'decodeZeroExTransactionData(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<
                [
                    string,
                    Array<{
                        makerAddress: string;
                        takerAddress: string;
                        feeRecipientAddress: string;
                        senderAddress: string;
                        makerAssetAmount: BigNumber;
                        takerAssetAmount: BigNumber;
                        makerFee: BigNumber;
                        takerFee: BigNumber;
                        expirationTimeSeconds: BigNumber;
                        salt: BigNumber;
                        makerAssetData: string;
                        takerAssetData: string;
                        makerFeeAssetData: string;
                        takerFeeAssetData: string;
                    }>,
                    BigNumber[],
                    string[],
                ]
            > {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<
                    [
                        string,
                        Array<{
                            makerAddress: string;
                            takerAddress: string;
                            feeRecipientAddress: string;
                            senderAddress: string;
                            makerAssetAmount: BigNumber;
                            takerAssetAmount: BigNumber;
                            makerFee: BigNumber;
                            takerFee: BigNumber;
                            expirationTimeSeconds: BigNumber;
                            salt: BigNumber;
                            makerAssetData: string;
                            takerAssetData: string;
                            makerFeeAssetData: string;
                            takerFeeAssetData: string;
                        }>,
                        BigNumber[],
                        string[],
                    ]
                >(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [transactionData]);
            },
        };
    }
    public dydxBridgeAddress(): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        const functionSignature = 'dydxBridgeAddress()';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, []);
            },
        };
    }
    /**
     * Encode ERC-1155 asset data into the format described in the AssetProxy contract specification.
     * @param tokenAddress The address of the ERC-1155 contract hosting the
     *     asset(s) to be traded.
     * @param tokenIds The identifiers of the specific assets to be traded.
     * @param tokenValues The amounts of each asset to be traded.
     * @param callbackData Data to be passed to receiving contracts when a transfer
     *     is performed.
     * @returns AssetProxy-compliant asset data describing the set of assets.
     */
    public encodeERC1155AssetData(
        tokenAddress: string,
        tokenIds: BigNumber[],
        tokenValues: BigNumber[],
        callbackData: string,
    ): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('tokenAddress', tokenAddress);
        assert.isArray('tokenIds', tokenIds);
        assert.isArray('tokenValues', tokenValues);
        assert.isString('callbackData', callbackData);
        const functionSignature = 'encodeERC1155AssetData(address,uint256[],uint256[],bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [
                    tokenAddress.toLowerCase(),
                    tokenIds,
                    tokenValues,
                    callbackData,
                ]);
            },
        };
    }
    /**
     * Encode ERC-20 asset data into the format described in the AssetProxy contract specification.
     * @param tokenAddress The address of the ERC-20 contract hosting the asset to
     *     be traded.
     * @returns AssetProxy-compliant data describing the asset.
     */
    public encodeERC20AssetData(tokenAddress: string): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('tokenAddress', tokenAddress);
        const functionSignature = 'encodeERC20AssetData(address)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [tokenAddress.toLowerCase()]);
            },
        };
    }
    /**
     * Encode ERC-721 asset data into the format described in the AssetProxy specification.
     * @param tokenAddress The address of the ERC-721 contract hosting the asset to
     *     be traded.
     * @param tokenId The identifier of the specific asset to be traded.
     * @returns AssetProxy-compliant asset data describing the asset.
     */
    public encodeERC721AssetData(tokenAddress: string, tokenId: BigNumber): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('tokenAddress', tokenAddress);
        assert.isBigNumber('tokenId', tokenId);
        const functionSignature = 'encodeERC721AssetData(address,uint256)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [tokenAddress.toLowerCase(), tokenId]);
            },
        };
    }
    /**
     * Encode data for multiple assets, per the AssetProxy contract specification.
     * @param amounts The amounts of each asset to be traded.
     * @param nestedAssetData AssetProxy-compliant data describing each asset to be
     *     traded.
     * @returns AssetProxy-compliant data describing the set of assets.
     */
    public encodeMultiAssetData(amounts: BigNumber[], nestedAssetData: string[]): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        assert.isArray('amounts', amounts);
        assert.isArray('nestedAssetData', nestedAssetData);
        const functionSignature = 'encodeMultiAssetData(uint256[],bytes[])';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [amounts, nestedAssetData]);
            },
        };
    }
    /**
     * Encode StaticCall asset data into the format described in the AssetProxy contract specification.
     * @param staticCallTargetAddress Target address of StaticCall.
     * @param staticCallData Data that will be passed to staticCallTargetAddress in
     *     the StaticCall.
     * @param expectedReturnDataHash Expected Keccak-256 hash of the StaticCall
     *     return data.
     * @returns AssetProxy-compliant asset data describing the set of assets.
     */
    public encodeStaticCallAssetData(
        staticCallTargetAddress: string,
        staticCallData: string,
        expectedReturnDataHash: string,
    ): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('staticCallTargetAddress', staticCallTargetAddress);
        assert.isString('staticCallData', staticCallData);
        assert.isString('expectedReturnDataHash', expectedReturnDataHash);
        const functionSignature = 'encodeStaticCallAssetData(address,bytes,bytes32)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [
                    staticCallTargetAddress.toLowerCase(),
                    staticCallData,
                    expectedReturnDataHash,
                ]);
            },
        };
    }
    public erc1155ProxyAddress(): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        const functionSignature = 'erc1155ProxyAddress()';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, []);
            },
        };
    }
    public erc20ProxyAddress(): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        const functionSignature = 'erc20ProxyAddress()';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, []);
            },
        };
    }
    public erc721ProxyAddress(): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        const functionSignature = 'erc721ProxyAddress()';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, []);
            },
        };
    }
    public exchangeAddress(): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        const functionSignature = 'exchangeAddress()';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, []);
            },
        };
    }
    /**
     * Returns the number of asset(s) (described by assetData) that the corresponding AssetProxy contract is authorized to spend.  When the asset data contains multiple assets (eg for Multi-Asset), the return value indicates how many complete "baskets" of those assets may be spent by all of the corresponding AssetProxy contracts.
     * @param ownerAddress Owner of the assets specified by assetData.
     * @param assetData Details of asset, encoded per the AssetProxy contract
     *     specification.
     * @returns Number of assets (or asset baskets) that the corresponding AssetProxy is authorized to spend.
     */
    public getAssetProxyAllowance(ownerAddress: string, assetData: string): ContractTxFunctionObj<BigNumber> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('ownerAddress', ownerAddress);
        assert.isString('assetData', assetData);
        const functionSignature = 'getAssetProxyAllowance(address,bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<BigNumber>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [ownerAddress.toLowerCase(), assetData]);
            },
        };
    }
    /**
     * Returns the owner's balance of the assets(s) specified in assetData.  When the asset data contains multiple assets (eg in ERC1155 or Multi-Asset), the return value indicates how many complete "baskets" of those assets are owned by owner.
     * @param ownerAddress Owner of the assets specified by assetData.
     * @param assetData Details of asset, encoded per the AssetProxy contract
     *     specification.
     * @returns Number of assets (or asset baskets) held by owner.
     */
    public getBalance(ownerAddress: string, assetData: string): ContractTxFunctionObj<BigNumber> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('ownerAddress', ownerAddress);
        assert.isString('assetData', assetData);
        const functionSignature = 'getBalance(address,bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<BigNumber>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [ownerAddress.toLowerCase(), assetData]);
            },
        };
    }
    /**
     * Calls getBalance() and getAllowance() for assetData.
     * @param ownerAddress Owner of the assets specified by assetData.
     * @param assetData Details of asset, encoded per the AssetProxy contract
     *     specification.
     * @returns Number of assets (or asset baskets) held by owner, and number of assets (or asset baskets) that the corresponding AssetProxy is authorized to spend.
     */
    public getBalanceAndAssetProxyAllowance(
        ownerAddress: string,
        assetData: string,
    ): ContractTxFunctionObj<[BigNumber, BigNumber]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('ownerAddress', ownerAddress);
        assert.isString('assetData', assetData);
        const functionSignature = 'getBalanceAndAssetProxyAllowance(address,bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<[BigNumber, BigNumber]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<[BigNumber, BigNumber]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [ownerAddress.toLowerCase(), assetData]);
            },
        };
    }
    /**
     * Calls getAssetProxyAllowance() for each element of assetData.
     * @param ownerAddress Owner of the assets specified by assetData.
     * @param assetData Array of asset details, each encoded per the AssetProxy
     *     contract specification.
     * @returns An array of asset allowances from getAllowance(), with each element corresponding to the same-indexed element in the assetData input.
     */
    public getBatchAssetProxyAllowances(ownerAddress: string, assetData: string[]): ContractTxFunctionObj<BigNumber[]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('ownerAddress', ownerAddress);
        assert.isArray('assetData', assetData);
        const functionSignature = 'getBatchAssetProxyAllowances(address,bytes[])';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber[]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<BigNumber[]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [ownerAddress.toLowerCase(), assetData]);
            },
        };
    }
    /**
     * Calls getBalance() for each element of assetData.
     * @param ownerAddress Owner of the assets specified by assetData.
     * @param assetData Array of asset details, each encoded per the AssetProxy
     *     contract specification.
     * @returns Array of asset balances from getBalance(), with each element corresponding to the same-indexed element in the assetData input.
     */
    public getBatchBalances(ownerAddress: string, assetData: string[]): ContractTxFunctionObj<BigNumber[]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('ownerAddress', ownerAddress);
        assert.isArray('assetData', assetData);
        const functionSignature = 'getBatchBalances(address,bytes[])';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber[]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<BigNumber[]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [ownerAddress.toLowerCase(), assetData]);
            },
        };
    }
    /**
     * Calls getBatchBalances() and getBatchAllowances() for each element of assetData.
     * @param ownerAddress Owner of the assets specified by assetData.
     * @param assetData Array of asset details, each encoded per the AssetProxy
     *     contract specification.
     * @returns An array of asset balances from getBalance(), and an array of asset allowances from getAllowance(), with each element corresponding to the same-indexed element in the assetData input.
     */
    public getBatchBalancesAndAssetProxyAllowances(
        ownerAddress: string,
        assetData: string[],
    ): ContractTxFunctionObj<[BigNumber[], BigNumber[]]> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('ownerAddress', ownerAddress);
        assert.isArray('assetData', assetData);
        const functionSignature = 'getBatchBalancesAndAssetProxyAllowances(address,bytes[])';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<[BigNumber[], BigNumber[]]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<[BigNumber[], BigNumber[]]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [ownerAddress.toLowerCase(), assetData]);
            },
        };
    }
    /**
     * Batch fetches ETH balances
     * @param addresses Array of addresses.
     * @returns Array of ETH balances.
     */
    public getEthBalances(addresses: string[]): ContractFunctionObj<BigNumber[]> {
        const self = (this as any) as DevUtilsContract;
        assert.isArray('addresses', addresses);
        const functionSignature = 'getEthBalances(address[])';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber[]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<BigNumber[]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [addresses]);
            },
        };
    }
    public getOrderHash(
        order: {
            makerAddress: string;
            takerAddress: string;
            feeRecipientAddress: string;
            senderAddress: string;
            makerAssetAmount: BigNumber;
            takerAssetAmount: BigNumber;
            makerFee: BigNumber;
            takerFee: BigNumber;
            expirationTimeSeconds: BigNumber;
            salt: BigNumber;
            makerAssetData: string;
            takerAssetData: string;
            makerFeeAssetData: string;
            takerFeeAssetData: string;
        },
        chainId: BigNumber,
        exchange: string,
    ): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;

        assert.isBigNumber('chainId', chainId);
        assert.isString('exchange', exchange);
        const functionSignature =
            'getOrderHash((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),uint256,address)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [order, chainId, exchange.toLowerCase()]);
            },
        };
    }
    /**
     * Fetches all order-relevant information needed to validate if the supplied order is fillable.
     * @param order The order structure.
     * @param signature Signature provided by maker that proves the order's
     *     authenticity. `0x01` can always be provided if the signature does not
     *     need to be validated.
     * @returns The orderInfo (hash, status, and &#x60;takerAssetAmount&#x60; already filled for the given order), fillableTakerAssetAmount (amount of the order&#x27;s &#x60;takerAssetAmount&#x60; that is fillable given all on-chain state), and isValidSignature (validity of the provided signature). NOTE: If the &#x60;takerAssetData&#x60; encodes data for multiple assets, &#x60;fillableTakerAssetAmount&#x60; will represent a &quot;scaled&quot; amount, meaning it must be multiplied by all the individual asset amounts within the &#x60;takerAssetData&#x60; to get the final amount of each asset that can be filled.
     */
    public getOrderRelevantState(
        order: {
            makerAddress: string;
            takerAddress: string;
            feeRecipientAddress: string;
            senderAddress: string;
            makerAssetAmount: BigNumber;
            takerAssetAmount: BigNumber;
            makerFee: BigNumber;
            takerFee: BigNumber;
            expirationTimeSeconds: BigNumber;
            salt: BigNumber;
            makerAssetData: string;
            takerAssetData: string;
            makerFeeAssetData: string;
            takerFeeAssetData: string;
        },
        signature: string,
    ): ContractTxFunctionObj<
        [{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, BigNumber, boolean]
    > {
        const self = (this as any) as DevUtilsContract;

        assert.isString('signature', signature);
        const functionSignature =
            'getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<
                [{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, BigNumber, boolean]
            > {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<
                    [
                        { orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber },
                        BigNumber,
                        boolean,
                    ]
                >(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [order, signature]);
            },
        };
    }
    /**
     * Fetches all order-relevant information needed to validate if the supplied orders are fillable.
     * @param orders Array of order structures.
     * @param signatures Array of signatures provided by makers that prove the
     *     authenticity of the orders. `0x01` can always be provided if a signature
     *     does not need to be validated.
     * @returns The ordersInfo (array of the hash, status, and &#x60;takerAssetAmount&#x60; already filled for each order), fillableTakerAssetAmounts (array of amounts for each order&#x27;s &#x60;takerAssetAmount&#x60; that is fillable given all on-chain state), and isValidSignature (array containing the validity of each provided signature). NOTE: If the &#x60;takerAssetData&#x60; encodes data for multiple assets, each element of &#x60;fillableTakerAssetAmounts&#x60; will represent a &quot;scaled&quot; amount, meaning it must be multiplied by all the individual asset amounts within the &#x60;takerAssetData&#x60; to get the final amount of each asset that can be filled.
     */
    public getOrderRelevantStates(
        orders: Array<{
            makerAddress: string;
            takerAddress: string;
            feeRecipientAddress: string;
            senderAddress: string;
            makerAssetAmount: BigNumber;
            takerAssetAmount: BigNumber;
            makerFee: BigNumber;
            takerFee: BigNumber;
            expirationTimeSeconds: BigNumber;
            salt: BigNumber;
            makerAssetData: string;
            takerAssetData: string;
            makerFeeAssetData: string;
            takerFeeAssetData: string;
        }>,
        signatures: string[],
    ): ContractTxFunctionObj<
        [
            Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>,
            BigNumber[],
            boolean[],
        ]
    > {
        const self = (this as any) as DevUtilsContract;
        assert.isArray('orders', orders);
        assert.isArray('signatures', signatures);
        const functionSignature =
            'getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[])';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(
                callData: Partial<CallData> = {},
                defaultBlock?: BlockParam,
            ): Promise<
                [
                    Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>,
                    BigNumber[],
                    boolean[],
                ]
            > {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<
                    [
                        Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>,
                        BigNumber[],
                        boolean[],
                    ]
                >(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [orders, signatures]);
            },
        };
    }
    /**
     * Simulates the maker transfers within an order and returns the index of the first failed transfer.
     * @param order The order to simulate transfers for.
     * @param takerAddress The address of the taker that will fill the order.
     * @param takerAssetFillAmount The amount of takerAsset that the taker wished
     *     to fill.
     * @returns The index of the first failed transfer (or 4 if all transfers are successful).
     */
    public getSimulatedOrderMakerTransferResults(
        order: {
            makerAddress: string;
            takerAddress: string;
            feeRecipientAddress: string;
            senderAddress: string;
            makerAssetAmount: BigNumber;
            takerAssetAmount: BigNumber;
            makerFee: BigNumber;
            takerFee: BigNumber;
            expirationTimeSeconds: BigNumber;
            salt: BigNumber;
            makerAssetData: string;
            takerAssetData: string;
            makerFeeAssetData: string;
            takerFeeAssetData: string;
        },
        takerAddress: string,
        takerAssetFillAmount: BigNumber,
    ): ContractTxFunctionObj<number> {
        const self = (this as any) as DevUtilsContract;

        assert.isString('takerAddress', takerAddress);
        assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount);
        const functionSignature =
            'getSimulatedOrderMakerTransferResults((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),address,uint256)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<number> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<number>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [
                    order,
                    takerAddress.toLowerCase(),
                    takerAssetFillAmount,
                ]);
            },
        };
    }
    /**
     * Simulates all of the transfers within an order and returns the index of the first failed transfer.
     * @param order The order to simulate transfers for.
     * @param takerAddress The address of the taker that will fill the order.
     * @param takerAssetFillAmount The amount of takerAsset that the taker wished
     *     to fill.
     * @returns The index of the first failed transfer (or 4 if all transfers are successful).
     */
    public getSimulatedOrderTransferResults(
        order: {
            makerAddress: string;
            takerAddress: string;
            feeRecipientAddress: string;
            senderAddress: string;
            makerAssetAmount: BigNumber;
            takerAssetAmount: BigNumber;
            makerFee: BigNumber;
            takerFee: BigNumber;
            expirationTimeSeconds: BigNumber;
            salt: BigNumber;
            makerAssetData: string;
            takerAssetData: string;
            makerFeeAssetData: string;
            takerFeeAssetData: string;
        },
        takerAddress: string,
        takerAssetFillAmount: BigNumber,
    ): ContractTxFunctionObj<number> {
        const self = (this as any) as DevUtilsContract;

        assert.isString('takerAddress', takerAddress);
        assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount);
        const functionSignature =
            'getSimulatedOrderTransferResults((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),address,uint256)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<number> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<number>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [
                    order,
                    takerAddress.toLowerCase(),
                    takerAssetFillAmount,
                ]);
            },
        };
    }
    /**
     * Simulates all of the transfers for each given order and returns the indices of each first failed transfer.
     * @param orders Array of orders to individually simulate transfers for.
     * @param takerAddresses Array of addresses of takers that will fill each
     *     order.
     * @param takerAssetFillAmounts Array of amounts of takerAsset that will be
     *     filled for each order.
     * @returns The indices of the first failed transfer (or 4 if all transfers are successful) for each order.
     */
    public getSimulatedOrdersTransferResults(
        orders: Array<{
            makerAddress: string;
            takerAddress: string;
            feeRecipientAddress: string;
            senderAddress: string;
            makerAssetAmount: BigNumber;
            takerAssetAmount: BigNumber;
            makerFee: BigNumber;
            takerFee: BigNumber;
            expirationTimeSeconds: BigNumber;
            salt: BigNumber;
            makerAssetData: string;
            takerAssetData: string;
            makerFeeAssetData: string;
            takerFeeAssetData: string;
        }>,
        takerAddresses: string[],
        takerAssetFillAmounts: BigNumber[],
    ): ContractTxFunctionObj<number[]> {
        const self = (this as any) as DevUtilsContract;
        assert.isArray('orders', orders);
        assert.isArray('takerAddresses', takerAddresses);
        assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts);
        const functionSignature =
            'getSimulatedOrdersTransferResults((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],address[],uint256[])';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<number[]> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<number[]>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [orders, takerAddresses, takerAssetFillAmounts]);
            },
        };
    }
    public getTransactionHash(
        transaction: {
            salt: BigNumber;
            expirationTimeSeconds: BigNumber;
            gasPrice: BigNumber;
            signerAddress: string;
            data: string;
        },
        chainId: BigNumber,
        exchange: string,
    ): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;

        assert.isBigNumber('chainId', chainId);
        assert.isString('exchange', exchange);
        const functionSignature = 'getTransactionHash((uint256,uint256,uint256,address,bytes),uint256,address)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [transaction, chainId, exchange.toLowerCase()]);
            },
        };
    }
    /**
     * Gets the amount of an asset transferable by the maker of an order.
     * @param ownerAddress Address of the owner of the asset.
     * @param assetData Description of tokens, per the AssetProxy contract
     *     specification.
     * @returns The amount of the asset tranferable by the owner. NOTE: If the &#x60;assetData&#x60; encodes data for multiple assets, the &#x60;transferableAssetAmount&#x60; will represent the amount of times the entire &#x60;assetData&#x60; can be transferred. To calculate the total individual transferable amounts, this scaled &#x60;transferableAmount&#x60; must be multiplied by the individual asset amounts located within the &#x60;assetData&#x60;.
     */
    public getTransferableAssetAmount(ownerAddress: string, assetData: string): ContractTxFunctionObj<BigNumber> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('ownerAddress', ownerAddress);
        assert.isString('assetData', assetData);
        const functionSignature = 'getTransferableAssetAmount(address,bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async sendTransactionAsync(
                txData?: Partial<TxData> | undefined,
                opts: SendTransactionOpts = { shouldValidate: true },
            ): Promise<string> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
                    { data: this.getABIEncodedTransactionData(), ...txData },
                    this.estimateGasAsync.bind(this),
                );
                if (opts.shouldValidate !== false) {
                    await this.callAsync(txDataWithDefaults);
                }
                return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
            },
            awaitTransactionSuccessAsync(
                txData?: Partial<TxData>,
                opts: AwaitTransactionSuccessOpts = { shouldValidate: true },
            ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
                return self._promiseWithTransactionHash(this.sendTransactionAsync(txData, opts), opts);
            },
            async estimateGasAsync(txData?: Partial<TxData> | undefined): Promise<number> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
            },
            async createAccessListAsync(
                txData?: Partial<TxData> | undefined,
                defaultBlock?: BlockParam,
            ): Promise<TxAccessListWithGas> {
                const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
                    data: this.getABIEncodedTransactionData(),
                    ...txData,
                });
                return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
            },
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<BigNumber>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [ownerAddress.toLowerCase(), assetData]);
            },
        };
    }
    /**
     * Reverts if assetData is not of a valid format for its given proxy id.
     * @param assetData AssetProxy compliant asset data.
     */
    public revertIfInvalidAssetData(assetData: string): ContractFunctionObj<void> {
        const self = (this as any) as DevUtilsContract;
        assert.isString('assetData', assetData);
        const functionSignature = 'revertIfInvalidAssetData(bytes)';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<void> {
                BaseContract._assertCallParams(callData, defaultBlock);
                let rawCallResult;
                if (self._deployedBytecodeIfExists) {
                    rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
                } else {
                    rawCallResult = await self._performCallAsync(
                        { data: this.getABIEncodedTransactionData(), ...callData },
                        defaultBlock,
                    );
                }
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<void>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, [assetData]);
            },
        };
    }
    public staticCallProxyAddress(): ContractFunctionObj<string> {
        const self = (this as any) as DevUtilsContract;
        const functionSignature = 'staticCallProxyAddress()';

        return {
            selector: self._lookupAbiEncoder(functionSignature).getSelector(),
            async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
                BaseContract._assertCallParams(callData, defaultBlock);
                const rawCallResult = await self._performCallAsync(
                    { data: this.getABIEncodedTransactionData(), ...callData },
                    defaultBlock,
                );
                const abiEncoder = self._lookupAbiEncoder(functionSignature);
                BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
                return abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
            },
            getABIEncodedTransactionData(): string {
                return self._strictEncodeArguments(functionSignature, []);
            },
        };
    }

    constructor(
        address: string,
        supportedProvider: SupportedProvider,
        txDefaults?: Partial<TxData>,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = DevUtilsContract.deployedBytecode,
        encoderOverrides?: Partial<EncoderOverrides>,
    ) {
        super(
            'DevUtils',
            DevUtilsContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
            encoderOverrides,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        DevUtilsContract.ABI().forEach((item, index) => {
            if (item.type === 'function') {
                const methodAbi = item as MethodAbi;
                this._methodABIIndex[methodAbi.name] = index;
            }
        });
    }
}

// tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method no-parameter-reassignment no-consecutive-blank-lines ordered-imports align
// tslint:enable:trailing-comma whitespace no-trailing-whitespace
