Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getABIEncodedTransactionData(a: string[]): string {
assert.isArray('a', a);
const self = (this as any) as AbiGenDummyContract;
const abiEncodedTransactionData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]);
return abiEncodedTransactionData;
},
getABIDecodedTransactionData(callData: string): void {
public mintNonFungible(type_: BigNumber, to: string[]): ContractTxFunctionObj {
const self = (this as any) as ERC1155MintableContract;
assert.isBigNumber('type_', type_);
assert.isArray('to', to);
const functionSignature = 'mintNonFungible(uint256,address[])';
return {
async sendTransactionAsync(
txData?: Partial | undefined,
opts: SendTransactionOpts = { shouldValidate: true },
): Promise {
const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
{ ...txData, data: this.getABIEncodedTransactionData() },
this.estimateGasAsync.bind(this),
);
if (opts.shouldValidate !== false) {
await this.callAsync(txDataWithDefaults);
}
return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
},
public mintFungible(id: BigNumber, to: string[], quantities: BigNumber[]): ContractTxFunctionObj {
const self = (this as any) as ERC1155MintableContract;
assert.isBigNumber('id', id);
assert.isArray('to', to);
assert.isArray('quantities', quantities);
const functionSignature = 'mintFungible(uint256,address[],uint256[])';
return {
async sendTransactionAsync(
txData?: Partial | undefined,
opts: SendTransactionOpts = { shouldValidate: true },
): Promise {
const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
{ ...txData, data: this.getABIEncodedTransactionData() },
this.estimateGasAsync.bind(this),
);
if (opts.shouldValidate !== false) {
await this.callAsync(txDataWithDefaults);
}
return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
public ERC1155Assets(
tokenAddress: string,
tokenIds: BigNumber[],
values: BigNumber[],
callbackData: string,
): ContractTxFunctionObj {
const self = (this as any) as IAssetDataContract;
assert.isString('tokenAddress', tokenAddress);
assert.isArray('tokenIds', tokenIds);
assert.isArray('values', values);
assert.isString('callbackData', callbackData);
const functionSignature = 'ERC1155Assets(address,uint256[],uint256[],bytes)';
return {
async sendTransactionAsync(
txData?: Partial | undefined,
opts: SendTransactionOpts = { shouldValidate: true },
): Promise {
const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
{ ...txData, data: this.getABIEncodedTransactionData() },
this.estimateGasAsync.bind(this),
);
if (opts.shouldValidate !== false) {
await this.callAsync(txDataWithDefaults);
}
public safeBatchTransferFrom(
from: string,
to: string,
ids: BigNumber[],
values: BigNumber[],
data: string,
): ContractTxFunctionObj {
const self = (this as any) as ERC1155MintableContract;
assert.isString('from', from);
assert.isString('to', to);
assert.isArray('ids', ids);
assert.isArray('values', values);
assert.isString('data', data);
const functionSignature = 'safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)';
return {
async sendTransactionAsync(
txData?: Partial | undefined,
opts: SendTransactionOpts = { shouldValidate: true },
): Promise {
const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
{ ...txData, data: this.getABIEncodedTransactionData() },
this.estimateGasAsync.bind(this),
);
if (opts.shouldValidate !== false) {
await this.callAsync(txDataWithDefaults);
}
public safeBatchTransferFrom(
from: string,
to: string,
ids: BigNumber[],
values: BigNumber[],
data: string,
): ContractTxFunctionObj {
const self = (this as any) as ERC1155MintableContract;
assert.isString('from', from);
assert.isString('to', to);
assert.isArray('ids', ids);
assert.isArray('values', values);
assert.isString('data', data);
const functionSignature = 'safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)';
return {
async sendTransactionAsync(
txData?: Partial | undefined,
opts: SendTransactionOpts = { shouldValidate: true },
): Promise {
const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
{ ...txData, data: this.getABIEncodedTransactionData() },
this.estimateGasAsync.bind(this),
);
if (opts.shouldValidate !== false) {
await this.callAsync(txDataWithDefaults);
}
return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
[
Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>,
Array<{
makerBalance: BigNumber;
makerAllowance: BigNumber;
takerBalance: BigNumber;
takerAllowance: BigNumber;
makerZrxBalance: BigNumber;
makerZrxAllowance: BigNumber;
takerZrxBalance: BigNumber;
takerZrxAllowance: BigNumber;
}>
]
> {
const self = (this as any) as OrderValidatorContract;
assert.isArray('orders', orders);
assert.isArray('takerAddresses', takerAddresses);
const functionSignature =
'getOrdersAndTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])';
return {
async callAsync(
callData: Partial = {},
defaultBlock?: BlockParam,
): Promise<
[
Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>,
Array<{
makerBalance: BigNumber;
makerAllowance: BigNumber;
takerBalance: BigNumber;
takerAllowance: BigNumber;
public balanceOfBatch(owners: string[], ids: BigNumber[]): ContractFunctionObj {
const self = (this as any) as ERC1155MintableContract;
assert.isArray('owners', owners);
assert.isArray('ids', ids);
const functionSignature = 'balanceOfBatch(address[],uint256[])';
return {
async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise {
BaseContract._assertCallParams(callData, defaultBlock);
const rawCallResult = await self._performCallAsync(
{ ...callData, data: this.getABIEncodedTransactionData() },
defaultBlock,
);
const abiEncoder = self._lookupAbiEncoder(functionSignature);
return abiEncoder.strictDecodeReturnValue(rawCallResult);
},
getABIEncodedTransactionData(): string {
return self._strictEncodeArguments(functionSignature, [owners, ids]);
},
public MultiAsset(values: BigNumber[], nestedAssetData: string[]): ContractTxFunctionObj {
const self = (this as any) as IAssetDataContract;
assert.isArray('values', values);
assert.isArray('nestedAssetData', nestedAssetData);
const functionSignature = 'MultiAsset(uint256[],bytes[])';
return {
async sendTransactionAsync(
txData?: Partial | undefined,
opts: SendTransactionOpts = { shouldValidate: true },
): Promise {
const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
{ ...txData, data: this.getABIEncodedTransactionData() },
this.estimateGasAsync.bind(this),
);
if (opts.shouldValidate !== false) {
await this.callAsync(txDataWithDefaults);
}
return self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
},
transaction: {
salt: BigNumber;
expirationTimeSeconds: BigNumber;
gasPrice: BigNumber;
signerAddress: string;
data: string;
},
txOrigin: string,
transactionSignature: string,
approvalSignatures: string[],
): ContractFunctionObj {
const self = (this as any) as CoordinatorContract;
assert.isString('txOrigin', txOrigin);
assert.isString('transactionSignature', transactionSignature);
assert.isArray('approvalSignatures', approvalSignatures);
const functionSignature =
'assertValidCoordinatorApprovals((uint256,uint256,uint256,address,bytes),address,bytes,bytes[])';
return {
async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise {
BaseContract._assertCallParams(callData, defaultBlock);
const rawCallResult = await self._performCallAsync(
{ ...callData, data: this.getABIEncodedTransactionData() },
defaultBlock,
);
const abiEncoder = self._lookupAbiEncoder(functionSignature);
return abiEncoder.strictDecodeReturnValue(rawCallResult);
},
getABIEncodedTransactionData(): string {
return self._strictEncodeArguments(functionSignature, [
transaction,