Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async callAsync(
from: BigNumber,
to: BigNumber,
pending: boolean,
executed: boolean,
callData: Partial = {},
defaultBlock?: BlockParam,
): Promise {
assert.isBigNumber('from', from);
assert.isBigNumber('to', to);
assert.isBoolean('pending', pending);
assert.isBoolean('executed', executed);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema,
schemas.numberSchema,
schemas.jsNumber,
]);
if (defaultBlock !== undefined) {
assert.isBlockParam('defaultBlock', defaultBlock);
}
const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('getTransactionIds(uint256,uint256,bool,bool)', [from,
to,
pending,
executed
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
public setApprovalForAll(_operator: string, _approved: boolean): ContractTxFunctionObj {
const self = (this as any) as DummyERC721TokenContract;
assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const functionSignature = 'setApprovalForAll(address,bool)';
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 setApprovalForAll(operator: string, approved: boolean): ContractTxFunctionObj {
const self = (this as any) as ERC1155MintableContract;
assert.isString('operator', operator);
assert.isBoolean('approved', approved);
const functionSignature = 'setApprovalForAll(address,bool)';
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 create(uri: string, isNF: boolean): ContractTxFunctionObj {
const self = (this as any) as ERC1155MintableContract;
assert.isString('uri', uri);
assert.isBoolean('isNF', isNF);
const functionSignature = 'create(string,bool)';
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);
},
async callAsync(
pending: boolean,
executed: boolean,
callData: Partial = {},
defaultBlock?: BlockParam,
): Promise {
assert.isBoolean('pending', pending);
assert.isBoolean('executed', executed);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema,
schemas.numberSchema,
schemas.jsNumber,
]);
if (defaultBlock !== undefined) {
assert.isBlockParam('defaultBlock', defaultBlock);
}
const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('getTransactionCount(bool,bool)', [pending,
executed
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
async callAsync(
assetProxyContract: string,
isRegistered: boolean,
callData: Partial = {},
defaultBlock?: BlockParam,
): Promise {
assert.isString('assetProxyContract', assetProxyContract);
assert.isBoolean('isRegistered', isRegistered);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema,
schemas.numberSchema,
schemas.jsNumber,
]);
if (defaultBlock !== undefined) {
assert.isBlockParam('defaultBlock', defaultBlock);
}
const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract,
isRegistered
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
public setApprovalForAll(_operator: string, _approved: boolean): ContractTxFunctionObj {
const self = (this as any) as ERC721TokenContract;
assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const functionSignature = 'setApprovalForAll(address,bool)';
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);
},