How to use the @0x/utils.classUtils.bindAll function in @0x/utils

To help you get started, we’ve selected a few @0x/utils examples, based on popular ways it is used in public projects.

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

github 0xProject / 0x-monorepo / contracts / tec / generated-wrappers / test_mixins.ts View on Github external
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial) {
        super('TestMixins', abi, address, supportedProvider, txDefaults);
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
    }
} // tslint:disable:max-file-line-count
github 0xProject / 0x-monorepo / contracts / tec / generated-wrappers / tec.ts View on Github external
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial) {
        super('TEC', abi, address, supportedProvider, txDefaults);
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
    }
} // tslint:disable:max-file-line-count
github 0xProject / 0x-monorepo / packages / abi-gen-wrappers / src / generated-wrappers / exchange.ts View on Github external
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial) {
        super('Exchange', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
    }
} // tslint:disable:max-file-line-count
github 0xProject / 0x-monorepo / packages / abi-gen / test-cli / output / typescript / abi_gen_dummy.ts View on Github external
address: string,
        supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = AbiGenDummyContract.deployedBytecode,
    ) {
        super(
            'AbiGenDummy',
            AbiGenDummyContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            AbiGenDummyContract.ABI(),
            this._web3Wrapper,
        );
        AbiGenDummyContract.ABI().forEach((item, index) => {
            if (item.type === 'function') {
                const methodAbi = item as MethodAbi;
                this._methodABIIndex[methodAbi.name] = index;
            }
        });
    }
}
github 0xProject / 0x-monorepo / packages / abi-gen / test-cli / expected-output / typescript / abi_gen_dummy.ts View on Github external
constructor(
        address: string,
        supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
    ) {
        super('AbiGenDummy', AbiGenDummyContract.ABI(), address, supportedProvider, txDefaults, logDecodeDependencies);
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            AbiGenDummyContract.ABI(),
            this._web3Wrapper,
        );
    }
}
github 0xProject / 0x-monorepo / packages / abi-gen-wrappers / src / generated-wrappers / i_wallet.ts View on Github external
address: string,
        supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = IWalletContract.deployedBytecode,
    ) {
        super(
            'IWallet',
            IWalletContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        IWalletContract.ABI().forEach((item, index) => {
            if (item.type === 'function') {
                const methodAbi = item as MethodAbi;
                this._methodABIIndex[methodAbi.name] = index;
            }
        });
    }
}
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / generated-wrappers / weth9.ts View on Github external
address: string,
        supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = WETH9Contract.deployedBytecode,
    ) {
        super(
            'WETH9',
            WETH9Contract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            WETH9Contract.ABI(),
            this._web3Wrapper,
        );
        WETH9Contract.ABI().forEach((item, index) => {
            if (item.type === 'function') {
                const methodAbi = item as MethodAbi;
                this._methodABIIndex[methodAbi.name] = index;
            }
        });
    }
}
github 0xProject / 0x-monorepo / packages / abi-gen-wrappers / src / generated-wrappers / erc721_proxy.ts View on Github external
address: string,
        supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = ERC721ProxyContract.deployedBytecode,
    ) {
        super(
            'ERC721Proxy',
            ERC721ProxyContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            ERC721ProxyContract.ABI(),
            this._web3Wrapper,
        );
    }
}
github 0xProject / 0x-monorepo / packages / abi-gen-wrappers / src / generated-wrappers / i_validator.ts View on Github external
address: string,
        supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = IValidatorContract.deployedBytecode,
    ) {
        super(
            'IValidator',
            IValidatorContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        IValidatorContract.ABI().forEach((item, index) => {
            if (item.type === 'function') {
                const methodAbi = item as MethodAbi;
                this._methodABIIndex[methodAbi.name] = index;
            }
        });
    }
}
github 0xProject / 0x-monorepo / packages / abi-gen-wrappers / src / generated-wrappers / static_call_proxy.ts View on Github external
constructor(
        address: string,
        supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
    ) {
        super(
            'StaticCallProxy',
            StaticCallProxyContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
    }
}