diff --git a/components/l3mbda/l3mbda.app.mjs b/components/l3mbda/l3mbda.app.mjs index 61521eb7cab69..1c0825bb1b236 100644 --- a/components/l3mbda/l3mbda.app.mjs +++ b/components/l3mbda/l3mbda.app.mjs @@ -31,7 +31,7 @@ export default { }, methods: { _baseUrl() { - return "https://l3mbda.com/integrations/pipedream"; + return "https://l3mbda.com/api/oracles"; }, _headers() { return { diff --git a/components/l3mbda/package.json b/components/l3mbda/package.json index 7c941cf899699..63c07795ad324 100644 --- a/components/l3mbda/package.json +++ b/components/l3mbda/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/l3mbda", - "version": "0.1.0", + "version": "0.1.2", "description": "Pipedream l3mbda Components", "main": "l3mbda.app.mjs", "keywords": [ diff --git a/components/l3mbda/sources/common/events.mjs b/components/l3mbda/sources/common/events.mjs index 2fb4a227d6804..925eb77306ed4 100644 --- a/components/l3mbda/sources/common/events.mjs +++ b/components/l3mbda/sources/common/events.mjs @@ -2,5 +2,5 @@ export default { ERC20_TRANSFER: "erc20-transfer", ERC721_TRANSFER: "erc721-transfer", ERC1155_TRANSFER: "erc1155-transfer", - ETH_TRANSFER: "eth-transfer", + NATIVE_TRANSFER: "native-transfer", }; diff --git a/components/l3mbda/sources/common/webhook.mjs b/components/l3mbda/sources/common/webhook.mjs index 8693260c31035..9c21dc330ba84 100644 --- a/components/l3mbda/sources/common/webhook.mjs +++ b/components/l3mbda/sources/common/webhook.mjs @@ -28,14 +28,13 @@ export default { }, createEndpoint(args = {}) { return this.app.post({ - path: "/endpoint", + path: "/simple", ...args, }); }, - deleteEndpoint(args = {}) { + deleteEndpoint(endpointId) { return this.app.delete({ - path: "/endpoint", - ...args, + path: `/${endpointId}`, }); }, getEvent() { @@ -80,16 +79,15 @@ export default { const response = await createEndpoint({ data: { - name: "Pipedream BLOCK", - description: "Pipedream & L3mbda Integration", - action: "webhook", - url: http.endpoint, + name: "Pipedream", + description: "Pipedream & L3MBDA Integration", event: getEvent(), filters: getFilters(), + url: http.endpoint, }, }); - setEndpointId(response.endpointId); + setEndpointId(response.id); }, async deactivate() { const { @@ -99,11 +97,7 @@ export default { const endpointId = getEndpointId(); if (endpointId) { - await deleteEndpoint({ - data: { - endpointId, - }, - }); + await deleteEndpoint(endpointId); } }, }, diff --git a/components/l3mbda/sources/new-erc-1155-transfer-instant/new-erc-1155-transfer-instant.mjs b/components/l3mbda/sources/new-erc-1155-transfer-instant/new-erc-1155-transfer-instant.mjs index 488e1a87994ee..163501e82a7ba 100644 --- a/components/l3mbda/sources/new-erc-1155-transfer-instant/new-erc-1155-transfer-instant.mjs +++ b/components/l3mbda/sources/new-erc-1155-transfer-instant/new-erc-1155-transfer-instant.mjs @@ -7,7 +7,7 @@ export default { key: "l3mbda-new-erc-1155-transfer-instant", name: "New ERC1155 NFT Transfer (Instant)", description: "Emit new event when a new ERC1155 NFT transfer is detected by [l3mbda.](https://l3mbda.com/)", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/l3mbda/sources/new-erc-1155-transfer-instant/test-event.mjs b/components/l3mbda/sources/new-erc-1155-transfer-instant/test-event.mjs index 3a43c683b90df..d8e5183b82e7a 100644 --- a/components/l3mbda/sources/new-erc-1155-transfer-instant/test-event.mjs +++ b/components/l3mbda/sources/new-erc-1155-transfer-instant/test-event.mjs @@ -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' } \ No newline at end of file diff --git a/components/l3mbda/sources/new-erc-20-transfer-instant/new-erc-20-transfer-instant.mjs b/components/l3mbda/sources/new-erc-20-transfer-instant/new-erc-20-transfer-instant.mjs index 425f5075ce7f8..a1e45eea50709 100644 --- a/components/l3mbda/sources/new-erc-20-transfer-instant/new-erc-20-transfer-instant.mjs +++ b/components/l3mbda/sources/new-erc-20-transfer-instant/new-erc-20-transfer-instant.mjs @@ -7,7 +7,7 @@ export default { key: "l3mbda-new-erc-20-transfer-instant", name: "New ERC20 Transfer (Instant)", description: "Emit new event when a new ERC20 transfer is detected by [l3mbda.](https://l3mbda.com/)", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/l3mbda/sources/new-erc-20-transfer-instant/test-event.mjs b/components/l3mbda/sources/new-erc-20-transfer-instant/test-event.mjs index 57eab3430264b..d994aa329ec9f 100644 --- a/components/l3mbda/sources/new-erc-20-transfer-instant/test-event.mjs +++ b/components/l3mbda/sources/new-erc-20-transfer-instant/test-event.mjs @@ -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', + 'blockHash': '0xdf29aef776ac19b239b2f64afe74df3666b8c4d3e219afdf5deff780e90cb472', + 'transactionHash': '0x38f8cb06ff0b8be535ee3d081c424718cef9b676716155de5c82fad879691e86', + 'transactionIndex': '137' } \ No newline at end of file diff --git a/components/l3mbda/sources/new-erc-721-transfer-instant/new-erc-721-transfer-instant.mjs b/components/l3mbda/sources/new-erc-721-transfer-instant/new-erc-721-transfer-instant.mjs index 5ee8ad2cbcaf3..95220d7d1c475 100644 --- a/components/l3mbda/sources/new-erc-721-transfer-instant/new-erc-721-transfer-instant.mjs +++ b/components/l3mbda/sources/new-erc-721-transfer-instant/new-erc-721-transfer-instant.mjs @@ -7,7 +7,7 @@ export default { key: "l3mbda-new-erc-721-transfer-instant", name: "New ERC721 NFT Transfer (Instant)", description: "Emit new event when a new ERC721 NFT transfer is detected by [l3mbda.](https://l3mbda.com/)", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/l3mbda/sources/new-erc-721-transfer-instant/test-event.mjs b/components/l3mbda/sources/new-erc-721-transfer-instant/test-event.mjs index 7700942a6c6d4..2fedcbbb7f491 100644 --- a/components/l3mbda/sources/new-erc-721-transfer-instant/test-event.mjs +++ b/components/l3mbda/sources/new-erc-721-transfer-instant/test-event.mjs @@ -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', + }, + 'from': '0x447cb0e7658de51238c953017a6b99d0eae65572', + 'to': '0xf2f8b9f61c21bf34c2d1390c4d434cfe178ee793', + 'tokenId': '80', + 'ordinal': '18062', + 'logIndex': '5', + 'blockNumber': '22797901', + 'blockTimestamp': '1732385149', + 'blockHash': '0xbb53cc05e03b2840d56da514bfebe21de2485e87234e9073870807d12d0b8626', + 'transactionHash': '0xdb90c932188ba766ef5147d7f1b2c0559e43f75e55328f08bfe75d2eb477f2e6', + 'transactionIndex': '88' } \ No newline at end of file diff --git a/components/l3mbda/sources/new-eth-transfer-instant/new-eth-transfer-instant.mjs b/components/l3mbda/sources/new-eth-transfer-instant/new-eth-transfer-instant.mjs index efee2ecbc6a95..dfefcf95545cb 100644 --- a/components/l3mbda/sources/new-eth-transfer-instant/new-eth-transfer-instant.mjs +++ b/components/l3mbda/sources/new-eth-transfer-instant/new-eth-transfer-instant.mjs @@ -3,10 +3,10 @@ import events from "../common/events.mjs"; import sampleEmit from "./test-event.mjs"; export default { - key: "l3mbda-new-eth-transfer-instant", - name: "New ETH Transfer (Instant)", - description: "Emit new event when a new ETH transfer is detected by [l3mbda.](https://l3mbda.com/)", - version: "0.0.1", + key: "l3mbda-new-native-transfer-instant", + name: "New Native Transfer (Instant)", + description: "Emit new event when a new native (ETH, POL) transfer is detected by [l3mbda.](https://l3mbda.com/)", + version: "0.0.3", type: "source", dedupe: "unique", props: { @@ -21,7 +21,7 @@ export default { methods: { ...common.methods, getEvent() { - return events.ERC1155_TRANSFER; + return events.NATIVE_TRANSFER; }, getFilters() { const { amount } = this; @@ -37,7 +37,7 @@ export default { return filters; }, getSummary({ logIndex }) { - return `New ETH Transfer: ${logIndex}`; + return `New Native Transfer: ${logIndex}`; }, }, sampleEmit, diff --git a/components/l3mbda/sources/new-eth-transfer-instant/test-event.mjs b/components/l3mbda/sources/new-eth-transfer-instant/test-event.mjs index 8b59d34b4b4c3..12a4591112f32 100644 --- a/components/l3mbda/sources/new-eth-transfer-instant/test-event.mjs +++ b/components/l3mbda/sources/new-eth-transfer-instant/test-event.mjs @@ -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' } \ No newline at end of file