-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(BACK-8037): EIP-712 conversion must not use format=amount inside …
…arrays (#152) * fix(BACK-8037): EIP-712 conversion must not use format=amount inside arrays * fix(BACK-8037): fix import
- Loading branch information
1 parent
34cfbfa
commit f62f2b6
Showing
5 changed files
with
244 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
174 changes: 174 additions & 0 deletions
174
tests/convert/ledger/eip712/data/eip712-UniswapX-DutchOrder.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
{ | ||
"blockchainName": "ethereum", | ||
"chainId": 1, | ||
"name": "Permit2", | ||
"contracts": [ | ||
{ | ||
"address": "0x000000000022d473030f116ddee9f6b43ac78ba3", | ||
"contractName": "Uniswap", | ||
"messages": [ | ||
{ | ||
"schema": { | ||
"DutchOrder": [ | ||
{ | ||
"name": "info", | ||
"type": "OrderInfo" | ||
}, | ||
{ | ||
"name": "decayStartTime", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "decayEndTime", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "inputToken", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "inputStartAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "inputEndAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "outputs", | ||
"type": "DutchOutput[]" | ||
} | ||
], | ||
"DutchOutput": [ | ||
{ | ||
"name": "token", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "startAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "endAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "recipient", | ||
"type": "address" | ||
} | ||
], | ||
"EIP712Domain": [ | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "chainId", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "verifyingContract", | ||
"type": "address" | ||
} | ||
], | ||
"OrderInfo": [ | ||
{ | ||
"name": "reactor", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "swapper", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "nonce", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "deadline", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "additionalValidationContract", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "additionalValidationData", | ||
"type": "bytes" | ||
} | ||
], | ||
"PermitWitnessTransferFrom": [ | ||
{ | ||
"name": "permitted", | ||
"type": "TokenPermissions" | ||
}, | ||
{ | ||
"name": "spender", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "nonce", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "deadline", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "witness", | ||
"type": "DutchOrder" | ||
} | ||
], | ||
"TokenPermissions": [ | ||
{ | ||
"name": "token", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "amount", | ||
"type": "uint256" | ||
} | ||
] | ||
}, | ||
"mapper": { | ||
"label": "UniswapX Dutch Order", | ||
"fields": [ | ||
{ | ||
"path": "spender", | ||
"label": "Approve to spender", | ||
"format": "raw" | ||
}, | ||
{ | ||
"path": "permitted.amount", | ||
"label": "Approve amount", | ||
"assetPath": "permitted.token", | ||
"format": "amount" | ||
}, | ||
{ | ||
"path": "witness.inputStartAmount", | ||
"label": "Spend max", | ||
"assetPath": "witness.inputToken", | ||
"format": "amount" | ||
}, | ||
{ | ||
"path": "witness.outputs.[].endAmount", | ||
"label": "Minimum amounts to receive", | ||
"format": "raw" | ||
}, | ||
{ | ||
"path": "witness.outputs.[].recipient", | ||
"label": "On Addresses", | ||
"format": "raw" | ||
}, | ||
{ | ||
"path": "deadline", | ||
"label": "Approval expire", | ||
"format": "datetime" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters