In @0x/abi-gen-templates
: Make txData
parameter optional in awaitTransactionSuccessAsync()
.
In `@0x/base-contract`: Make `PromiseWithTransactionHash` class compatible with ES5 transpiler. In `@0x/abi-gen-wrappers`: Regenerate contract wrappers.
This commit is contained in:
@@ -28,14 +28,20 @@ public {{this.tsName}} = {
|
||||
async awaitTransactionSuccessAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
{{#this.payable}}
|
||||
txData: Partial<TxDataPayable> = {},
|
||||
txData?: Partial<TxDataPayable> | number,
|
||||
{{/this.payable}}
|
||||
{{^this.payable}}
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
{{/this.payable}}
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
{{#if inputs}}
|
||||
const txHash = await self.{{this.tsName}}.sendTransactionAsync({{> params input=inputs}}, txData);
|
||||
@@ -47,7 +53,7 @@ public {{this.tsName}} = {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -161,10 +161,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
owner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.removeOwner.sendTransactionAsync(owner
|
||||
, txData);
|
||||
@@ -173,7 +179,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -255,10 +261,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
transactionId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.revokeConfirmation.sendTransactionAsync(transactionId
|
||||
, txData);
|
||||
@@ -267,7 +279,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -407,10 +419,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
transactionId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.executeRemoveAuthorizedAddressAtIndex.sendTransactionAsync(transactionId
|
||||
, txData);
|
||||
@@ -419,7 +437,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -561,10 +579,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
assetProxyContract: string,
|
||||
isRegistered: boolean,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.registerAssetProxy.sendTransactionAsync(assetProxyContract,
|
||||
isRegistered
|
||||
@@ -574,7 +598,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -662,10 +686,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
owner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.addOwner.sendTransactionAsync(owner
|
||||
, txData);
|
||||
@@ -674,7 +704,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -784,10 +814,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
_secondsTimeLocked: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.changeTimeLock.sendTransactionAsync(_secondsTimeLocked
|
||||
, txData);
|
||||
@@ -796,7 +832,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1076,10 +1112,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
_required: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.changeRequirement.sendTransactionAsync(_required
|
||||
, txData);
|
||||
@@ -1088,7 +1130,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1170,10 +1212,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
transactionId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.confirmTransaction.sendTransactionAsync(transactionId
|
||||
, txData);
|
||||
@@ -1182,7 +1230,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1272,10 +1320,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
destination: string,
|
||||
value: BigNumber,
|
||||
data: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.submitTransaction.sendTransactionAsync(destination,
|
||||
value,
|
||||
@@ -1286,7 +1340,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1464,10 +1518,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
owner: string,
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.replaceOwner.sendTransactionAsync(owner,
|
||||
newOwner
|
||||
@@ -1477,7 +1537,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1565,10 +1625,16 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
transactionId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as AssetProxyOwnerContract;
|
||||
const txHash = await self.executeTransaction.sendTransactionAsync(transactionId
|
||||
, txData);
|
||||
@@ -1577,7 +1643,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -97,10 +97,16 @@ export class CoordinatorContract extends BaseContract {
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as CoordinatorContract;
|
||||
const txHash = await self.executeTransaction.sendTransactionAsync(transaction,
|
||||
txOrigin,
|
||||
@@ -113,7 +119,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -63,10 +63,16 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
coordinatorEndpoint: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as CoordinatorRegistryContract;
|
||||
const txHash = await self.setCoordinatorEndpoint.sendTransactionAsync(coordinatorEndpoint
|
||||
, txData);
|
||||
@@ -75,7 +81,7 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -102,10 +102,16 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC20TokenContract;
|
||||
const txHash = await self.approve.sendTransactionAsync(_spender,
|
||||
_value
|
||||
@@ -115,7 +121,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -237,10 +243,16 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC20TokenContract;
|
||||
const txHash = await self.transferFrom.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -251,7 +263,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -451,10 +463,16 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC20TokenContract;
|
||||
const txHash = await self.mint.sendTransactionAsync(_value
|
||||
, txData);
|
||||
@@ -463,7 +481,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -549,10 +567,16 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC20TokenContract;
|
||||
const txHash = await self.transfer.sendTransactionAsync(_to,
|
||||
_value
|
||||
@@ -562,7 +586,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -684,10 +708,16 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_target: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC20TokenContract;
|
||||
const txHash = await self.setBalance.sendTransactionAsync(_target,
|
||||
_value
|
||||
@@ -697,7 +727,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -785,10 +815,16 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC20TokenContract;
|
||||
const txHash = await self.transferOwnership.sendTransactionAsync(newOwner
|
||||
, txData);
|
||||
@@ -797,7 +833,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -138,10 +138,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_approved: string,
|
||||
_tokenId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC721TokenContract;
|
||||
const txHash = await self.approve.sendTransactionAsync(_approved,
|
||||
_tokenId
|
||||
@@ -151,7 +157,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -247,10 +253,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC721TokenContract;
|
||||
const txHash = await self.transferFrom.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -261,7 +273,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -359,10 +371,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC721TokenContract;
|
||||
const txHash = await self.mint.sendTransactionAsync(_to,
|
||||
_tokenId
|
||||
@@ -372,7 +390,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -468,10 +486,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC721TokenContract;
|
||||
const txHash = await self.safeTransferFrom1.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -482,7 +506,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -688,10 +712,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_owner: string,
|
||||
_tokenId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC721TokenContract;
|
||||
const txHash = await self.burn.sendTransactionAsync(_owner,
|
||||
_tokenId
|
||||
@@ -701,7 +731,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -793,10 +823,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_operator: string,
|
||||
_approved: boolean,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC721TokenContract;
|
||||
const txHash = await self.setApprovalForAll.sendTransactionAsync(_operator,
|
||||
_approved
|
||||
@@ -806,7 +842,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -906,10 +942,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
_data: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC721TokenContract;
|
||||
const txHash = await self.safeTransferFrom2.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -921,7 +963,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1051,10 +1093,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DummyERC721TokenContract;
|
||||
const txHash = await self.transferOwnership.sendTransactionAsync(newOwner
|
||||
, txData);
|
||||
@@ -1063,7 +1111,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -51,10 +51,16 @@ export class DutchAuctionContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DutchAuctionContract;
|
||||
const txHash = await self.getAuctionDetails.sendTransactionAsync(order
|
||||
, txData);
|
||||
@@ -63,7 +69,7 @@ export class DutchAuctionContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -157,10 +163,16 @@ export class DutchAuctionContract extends BaseContract {
|
||||
sellOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
|
||||
buySignature: string,
|
||||
sellSignature: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as DutchAuctionContract;
|
||||
const txHash = await self.matchOrders.sendTransactionAsync(buyOrder,
|
||||
sellOrder,
|
||||
@@ -172,7 +184,7 @@ export class DutchAuctionContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -70,10 +70,16 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC20ProxyContract;
|
||||
const txHash = await self.addAuthorizedAddress.sendTransactionAsync(target
|
||||
, txData);
|
||||
@@ -82,7 +88,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -192,10 +198,16 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC20ProxyContract;
|
||||
const txHash = await self.removeAuthorizedAddress.sendTransactionAsync(target
|
||||
, txData);
|
||||
@@ -204,7 +216,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -316,10 +328,16 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC20ProxyContract;
|
||||
const txHash = await self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target,
|
||||
index
|
||||
@@ -329,7 +347,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -497,10 +515,16 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC20ProxyContract;
|
||||
const txHash = await self.transferOwnership.sendTransactionAsync(newOwner
|
||||
, txData);
|
||||
@@ -509,7 +533,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -76,10 +76,16 @@ export class ERC20TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC20TokenContract;
|
||||
const txHash = await self.approve.sendTransactionAsync(_spender,
|
||||
_value
|
||||
@@ -89,7 +95,7 @@ export class ERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -211,10 +217,16 @@ export class ERC20TokenContract extends BaseContract {
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC20TokenContract;
|
||||
const txHash = await self.transferFrom.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -225,7 +237,7 @@ export class ERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -351,10 +363,16 @@ export class ERC20TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC20TokenContract;
|
||||
const txHash = await self.transfer.sendTransactionAsync(_to,
|
||||
_value
|
||||
@@ -364,7 +382,7 @@ export class ERC20TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -70,10 +70,16 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721ProxyContract;
|
||||
const txHash = await self.addAuthorizedAddress.sendTransactionAsync(target
|
||||
, txData);
|
||||
@@ -82,7 +88,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -192,10 +198,16 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721ProxyContract;
|
||||
const txHash = await self.removeAuthorizedAddress.sendTransactionAsync(target
|
||||
, txData);
|
||||
@@ -204,7 +216,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -316,10 +328,16 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721ProxyContract;
|
||||
const txHash = await self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target,
|
||||
index
|
||||
@@ -329,7 +347,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -497,10 +515,16 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721ProxyContract;
|
||||
const txHash = await self.transferOwnership.sendTransactionAsync(newOwner
|
||||
, txData);
|
||||
@@ -509,7 +533,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -112,10 +112,16 @@ export class ERC721TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_approved: string,
|
||||
_tokenId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721TokenContract;
|
||||
const txHash = await self.approve.sendTransactionAsync(_approved,
|
||||
_tokenId
|
||||
@@ -125,7 +131,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -221,10 +227,16 @@ export class ERC721TokenContract extends BaseContract {
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721TokenContract;
|
||||
const txHash = await self.transferFrom.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -235,7 +247,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -337,10 +349,16 @@ export class ERC721TokenContract extends BaseContract {
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721TokenContract;
|
||||
const txHash = await self.safeTransferFrom1.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -351,7 +369,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -505,10 +523,16 @@ export class ERC721TokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_operator: string,
|
||||
_approved: boolean,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721TokenContract;
|
||||
const txHash = await self.setApprovalForAll.sendTransactionAsync(_operator,
|
||||
_approved
|
||||
@@ -518,7 +542,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -618,10 +642,16 @@ export class ERC721TokenContract extends BaseContract {
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
_data: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ERC721TokenContract;
|
||||
const txHash = await self.safeTransferFrom2.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -633,7 +663,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -142,10 +142,16 @@ export class ExchangeContract extends BaseContract {
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
takerAssetFillAmounts: BigNumber[],
|
||||
signatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.batchFillOrders.sendTransactionAsync(orders,
|
||||
takerAssetFillAmounts,
|
||||
@@ -156,7 +162,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -286,10 +292,16 @@ export class ExchangeContract extends BaseContract {
|
||||
hash: string,
|
||||
signerAddress: string,
|
||||
signature: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.preSign.sendTransactionAsync(hash,
|
||||
signerAddress,
|
||||
@@ -300,7 +312,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -406,10 +418,16 @@ export class ExchangeContract extends BaseContract {
|
||||
rightOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
|
||||
leftSignature: string,
|
||||
rightSignature: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.matchOrders.sendTransactionAsync(leftOrder,
|
||||
rightOrder,
|
||||
@@ -421,7 +439,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -529,10 +547,16 @@ export class ExchangeContract extends BaseContract {
|
||||
order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
|
||||
takerAssetFillAmount: BigNumber,
|
||||
signature: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.fillOrderNoThrow.sendTransactionAsync(order,
|
||||
takerAssetFillAmount,
|
||||
@@ -543,7 +567,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -665,10 +689,16 @@ export class ExchangeContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.batchCancelOrders.sendTransactionAsync(orders
|
||||
, txData);
|
||||
@@ -677,7 +707,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -767,10 +797,16 @@ export class ExchangeContract extends BaseContract {
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
takerAssetFillAmounts: BigNumber[],
|
||||
signatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.batchFillOrKillOrders.sendTransactionAsync(orders,
|
||||
takerAssetFillAmounts,
|
||||
@@ -781,7 +817,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -875,10 +911,16 @@ export class ExchangeContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
targetOrderEpoch: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch
|
||||
, txData);
|
||||
@@ -887,7 +929,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -977,10 +1019,16 @@ export class ExchangeContract extends BaseContract {
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
takerAssetFillAmounts: BigNumber[],
|
||||
signatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.batchFillOrdersNoThrow.sendTransactionAsync(orders,
|
||||
takerAssetFillAmounts,
|
||||
@@ -991,7 +1039,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1149,10 +1197,16 @@ export class ExchangeContract extends BaseContract {
|
||||
order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
|
||||
takerAssetFillAmount: BigNumber,
|
||||
signature: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.fillOrKillOrder.sendTransactionAsync(order,
|
||||
takerAssetFillAmount,
|
||||
@@ -1163,7 +1217,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1261,10 +1315,16 @@ export class ExchangeContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
validatorAddress: string,
|
||||
approval: boolean,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.setSignatureValidatorApproval.sendTransactionAsync(validatorAddress,
|
||||
approval
|
||||
@@ -1274,7 +1334,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1400,10 +1460,16 @@ export class ExchangeContract extends BaseContract {
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
takerAssetFillAmount: BigNumber,
|
||||
signatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.marketSellOrders.sendTransactionAsync(orders,
|
||||
takerAssetFillAmount,
|
||||
@@ -1414,7 +1480,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1632,10 +1698,16 @@ export class ExchangeContract extends BaseContract {
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
makerAssetFillAmount: BigNumber,
|
||||
signatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.marketBuyOrdersNoThrow.sendTransactionAsync(orders,
|
||||
makerAssetFillAmount,
|
||||
@@ -1646,7 +1718,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1748,10 +1820,16 @@ export class ExchangeContract extends BaseContract {
|
||||
order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
|
||||
takerAssetFillAmount: BigNumber,
|
||||
signature: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.fillOrder.sendTransactionAsync(order,
|
||||
takerAssetFillAmount,
|
||||
@@ -1762,7 +1840,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1868,10 +1946,16 @@ export class ExchangeContract extends BaseContract {
|
||||
signerAddress: string,
|
||||
data: string,
|
||||
signature: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.executeTransaction.sendTransactionAsync(salt,
|
||||
signerAddress,
|
||||
@@ -1883,7 +1967,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -1983,10 +2067,16 @@ export class ExchangeContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
assetProxy: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.registerAssetProxy.sendTransactionAsync(assetProxy
|
||||
, txData);
|
||||
@@ -1995,7 +2085,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -2105,10 +2195,16 @@ export class ExchangeContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.cancelOrder.sendTransactionAsync(order
|
||||
, txData);
|
||||
@@ -2117,7 +2213,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -2263,10 +2359,16 @@ export class ExchangeContract extends BaseContract {
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
takerAssetFillAmount: BigNumber,
|
||||
signatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.marketSellOrdersNoThrow.sendTransactionAsync(orders,
|
||||
takerAssetFillAmount,
|
||||
@@ -2277,7 +2379,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -2405,10 +2507,16 @@ export class ExchangeContract extends BaseContract {
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
makerAssetFillAmount: BigNumber,
|
||||
signatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.marketBuyOrders.sendTransactionAsync(orders,
|
||||
makerAssetFillAmount,
|
||||
@@ -2419,7 +2527,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -2539,10 +2647,16 @@ export class ExchangeContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ExchangeContract;
|
||||
const txHash = await self.transferOwnership.sendTransactionAsync(newOwner
|
||||
, txData);
|
||||
@@ -2551,7 +2665,7 @@ export class ExchangeContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -75,10 +75,16 @@ export class ForwarderContract extends BaseContract {
|
||||
feeSignatures: string[],
|
||||
feePercentage: BigNumber,
|
||||
feeRecipient: string,
|
||||
txData: Partial<TxDataPayable> = {},
|
||||
txData?: Partial<TxDataPayable> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ForwarderContract;
|
||||
const txHash = await self.marketBuyOrdersWithEth.sendTransactionAsync(orders,
|
||||
makerAssetFillAmount,
|
||||
@@ -93,7 +99,7 @@ export class ForwarderContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -215,10 +221,16 @@ export class ForwarderContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
assetData: string,
|
||||
amount: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ForwarderContract;
|
||||
const txHash = await self.withdrawAsset.sendTransactionAsync(assetData,
|
||||
amount
|
||||
@@ -228,7 +240,7 @@ export class ForwarderContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -362,10 +374,16 @@ export class ForwarderContract extends BaseContract {
|
||||
feeSignatures: string[],
|
||||
feePercentage: BigNumber,
|
||||
feeRecipient: string,
|
||||
txData: Partial<TxDataPayable> = {},
|
||||
txData?: Partial<TxDataPayable> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ForwarderContract;
|
||||
const txHash = await self.marketSellOrdersWithEth.sendTransactionAsync(orders,
|
||||
signatures,
|
||||
@@ -379,7 +397,7 @@ export class ForwarderContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -491,10 +509,16 @@ export class ForwarderContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ForwarderContract;
|
||||
const txHash = await self.transferOwnership.sendTransactionAsync(newOwner
|
||||
, txData);
|
||||
@@ -503,7 +527,7 @@ export class ForwarderContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -51,10 +51,16 @@ export class IAssetProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as IAssetProxyContract;
|
||||
const txHash = await self.addAuthorizedAddress.sendTransactionAsync(target
|
||||
, txData);
|
||||
@@ -63,7 +69,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -145,10 +151,16 @@ export class IAssetProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as IAssetProxyContract;
|
||||
const txHash = await self.removeAuthorizedAddress.sendTransactionAsync(target
|
||||
, txData);
|
||||
@@ -157,7 +169,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -243,10 +255,16 @@ export class IAssetProxyContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as IAssetProxyContract;
|
||||
const txHash = await self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target,
|
||||
index
|
||||
@@ -256,7 +274,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -356,10 +374,16 @@ export class IAssetProxyContract extends BaseContract {
|
||||
from: string,
|
||||
to: string,
|
||||
amount: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as IAssetProxyContract;
|
||||
const txHash = await self.transferFrom.sendTransactionAsync(assetData,
|
||||
from,
|
||||
@@ -371,7 +395,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -523,10 +547,16 @@ export class IAssetProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as IAssetProxyContract;
|
||||
const txHash = await self.transferOwnership.sendTransactionAsync(newOwner
|
||||
, txData);
|
||||
@@ -535,7 +565,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -105,10 +105,16 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as MultiAssetProxyContract;
|
||||
const txHash = await self.addAuthorizedAddress.sendTransactionAsync(target
|
||||
, txData);
|
||||
@@ -117,7 +123,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -255,10 +261,16 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as MultiAssetProxyContract;
|
||||
const txHash = await self.removeAuthorizedAddress.sendTransactionAsync(target
|
||||
, txData);
|
||||
@@ -267,7 +279,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -379,10 +391,16 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as MultiAssetProxyContract;
|
||||
const txHash = await self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target,
|
||||
index
|
||||
@@ -392,7 +410,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -534,10 +552,16 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
assetProxy: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as MultiAssetProxyContract;
|
||||
const txHash = await self.registerAssetProxy.sendTransactionAsync(assetProxy
|
||||
, txData);
|
||||
@@ -546,7 +570,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -654,10 +678,16 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
newOwner: string,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as MultiAssetProxyContract;
|
||||
const txHash = await self.transferOwnership.sendTransactionAsync(newOwner
|
||||
, txData);
|
||||
@@ -666,7 +696,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -116,10 +116,16 @@ export class WETH9Contract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
guy: string,
|
||||
wad: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as WETH9Contract;
|
||||
const txHash = await self.approve.sendTransactionAsync(guy,
|
||||
wad
|
||||
@@ -129,7 +135,7 @@ export class WETH9Contract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -251,10 +257,16 @@ export class WETH9Contract extends BaseContract {
|
||||
src: string,
|
||||
dst: string,
|
||||
wad: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as WETH9Contract;
|
||||
const txHash = await self.transferFrom.sendTransactionAsync(src,
|
||||
dst,
|
||||
@@ -265,7 +277,7 @@ export class WETH9Contract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -359,10 +371,16 @@ export class WETH9Contract extends BaseContract {
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
wad: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as WETH9Contract;
|
||||
const txHash = await self.withdraw.sendTransactionAsync(wad
|
||||
, txData);
|
||||
@@ -371,7 +389,7 @@ export class WETH9Contract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -537,10 +555,16 @@ export class WETH9Contract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
dst: string,
|
||||
wad: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as WETH9Contract;
|
||||
const txHash = await self.transfer.sendTransactionAsync(dst,
|
||||
wad
|
||||
@@ -550,7 +574,7 @@ export class WETH9Contract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -634,10 +658,16 @@ export class WETH9Contract extends BaseContract {
|
||||
return txHash;
|
||||
},
|
||||
async awaitTransactionSuccessAsync(
|
||||
txData: Partial<TxDataPayable> = {},
|
||||
txData?: Partial<TxDataPayable> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as WETH9Contract;
|
||||
const txHash = await self.deposit.sendTransactionAsync(txData);
|
||||
// tslint:disable-next-line: no-unnecessary-type-assertion
|
||||
@@ -645,7 +675,7 @@ export class WETH9Contract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -102,10 +102,16 @@ export class ZRXTokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ZRXTokenContract;
|
||||
const txHash = await self.approve.sendTransactionAsync(_spender,
|
||||
_value
|
||||
@@ -115,7 +121,7 @@ export class ZRXTokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -237,10 +243,16 @@ export class ZRXTokenContract extends BaseContract {
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ZRXTokenContract;
|
||||
const txHash = await self.transferFrom.sendTransactionAsync(_from,
|
||||
_to,
|
||||
@@ -251,7 +263,7 @@ export class ZRXTokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
@@ -429,10 +441,16 @@ export class ZRXTokenContract extends BaseContract {
|
||||
async awaitTransactionSuccessAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData: Partial<TxData> = {},
|
||||
txData?: Partial<TxData> | number,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
// `txData` is optional, so it might be set to `pollingIntervalMs`.
|
||||
if (typeof(txData) === 'number') {
|
||||
pollingIntervalMs = txData;
|
||||
timeoutMs = pollingIntervalMs;
|
||||
txData = {};
|
||||
}
|
||||
const self = this as any as ZRXTokenContract;
|
||||
const txHash = await self.transfer.sendTransactionAsync(_to,
|
||||
_value
|
||||
@@ -442,7 +460,7 @@ export class ZRXTokenContract extends BaseContract {
|
||||
txHash,
|
||||
pollingIntervalMs,
|
||||
timeoutMs,
|
||||
) as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
) as any as PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>;
|
||||
receiptPromise.txHash = txHash;
|
||||
return receiptPromise;
|
||||
},
|
||||
|
@@ -20,14 +20,26 @@ export interface AbiEncoderByFunctionSignature {
|
||||
[key: string]: AbiEncoder.Method;
|
||||
}
|
||||
|
||||
// Not used here, but generated contracts will return it in `awaitTransactionSuccessAsync()`.
|
||||
// Maybe there's a better place for this.
|
||||
// Must be a class to get tsc to regard as a Promise type.
|
||||
// tslint:disable: max-classes-per-file
|
||||
export class PromiseWithTransactionHash<T> extends Promise<T> {
|
||||
/**
|
||||
* @dev A promise-compatible type that exposes a `txHash` field.
|
||||
* Not used by BaseContract, but generated contracts will return it in
|
||||
* `awaitTransactionSuccessAsync()`.
|
||||
* Maybe there's a better place for this.
|
||||
* If you're wondering why this class is not simpler, it's to get around
|
||||
* Typescript/ES5 transpiling issues.
|
||||
*/
|
||||
export class PromiseWithTransactionHash<T> implements PromiseLike<T> {
|
||||
public txHash: string = '';
|
||||
constructor(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) {
|
||||
super(executor);
|
||||
private readonly _promise: Promise<T>;
|
||||
constructor(handler: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) {
|
||||
this._promise = new Promise(handler);
|
||||
}
|
||||
public then<TResult>(
|
||||
onFulfilled?: (v: T) => TResult | PromiseLike<TResult>,
|
||||
onRejected?: (reason: any) => PromiseLike<never>,
|
||||
): PromiseLike<TResult> {
|
||||
return this._promise.then<TResult>(onFulfilled, onRejected);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user