-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[Components] l3mbda: update API routes #12938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
export default { | ||
schema: "erc1155", | ||
timestamp: 1696056683, | ||
hash: "0x746f2590d47aaa820b5beecbaa63c2f5da8ea82a514ed744b2df9e32fc488444", | ||
logIndex: 1, | ||
from: "0xA7DA87A14C2595268cb4944B53bd965e39205AB6", | ||
to: "0x693906100C48222162Ee3ecCE7d7d8055cF7717F", | ||
quantity: "2", | ||
quantityPretty: "2", | ||
tokenId: "1", | ||
tokenContract: "0xEdd960709617F150844BCEf07b46F4c078a99A07", | ||
blockNumber: 18246849, | ||
blockHash: "0x51add0822281d792f695f3b26fab029677af96fcdaf3aa1dae860e4c7d5eda08", | ||
'schema': 'erc1155', | ||
'token': { | ||
'name': 'Parallel Aftermath', | ||
'symbol': 'LLAM', | ||
'address': '0xa7b67cd6b31b73772ae3c8ea784317207194a6f4', | ||
'decimals': '18', | ||
}, | ||
'from': '0xc0b995b600db778980f6eb37bc8206a1ff080d56', | ||
'to': '0x11dc6afae1ae3e32cb1f28a329c3b9a2559bdb61', | ||
'quantity': '1', | ||
'quantityPretty': '1', | ||
'tokenId': '100400002', | ||
'ordinal': '14947', | ||
'blockNumber': '22797902', | ||
'blockTimestamp': '1732385151', | ||
'blockHash': '0x9dc16f1419ca77dafe01f5a0ff92afcce48f5e9ec60f986b2adc1c7e262c1516', | ||
'transactionHash': '0x0e8ec5b9bfe7a367c5c62f31f70c90225b5efba29ef532f29c2c0723535a748c', | ||
'transactionIndex': '81' | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,14 +1,20 @@ | ||||||||||||||||||
export default { | ||||||||||||||||||
schema: "erc20", | ||||||||||||||||||
timestamp: 1699268519, | ||||||||||||||||||
hash: "0x654dcd2642341a56dc551da546a7c78abd7507b65be9a6f21efac82a814451a4", | ||||||||||||||||||
logIndex: 0, | ||||||||||||||||||
from: "0x1440ec793aE50fA046B95bFeCa5aF475b6003f9e", | ||||||||||||||||||
to: "0xe9f35a820F79105d26E8925d4B2a216Ed65521c8", | ||||||||||||||||||
decimals: 6, | ||||||||||||||||||
quantity: "197360000", | ||||||||||||||||||
quantityPretty: "197.36", | ||||||||||||||||||
tokenContract: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", | ||||||||||||||||||
blockNumber: 18512513, | ||||||||||||||||||
blockHash: "0xd152c16c56ceff826942b526642de928cf99a25c01b1b2541b93c330d828f192", | ||||||||||||||||||
export default { | ||||||||||||||||||
'schema': 'erc20', | ||||||||||||||||||
'token': { | ||||||||||||||||||
'name': 'Wrapped Ether', | ||||||||||||||||||
'symbol': 'WETH', | ||||||||||||||||||
'address': '0x4200000000000000000000000000000000000006', | ||||||||||||||||||
'decimals': '18', | ||||||||||||||||||
}, | ||||||||||||||||||
'from': '0x2626664c2603336e57b271c5c0b26f421741e481', | ||||||||||||||||||
'to': '0x22a6a16842ab40ff40614ac5da38b41eac8c5de0', | ||||||||||||||||||
'quantity': '1000000000', | ||||||||||||||||||
'quantityPretty': '0.000000001000000000', | ||||||||||||||||||
'ordinal': '28422', | ||||||||||||||||||
'logIndex': '2', | ||||||||||||||||||
'blockNumber': '22797900', | ||||||||||||||||||
'blockTimestamp': '1732385147', | ||||||||||||||||||
Comment on lines
+13
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix future timestamp and use appropriate types for numeric values
- 'ordinal': '28422',
- 'logIndex': '2',
- 'blockNumber': '22797900',
- 'blockTimestamp': '1732385147',
+ 'ordinal': 28422,
+ 'logIndex': 2,
+ 'blockNumber': 22797900,
+ 'blockTimestamp': 1699123456, // Use a past timestamp 📝 Committable suggestion
Suggested change
|
||||||||||||||||||
'blockHash': '0xdf29aef776ac19b239b2f64afe74df3666b8c4d3e219afdf5deff780e90cb472', | ||||||||||||||||||
'transactionHash': '0x38f8cb06ff0b8be535ee3d081c424718cef9b676716155de5c82fad879691e86', | ||||||||||||||||||
'transactionIndex': '137' | ||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,14 +1,19 @@ | ||||||||||||||||||||||||||||
export default { | ||||||||||||||||||||||||||||
schema: "erc721", | ||||||||||||||||||||||||||||
timestamp: 1699267823, | ||||||||||||||||||||||||||||
hash: "0xc7af5e36f825af1dec0869b7f42e7c991325c6f8954f11002feb8d9713d3b072", | ||||||||||||||||||||||||||||
logIndex: 1, | ||||||||||||||||||||||||||||
from: "0x13872B61CF6A60C90e11aBd34F897e6042969B3c", | ||||||||||||||||||||||||||||
to: "0x539f869ACF4f77893a945A7dfE97758A6f2CB22a", | ||||||||||||||||||||||||||||
quantity: "1", | ||||||||||||||||||||||||||||
quantityPretty: "1", | ||||||||||||||||||||||||||||
tokenId: "14079", | ||||||||||||||||||||||||||||
tokenContract: "0xF661D58cfE893993b11D53d11148c4650590C692", | ||||||||||||||||||||||||||||
blockNumber: 18512455, | ||||||||||||||||||||||||||||
blockHash: "0x6e09f1ddbc3f9f3b6830e4ba2583e74bf53808839593e57471b63be81cfdf5f3", | ||||||||||||||||||||||||||||
'schema': 'erc721', | ||||||||||||||||||||||||||||
'token': { | ||||||||||||||||||||||||||||
'name': 'Based Young Chads', | ||||||||||||||||||||||||||||
'symbol': 'BYC', | ||||||||||||||||||||||||||||
'address': '0x6cd7059c4b56674f3272368f1d9fb895e0dacd55', | ||||||||||||||||||||||||||||
'decimals': '18', | ||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||
Comment on lines
+2
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove decimals field and use checksum address format
Apply this diff: 'token': {
'name': 'Based Young Chads',
'symbol': 'BYC',
- 'address': '0x6cd7059c4b56674f3272368f1d9fb895e0dacd55',
- 'decimals': '18',
+ 'address': '0x6Cd7059C4B56674f3272368F1D9FB895E0DacD55',
}, 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||
'from': '0x447cb0e7658de51238c953017a6b99d0eae65572', | ||||||||||||||||||||||||||||
'to': '0xf2f8b9f61c21bf34c2d1390c4d434cfe178ee793', | ||||||||||||||||||||||||||||
'tokenId': '80', | ||||||||||||||||||||||||||||
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Use checksum format for Ethereum addresses The Apply this diff: - 'from': '0x447cb0e7658de51238c953017a6b99d0eae65572',
- 'to': '0xf2f8b9f61c21bf34c2d1390c4d434cfe178ee793',
+ 'from': '0x447cB0E7658DE51238C953017A6B99d0EaE65572',
+ 'to': '0xF2F8B9F61C21Bf34C2D1390C4D434CFE178EE793', 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||
'ordinal': '18062', | ||||||||||||||||||||||||||||
'logIndex': '5', | ||||||||||||||||||||||||||||
'blockNumber': '22797901', | ||||||||||||||||||||||||||||
'blockTimestamp': '1732385149', | ||||||||||||||||||||||||||||
'blockHash': '0xbb53cc05e03b2840d56da514bfebe21de2485e87234e9073870807d12d0b8626', | ||||||||||||||||||||||||||||
'transactionHash': '0xdb90c932188ba766ef5147d7f1b2c0559e43f75e55328f08bfe75d2eb477f2e6', | ||||||||||||||||||||||||||||
'transactionIndex': '88' | ||||||||||||||||||||||||||||
Comment on lines
+12
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update blockTimestamp to a realistic value The Consider using a recent past timestamp for more realistic test scenarios. For example: - 'blockTimestamp': '1732385149',
+ 'blockTimestamp': '1699887149', // November 2023
|
||||||||||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,13 +1,19 @@ | ||||||||||||||||||||||||||
export default { | ||||||||||||||||||||||||||
schema: "eth", | ||||||||||||||||||||||||||
timestamp: 1699268447, | ||||||||||||||||||||||||||
hash: "0x8b8f908e63f04a22148ae0ef51e9ee7d9aa5827dec63c47af0d39672602957a1", | ||||||||||||||||||||||||||
from: "0x2fb82d8685df39695B3b13269CDf2A4ed8831958", | ||||||||||||||||||||||||||
to: "0xec554417Cb64C7433Bb2f84a46b9Ad633dD457c6", | ||||||||||||||||||||||||||
decimals: 18, | ||||||||||||||||||||||||||
quantity: "534789329758081000", | ||||||||||||||||||||||||||
quantityPretty: "0.534789329758081", | ||||||||||||||||||||||||||
tokenContract: "0x00000000000000000000000000000000000000", | ||||||||||||||||||||||||||
blockNumber: 18512507, | ||||||||||||||||||||||||||
blockHash: "0xf3ceecea34c273fbaa02a232034d7e4caea1dae3af2a0871139d574b5ffeb78d", | ||||||||||||||||||||||||||
'schema': 'native', | ||||||||||||||||||||||||||
'token': { | ||||||||||||||||||||||||||
'name': 'Ethereum', | ||||||||||||||||||||||||||
'symbol': 'ETH', | ||||||||||||||||||||||||||
'address': '0x0000000000000000000000000000000000000000', | ||||||||||||||||||||||||||
'decimals': '18', | ||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||
'from': '0xe892e6a588795df59a2d419b53f27bcb3545d348', | ||||||||||||||||||||||||||
'to': '0x5e73c5cf9422d6a59bf544dc524965634e21974a', | ||||||||||||||||||||||||||
'quantity': '14087534999169', | ||||||||||||||||||||||||||
'quantityPretty': '0.000014087534999169', | ||||||||||||||||||||||||||
'ordinal': '9102', | ||||||||||||||||||||||||||
'blockNumber': '22000025', | ||||||||||||||||||||||||||
'blockTimestamp': '1730789397', | ||||||||||||||||||||||||||
'blockHash': '0x5e5a08875cb617d1d1cf9f59ae323d1a138a01a9e05182e289dbe71b17a34178', | ||||||||||||||||||||||||||
'transactionHash': '0x73835ff56b880aefcaff653a10832a1eefa02c89cec905c5335b7168e2f9f4cc', | ||||||||||||||||||||||||||
'transactionIndex': '49' | ||||||||||||||||||||||||||
Comment on lines
+13
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Improve type safety and timestamp formatting. Consider the following improvements:
Example conversion: - 'ordinal': '9102',
- 'blockNumber': '22000025',
- 'blockTimestamp': '1730789397',
- 'transactionIndex': '49'
+ 'ordinal': 9102,
+ 'blockNumber': 22000025,
+ 'blockTimestamp': '2024-11-05T12:23:17Z',
+ 'transactionIndex': 49 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review the
decimals
field for ERC-1155 tokenERC-1155 tokens typically don't use decimals as they represent non-fungible or semi-fungible tokens. The inclusion of
decimals: '18'
seems incorrect and could lead to misinterpretation of token amounts.Consider removing the decimals field or setting it to '0':
📝 Committable suggestion