How to use the @0x/base-contract.SubscriptionManager function in @0x/base-contract

To help you get started, we’ve selected a few @0x/base-contract 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 / 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 / contract-wrappers / src / generated-wrappers / staking_proxy.ts View on Github external
supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = StakingProxyContract.deployedBytecode,
    ) {
        super(
            'StakingProxy',
            StakingProxyContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            StakingProxyContract.ABI(),
            this._web3Wrapper,
        );
        StakingProxyContract.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 / dummy_erc20_token.ts View on Github external
supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = DummyERC20TokenContract.deployedBytecode,
    ) {
        super(
            'DummyERC20Token',
            DummyERC20TokenContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            DummyERC20TokenContract.ABI(),
            this._web3Wrapper,
        );
        DummyERC20TokenContract.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 / erc20_token.ts View on Github external
supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = ERC20TokenContract.deployedBytecode,
    ) {
        super(
            'ERC20Token',
            ERC20TokenContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            ERC20TokenContract.ABI(),
            this._web3Wrapper,
        );
        ERC20TokenContract.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 / dummy_erc721_token.ts View on Github external
supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = DummyERC721TokenContract.deployedBytecode,
    ) {
        super(
            'DummyERC721Token',
            DummyERC721TokenContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            DummyERC721TokenContract.ABI(),
            this._web3Wrapper,
        );
        DummyERC721TokenContract.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 / erc1155_proxy.ts View on Github external
supportedProvider: SupportedProvider,
        txDefaults?: Partial,
        logDecodeDependencies?: { [contractName: string]: ContractAbi },
        deployedBytecode: string | undefined = ERC1155ProxyContract.deployedBytecode,
    ) {
        super(
            'ERC1155Proxy',
            ERC1155ProxyContract.ABI(),
            address,
            supportedProvider,
            txDefaults,
            logDecodeDependencies,
            deployedBytecode,
        );
        classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
        this._subscriptionManager = new SubscriptionManager(
            ERC1155ProxyContract.ABI(),
            this._web3Wrapper,
        );
    }
}
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / contract_wrappers / erc20_token_wrapper.ts View on Github external
constructor(web3Wrapper: Web3Wrapper, erc20ProxyWrapper: ERC20ProxyWrapper, blockPollingIntervalMs?: number) {
        this._web3Wrapper = web3Wrapper;
        this._tokenContractsByAddress = {};
        this._erc20ProxyWrapper = erc20ProxyWrapper;
        this._blockPollingIntervalMs = blockPollingIntervalMs;
        this._subscriptionManager = new SubscriptionManager(
            ERC20TokenContract.ABI(),
            web3Wrapper,
        );
    }
    /**
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / contract_wrappers / erc721_token_wrapper.ts View on Github external
constructor(web3Wrapper: Web3Wrapper, erc721ProxyWrapper: ERC721ProxyWrapper, blockPollingIntervalMs?: number) {
        this._web3Wrapper = web3Wrapper;
        this._tokenContractsByAddress = {};
        this._erc721ProxyWrapper = erc721ProxyWrapper;
        this._blockPollingIntervalMs = blockPollingIntervalMs;
        this._subscriptionManager = new SubscriptionManager(
            ERC721TokenContract.ABI(),
            web3Wrapper,
        );
    }
    /**
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / generated-wrappers / weth9.ts View on Github external
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 / contract-wrappers / src / contract_wrappers / ether_token_wrapper.ts View on Github external
constructor(web3Wrapper: Web3Wrapper, erc20TokenWrapper: ERC20TokenWrapper, blockPollingIntervalMs?: number) {
        this._web3Wrapper = web3Wrapper;
        this._erc20TokenWrapper = erc20TokenWrapper;
        this._blockPollingIntervalMs = blockPollingIntervalMs;
        this._subscriptionManager = new SubscriptionManager(
            WETH9Contract.ABI(),
            web3Wrapper,
        );
    }
    /**