How to use @0x/contracts-erc1155 - 6 common examples

To help you get started, we’ve selected a few @0x/contracts-erc1155 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 / asset-proxy / src / erc1155_proxy_wrapper.ts View on Github external
public async deployDummyContractsAsync(): Promise {
        // tslint:disable-next-line:no-unused-variable
        for (const i of _.times(constants.NUM_DUMMY_ERC1155_CONTRACTS_TO_DEPLOY)) {
            const erc1155Contract = await ERC1155MintableContract.deployFrom0xArtifactAsync(
                erc1155Artifacts.ERC1155Mintable,
                this._provider,
                txDefaults,
                artifacts,
            );
            const erc1155Wrapper = new Erc1155Wrapper(erc1155Contract, this._provider, this._contractOwnerAddress);
            this._dummyTokenWrappers.push(erc1155Wrapper);
        }
        return this._dummyTokenWrappers;
    }
    /**
github 0xProject / 0x-monorepo / packages / migrations / src / migration.ts View on Github external
artifacts,
        exchange.address,
        chainId,
    );

    // Dev Utils
    const devUtils = await DevUtilsContract.deployFrom0xArtifactAsync(
        artifacts.DevUtils,
        provider,
        txDefaults,
        artifacts,
        exchange.address,
    );

    // tslint:disable-next-line:no-unused-variable
    const erc1155DummyToken = await ERC1155MintableContract.deployFrom0xArtifactAsync(
        artifacts.ERC1155Mintable,
        provider,
        txDefaults,
        artifacts,
    );

    const erc20BridgeProxy = await ERC20BridgeProxyContract.deployFrom0xArtifactAsync(
        artifacts.ERC20BridgeProxy,
        provider,
        txDefaults,
        {},
    );
    await exchange.registerAssetProxy(erc20BridgeProxy.address).awaitTransactionSuccessAsync(txDefaults);
    await erc20BridgeProxy.addAuthorizedAddress(exchange.address).awaitTransactionSuccessAsync(txDefaults);
    await erc20BridgeProxy.addAuthorizedAddress(multiAssetProxy.address).awaitTransactionSuccessAsync(txDefaults);
    await multiAssetProxy.registerAssetProxy(erc20BridgeProxy.address).awaitTransactionSuccessAsync(txDefaults);
github 0xProject / 0x-monorepo / contracts / asset-proxy / src / erc1155_proxy_wrapper.ts View on Github external
public async deployDummyContractsAsync(): Promise {
        // tslint:disable-next-line:no-unused-variable
        for (const i of _.times(constants.NUM_DUMMY_ERC1155_CONTRACTS_TO_DEPLOY)) {
            const erc1155Contract = await ERC1155MintableContract.deployFrom0xArtifactAsync(
                erc1155Artifacts.ERC1155Mintable,
                this._provider,
                txDefaults,
                artifacts,
            );
            const erc1155Wrapper = new Erc1155Wrapper(erc1155Contract, this._provider, this._contractOwnerAddress);
            this._dummyTokenWrappers.push(erc1155Wrapper);
        }
        return this._dummyTokenWrappers;
    }
    /**
github 0xProject / 0x-monorepo / contracts / asset-proxy / src / erc1155_proxy_wrapper.ts View on Github external
public async deployDummyContractsAsync(): Promise {
        // tslint:disable-next-line:no-unused-variable
        for (const i of _.times(constants.NUM_DUMMY_ERC1155_CONTRACTS_TO_DEPLOY)) {
            const erc1155Contract = await ERC1155MintableContract.deployFrom0xArtifactAsync(
                erc1155Artifacts.ERC1155Mintable,
                this._provider,
                txDefaults,
                artifacts,
            );
            const erc1155Wrapper = new Erc1155Wrapper(erc1155Contract, this._provider, this._contractOwnerAddress);
            this._dummyTokenWrappers.push(erc1155Wrapper);
        }
        return this._dummyTokenWrappers;
    }
    /**
github 0xProject / 0x-monorepo / contracts / integrations / src / deployment_mananger.ts View on Github external
): Promise {
        const erc20 = await ERC20TokenContract.deployFrom0xArtifactAsync(
            ERC20Artifacts.ERC20Token,
            environment.provider,
            txDefaults,
            ERC20Artifacts,
        );

        const erc721 = await ERC721TokenContract.deployFrom0xArtifactAsync(
            ERC721Artifacts.ERC721Token,
            environment.provider,
            txDefaults,
            ERC721Artifacts,
        );

        const erc1155 = await ERC1155Contract.deployFrom0xArtifactAsync(
            ERC1155Artifacts.ERC1155,
            environment.provider,
            txDefaults,
            ERC1155Artifacts,
        );

        const weth = await WETH9Contract.deployFrom0xArtifactAsync(
            ERC20Artifacts.WETH9,
            environment.provider,
            txDefaults,
            ERC20Artifacts,
        );

        const zrx = await ZRXTokenContract.deployFrom0xArtifactAsync(
            ERC20Artifacts.ZRXToken,
            environment.provider,
github 0xProject / 0x-monorepo / contracts / integrations / src / deployment_mananger.ts View on Github external
const erc20 = await ERC20TokenContract.deployFrom0xArtifactAsync(
            ERC20Artifacts.ERC20Token,
            environment.provider,
            txDefaults,
            ERC20Artifacts,
        );

        const erc721 = await ERC721TokenContract.deployFrom0xArtifactAsync(
            ERC721Artifacts.ERC721Token,
            environment.provider,
            txDefaults,
            ERC721Artifacts,
        );

        const erc1155 = await ERC1155Contract.deployFrom0xArtifactAsync(
            ERC1155Artifacts.ERC1155,
            environment.provider,
            txDefaults,
            ERC1155Artifacts,
        );

        const weth = await WETH9Contract.deployFrom0xArtifactAsync(
            ERC20Artifacts.WETH9,
            environment.provider,
            txDefaults,
            ERC20Artifacts,
        );

        const zrx = await ZRXTokenContract.deployFrom0xArtifactAsync(
            ERC20Artifacts.ZRXToken,
            environment.provider,
            txDefaults,

@0x/contracts-erc1155

Token contracts used by 0x protocol

Apache-2.0
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages