Ran prettier
This commit is contained in:
parent
9f2221a885
commit
fea5a39740
@ -46,7 +46,7 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr
|
|||||||
| [`@0x/contracts-multisig`](/contracts/multisig) | [](https://www.npmjs.com/package/@0x/contracts-multisig) | Various implementations of multisignature wallets, including the [`AssetProxyOwner`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxyowner) contract that has permissions to upgrade the protocol |
|
| [`@0x/contracts-multisig`](/contracts/multisig) | [](https://www.npmjs.com/package/@0x/contracts-multisig) | Various implementations of multisignature wallets, including the [`AssetProxyOwner`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxyowner) contract that has permissions to upgrade the protocol |
|
||||||
| [`@0x/contracts-test-utils`](/contracts/test-utils) | [](https://www.npmjs.com/package/@0x/contracts-test-utils) | Typescript/Javascript shared utilities used for testing contracts |
|
| [`@0x/contracts-test-utils`](/contracts/test-utils) | [](https://www.npmjs.com/package/@0x/contracts-test-utils) | Typescript/Javascript shared utilities used for testing contracts |
|
||||||
| [`@0x/contracts-utils`](/contracts/utils) | [](https://www.npmjs.com/package/@0x/contracts-utils) | Generic libraries and utilities used throughout all of the contracts |
|
| [`@0x/contracts-utils`](/contracts/utils) | [](https://www.npmjs.com/package/@0x/contracts-utils) | Generic libraries and utilities used throughout all of the contracts |
|
||||||
| [`@0x/contracts-coordinator`](/contracts/coordinator) | [](https://www.npmjs.com/package/@0x/contracts-coordinator) | A contract that allows users to execute 0x transactions with permission from a Coordinator |
|
| [`@0x/contracts-coordinator`](/contracts/coordinator) | [](https://www.npmjs.com/package/@0x/contracts-coordinator) | A contract that allows users to execute 0x transactions with permission from a Coordinator |
|
||||||
|
|
||||||
### Typescript/Javascript Packages
|
### Typescript/Javascript Packages
|
||||||
|
|
||||||
|
@ -190,10 +190,16 @@ describe('Coordinator tests', () => {
|
|||||||
const data = exchangeDataEncoder.encodeOrdersToExchangeData(fnName, orders);
|
const data = exchangeDataEncoder.encodeOrdersToExchangeData(fnName, orders);
|
||||||
const transaction = takerTransactionFactory.newSignedTransaction(data);
|
const transaction = takerTransactionFactory.newSignedTransaction(data);
|
||||||
await expectTransactionFailedAsync(
|
await expectTransactionFailedAsync(
|
||||||
coordinatorContract.executeTransaction.sendTransactionAsync(transaction, transaction.signature, [], [], {
|
coordinatorContract.executeTransaction.sendTransactionAsync(
|
||||||
from: takerAddress,
|
transaction,
|
||||||
gas: devConstants.MAX_EXECUTE_TRANSACTION_GAS,
|
transaction.signature,
|
||||||
}),
|
[],
|
||||||
|
[],
|
||||||
|
{
|
||||||
|
from: takerAddress,
|
||||||
|
gas: devConstants.MAX_EXECUTE_TRANSACTION_GAS,
|
||||||
|
},
|
||||||
|
),
|
||||||
RevertReason.InvalidApprovalSignature,
|
RevertReason.InvalidApprovalSignature,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -388,9 +394,15 @@ describe('Coordinator tests', () => {
|
|||||||
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.CANCEL_ORDERS, orders);
|
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.CANCEL_ORDERS, orders);
|
||||||
const transaction = makerTransactionFactory.newSignedTransaction(data);
|
const transaction = makerTransactionFactory.newSignedTransaction(data);
|
||||||
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
|
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
|
||||||
await coordinatorContract.executeTransaction.sendTransactionAsync(transaction, transaction.signature, [], [], {
|
await coordinatorContract.executeTransaction.sendTransactionAsync(
|
||||||
from: makerAddress,
|
transaction,
|
||||||
}),
|
transaction.signature,
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
{
|
||||||
|
from: makerAddress,
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
const cancelLogs = transactionReceipt.logs.filter(
|
const cancelLogs = transactionReceipt.logs.filter(
|
||||||
log => (log as LogWithDecodedArgs<ExchangeCancelEventArgs>).event === 'Cancel',
|
log => (log as LogWithDecodedArgs<ExchangeCancelEventArgs>).event === 'Cancel',
|
||||||
@ -409,9 +421,15 @@ describe('Coordinator tests', () => {
|
|||||||
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.BATCH_CANCEL_ORDERS, orders);
|
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.BATCH_CANCEL_ORDERS, orders);
|
||||||
const transaction = makerTransactionFactory.newSignedTransaction(data);
|
const transaction = makerTransactionFactory.newSignedTransaction(data);
|
||||||
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
|
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
|
||||||
await coordinatorContract.executeTransaction.sendTransactionAsync(transaction, transaction.signature, [], [], {
|
await coordinatorContract.executeTransaction.sendTransactionAsync(
|
||||||
from: makerAddress,
|
transaction,
|
||||||
}),
|
transaction.signature,
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
{
|
||||||
|
from: makerAddress,
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
const cancelLogs = transactionReceipt.logs.filter(
|
const cancelLogs = transactionReceipt.logs.filter(
|
||||||
log => (log as LogWithDecodedArgs<ExchangeCancelEventArgs>).event === 'Cancel',
|
log => (log as LogWithDecodedArgs<ExchangeCancelEventArgs>).event === 'Cancel',
|
||||||
@ -432,9 +450,15 @@ describe('Coordinator tests', () => {
|
|||||||
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.CANCEL_ORDERS_UP_TO, orders);
|
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.CANCEL_ORDERS_UP_TO, orders);
|
||||||
const transaction = makerTransactionFactory.newSignedTransaction(data);
|
const transaction = makerTransactionFactory.newSignedTransaction(data);
|
||||||
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
|
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
|
||||||
await coordinatorContract.executeTransaction.sendTransactionAsync(transaction, transaction.signature, [], [], {
|
await coordinatorContract.executeTransaction.sendTransactionAsync(
|
||||||
from: makerAddress,
|
transaction,
|
||||||
}),
|
transaction.signature,
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
{
|
||||||
|
from: makerAddress,
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
const cancelLogs = transactionReceipt.logs.filter(
|
const cancelLogs = transactionReceipt.logs.filter(
|
||||||
log => (log as LogWithDecodedArgs<ExchangeCancelUpToEventArgs>).event === 'CancelUpTo',
|
log => (log as LogWithDecodedArgs<ExchangeCancelUpToEventArgs>).event === 'CancelUpTo',
|
||||||
|
@ -81,14 +81,20 @@ describe('Mixins tests', () => {
|
|||||||
describe('getSignerAddress', () => {
|
describe('getSignerAddress', () => {
|
||||||
it('should return the correct address using the EthSign signature type', async () => {
|
it('should return the correct address using the EthSign signature type', async () => {
|
||||||
const data = devConstants.NULL_BYTES;
|
const data = devConstants.NULL_BYTES;
|
||||||
const transaction = transactionFactory.newSignedCoordinatorTransaction(data, CoordinatorSignatureType.EthSign);
|
const transaction = transactionFactory.newSignedCoordinatorTransaction(
|
||||||
|
data,
|
||||||
|
CoordinatorSignatureType.EthSign,
|
||||||
|
);
|
||||||
const transactionHash = hashUtils.getTransactionHashHex(transaction);
|
const transactionHash = hashUtils.getTransactionHashHex(transaction);
|
||||||
const signerAddress = await mixins.getSignerAddress.callAsync(transactionHash, transaction.signature);
|
const signerAddress = await mixins.getSignerAddress.callAsync(transactionHash, transaction.signature);
|
||||||
expect(transaction.signerAddress).to.eq(signerAddress);
|
expect(transaction.signerAddress).to.eq(signerAddress);
|
||||||
});
|
});
|
||||||
it('should return the correct address using the EIP712 signature type', async () => {
|
it('should return the correct address using the EIP712 signature type', async () => {
|
||||||
const data = devConstants.NULL_BYTES;
|
const data = devConstants.NULL_BYTES;
|
||||||
const transaction = transactionFactory.newSignedCoordinatorTransaction(data, CoordinatorSignatureType.EIP712);
|
const transaction = transactionFactory.newSignedCoordinatorTransaction(
|
||||||
|
data,
|
||||||
|
CoordinatorSignatureType.EIP712,
|
||||||
|
);
|
||||||
const transactionHash = hashUtils.getTransactionHashHex(transaction);
|
const transactionHash = hashUtils.getTransactionHashHex(transaction);
|
||||||
const signerAddress = await mixins.getSignerAddress.callAsync(transactionHash, transaction.signature);
|
const signerAddress = await mixins.getSignerAddress.callAsync(transactionHash, transaction.signature);
|
||||||
expect(transaction.signerAddress).to.eq(signerAddress);
|
expect(transaction.signerAddress).to.eq(signerAddress);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
"version": "2.0.9",
|
"version": "2.0.9",
|
||||||
"changes": [
|
"changes": [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user