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(callData: Partial = {}, defaultBlock?: BlockParam): Promise {
const self = (this as any) as TestMixinsContract;
const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise {
const self = (this as any) as TestLibsContract;
const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
index_2,
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue<[string, string, string]>(rawCallResult);
// tslint:enable boolean-naming
return result;
},
/**
const self = (this as any) as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
/**
signature: string,
callData: Partial = {},
defaultBlock?: BlockParam,
): Promise {
const self = (this as any) as TECContract;
const encodedData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [hash, signature]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
amount,
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
callDataWithDefaults.from = callDataWithDefaults.from
? callDataWithDefaults.from.toLowerCase()
: callDataWithDefaults.from;
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue(rawCallResult);
// tslint:enable boolean-naming
return result;
},
/**
> {
const self = this as any as ExchangeContract;
const encodedData = self._strictEncodeArguments('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order,
takerAssetFillAmount,
signature
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
const abiEncoder = self._lookupAbiEncoder('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
>(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};