Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.addOwner.estimateGasAsync.bind(
self,
owner
),
);
try {
return await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
} catch (err) {
// Try to decode ganache transaction revert Errors.
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
awaitTransactionSuccessAsync(
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
let rawCallResult;
try {
rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('getEthBalances(address[])');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
let rawCallResult;
try {
rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
schemas.addressSchema,
schemas.numberSchema,
schemas.jsNumber,
]);
if (defaultBlock !== undefined) {
assert.isBlockParam('defaultBlock', defaultBlock);
}
const self = (this as any) as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('getProxyId()', []);
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
let rawCallResult;
try {
rawCallResult = await self._evmExecAsync(encodedDataBytes);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
schemas.addressSchema,
schemas.numberSchema,
schemas.jsNumber,
]);
if (defaultBlock !== undefined) {
assert.isBlockParam('defaultBlock', defaultBlock);
}
const self = (this as any) as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('getProxyId()', []);
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
let rawCallResult;
try {
rawCallResult = await self._evmExecAsync(encodedDataBytes);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
let rawCallResult;
try {
rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('decimals()');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
let rawCallResult;
try {
rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder(
'getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))',
);
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue<{
beginTimeSeconds: BigNumber;
endTimeSeconds: BigNumber;
beginAmount: BigNumber;
endAmount: BigNumber;
currentAmount: BigNumber;
currentTimeSeconds: BigNumber;
}>(rawCallResult);
// tslint:enable boolean-naming
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
let rawCallResult;
try {
rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
let rawCallResult;
try {
rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('assetProxies(bytes4)');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
schemas.addressSchema,
schemas.numberSchema,
schemas.jsNumber,
]);
if (defaultBlock !== undefined) {
assert.isBlockParam('defaultBlock', defaultBlock);
}
const self = (this as any) as StaticCallProxyContract;
const encodedData = self._strictEncodeArguments('getProxyId()', []);
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
let rawCallResult;
try {
rawCallResult = await self._evmExecAsync(encodedDataBytes);
} catch (err) {
BaseContract._throwIfThrownErrorIsRevertError(err);
throw err;
}
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};