Berlin wrappers (#212)
* `@0x/contract-wrappers`: Regenerate wrappers using updated abi-gen Update tools deps * update deps to hopefully fix doc gen
This commit is contained in:
@@ -24,9 +24,10 @@ import {
|
||||
TransactionReceiptWithDecodedLogs,
|
||||
TxData,
|
||||
TxDataPayable,
|
||||
TxAccessListWithGas,
|
||||
SupportedProvider,
|
||||
} from 'ethereum-types';
|
||||
import { BigNumber, classUtils, hexUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { AbiEncoder, BigNumber, classUtils, EncodingRules, hexUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { EventCallback, IndexedFilterValues, SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { assert } from '@0x/assert';
|
||||
@@ -53,11 +54,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
exchange: string,
|
||||
chainId: BigNumber,
|
||||
): Promise<CoordinatorContract> {
|
||||
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
|
||||
schemas.addressSchema,
|
||||
schemas.numberSchema,
|
||||
schemas.jsNumber,
|
||||
]);
|
||||
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema);
|
||||
if (artifact.compilerOutput === undefined) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
@@ -90,11 +87,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
exchange: string,
|
||||
chainId: BigNumber,
|
||||
): Promise<CoordinatorContract> {
|
||||
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
|
||||
schemas.addressSchema,
|
||||
schemas.numberSchema,
|
||||
schemas.jsNumber,
|
||||
]);
|
||||
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema);
|
||||
if (artifact.compilerOutput === undefined) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
@@ -134,11 +127,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
chainId: BigNumber,
|
||||
): Promise<CoordinatorContract> {
|
||||
assert.isHexString('bytecode', bytecode);
|
||||
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
|
||||
schemas.addressSchema,
|
||||
schemas.numberSchema,
|
||||
schemas.jsNumber,
|
||||
]);
|
||||
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema);
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[exchange, chainId] = BaseContract._formatABIDataItemList(
|
||||
@@ -875,6 +864,16 @@ export class CoordinatorContract extends BaseContract {
|
||||
});
|
||||
return self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
},
|
||||
async createAccessListAsync(
|
||||
txData?: Partial<TxData> | undefined,
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<TxAccessListWithGas> {
|
||||
const txDataWithDefaults = await self._applyDefaultsToTxDataAsync({
|
||||
data: this.getABIEncodedTransactionData(),
|
||||
...txData,
|
||||
});
|
||||
return self._web3Wrapper.createAccessListAsync(txDataWithDefaults, defaultBlock);
|
||||
},
|
||||
async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<void> {
|
||||
BaseContract._assertCallParams(callData, defaultBlock);
|
||||
const rawCallResult = await self._performCallAsync(
|
||||
@@ -967,6 +966,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
txDefaults?: Partial<TxData>,
|
||||
logDecodeDependencies?: { [contractName: string]: ContractAbi },
|
||||
deployedBytecode: string | undefined = CoordinatorContract.deployedBytecode,
|
||||
encodingRules?: EncodingRules,
|
||||
) {
|
||||
super(
|
||||
'Coordinator',
|
||||
@@ -976,6 +976,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
txDefaults,
|
||||
logDecodeDependencies,
|
||||
deployedBytecode,
|
||||
encodingRules,
|
||||
);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
|
||||
CoordinatorContract.ABI().forEach((item, index) => {
|
||||
|
||||
Reference in New Issue
Block a user