-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix registration of proxied ERC20 deposits (#1289)
- Loading branch information
Showing
9 changed files
with
238 additions
and
3 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
26 changes: 26 additions & 0 deletions
26
.../test/resources/wiremock/ethereum/__files/body-eth_getTransactionByHashERC20_proxied.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,26 @@ | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": { | ||
"accessList": [], | ||
"blockHash": "0xef8b66f05b3d7da11d46791de8888e3f62720a0b334d1cd50d3fcf7017cb27ef", | ||
"blockNumber": "0x1430db7", | ||
"chainId": "0x1", | ||
"from": "0x3ab6ca1c61b37312c7ab3816087dc64237d09fe2", | ||
"gas": "0x155b4", | ||
"gasPrice": "0x551e0d961", | ||
"hash": "0x384cf237da4ed3592b5140ab1ff5bbbad8b06abef3a5e2ae250d0f4333ea27dd", | ||
"input": "0x6a761202000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000cc283c1ced6f9eaf288efee2e924cd01e5578990000000000000000000000000000000000000000000000000000000055ae826000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c3c6277fcc2492884d46aaa3b741ae298ae286ce795b73aef57b4a1840a3cd7293063078f0643c5cab6fc309018992960f5609fcdc5ebd1cd908706a07867448141b0000000000000000000000003ab6ca1c61b37312c7ab3816087dc64237d09fe2000000000000000000000000000000000000000000000000000000000000000001c687231683a177b9dbb0cb79c59c5570240dccdf231305ef783a13f7b4687b9b34c94d754497a3d7c9aab2f1f7c31b09986c2507220f69c4ecfe67ea5d455ead1c0000000000000000000000000000000000000000000000000000000000", | ||
"maxFeePerGas": "0x619264a7c", | ||
"maxPriorityFeePerGas": "0x7029fd40", | ||
"nonce": "0x10", | ||
"r": "0xa27c415ed8f8b52bc34b9e1235c73386711f1f06cfe835175f9d5b36b948d33", | ||
"s": "0x4ff1b160159a77479d86121655022740a3771ee2a68a527dcf9f3063cdfbf87c", | ||
"to": "0x13b2639533ec7741172563b490b64cde14a34258", | ||
"transactionIndex": "0xb2", | ||
"type": "0x2", | ||
"v": "0x0", | ||
"value": "0x0", | ||
"yParity": "0x0" | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...test/resources/wiremock/ethereum/__files/body-eth_getTransactionReceiptERC20_proxied.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,49 @@ | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": {{jsonPath request.body '$.id'}}, | ||
"result": { | ||
"blockHash": "0xef8b66f05b3d7da11d46791de8888e3f62720a0b334d1cd50d3fcf7017cb27ef", | ||
"blockNumber": "0x1430db7", | ||
"contractAddress": null, | ||
"cumulativeGasUsed": "0x11c0c51", | ||
"effectiveGasPrice": "0x551e0d961", | ||
"from": "0x3ab6ca1c61b37312c7ab3816087dc64237d09fe2", | ||
"gasUsed": "0x15216", | ||
"logs": [ | ||
{ | ||
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", | ||
"blockHash": "0xef8b66f05b3d7da11d46791de8888e3f62720a0b334d1cd50d3fcf7017cb27ef", | ||
"blockNumber": "0x1430db7", | ||
"data": "0x000000000000000000000000000000000000000000000000000000055ae82600", | ||
"logIndex": "0x231", | ||
"removed": false, | ||
"topics": [ | ||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", | ||
"0x00000000000000000000000013b2639533ec7741172563b490b64cde14a34258", | ||
"0x0000000000000000000000008371e21f595dbf98caffdcef665ebcaccb983cb1" | ||
], | ||
"transactionHash": "0x384cf237da4ed3592b5140ab1ff5bbbad8b06abef3a5e2ae250d0f4333ea27dd", | ||
"transactionIndex": "0xb2" | ||
}, | ||
{ | ||
"address": "0x13b2639533ec7741172563b490b64cde14a34258", | ||
"blockHash": "0xef8b66f05b3d7da11d46791de8888e3f62720a0b334d1cd50d3fcf7017cb27ef", | ||
"blockNumber": "0x1430db7", | ||
"data": "0xfd0caa8036e464ffca63457a88b9bf516f415897cbbc50af8c254758141ed3310000000000000000000000000000000000000000000000000000000000000000", | ||
"logIndex": "0x232", | ||
"removed": false, | ||
"topics": [ | ||
"0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e" | ||
], | ||
"transactionHash": "{{jsonPath request.body '$.params[0]'}}", | ||
"transactionIndex": "0xb2" | ||
} | ||
], | ||
"logsBloom": "0x00000000400000000000000000000000000100000000000000000000040000000000000000000000000000000000000008000000000000000000000000000000000000000000000008000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010020000000000000000000002000000000000000000000000010000000000000000000000010100000000200000002000000004000000000000000000000000000000000000000002000000000000000000000000000000000100000000000000000000000000000004000000000000000000000000000000000000000000000000000000", | ||
"status": "0x1", | ||
"to": "0x13b2639533ec7741172563b490b64cde14a34258", | ||
"transactionHash": "0x384cf237da4ed3592b5140ab1ff5bbbad8b06abef3a5e2ae250d0f4333ea27dd", | ||
"transactionIndex": "0xb2", | ||
"type": "0x2" | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
.../src/test/resources/wiremock/ethereum/mappings/eth_getTransactionByHashERC20_proxied.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,27 @@ | ||
{ | ||
"priority": 1, | ||
"request": { | ||
"url": "/", | ||
"method": "POST", | ||
"bodyPatterns": [ | ||
{ | ||
"equalToJson": { | ||
"jsonrpc": "2.0", | ||
"method": "eth_getTransactionByHash", | ||
"params": [ | ||
"0x384cf237da4ed3592b5140ab1ff5bbbad8b06abef3a5e2ae250d0f4333ea27dd" | ||
] | ||
}, | ||
"ignoreArrayOrder": true, | ||
"ignoreExtraElements": true | ||
} | ||
] | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "body-eth_getTransactionByHashERC20_proxied.json", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...src/test/resources/wiremock/ethereum/mappings/eth_getTransactionReceiptERC20_proxied.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,27 @@ | ||
{ | ||
"priority": 1, | ||
"request": { | ||
"url": "/", | ||
"method": "POST", | ||
"bodyPatterns": [ | ||
{ | ||
"equalToJson": { | ||
"jsonrpc": "2.0", | ||
"method": "eth_getTransactionReceipt", | ||
"params": [ | ||
"0x384cf237da4ed3592b5140ab1ff5bbbad8b06abef3a5e2ae250d0f4333ea27dd" | ||
] | ||
}, | ||
"ignoreArrayOrder": true, | ||
"ignoreExtraElements": true | ||
} | ||
] | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "body-eth_getTransactionReceiptERC20_proxied.json", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...dapter/src/main/java/onlydust/com/marketplace/api/infura/NotAnERC20TransferException.java
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,7 @@ | ||
package onlydust.com.marketplace.api.infura; | ||
|
||
public class NotAnERC20TransferException extends RuntimeException { | ||
public NotAnERC20TransferException(String message) { | ||
super(message); | ||
} | ||
} |
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