Fix: FQT otc order encoding logic (#596)
* swap rfq and otc in fillQuoteTransformerDataEncoder to match our enum * changelog * fix changelog and move otcOrders field to last in fillQuoteTransformerDataEncoder * prettier * move otcOrders array to end of fqtTransformData Co-authored-by: Noah Khamliche <0xnoah@Noahs-MacBook-Pro-2.local>
This commit is contained in:
parent
10916205ab
commit
bf1b5c4257
@ -15,7 +15,7 @@ export const artifacts = {
|
|||||||
DummyERC20Token: DummyERC20Token as ContractArtifact,
|
DummyERC20Token: DummyERC20Token as ContractArtifact,
|
||||||
ERC20Token: ERC20Token as ContractArtifact,
|
ERC20Token: ERC20Token as ContractArtifact,
|
||||||
WETH9: WETH9 as ContractArtifact,
|
WETH9: WETH9 as ContractArtifact,
|
||||||
ZRXToken: (ZRXToken as any) as ContractArtifact,
|
ZRXToken: ZRXToken as any as ContractArtifact,
|
||||||
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
|
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
|
||||||
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
|
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
|
||||||
};
|
};
|
||||||
|
@ -28,7 +28,7 @@ export const artifacts = {
|
|||||||
MintableERC20Token: MintableERC20Token as ContractArtifact,
|
MintableERC20Token: MintableERC20Token as ContractArtifact,
|
||||||
UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
|
UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
|
||||||
WETH9: WETH9 as ContractArtifact,
|
WETH9: WETH9 as ContractArtifact,
|
||||||
ZRXToken: (ZRXToken as any) as ContractArtifact,
|
ZRXToken: ZRXToken as any as ContractArtifact,
|
||||||
IERC20Token: IERC20Token as ContractArtifact,
|
IERC20Token: IERC20Token as ContractArtifact,
|
||||||
IEtherToken: IEtherToken as ContractArtifact,
|
IEtherToken: IEtherToken as ContractArtifact,
|
||||||
IERC20TokenV06: IERC20TokenV06 as ContractArtifact,
|
IERC20TokenV06: IERC20TokenV06 as ContractArtifact,
|
||||||
|
@ -90,8 +90,6 @@ contract FillQuoteTransformer is Transformer {
|
|||||||
IBridgeAdapter.BridgeOrder[] bridgeOrders;
|
IBridgeAdapter.BridgeOrder[] bridgeOrders;
|
||||||
// Native limit orders. Sorted by fill sequence.
|
// Native limit orders. Sorted by fill sequence.
|
||||||
LimitOrderInfo[] limitOrders;
|
LimitOrderInfo[] limitOrders;
|
||||||
// Otc orders. Sorted by fill sequence.
|
|
||||||
OtcOrderInfo[] otcOrders;
|
|
||||||
// Native RFQ orders. Sorted by fill sequence.
|
// Native RFQ orders. Sorted by fill sequence.
|
||||||
RfqOrderInfo[] rfqOrders;
|
RfqOrderInfo[] rfqOrders;
|
||||||
// The sequence to fill the orders in. Each item will fill the next
|
// The sequence to fill the orders in. Each item will fill the next
|
||||||
@ -110,6 +108,8 @@ contract FillQuoteTransformer is Transformer {
|
|||||||
// `address(1)`: Send to the taker.
|
// `address(1)`: Send to the taker.
|
||||||
// `address(2)`: Send to the sender (caller of `transformERC20()`).
|
// `address(2)`: Send to the sender (caller of `transformERC20()`).
|
||||||
address payable refundReceiver;
|
address payable refundReceiver;
|
||||||
|
// Otc orders. Sorted by fill sequence.
|
||||||
|
OtcOrderInfo[] otcOrders;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct FillOrderResults {
|
struct FillOrderResults {
|
||||||
|
@ -389,7 +389,8 @@ export const artifacts = {
|
|||||||
TestNoEthRecipient: TestNoEthRecipient as ContractArtifact,
|
TestNoEthRecipient: TestNoEthRecipient as ContractArtifact,
|
||||||
TestOrderSignerRegistryWithContractWallet: TestOrderSignerRegistryWithContractWallet as ContractArtifact,
|
TestOrderSignerRegistryWithContractWallet: TestOrderSignerRegistryWithContractWallet as ContractArtifact,
|
||||||
TestPermissionlessTransformerDeployerSuicidal: TestPermissionlessTransformerDeployerSuicidal as ContractArtifact,
|
TestPermissionlessTransformerDeployerSuicidal: TestPermissionlessTransformerDeployerSuicidal as ContractArtifact,
|
||||||
TestPermissionlessTransformerDeployerTransformer: TestPermissionlessTransformerDeployerTransformer as ContractArtifact,
|
TestPermissionlessTransformerDeployerTransformer:
|
||||||
|
TestPermissionlessTransformerDeployerTransformer as ContractArtifact,
|
||||||
TestPropertyValidator: TestPropertyValidator as ContractArtifact,
|
TestPropertyValidator: TestPropertyValidator as ContractArtifact,
|
||||||
TestRfqOriginRegistration: TestRfqOriginRegistration as ContractArtifact,
|
TestRfqOriginRegistration: TestRfqOriginRegistration as ContractArtifact,
|
||||||
TestSimpleFunctionRegistryFeatureImpl1: TestSimpleFunctionRegistryFeatureImpl1 as ContractArtifact,
|
TestSimpleFunctionRegistryFeatureImpl1: TestSimpleFunctionRegistryFeatureImpl1 as ContractArtifact,
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "11.16.14",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Fix FQT Otc encoding logic",
|
||||||
|
"pr": "596"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1665531940,
|
"timestamp": 1665531940,
|
||||||
"version": "11.16.13",
|
"version": "11.16.13",
|
||||||
|
@ -74,11 +74,6 @@ export const fillQuoteTransformerDataEncoder = AbiEncoder.create([
|
|||||||
type: 'tuple[]',
|
type: 'tuple[]',
|
||||||
components: LIMIT_ORDER_INFO_ABI_COMPONENTS,
|
components: LIMIT_ORDER_INFO_ABI_COMPONENTS,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'otcOrders',
|
|
||||||
type: 'tuple[]',
|
|
||||||
components: OTC_ORDER_INFO_ABI_COMPONENTS,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'rfqOrders',
|
name: 'rfqOrders',
|
||||||
type: 'tuple[]',
|
type: 'tuple[]',
|
||||||
@ -87,6 +82,11 @@ export const fillQuoteTransformerDataEncoder = AbiEncoder.create([
|
|||||||
{ name: 'fillSequence', type: 'uint8[]' },
|
{ name: 'fillSequence', type: 'uint8[]' },
|
||||||
{ name: 'fillAmount', type: 'uint256' },
|
{ name: 'fillAmount', type: 'uint256' },
|
||||||
{ name: 'refundReceiver', type: 'address' },
|
{ name: 'refundReceiver', type: 'address' },
|
||||||
|
{
|
||||||
|
name: 'otcOrders',
|
||||||
|
type: 'tuple[]',
|
||||||
|
components: OTC_ORDER_INFO_ABI_COMPONENTS,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user