From c2ac809c7336adad4413c3a3e9bab660bed29a93 Mon Sep 17 00:00:00 2001 From: Phil Buuza Date: Thu, 9 Jan 2025 15:53:39 +0000 Subject: [PATCH] Overledger upgrade (#15052) * overledger new actions added - read from smart contract and sign a transaction * Update components/overledger/actions/read-from-a-smart-contract/read-from-smart-contract.mjs Success message alteration to align with current context Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update components/overledger/actions/read-from-a-smart-contract/read-from-smart-contract.mjs inputParameters is an array of Objects so no need to parseObject Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * modified read from smart contract parameters * modified readfromsmart contract transaction, prepare-sign-execute transaction actions * modified readfromsmart contract transaction, prepare-sign-execute transaction actions * modified readfromsmart contract transaction, prepare-sign-execute transaction actions * modified readfromsmart contract transaction, prepare-sign-execute transaction actions * modified Overledger.app to add instance selection between Sandbox and Live Overledger * modified Overledger.app to add instance selection between Sandbox and Live Overledger - altered basURL in hook methods create and delete * comments added to explain actions modifications * added versioning updates to actions and overledger pckage.json. as well as component key adjustments to alin with pipedream requirements * code revisions made based on pull request review * added enironment prop to commmon sources file (base.mjs) and updated delete and creathooks to take in this param * fixed issue with sign-a-transaction default nativeData being undefined now is object * removal of default actions prop values on sign-transaction - stop error flag * tested and ammended read-from smart contract ans sign transcation to prevent failures * upgraded overledger urls sandbox and production to new .dev urls, changed polygon network option from mumbai to amoy * upgraded overledger urls sandbox and production to new .dev urls, changed polygon network option from mumbai to amoy * upgraded overledger urls sandbox and production to new .dev urls, changed polygon network option from mumbai to amoy - uppdated version * versioning update for overledger component to 1.0.0 due to API url change * updates * pnpm-lock.yaml --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Luan Cazarine Co-authored-by: michelle0927 --- .../execute-signed-transaction.mjs | 2 +- .../prepare-smart-contract-transaction.mjs | 2 +- .../read-from-a-smart-contract.mjs | 2 +- .../actions/sign-a-transaction/sign-a-transaction.mjs | 6 ++++-- components/overledger/common/constants.mjs | 4 +--- components/overledger/overledger.app.mjs | 4 ++-- components/overledger/package.json | 2 +- .../new-contract-event-instant.mjs | 2 +- .../watch-new-account-event-instant.mjs | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/components/overledger/actions/execute-signed-transaction/execute-signed-transaction.mjs b/components/overledger/actions/execute-signed-transaction/execute-signed-transaction.mjs index 6dde413c438be..7e21ea44c664c 100644 --- a/components/overledger/actions/execute-signed-transaction/execute-signed-transaction.mjs +++ b/components/overledger/actions/execute-signed-transaction/execute-signed-transaction.mjs @@ -4,7 +4,7 @@ export default { key: "overledger-execute-signed-transaction", name: "Execute Signed Transaction", description: "Executes a signed transaction by sending it to a blockchain node via Overledger. [See the documentation](https://developers.quant.network/reference/executesignedrequest)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { overledger, diff --git a/components/overledger/actions/prepare-smart-contract-transaction/prepare-smart-contract-transaction.mjs b/components/overledger/actions/prepare-smart-contract-transaction/prepare-smart-contract-transaction.mjs index 4fc0fb11ad5d2..5dedda399ff12 100644 --- a/components/overledger/actions/prepare-smart-contract-transaction/prepare-smart-contract-transaction.mjs +++ b/components/overledger/actions/prepare-smart-contract-transaction/prepare-smart-contract-transaction.mjs @@ -8,7 +8,7 @@ export default { key: "overledger-prepare-smart-contract-transaction", name: "Prepare Smart Contract Transaction", description: "Prepares a smart contract transaction for signing on the Overledger platform. [See the documentation](https://developers.quant.network/reference/preparesmartcontractwrite)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { overledger, diff --git a/components/overledger/actions/read-from-a-smart-contract/read-from-a-smart-contract.mjs b/components/overledger/actions/read-from-a-smart-contract/read-from-a-smart-contract.mjs index 5e4cab704bb74..d05977fb19136 100644 --- a/components/overledger/actions/read-from-a-smart-contract/read-from-a-smart-contract.mjs +++ b/components/overledger/actions/read-from-a-smart-contract/read-from-a-smart-contract.mjs @@ -8,7 +8,7 @@ export default { key: "overledger-read-from-a-smart-contract", name: "Read from a smart contract", description: "Reads data from a specified smart contract on the Overledger network.", - version: "0.0.1", + version: "0.0.2", type: "action", props: { overledger, diff --git a/components/overledger/actions/sign-a-transaction/sign-a-transaction.mjs b/components/overledger/actions/sign-a-transaction/sign-a-transaction.mjs index ca7edb523aac5..f24ac3c535d25 100644 --- a/components/overledger/actions/sign-a-transaction/sign-a-transaction.mjs +++ b/components/overledger/actions/sign-a-transaction/sign-a-transaction.mjs @@ -1,11 +1,13 @@ import overledger from "../../overledger.app.mjs"; -import { TECHNOLOGY_OPTIONS, UNIT_OPTIONS } from "../../common/constants.mjs"; +import { + TECHNOLOGY_OPTIONS, UNIT_OPTIONS, +} from "../../common/constants.mjs"; export default { key: "overledger-sign-a-transaction", name: "Sign a transaction", description: "Sign a transaction using Overledger - Part 2 of [Overledger Pattern](https://developers.quant.network/reference/overledger-pattern). [See documentation](https://developers.quant.network/reference/sandboxsigning)", - version: "0.0.1", + version: "0.0.3", type: "action", props: { overledger, diff --git a/components/overledger/common/constants.mjs b/components/overledger/common/constants.mjs index e9e8dd4a77959..58d8d0c621972 100644 --- a/components/overledger/common/constants.mjs +++ b/components/overledger/common/constants.mjs @@ -24,15 +24,13 @@ export const TECHNOLOGY_OPTIONS = [ export const NETWORK_OPTIONS = { "ethereum": [ "ethereum sepolia testnet", - "ethereum goerli testnet", "ethereum mainnet", - "polygon mumbai testnet", + "polygon amoy testnet", "polygon mainnet", "avalanche fuji testnet", "avalanche c-chain mainnet", "xdc apothem testnet", "xdc network mainnet", - "Defined on demand", ], "substrate": [ "polkadot westend", diff --git a/components/overledger/overledger.app.mjs b/components/overledger/overledger.app.mjs index d7f4e561f6569..794e845ed370a 100644 --- a/components/overledger/overledger.app.mjs +++ b/components/overledger/overledger.app.mjs @@ -27,8 +27,8 @@ export default { }, _getBaseUrl(environment) { //conditional for environment url selection. return environment === "sandbox" - ? "https://api.sandbox.overledger.io" - : "https://api.overledger.io"; + ? "https://api.sandbox.overledger.dev" + : "https://api.overledger.dev"; }, _makeRequest({ $ = this, environment, path, ...otherOpts diff --git a/components/overledger/package.json b/components/overledger/package.json index 7cb7ad307a8bb..e6ff12a98bcf5 100644 --- a/components/overledger/package.json +++ b/components/overledger/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/overledger", - "version": "0.2.0", + "version": "1.0.0", "description": "Pipedream Overledger Components", "main": "overledger.app.mjs", "keywords": [ diff --git a/components/overledger/sources/new-contract-event-instant/new-contract-event-instant.mjs b/components/overledger/sources/new-contract-event-instant/new-contract-event-instant.mjs index 1ea476ebfe6c8..32609a09817bc 100644 --- a/components/overledger/sources/new-contract-event-instant/new-contract-event-instant.mjs +++ b/components/overledger/sources/new-contract-event-instant/new-contract-event-instant.mjs @@ -6,7 +6,7 @@ export default { key: "overledger-new-contract-event-instant", name: "New Smart Contract Event (Instant)", description: "Emit new event when a smart contract releases a new event.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/overledger/sources/watch-new-account-event-instant/watch-new-account-event-instant.mjs b/components/overledger/sources/watch-new-account-event-instant/watch-new-account-event-instant.mjs index f0c29481e1883..75a43e58b8a01 100644 --- a/components/overledger/sources/watch-new-account-event-instant/watch-new-account-event-instant.mjs +++ b/components/overledger/sources/watch-new-account-event-instant/watch-new-account-event-instant.mjs @@ -6,7 +6,7 @@ export default { key: "overledger-watch-new-account-event-instant", name: "New Account Event (Instant)", description: "Emit new event for transactions to/from a specific account.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: {