Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const dummyErc20Token = await DummyERC20TokenContract.deployFrom0xArtifactAsync(
artifacts.DummyERC20Token,
provider,
txDefaults,
artifacts,
token.name,
token.symbol,
token.decimals,
totalSupply,
);
}
// ERC721
// tslint:disable-next-line:no-unused-variable
const cryptoKittieToken = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
erc721TokenInfo[0].name,
erc721TokenInfo[0].symbol,
);
// 1155 Asset Proxy
const erc1155Proxy = await ERC1155ProxyContract.deployFrom0xArtifactAsync(
artifacts.ERC1155Proxy,
provider,
txDefaults,
artifacts,
);
const staticCallProxy = await StaticCallProxyContract.deployFrom0xArtifactAsync(
// tslint:disable-next-line:no-unused-variable
const dummyErc20Token = await wrappers.DummyERC20TokenContract.deployFrom0xArtifactAsync(
artifacts.DummyERC20Token,
provider,
txDefaults,
token.name,
token.symbol,
token.decimals,
totalSupply,
);
}
// ERC721
// tslint:disable-next-line:no-unused-variable
const cryptoKittieToken = await wrappers.DummyERC721TokenContract.deployFrom0xArtifactAsync(
artifacts.DummyERC721Token,
provider,
txDefaults,
erc721TokenInfo[0].name,
erc721TokenInfo[0].symbol,
);
const multiAssetProxy = await wrappers.MultiAssetProxyContract.deployFrom0xArtifactAsync(
artifacts.MultiAssetProxy,
provider,
txDefaults,
);
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, txDefaults),
);
await web3Wrapper.awaitTransactionSuccessAsync(
private async _increaseERC721AllowanceAsync(
tokenAddress: string,
address: string,
tokenId: BigNumber,
): Promise {
const erc721Token = new DummyERC721TokenContract(
artifacts.DummyERC721Token.compilerOutput.abi,
tokenAddress,
this._web3Wrapper.getProvider(),
this._web3Wrapper.getContractDefaults(),
);
const txHash = await erc721Token.approve.sendTransactionAsync(this._erc721ProxyAddress, tokenId, {
from: address,
});
await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
}
private async _increaseERC721BalanceAsync(